diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/crypto_hash.c | 2 | ||||
-rw-r--r-- | src/util/gnunet-qr.c | 7 | ||||
-rw-r--r-- | src/util/gnunet-uri.c | 2 | ||||
-rw-r--r-- | src/util/mq.c | 6 |
4 files changed, 12 insertions, 5 deletions
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c index 0dbe9dbe8..94b6f5099 100644 --- a/src/util/crypto_hash.c +++ b/src/util/crypto_hash.c | |||
@@ -94,7 +94,7 @@ GNUNET_CRYPTO_hash_to_enc (const struct GNUNET_HashCode *block, | |||
94 | * @param result where to store the hash code | 94 | * @param result where to store the hash code |
95 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if result has the wrong encoding | 95 | * @return #GNUNET_OK on success, #GNUNET_SYSERR if result has the wrong encoding |
96 | */ | 96 | */ |
97 | int | 97 | enum GNUNET_GenericReturnValue |
98 | GNUNET_CRYPTO_hash_from_string2 (const char *enc, | 98 | GNUNET_CRYPTO_hash_from_string2 (const char *enc, |
99 | size_t enclen, | 99 | size_t enclen, |
100 | struct GNUNET_HashCode *result) | 100 | struct GNUNET_HashCode *result) |
diff --git a/src/util/gnunet-qr.c b/src/util/gnunet-qr.c index 83b2af2fc..451d61d40 100644 --- a/src/util/gnunet-qr.c +++ b/src/util/gnunet-qr.c | |||
@@ -36,7 +36,7 @@ | |||
36 | /** | 36 | /** |
37 | * Video device to capture from. Sane default for GNU/Linux systems. | 37 | * Video device to capture from. Sane default for GNU/Linux systems. |
38 | */ | 38 | */ |
39 | static char *device = "/dev/video0"; | 39 | static char *device; |
40 | 40 | ||
41 | /** | 41 | /** |
42 | * --verbose option | 42 | * --verbose option |
@@ -51,7 +51,7 @@ static int silent = false; | |||
51 | /** | 51 | /** |
52 | * Handler exit code | 52 | * Handler exit code |
53 | */ | 53 | */ |
54 | static long unsigned int exit_code = 1; | 54 | static long unsigned int exit_code = 0; |
55 | 55 | ||
56 | /** | 56 | /** |
57 | * Helper process we started. | 57 | * Helper process we started. |
@@ -228,6 +228,8 @@ get_symbol (zbar_processor_t *proc) | |||
228 | } | 228 | } |
229 | 229 | ||
230 | /* initialize the Processor */ | 230 | /* initialize the Processor */ |
231 | if (NULL == device) | ||
232 | device = GNUNET_strdup ("/dev/video0"); | ||
231 | if (0 != (rc = zbar_processor_init (proc, device, 1))) | 233 | if (0 != (rc = zbar_processor_init (proc, device, 1))) |
232 | { | 234 | { |
233 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 235 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
@@ -306,6 +308,7 @@ run_zbar () | |||
306 | ret = GNUNET_strdup (data); | 308 | ret = GNUNET_strdup (data); |
307 | /* clean up */ | 309 | /* clean up */ |
308 | zbar_processor_destroy (proc); | 310 | zbar_processor_destroy (proc); |
311 | GNUNET_free (device); | ||
309 | return ret; | 312 | return ret; |
310 | } | 313 | } |
311 | 314 | ||
diff --git a/src/util/gnunet-uri.c b/src/util/gnunet-uri.c index 9443c9120..de0ff1f92 100644 --- a/src/util/gnunet-uri.c +++ b/src/util/gnunet-uri.c | |||
@@ -29,7 +29,7 @@ | |||
29 | /** | 29 | /** |
30 | * Handler exit code | 30 | * Handler exit code |
31 | */ | 31 | */ |
32 | static long unsigned int exit_code = 1; | 32 | static long unsigned int exit_code = 0; |
33 | 33 | ||
34 | /** | 34 | /** |
35 | * Helper process we started. | 35 | * Helper process we started. |
diff --git a/src/util/mq.c b/src/util/mq.c index 302b310de..29ead02a4 100644 --- a/src/util/mq.c +++ b/src/util/mq.c | |||
@@ -273,7 +273,7 @@ GNUNET_MQ_handle_message (const struct GNUNET_MQ_MessageHandler *handlers, | |||
273 | break; | 273 | break; |
274 | } | 274 | } |
275 | } | 275 | } |
276 | done: | 276 | done: |
277 | if (GNUNET_NO == handled) | 277 | if (GNUNET_NO == handled) |
278 | { | 278 | { |
279 | LOG (GNUNET_ERROR_TYPE_INFO, | 279 | LOG (GNUNET_ERROR_TYPE_INFO, |
@@ -355,6 +355,10 @@ void | |||
355 | GNUNET_MQ_send (struct GNUNET_MQ_Handle *mq, | 355 | GNUNET_MQ_send (struct GNUNET_MQ_Handle *mq, |
356 | struct GNUNET_MQ_Envelope *ev) | 356 | struct GNUNET_MQ_Envelope *ev) |
357 | { | 357 | { |
358 | if (NULL == mq) | ||
359 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
360 | "mq is NUll when sending message of type %u\n", | ||
361 | (unsigned int) ntohs (ev->mh->type)); | ||
358 | GNUNET_assert (NULL != mq); | 362 | GNUNET_assert (NULL != mq); |
359 | GNUNET_assert (NULL == ev->parent_queue); | 363 | GNUNET_assert (NULL == ev->parent_queue); |
360 | 364 | ||