diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-10-21 09:38:56 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-10-21 09:38:56 +0000 |
commit | 4e565fee331b196766fbde23b177cd8fd3d9c179 (patch) | |
tree | a9b460e1247a328536cc0826f3b7f4657d5a803d /src/ats | |
parent | 78ead844f692faca1508ebcba27ca12e496bc79b (diff) | |
download | gnunet-4e565fee331b196766fbde23b177cd8fd3d9c179.tar.gz gnunet-4e565fee331b196766fbde23b177cd8fd3d9c179.zip |
fixing mantis #18773
Diffstat (limited to 'src/ats')
-rw-r--r-- | src/ats/ats_api_scheduling.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/ats/ats_api_scheduling.c b/src/ats/ats_api_scheduling.c index 075d776e5..1dd7ad36f 100644 --- a/src/ats/ats_api_scheduling.c +++ b/src/ats/ats_api_scheduling.c | |||
@@ -209,6 +209,14 @@ transmit_message_to_ats (void *cls, | |||
209 | char *cbuf; | 209 | char *cbuf; |
210 | 210 | ||
211 | sh->th = NULL; | 211 | sh->th = NULL; |
212 | if ( (size == 0) || (buf == NULL)) | ||
213 | { | ||
214 | GNUNET_CLIENT_disconnect (sh->client, GNUNET_NO); | ||
215 | sh->client = NULL; | ||
216 | sh->task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, | ||
217 | &reconnect_task, sh); | ||
218 | return 0; | ||
219 | } | ||
212 | ret = 0; | 220 | ret = 0; |
213 | cbuf = buf; | 221 | cbuf = buf; |
214 | while ( (NULL != (p = sh->pending_head)) && | 222 | while ( (NULL != (p = sh->pending_head)) && |
@@ -251,7 +259,7 @@ do_transmit (struct GNUNET_ATS_SchedulingHandle *sh) | |||
251 | sh->th = GNUNET_CLIENT_notify_transmit_ready (sh->client, | 259 | sh->th = GNUNET_CLIENT_notify_transmit_ready (sh->client, |
252 | p->size, | 260 | p->size, |
253 | GNUNET_TIME_UNIT_FOREVER_REL, | 261 | GNUNET_TIME_UNIT_FOREVER_REL, |
254 | GNUNET_YES, | 262 | GNUNET_NO, |
255 | &transmit_message_to_ats, sh); | 263 | &transmit_message_to_ats, sh); |
256 | } | 264 | } |
257 | 265 | ||