aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-11-28 01:45:03 +0000
committerBart Polot <bart@net.in.tum.de>2013-11-28 01:45:03 +0000
commit133c2f9f2d93097848ce7420fcf86a4e6863db45 (patch)
treeef0b7d8d63eca96003e48f1c9b6c73895cdfcdc4 /src
parent69b47f0c65a68e8731af238246b1b29121117d7c (diff)
downloadgnunet-133c2f9f2d93097848ce7420fcf86a4e6863db45.tar.gz
gnunet-133c2f9f2d93097848ce7420fcf86a4e6863db45.zip
- use new keepalive message type
Diffstat (limited to 'src')
-rw-r--r--src/mesh/gnunet-service-mesh_connection.c4
-rw-r--r--src/mesh/gnunet-service-mesh_peer.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c
index 10fcb7b11..d264cfb32 100644
--- a/src/mesh/gnunet-service-mesh_connection.c
+++ b/src/mesh/gnunet-service-mesh_connection.c
@@ -742,7 +742,6 @@ send_broken (struct MeshConnection *c,
742} 742}
743 743
744 744
745
746/** 745/**
747 * Send keepalive packets for a connection. 746 * Send keepalive packets for a connection.
748 * 747 *
@@ -766,6 +765,7 @@ connection_keepalive (struct MeshConnection *c, int fwd)
766 msg->header.size = htons (size); 765 msg->header.size = htons (size);
767 msg->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_KEEPALIVE); 766 msg->header.type = htons (GNUNET_MESSAGE_TYPE_MESH_KEEPALIVE);
768 msg->cid = c->id; 767 msg->cid = c->id;
768 msg->reserved = htonl (0);
769 769
770 GMC_send_prebuilt_message (&msg->header, c, fwd, NULL, NULL); 770 GMC_send_prebuilt_message (&msg->header, c, fwd, NULL, NULL);
771} 771}
@@ -2529,6 +2529,7 @@ GMC_send_prebuilt_message (const struct GNUNET_MessageHeader *message,
2529 struct GNUNET_MESH_Poll *pmsg; 2529 struct GNUNET_MESH_Poll *pmsg;
2530 struct GNUNET_MESH_ConnectionDestroy *dmsg; 2530 struct GNUNET_MESH_ConnectionDestroy *dmsg;
2531 struct GNUNET_MESH_ConnectionBroken *bmsg; 2531 struct GNUNET_MESH_ConnectionBroken *bmsg;
2532 struct GNUNET_MESH_ConnectionKeepAlive *kamsg;
2532 uint32_t ttl; 2533 uint32_t ttl;
2533 2534
2534 case GNUNET_MESSAGE_TYPE_MESH_ENCRYPTED: 2535 case GNUNET_MESSAGE_TYPE_MESH_ENCRYPTED:
@@ -2587,6 +2588,7 @@ GMC_send_prebuilt_message (const struct GNUNET_MessageHeader *message,
2587 2588
2588 case GNUNET_MESSAGE_TYPE_MESH_CONNECTION_CREATE: 2589 case GNUNET_MESSAGE_TYPE_MESH_CONNECTION_CREATE:
2589 case GNUNET_MESSAGE_TYPE_MESH_CONNECTION_ACK: 2590 case GNUNET_MESSAGE_TYPE_MESH_CONNECTION_ACK:
2591 case GNUNET_MESSAGE_TYPE_MESH_KEEPALIVE:
2590 break; 2592 break;
2591 2593
2592 default: 2594 default:
diff --git a/src/mesh/gnunet-service-mesh_peer.c b/src/mesh/gnunet-service-mesh_peer.c
index 76296c198..4b0a95133 100644
--- a/src/mesh/gnunet-service-mesh_peer.c
+++ b/src/mesh/gnunet-service-mesh_peer.c
@@ -808,6 +808,7 @@ queue_send (void *cls, size_t size, void *buf)
808 { 808 {
809 case GNUNET_MESSAGE_TYPE_MESH_CONNECTION_DESTROY: 809 case GNUNET_MESSAGE_TYPE_MESH_CONNECTION_DESTROY:
810 case GNUNET_MESSAGE_TYPE_MESH_CONNECTION_BROKEN: 810 case GNUNET_MESSAGE_TYPE_MESH_CONNECTION_BROKEN:
811 case GNUNET_MESSAGE_TYPE_MESH_KEEPALIVE:
811 case GNUNET_MESSAGE_TYPE_MESH_ENCRYPTED: 812 case GNUNET_MESSAGE_TYPE_MESH_ENCRYPTED:
812 case GNUNET_MESSAGE_TYPE_MESH_KX: 813 case GNUNET_MESSAGE_TYPE_MESH_KX:
813 case GNUNET_MESSAGE_TYPE_MESH_ACK: 814 case GNUNET_MESSAGE_TYPE_MESH_ACK: