aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-04-12 20:09:45 +0000
committerChristian Grothoff <christian@grothoff.org>2010-04-12 20:09:45 +0000
commitab857917861c0550e77752af5995859b3dbacd2a (patch)
tree39d215671e7686d7fc4a05c83b01eb4adb164603 /src/transport
parent28a523ab89a77fa5e9e4d6768b1cf4d15b1f630b (diff)
downloadgnunet-ab857917861c0550e77752af5995859b3dbacd2a.tar.gz
gnunet-ab857917861c0550e77752af5995859b3dbacd2a.zip
fix
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/transport_api.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c
index bfbaa2250..ef2538baf 100644
--- a/src/transport/transport_api.c
+++ b/src/transport/transport_api.c
@@ -521,6 +521,7 @@ transport_notify_ready (void *cls, size_t size, void *buf)
521 struct OutboundMessage obm; 521 struct OutboundMessage obm;
522 size_t ret; 522 size_t ret;
523 size_t mret; 523 size_t mret;
524 size_t nret;
524 char *cbuf; 525 char *cbuf;
525 526
526 h->network_handle = NULL; 527 h->network_handle = NULL;
@@ -546,9 +547,10 @@ transport_notify_ready (void *cls, size_t size, void *buf)
546 GNUNET_CONTAINER_DLL_remove (h->control_head, 547 GNUNET_CONTAINER_DLL_remove (h->control_head,
547 h->control_tail, 548 h->control_tail,
548 cm); 549 cm);
549 ret += cm->notify (cm->notify_cls, size, &cbuf[ret]); 550 nret = cm->notify (cm->notify_cls, size, &cbuf[ret]);
550 GNUNET_free (cm); 551 GNUNET_free (cm);
551 size -= ret; 552 ret += nret;
553 size -= nret;
552 } 554 }
553 while ( (NULL != (th = schedule_peer_transmission (h))) && 555 while ( (NULL != (th = schedule_peer_transmission (h))) &&
554 (th->notify_size <= size) ) 556 (th->notify_size <= size) )