[hipl-commit] [tiny] Rev 3631: Removed unneede switch statement in CLOSE handling.

  • From: Tim Just <tim.just@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Fri, 5 Mar 2010 20:46:32 +0200

Committer: Tim Just <tim.just@xxxxxxxxxxxxxx>
Date: Fri Mar 05 19:45:16 2010 +0100
Revision: 3631
Revision-id: tim.just@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: tiny

Log:
  Removed unneede switch statement in CLOSE handling.
  
  hip_handle_close is only registered for the appropriate states. Therefore
  the check was pointless.

Modified:
  M  hipd/close.c

=== modified file 'hipd/close.c'
--- hipd/close.c        2010-03-05 17:28:01 +0000
+++ hipd/close.c        2010-03-05 18:45:16 +0000
@@ -197,16 +197,6 @@
              "No entry in host association database when receiving R2." \
              "Dropping.\n");
 
-    switch (ha_state) {
-    case HIP_STATE_ESTABLISHED:
-    case HIP_STATE_CLOSING:
-        /* Proceed with packet handling */
-        break;
-    default:
-        HIP_ERROR("Internal state (%d) is incorrect\n", ha_state);
-        goto out_err;
-    }
-
     /* verify HMAC */
     if (ctx->hadb_entry->is_loopback) {
         HIP_IFEL(hip_verify_packet_hmac(ctx->input_msg, 
&(ctx->hadb_entry)->hip_hmac_out),

Other related posts:

  • » [hipl-commit] [tiny] Rev 3631: Removed unneede switch statement in CLOSE handling. - Tim Just