aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-01-03 22:51:14 +0000
committerChristian Grothoff <christian@grothoff.org>2012-01-03 22:51:14 +0000
commit0bc020d2fe8fa8aa1e6896cd38c7b9d6c2311267 (patch)
treec4e9795e36241788f438b6b14dfb3a3c74f962d6 /src/util
parent2b8b0b0dac4286b5f935167b57db5255eab1681f (diff)
downloadgnunet-0bc020d2fe8fa8aa1e6896cd38c7b9d6c2311267.tar.gz
gnunet-0bc020d2fe8fa8aa1e6896cd38c7b9d6c2311267.zip
-misc DNS related bugfixes
Diffstat (limited to 'src/util')
-rw-r--r--src/util/crypto_crc.c2
-rw-r--r--src/util/helper.c8
2 files changed, 4 insertions, 6 deletions
diff --git a/src/util/crypto_crc.c b/src/util/crypto_crc.c
index c26541457..c6cd83a74 100644
--- a/src/util/crypto_crc.c
+++ b/src/util/crypto_crc.c
@@ -114,7 +114,6 @@ GNUNET_CRYPTO_crc32_n (const void *buf, size_t len)
114} 114}
115 115
116 116
117
118/** 117/**
119 * Perform an incremental step in a CRC16 (for TCP/IP) calculation. 118 * Perform an incremental step in a CRC16 (for TCP/IP) calculation.
120 * 119 *
@@ -126,7 +125,6 @@ GNUNET_CRYPTO_crc32_n (const void *buf, size_t len)
126uint32_t 125uint32_t
127GNUNET_CRYPTO_crc16_step (uint32_t sum, uint16_t * hdr, size_t len) 126GNUNET_CRYPTO_crc16_step (uint32_t sum, uint16_t * hdr, size_t len)
128{ 127{
129 GNUNET_assert (0 == (len & 1));
130 for (; len >= 2; len -= 2) 128 for (; len >= 2; len -= 2)
131 sum += *(hdr++); 129 sum += *(hdr++);
132 if (len == 1) 130 if (len == 1)
diff --git a/src/util/helper.c b/src/util/helper.c
index e5c3be08f..d4d26ba51 100644
--- a/src/util/helper.c
+++ b/src/util/helper.c
@@ -152,7 +152,7 @@ stop_helper (struct GNUNET_HELPER_Handle *h)
152 152
153 if (NULL != h->helper_proc) 153 if (NULL != h->helper_proc)
154 { 154 {
155 GNUNET_OS_process_kill (h->helper_proc, SIGKILL); 155 GNUNET_OS_process_kill (h->helper_proc, SIGTERM);
156 GNUNET_OS_process_wait (h->helper_proc); 156 GNUNET_OS_process_wait (h->helper_proc);
157 GNUNET_OS_process_close (h->helper_proc); 157 GNUNET_OS_process_close (h->helper_proc);
158 h->helper_proc = NULL; 158 h->helper_proc = NULL;
@@ -247,16 +247,16 @@ helper_read (void *cls,
247 } 247 }
248 if (0 == t) 248 if (0 == t)
249 { 249 {
250 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 250 /* this happens if the helper is shut down via a
251 signal, so it is not a "hard" error */
252 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
251 _("Got 0 bytes from helper `%s' (EOF)\n"), 253 _("Got 0 bytes from helper `%s' (EOF)\n"),
252 h->binary_name); 254 h->binary_name);
253#if 0
254 stop_helper (h); 255 stop_helper (h);
255 /* Restart the helper */ 256 /* Restart the helper */
256 h->restart_task = 257 h->restart_task =
257 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, 258 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
258 &restart_task, h); 259 &restart_task, h);
259#endif
260 return; 260 return;
261 } 261 }
262 if (GNUNET_SYSERR == 262 if (GNUNET_SYSERR ==