diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2012-10-31 12:21:36 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2012-10-31 12:21:36 +0000 |
commit | 31ce803b2e7ffbb81ee3ed894c00c970cd74ab6a (patch) | |
tree | 84e8534b149ca2b4f97c4f22f859f1bfb91eabfa | |
parent | 94810d13be7951079987972e081373ed1621177e (diff) | |
download | gnunet-31ce803b2e7ffbb81ee3ed894c00c970cd74ab6a.tar.gz gnunet-31ce803b2e7ffbb81ee3ed894c00c970cd74ab6a.zip |
fix crashes when aborting testing drivers
-rw-r--r-- | src/testbed/gnunet-helper-testbed.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/testbed/gnunet-helper-testbed.c b/src/testbed/gnunet-helper-testbed.c index 0f9a76699..5fbe2a8c9 100644 --- a/src/testbed/gnunet-helper-testbed.c +++ b/src/testbed/gnunet-helper-testbed.c | |||
@@ -191,7 +191,13 @@ write_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
191 | bytes_wrote = | 191 | bytes_wrote = |
192 | GNUNET_DISK_file_write (stdout_fd, wc->data + wc->pos, | 192 | GNUNET_DISK_file_write (stdout_fd, wc->data + wc->pos, |
193 | wc->length - wc->pos); | 193 | wc->length - wc->pos); |
194 | GNUNET_assert (GNUNET_SYSERR != bytes_wrote); | 194 | if (GNUNET_SYSERR == bytes_wrote) |
195 | { | ||
196 | LOG (GNUNET_ERROR_TYPE_WARNING, "Cannot reply back configuration\n"); | ||
197 | GNUNET_free (wc->data); | ||
198 | GNUNET_free (wc); | ||
199 | return; | ||
200 | } | ||
195 | wc->pos += bytes_wrote; | 201 | wc->pos += bytes_wrote; |
196 | if (wc->pos == wc->length) | 202 | if (wc->pos == wc->length) |
197 | { | 203 | { |