From ab857917861c0550e77752af5995859b3dbacd2a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 12 Apr 2010 20:09:45 +0000 Subject: [PATCH] fix --- src/transport/transport_api.c | 6 ++++-- 1 file 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) struct OutboundMessage obm; size_t ret; size_t mret; + size_t nret; char *cbuf; h->network_handle = NULL; @@ -546,9 +547,10 @@ transport_notify_ready (void *cls, size_t size, void *buf) GNUNET_CONTAINER_DLL_remove (h->control_head, h->control_tail, cm); - ret += cm->notify (cm->notify_cls, size, &cbuf[ret]); + nret = cm->notify (cm->notify_cls, size, &cbuf[ret]); GNUNET_free (cm); - size -= ret; + ret += nret; + size -= nret; } while ( (NULL != (th = schedule_peer_transmission (h))) && (th->notify_size <= size) ) -- 2.25.1