[hipl-commit] [tiny] Rev 3660: Simplified initialization of heartbeat_counter and removed debug output.

  • From: Tim Just <tim.just@xxxxxxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Thu, 11 Mar 2010 18:13:08 +0200

Committer: Tim Just <tim.just@xxxxxxxxxxxxxx>
Date: Thu Mar 11 17:12:41 2010 +0100
Revision: 3660
Revision-id: tim.just@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: tiny

Log:
  Simplified initialization of heartbeat_counter and removed debug output.

Modified:
  M  modules/heartbeat/hipd/heartbeat.c

=== modified file 'modules/heartbeat/hipd/heartbeat.c'
--- modules/heartbeat/hipd/heartbeat.c  2010-03-11 14:08:33 +0000
+++ modules/heartbeat/hipd/heartbeat.c  2010-03-11 16:12:41 +0000
@@ -12,7 +12,7 @@
 #define HIP_HEARTBEAT_INTERVAL 20
 
 int hip_icmp_sock     = 0;
-int heartbeat_counter = 0;
+int heartbeat_counter = HIP_HEARTBEAT_INTERVAL;
 
 /**
  * This function sends ICMPv6 echo with timestamp to dsthit
@@ -124,8 +124,6 @@
 {
     int err = 0;
 
-    HIP_DEBUG("\n\nhandle icmp sock\n\n");
-
     HIP_IFEL(hip_icmp_recvmsg(hip_icmp_sock), -1,
              "Failed to recvmsg from ICMPv6\n");
 
@@ -317,9 +315,6 @@
     hip_register_maint_function(&hip_heartbeat_maintenance, 10000);
     hip_register_socket(hip_icmp_sock, &hip_heartbeat_handle_icmp_sock, 30000);
 
-    /* Make sure that hipd does not send icmpv6 immediately after base 
exchange */
-    heartbeat_counter = HIP_HEARTBEAT_INTERVAL;
-
     *icmpsockfd       = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
     hip_set_cloexec_flag(*icmpsockfd, 1);
     HIP_IFEL(*icmpsockfd <= 0, 1, "ICMPv6 socket creation failed\n");

Other related posts:

  • » [hipl-commit] [tiny] Rev 3660: Simplified initialization of heartbeat_counter and removed debug output. - Tim Just