- initialize recv pid, reset on reconncet
authorBart Polot <bart@net.in.tum.de>
Sat, 18 Aug 2012 02:35:52 +0000 (02:35 +0000)
committerBart Polot <bart@net.in.tum.de>
Sat, 18 Aug 2012 02:35:52 +0000 (02:35 +0000)
src/mesh/mesh_api.c

index 2f6ac26a1d526c9f6c933e82a62704efa65335c1..412180aa55045bafb2bcced33197c4efebeb7ef7 100644 (file)
@@ -455,6 +455,7 @@ create_tunnel (struct GNUNET_MESH_Handle *h, MESH_TunnelNumber tid)
     t->tid = tid;
   }
   t->max_send_pid = 0;
+  t->last_recv_pid = (uint32_t) -1;
   return t;
 }
 
@@ -835,6 +836,9 @@ do_reconnect (struct GNUNET_MESH_Handle *h)
        */
       continue;
     }
+    t->next_send_pid = 0;
+    t->max_send_pid = 0;
+    t->last_recv_pid = (uint32_t) -1;
     tmsg.header.type = htons (GNUNET_MESSAGE_TYPE_MESH_LOCAL_TUNNEL_CREATE);
     tmsg.header.size = htons (sizeof (struct GNUNET_MESH_TunnelMessage));
     tmsg.tunnel_id = htonl (t->tid);