Change keepalive packets to explicit message type number
authorBart Polot <bart@net.in.tum.de>
Tue, 18 Oct 2011 15:40:57 +0000 (15:40 +0000)
committerBart Polot <bart@net.in.tum.de>
Tue, 18 Oct 2011 15:40:57 +0000 (15:40 +0000)
src/include/gnunet_protocols.h
src/mesh/gnunet-service-mesh.c

index d611927107d965dd83af04e46f93e475f9e8e621..d65a91911aa79361c8b5176835989cda30551f1e 100644 (file)
@@ -824,6 +824,11 @@ extern "C"
  */
 #define GNUNET_MESSAGE_TYPE_MESH_PATH_ACK               263
 
+/**
+ * Avoid path timeouts
+ */
+#define GNUNET_MESSAGE_TYPE_MESH_PATH_KEEPALIVE         264
+
 /**
  * We need flow control
  */
index 8ee55c845928a3caf6b7dc4c7f09b91f6da99624..486684507d00128a130af63aab7a6b720992adfa 100644 (file)
@@ -2182,9 +2182,9 @@ send_p2p_tunnel_destroy (void *cls, size_t size, void *buf)
  * @param message message
  * @param peer peer identity this notification is about
  * @param atsi performance data
+ * 
  * @return GNUNET_OK to keep the connection open,
  *         GNUNET_SYSERR to close it (signal serious error)
- *
  */
 static int
 handle_mesh_path_create (void *cls, const struct GNUNET_PeerIdentity *peer,
@@ -2772,7 +2772,7 @@ path_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   msg->tid = htonl(t->id.tid);
   payload = (struct GNUNET_MessageHeader *) &msg[1];
   payload->size = htons (sizeof(struct GNUNET_MessageHeader));
-  payload->type = htons (GNUNET_MESSAGE_TYPE_MESH_PATH_CREATE);
+  payload->type = htons (GNUNET_MESSAGE_TYPE_MESH_PATH_KEEPALIVE);
   tunnel_send_multicast (t, &msg->header);
 
   t->path_refresh_task =