diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/multicast/multicast_api.c | 6 | ||||
-rw-r--r-- | src/psyc/gnunet-service-psyc.c | 12 | ||||
-rw-r--r-- | src/psyc/test_psyc.c | 18 | ||||
-rw-r--r-- | src/psycstore/test_psycstore.c | 24 |
4 files changed, 35 insertions, 25 deletions
diff --git a/src/multicast/multicast_api.c b/src/multicast/multicast_api.c index 75b2d8852..f5c8c3d34 100644 --- a/src/multicast/multicast_api.c +++ b/src/multicast/multicast_api.c | |||
@@ -1124,7 +1124,8 @@ GNUNET_MULTICAST_member_replay_fragment (struct GNUNET_MULTICAST_Member *mem, | |||
1124 | uint64_t flags) | 1124 | uint64_t flags) |
1125 | { | 1125 | { |
1126 | member_replay_request (mem, fragment_id, 0, 0, flags); | 1126 | member_replay_request (mem, fragment_id, 0, 0, flags); |
1127 | // FIXME: return | 1127 | // FIXME: return something useful |
1128 | return NULL; | ||
1128 | } | 1129 | } |
1129 | 1130 | ||
1130 | 1131 | ||
@@ -1153,7 +1154,8 @@ GNUNET_MULTICAST_member_replay_message (struct GNUNET_MULTICAST_Member *mem, | |||
1153 | uint64_t flags) | 1154 | uint64_t flags) |
1154 | { | 1155 | { |
1155 | member_replay_request (mem, 0, message_id, fragment_offset, flags); | 1156 | member_replay_request (mem, 0, message_id, fragment_offset, flags); |
1156 | // FIXME: return | 1157 | // FIXME: return something useful |
1158 | return NULL; | ||
1157 | } | 1159 | } |
1158 | 1160 | ||
1159 | 1161 | ||
diff --git a/src/psyc/gnunet-service-psyc.c b/src/psyc/gnunet-service-psyc.c index 792164b95..9106e8731 100644 --- a/src/psyc/gnunet-service-psyc.c +++ b/src/psyc/gnunet-service-psyc.c | |||
@@ -856,18 +856,23 @@ store_recv_fragment_replay_result (void *cls, int64_t result, | |||
856 | case GNUNET_NO: | 856 | case GNUNET_NO: |
857 | GNUNET_MULTICAST_replay_response (rh, NULL, | 857 | GNUNET_MULTICAST_replay_response (rh, NULL, |
858 | GNUNET_MULTICAST_REC_NOT_FOUND); | 858 | GNUNET_MULTICAST_REC_NOT_FOUND); |
859 | break; | 859 | return; |
860 | 860 | ||
861 | case GNUNET_PSYCSTORE_MEMBERSHIP_TEST_FAILED: | 861 | case GNUNET_PSYCSTORE_MEMBERSHIP_TEST_FAILED: |
862 | GNUNET_MULTICAST_replay_response (rh, NULL, | 862 | GNUNET_MULTICAST_replay_response (rh, NULL, |
863 | GNUNET_MULTICAST_REC_ACCESS_DENIED); | 863 | GNUNET_MULTICAST_REC_ACCESS_DENIED); |
864 | break; | 864 | return; |
865 | 865 | ||
866 | case GNUNET_SYSERR: | 866 | case GNUNET_SYSERR: |
867 | GNUNET_MULTICAST_replay_response (rh, NULL, | 867 | GNUNET_MULTICAST_replay_response (rh, NULL, |
868 | GNUNET_MULTICAST_REC_INTERNAL_ERROR); | 868 | GNUNET_MULTICAST_REC_INTERNAL_ERROR); |
869 | return; | 869 | return; |
870 | } | 870 | } |
871 | /* GNUNET_MULTICAST_replay_response frees 'rh' when passed | ||
872 | * an error code, so it must be ensured no further processing | ||
873 | * is attempted on 'rh'. Maybe this should be refactored as | ||
874 | * it doesn't look very intuitive. --lynX | ||
875 | */ | ||
871 | GNUNET_MULTICAST_replay_response_end (rh); | 876 | GNUNET_MULTICAST_replay_response_end (rh); |
872 | } | 877 | } |
873 | 878 | ||
@@ -2269,6 +2274,9 @@ client_recv_psyc_message (void *cls, struct GNUNET_SERVER_Client *client, | |||
2269 | uint16_t size = ntohs (msg->size); | 2274 | uint16_t size = ntohs (msg->size); |
2270 | if (GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD < size - sizeof (*msg)) | 2275 | if (GNUNET_MULTICAST_FRAGMENT_MAX_PAYLOAD < size - sizeof (*msg)) |
2271 | { | 2276 | { |
2277 | /* Coverity says this printf has incompatible args | ||
2278 | * but I don't see anything wrong with it.. FIXME | ||
2279 | */ | ||
2272 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 2280 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
2273 | "%p Message payload too large: %u < %u.\n", | 2281 | "%p Message payload too large: %u < %u.\n", |
2274 | chn, | 2282 | chn, |
diff --git a/src/psyc/test_psyc.c b/src/psyc/test_psyc.c index 9797a96b5..329ad5b25 100644 --- a/src/psyc/test_psyc.c +++ b/src/psyc/test_psyc.c | |||
@@ -350,7 +350,7 @@ slave_state_get_prefix_result (void *cls, int64_t result, | |||
350 | const void *err_msg, uint16_t err_msg_size) | 350 | const void *err_msg, uint16_t err_msg_size) |
351 | { | 351 | { |
352 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 352 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
353 | "slave_state_get_prefix:\t%" PRId64 " (%.s)\n", | 353 | "slave_state_get_prefix:\t%" PRId64 " (%.*s)\n", |
354 | result, | 354 | result, |
355 | (int) err_msg_size, | 355 | (int) err_msg_size, |
356 | (const char *) err_msg); | 356 | (const char *) err_msg); |
@@ -376,7 +376,7 @@ master_state_get_prefix_result (void *cls, int64_t result, | |||
376 | const void *err_msg, uint16_t err_msg_size) | 376 | const void *err_msg, uint16_t err_msg_size) |
377 | { | 377 | { |
378 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 378 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
379 | "master_state_get_prefix:\t%" PRId64 " (%s)\n", result, err_msg); | 379 | "master_state_get_prefix:\t%" PRId64 " (%s)\n", result, (char *) err_msg); |
380 | // FIXME: GNUNET_assert (2 == result); | 380 | // FIXME: GNUNET_assert (2 == result); |
381 | slave_state_get_prefix (); | 381 | slave_state_get_prefix (); |
382 | } | 382 | } |
@@ -400,7 +400,7 @@ slave_state_get_result (void *cls, int64_t result, | |||
400 | { | 400 | { |
401 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 401 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
402 | "slave_state_get:\t%" PRId64 " (%.*s)\n", | 402 | "slave_state_get:\t%" PRId64 " (%.*s)\n", |
403 | result, err_msg_size, err_msg); | 403 | result, err_msg_size, (char *) err_msg); |
404 | // FIXME: GNUNET_assert (2 == result); | 404 | // FIXME: GNUNET_assert (2 == result); |
405 | master_state_get_prefix (); | 405 | master_state_get_prefix (); |
406 | } | 406 | } |
@@ -424,7 +424,7 @@ master_state_get_result (void *cls, int64_t result, | |||
424 | { | 424 | { |
425 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 425 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
426 | "master_state_get:\t%" PRId64 " (%.*s)\n", | 426 | "master_state_get:\t%" PRId64 " (%.*s)\n", |
427 | result, err_msg_size, err_msg); | 427 | result, err_msg_size, (char *) err_msg); |
428 | // FIXME: GNUNET_assert (1 == result); | 428 | // FIXME: GNUNET_assert (1 == result); |
429 | slave_state_get (); | 429 | slave_state_get (); |
430 | } | 430 | } |
@@ -538,7 +538,7 @@ master_history_replay_latest_result (void *cls, int64_t result, | |||
538 | { | 538 | { |
539 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 539 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
540 | "master_history_replay_latest:\t%" PRId64 " (%.*s)\n", | 540 | "master_history_replay_latest:\t%" PRId64 " (%.*s)\n", |
541 | result, err_msg_size, err_msg); | 541 | result, err_msg_size, (char *) err_msg); |
542 | GNUNET_assert (9 == result); | 542 | GNUNET_assert (9 == result); |
543 | 543 | ||
544 | slave_history_replay_latest (); | 544 | slave_history_replay_latest (); |
@@ -619,7 +619,7 @@ tmit_notify_mod (void *cls, uint16_t *data_size, void *data, uint8_t *oper, | |||
619 | { | 619 | { |
620 | struct TransmitClosure *tmit = cls; | 620 | struct TransmitClosure *tmit = cls; |
621 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 621 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
622 | "Test #%d: Transmit notify modifier: %lu bytes available, " | 622 | "Test #%d: Transmit notify modifier: %u bytes available, " |
623 | "%u modifiers left to process.\n", | 623 | "%u modifiers left to process.\n", |
624 | test, *data_size, GNUNET_PSYC_env_get_count (tmit->env)); | 624 | test, *data_size, GNUNET_PSYC_env_get_count (tmit->env)); |
625 | 625 | ||
@@ -723,7 +723,7 @@ slave_remove_cb (void *cls, int64_t result, | |||
723 | { | 723 | { |
724 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 724 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
725 | "slave_remove:\t%" PRId64 " (%.*s)\n", | 725 | "slave_remove:\t%" PRId64 " (%.*s)\n", |
726 | result, err_msg_size, err_msg); | 726 | result, err_msg_size, (char *) err_msg); |
727 | 727 | ||
728 | slave_transmit (); | 728 | slave_transmit (); |
729 | } | 729 | } |
@@ -745,7 +745,7 @@ slave_add_cb (void *cls, int64_t result, | |||
745 | { | 745 | { |
746 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, | 746 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, |
747 | "slave_add:\t%" PRId64 " (%.*s)\n", | 747 | "slave_add:\t%" PRId64 " (%.*s)\n", |
748 | result, err_msg_size, err_msg); | 748 | result, err_msg_size, (char *) err_msg); |
749 | slave_remove (); | 749 | slave_remove (); |
750 | } | 750 | } |
751 | 751 | ||
@@ -837,7 +837,7 @@ static void | |||
837 | slave_join (int t) | 837 | slave_join (int t) |
838 | { | 838 | { |
839 | test = t; | 839 | test = t; |
840 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Test #%d: Joining slave.\n"); | 840 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Test #%d: Joining slave.\n", t); |
841 | 841 | ||
842 | struct GNUNET_PeerIdentity origin = this_peer; | 842 | struct GNUNET_PeerIdentity origin = this_peer; |
843 | struct GNUNET_PSYC_Environment *env = GNUNET_PSYC_env_create (); | 843 | struct GNUNET_PSYC_Environment *env = GNUNET_PSYC_env_create (); |
diff --git a/src/psycstore/test_psycstore.c b/src/psycstore/test_psycstore.c index f9a7ce9ca..6741858ee 100644 --- a/src/psycstore/test_psycstore.c +++ b/src/psycstore/test_psycstore.c | |||
@@ -195,7 +195,7 @@ state_result (void *cls, | |||
195 | { | 195 | { |
196 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 196 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
197 | " variable %s differs\nReceived: %.*s\nExpected: %.*s\n", | 197 | " variable %s differs\nReceived: %.*s\nExpected: %.*s\n", |
198 | name, value_size, value, val_size, val); | 198 | name, value_size, (char*) value, val_size, (char*) val); |
199 | GNUNET_assert (0); | 199 | GNUNET_assert (0); |
200 | return GNUNET_SYSERR; | 200 | return GNUNET_SYSERR; |
201 | } | 201 | } |
@@ -208,7 +208,7 @@ state_get_prefix_result (void *cls, int64_t result, | |||
208 | { | 208 | { |
209 | struct StateClosure *scls = cls; | 209 | struct StateClosure *scls = cls; |
210 | op = NULL; | 210 | op = NULL; |
211 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "state_get_prefix_result:\t%d\n", result); | 211 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "state_get_prefix_result:\t%ld\n", (long int) result); |
212 | GNUNET_assert (GNUNET_OK == result && 2 == scls->n); | 212 | GNUNET_assert (GNUNET_OK == result && 2 == scls->n); |
213 | 213 | ||
214 | op = GNUNET_PSYCSTORE_state_reset (h, &channel_pub_key, | 214 | op = GNUNET_PSYCSTORE_state_reset (h, &channel_pub_key, |
@@ -221,7 +221,7 @@ state_get_result (void *cls, int64_t result, | |||
221 | const char *err_msg, uint16_t err_msg_size) | 221 | const char *err_msg, uint16_t err_msg_size) |
222 | { | 222 | { |
223 | op = NULL; | 223 | op = NULL; |
224 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "state_get_result:\t%d\n", result); | 224 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "state_get_result:\t%ld\n", (long int) result); |
225 | GNUNET_assert (GNUNET_OK == result); | 225 | GNUNET_assert (GNUNET_OK == result); |
226 | 226 | ||
227 | scls.n = 0; | 227 | scls.n = 0; |
@@ -274,7 +274,7 @@ state_modify_result (void *cls, int64_t result, | |||
274 | const char *err_msg, uint16_t err_msg_size) | 274 | const char *err_msg, uint16_t err_msg_size) |
275 | { | 275 | { |
276 | op = NULL; | 276 | op = NULL; |
277 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "state_modify_result:\t%d\n", result); | 277 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "state_modify_result:\t%ld\n", (long int) result); |
278 | GNUNET_assert (GNUNET_OK == result); | 278 | GNUNET_assert (GNUNET_OK == result); |
279 | 279 | ||
280 | op = GNUNET_PSYCSTORE_counters_get (h, &channel_pub_key, | 280 | op = GNUNET_PSYCSTORE_counters_get (h, &channel_pub_key, |
@@ -288,7 +288,7 @@ state_sync_result (void *cls, int64_t result, | |||
288 | { | 288 | { |
289 | struct FragmentClosure *fcls = cls; | 289 | struct FragmentClosure *fcls = cls; |
290 | op = NULL; | 290 | op = NULL; |
291 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "state_sync_result:\t%d\n", result); | 291 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "state_sync_result:\t%ld\n", (long int) result); |
292 | GNUNET_assert (GNUNET_OK == result); | 292 | GNUNET_assert (GNUNET_OK == result); |
293 | 293 | ||
294 | op = GNUNET_PSYCSTORE_state_modify (h, &channel_pub_key, | 294 | op = GNUNET_PSYCSTORE_state_modify (h, &channel_pub_key, |
@@ -332,7 +332,7 @@ message_get_latest_result (void *cls, int64_t result, | |||
332 | { | 332 | { |
333 | struct FragmentClosure *fcls = cls; | 333 | struct FragmentClosure *fcls = cls; |
334 | op = NULL; | 334 | op = NULL; |
335 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "message_get_latest:\t%d\n", result); | 335 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "message_get_latest:\t%ld\n", (long int) result); |
336 | GNUNET_assert (0 < result && fcls->n == fcls->n_expected); | 336 | GNUNET_assert (0 < result && fcls->n == fcls->n_expected); |
337 | 337 | ||
338 | modifiers[0] = (struct GNUNET_PSYC_Modifier) { | 338 | modifiers[0] = (struct GNUNET_PSYC_Modifier) { |
@@ -361,7 +361,7 @@ message_get_result (void *cls, int64_t result, | |||
361 | { | 361 | { |
362 | struct FragmentClosure *fcls = cls; | 362 | struct FragmentClosure *fcls = cls; |
363 | op = NULL; | 363 | op = NULL; |
364 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "message_get:\t%d\n", result); | 364 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "message_get:\t%ld\n", (long int) result); |
365 | GNUNET_assert (0 < result && fcls->n == fcls->n_expected); | 365 | GNUNET_assert (0 < result && fcls->n == fcls->n_expected); |
366 | 366 | ||
367 | fcls->n = 0; | 367 | fcls->n = 0; |
@@ -378,7 +378,7 @@ message_get_fragment_result (void *cls, int64_t result, | |||
378 | { | 378 | { |
379 | struct FragmentClosure *fcls = cls; | 379 | struct FragmentClosure *fcls = cls; |
380 | op = NULL; | 380 | op = NULL; |
381 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "message_get_fragment:\t%d\n", result); | 381 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "message_get_fragment:\t%ld\n", (long int) result); |
382 | GNUNET_assert (0 < result && fcls->n == fcls->n_expected); | 382 | GNUNET_assert (0 < result && fcls->n == fcls->n_expected); |
383 | 383 | ||
384 | fcls->n = 0; | 384 | fcls->n = 0; |
@@ -397,7 +397,7 @@ fragment_get_latest_result (void *cls, int64_t result, | |||
397 | { | 397 | { |
398 | struct FragmentClosure *fcls = cls; | 398 | struct FragmentClosure *fcls = cls; |
399 | op = NULL; | 399 | op = NULL; |
400 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "fragment_get_latest:\t%d\n", result); | 400 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "fragment_get_latest:\t%ld\n", (long int) result); |
401 | GNUNET_assert (0 < result && fcls->n == fcls->n_expected); | 401 | GNUNET_assert (0 < result && fcls->n == fcls->n_expected); |
402 | 402 | ||
403 | fcls->n = 1; | 403 | fcls->n = 1; |
@@ -435,7 +435,7 @@ fragment_store_result (void *cls, int64_t result, | |||
435 | const char *err_msg, uint16_t err_msg_size) | 435 | const char *err_msg, uint16_t err_msg_size) |
436 | { | 436 | { |
437 | op = NULL; | 437 | op = NULL; |
438 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "fragment_store:\t%d\n", result); | 438 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "fragment_store:\t%ld\n", (long int) result); |
439 | GNUNET_assert (GNUNET_OK == result); | 439 | GNUNET_assert (GNUNET_OK == result); |
440 | 440 | ||
441 | if ((intptr_t) cls == GNUNET_YES) | 441 | if ((intptr_t) cls == GNUNET_YES) |
@@ -507,7 +507,7 @@ membership_test_result (void *cls, int64_t result, | |||
507 | const char *err_msg, uint16_t err_msg_size) | 507 | const char *err_msg, uint16_t err_msg_size) |
508 | { | 508 | { |
509 | op = NULL; | 509 | op = NULL; |
510 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "membership_test:\t%d\n", result); | 510 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "membership_test:\t%ld\n", (long int) result); |
511 | GNUNET_assert (GNUNET_OK == result); | 511 | GNUNET_assert (GNUNET_OK == result); |
512 | 512 | ||
513 | fragment_store (); | 513 | fragment_store (); |
@@ -519,7 +519,7 @@ membership_store_result (void *cls, int64_t result, | |||
519 | const char *err_msg, uint16_t err_msg_size) | 519 | const char *err_msg, uint16_t err_msg_size) |
520 | { | 520 | { |
521 | op = NULL; | 521 | op = NULL; |
522 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "membership_store:\t%d\n", result); | 522 | GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "membership_store:\t%ld\n", (long int) result); |
523 | GNUNET_assert (GNUNET_OK == result); | 523 | GNUNET_assert (GNUNET_OK == result); |
524 | 524 | ||
525 | op = GNUNET_PSYCSTORE_membership_test (h, &channel_pub_key, &slave_pub_key, | 525 | op = GNUNET_PSYCSTORE_membership_test (h, &channel_pub_key, &slave_pub_key, |