aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-02-02 13:14:54 +0000
committerChristian Grothoff <christian@grothoff.org>2010-02-02 13:14:54 +0000
commit7ee6a59d70aa5a83da74c73fae4e144f749332a8 (patch)
tree7ba64bb1a29218215cc4ffc15a3d6e8f35b30406 /src
parentbc79d05e558c72ec9d8b0a88755c1f4c8ab3e00f (diff)
downloadgnunet-7ee6a59d70aa5a83da74c73fae4e144f749332a8.tar.gz
gnunet-7ee6a59d70aa5a83da74c73fae4e144f749332a8.zip
fixing leaks
Diffstat (limited to 'src')
-rw-r--r--src/transport/gnunet-service-transport.c3
-rw-r--r--src/transport/transport_api.c9
2 files changed, 5 insertions, 7 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 81945c511..6fb1f0b38 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -1710,7 +1710,7 @@ handle_pong (void *cls, const struct GNUNET_MessageHeader *message,
1710 struct ValidationList *pos; 1710 struct ValidationList *pos;
1711 struct ValidationAddress *va; 1711 struct ValidationAddress *va;
1712 struct GNUNET_PeerIdentity id; 1712 struct GNUNET_PeerIdentity id;
1713 struct TransportPongMessage *pong = (struct TransportPongMessage *)message; 1713 const struct TransportPongMessage *pong = (const struct TransportPongMessage *)message;
1714 int count = 0; 1714 int count = 0;
1715 unsigned int challenge = ntohl(pong->challenge); 1715 unsigned int challenge = ntohl(pong->challenge);
1716 pos = pending_validations; 1716 pos = pending_validations;
@@ -2335,7 +2335,6 @@ static int handle_ping(void *cls, const struct GNUNET_MessageHeader *message,
2335 struct PeerAddressList *peer_address; 2335 struct PeerAddressList *peer_address;
2336 uint16_t msize; 2336 uint16_t msize;
2337 struct NeighborList *n; 2337 struct NeighborList *n;
2338 pong = GNUNET_malloc(sizeof(struct TransportPongMessage));
2339 2338
2340#if DEBUG_TRANSPORT 2339#if DEBUG_TRANSPORT
2341 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, 2340 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK,
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c
index bd9e11270..347842e52 100644
--- a/src/transport/transport_api.c
+++ b/src/transport/transport_api.c
@@ -1623,7 +1623,7 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg)
1623 "Receiving `%s' message for `%4s'.\n", 1623 "Receiving `%s' message for `%4s'.\n",
1624 "CONNECT", GNUNET_i2s (&cim->id)); 1624 "CONNECT", GNUNET_i2s (&cim->id));
1625#endif 1625#endif
1626 if (find_neighbour(h, &cim->id) == NULL) 1626 if (NULL == (n = find_neighbour(h, &cim->id)))
1627 { 1627 {
1628#if DEBUG_TRANSPORT 1628#if DEBUG_TRANSPORT
1629 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1629 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1636,11 +1636,10 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg)
1636 else 1636 else
1637 { 1637 {
1638#if DEBUG_TRANSPORT 1638#if DEBUG_TRANSPORT
1639 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1639 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1640 "Do know neighbor, scheduling transmission!\n"); 1640 "Do know neighbor, scheduling transmission!\n");
1641#endif 1641#endif
1642 n = find_neighbour(h, &cim->id); 1642 n->received_ack = GNUNET_YES;
1643 n->received_ack = GNUNET_YES;
1644 if (NULL != n->transmit_handle) 1643 if (NULL != n->transmit_handle)
1645 { 1644 {
1646#if DEBUG_TRANSPORT 1645#if DEBUG_TRANSPORT