diff options
28 files changed, 82 insertions, 122 deletions
@@ -10,7 +10,6 @@ Core: | |||
10 | => bootstrap should use plugins, possible multiple at the same time! | 10 | => bootstrap should use plugins, possible multiple at the same time! |
11 | 11 | ||
12 | Util: | 12 | Util: |
13 | * Should "server" argument be given in event callbacks? | ||
14 | * consider adding "get_time" to "configuration" API | 13 | * consider adding "get_time" to "configuration" API |
15 | 14 | ||
16 | TESTCASES WANTED: | 15 | TESTCASES WANTED: |
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c index 97d507890..c9736982f 100644 --- a/src/arm/gnunet-service-arm.c +++ b/src/arm/gnunet-service-arm.c | |||
@@ -327,8 +327,7 @@ start_process (struct ServiceList *sl) | |||
327 | * Start the specified service. | 327 | * Start the specified service. |
328 | */ | 328 | */ |
329 | static void | 329 | static void |
330 | start_service (struct GNUNET_SERVER_Handle *server, | 330 | start_service (struct GNUNET_SERVER_Client *client, const char *servicename) |
331 | struct GNUNET_SERVER_Client *client, const char *servicename) | ||
332 | { | 331 | { |
333 | struct ServiceList *sl; | 332 | struct ServiceList *sl; |
334 | char *binary; | 333 | char *binary; |
@@ -368,6 +367,7 @@ start_service (struct GNUNET_SERVER_Handle *server, | |||
368 | config, servicename); | 367 | config, servicename); |
369 | signal_result (client, servicename, GNUNET_MESSAGE_TYPE_ARM_IS_DOWN); | 368 | signal_result (client, servicename, GNUNET_MESSAGE_TYPE_ARM_IS_DOWN); |
370 | GNUNET_free (binary); | 369 | GNUNET_free (binary); |
370 | GNUNET_free (config); | ||
371 | return; | 371 | return; |
372 | } | 372 | } |
373 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 373 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
@@ -403,8 +403,7 @@ free_and_signal (void *cls, struct ServiceList *pos) | |||
403 | * Stop the specified service. | 403 | * Stop the specified service. |
404 | */ | 404 | */ |
405 | static void | 405 | static void |
406 | stop_service (struct GNUNET_SERVER_Handle *server, | 406 | stop_service (struct GNUNET_SERVER_Client *client, const char *servicename) |
407 | struct GNUNET_SERVER_Client *client, const char *servicename) | ||
408 | { | 407 | { |
409 | struct ServiceList *pos; | 408 | struct ServiceList *pos; |
410 | struct GNUNET_CLIENT_Connection *sc; | 409 | struct GNUNET_CLIENT_Connection *sc; |
@@ -412,7 +411,7 @@ stop_service (struct GNUNET_SERVER_Handle *server, | |||
412 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 411 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
413 | "Preparing to stop `%s'\n", servicename); | 412 | "Preparing to stop `%s'\n", servicename); |
414 | pos = find_name (servicename); | 413 | pos = find_name (servicename); |
415 | if (pos->kill_continuation != NULL) | 414 | if ((pos != NULL) && (pos->kill_continuation != NULL)) |
416 | { | 415 | { |
417 | /* killing already in progress */ | 416 | /* killing already in progress */ |
418 | signal_result (client, servicename, GNUNET_MESSAGE_TYPE_ARM_IS_DOWN); | 417 | signal_result (client, servicename, GNUNET_MESSAGE_TYPE_ARM_IS_DOWN); |
@@ -453,7 +452,6 @@ stop_service (struct GNUNET_SERVER_Handle *server, | |||
453 | * Handle START-message. | 452 | * Handle START-message. |
454 | * | 453 | * |
455 | * @param cls closure (always NULL) | 454 | * @param cls closure (always NULL) |
456 | * @param server the server handling the message | ||
457 | * @param client identification of the client | 455 | * @param client identification of the client |
458 | * @param message the actual message | 456 | * @param message the actual message |
459 | * @return GNUNET_OK to keep the connection open, | 457 | * @return GNUNET_OK to keep the connection open, |
@@ -461,7 +459,6 @@ stop_service (struct GNUNET_SERVER_Handle *server, | |||
461 | */ | 459 | */ |
462 | static void | 460 | static void |
463 | handle_start (void *cls, | 461 | handle_start (void *cls, |
464 | struct GNUNET_SERVER_Handle *server, | ||
465 | struct GNUNET_SERVER_Client *client, | 462 | struct GNUNET_SERVER_Client *client, |
466 | const struct GNUNET_MessageHeader *message) | 463 | const struct GNUNET_MessageHeader *message) |
467 | { | 464 | { |
@@ -477,7 +474,7 @@ handle_start (void *cls, | |||
477 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 474 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
478 | return; | 475 | return; |
479 | } | 476 | } |
480 | start_service (server, client, servicename); | 477 | start_service (client, servicename); |
481 | GNUNET_SERVER_receive_done (client, GNUNET_OK); | 478 | GNUNET_SERVER_receive_done (client, GNUNET_OK); |
482 | } | 479 | } |
483 | 480 | ||
@@ -486,7 +483,6 @@ handle_start (void *cls, | |||
486 | * Handle STOP-message. | 483 | * Handle STOP-message. |
487 | * | 484 | * |
488 | * @param cls closure (always NULL) | 485 | * @param cls closure (always NULL) |
489 | * @param server the server handling the message | ||
490 | * @param client identification of the client | 486 | * @param client identification of the client |
491 | * @param message the actual message | 487 | * @param message the actual message |
492 | * @return GNUNET_OK to keep the connection open, | 488 | * @return GNUNET_OK to keep the connection open, |
@@ -494,7 +490,6 @@ handle_start (void *cls, | |||
494 | */ | 490 | */ |
495 | static void | 491 | static void |
496 | handle_stop (void *cls, | 492 | handle_stop (void *cls, |
497 | struct GNUNET_SERVER_Handle *server, | ||
498 | struct GNUNET_SERVER_Client *client, | 493 | struct GNUNET_SERVER_Client *client, |
499 | const struct GNUNET_MessageHeader *message) | 494 | const struct GNUNET_MessageHeader *message) |
500 | { | 495 | { |
@@ -510,7 +505,7 @@ handle_stop (void *cls, | |||
510 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 505 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
511 | return; | 506 | return; |
512 | } | 507 | } |
513 | stop_service (server, client, servicename); | 508 | stop_service (client, servicename); |
514 | } | 509 | } |
515 | 510 | ||
516 | 511 | ||
@@ -669,7 +664,7 @@ run (void *cls, | |||
669 | pos = strtok (defaultservices, " "); | 664 | pos = strtok (defaultservices, " "); |
670 | while (pos != NULL) | 665 | while (pos != NULL) |
671 | { | 666 | { |
672 | start_service (server, NULL, pos); | 667 | start_service (NULL, pos); |
673 | pos = strtok (NULL, " "); | 668 | pos = strtok (NULL, " "); |
674 | } | 669 | } |
675 | GNUNET_free (defaultservices); | 670 | GNUNET_free (defaultservices); |
diff --git a/src/core/core_api.c b/src/core/core_api.c index 10fa0ccdd..61836e590 100644 --- a/src/core/core_api.c +++ b/src/core/core_api.c | |||
@@ -732,8 +732,8 @@ transmit_start (void *cls, size_t size, void *buf) | |||
732 | GNUNET_CLIENT_receive (h->client, | 732 | GNUNET_CLIENT_receive (h->client, |
733 | &init_reply_handler, | 733 | &init_reply_handler, |
734 | h, | 734 | h, |
735 | GNUNET_TIME_absolute_get_remaining (h-> | 735 | GNUNET_TIME_absolute_get_remaining |
736 | startup_timeout)); | 736 | (h->startup_timeout)); |
737 | return sizeof (struct InitMessage) + h->hcnt * sizeof (uint16_t); | 737 | return sizeof (struct InitMessage) + h->hcnt * sizeof (uint16_t); |
738 | } | 738 | } |
739 | 739 | ||
diff --git a/src/core/gnunet-service-core.c b/src/core/gnunet-service-core.c index e9e076bcc..2fbb4ca05 100644 --- a/src/core/gnunet-service-core.c +++ b/src/core/gnunet-service-core.c | |||
@@ -834,7 +834,6 @@ send_to_all_clients (const struct GNUNET_MessageHeader *msg, int can_drop) | |||
834 | */ | 834 | */ |
835 | static void | 835 | static void |
836 | handle_client_init (void *cls, | 836 | handle_client_init (void *cls, |
837 | struct GNUNET_SERVER_Handle *server, | ||
838 | struct GNUNET_SERVER_Client *client, | 837 | struct GNUNET_SERVER_Client *client, |
839 | const struct GNUNET_MessageHeader *message) | 838 | const struct GNUNET_MessageHeader *message) |
840 | { | 839 | { |
@@ -948,7 +947,6 @@ handle_client_disconnect (void *cls, struct GNUNET_SERVER_Client *client) | |||
948 | */ | 947 | */ |
949 | static void | 948 | static void |
950 | handle_client_request_configure (void *cls, | 949 | handle_client_request_configure (void *cls, |
951 | struct GNUNET_SERVER_Handle *server, | ||
952 | struct GNUNET_SERVER_Client *client, | 950 | struct GNUNET_SERVER_Client *client, |
953 | const struct GNUNET_MessageHeader *message) | 951 | const struct GNUNET_MessageHeader *message) |
954 | { | 952 | { |
@@ -1102,8 +1100,9 @@ process_encrypted_neighbour_queue (struct Neighbour *n) | |||
1102 | "Asking transport for transmission of %u bytes to `%4s' in next %llu ms\n", | 1100 | "Asking transport for transmission of %u bytes to `%4s' in next %llu ms\n", |
1103 | n->encrypted_head->size, | 1101 | n->encrypted_head->size, |
1104 | GNUNET_i2s (&n->peer), | 1102 | GNUNET_i2s (&n->peer), |
1105 | GNUNET_TIME_absolute_get_remaining (n->encrypted_head-> | 1103 | GNUNET_TIME_absolute_get_remaining (n-> |
1106 | deadline).value); | 1104 | encrypted_head->deadline). |
1105 | value); | ||
1107 | n->th = | 1106 | n->th = |
1108 | GNUNET_TRANSPORT_notify_transmit_ready (transport, &n->peer, | 1107 | GNUNET_TRANSPORT_notify_transmit_ready (transport, &n->peer, |
1109 | n->encrypted_head->size, | 1108 | n->encrypted_head->size, |
@@ -1307,6 +1306,7 @@ select_messages (struct Neighbour *n, | |||
1307 | } | 1306 | } |
1308 | if (discard_low_prio) | 1307 | if (discard_low_prio) |
1309 | { | 1308 | { |
1309 | GNUNET_assert (min != NULL); | ||
1310 | /* remove lowest-priority entry from consideration */ | 1310 | /* remove lowest-priority entry from consideration */ |
1311 | min->do_transmit = GNUNET_YES; /* means: discard (for now) */ | 1311 | min->do_transmit = GNUNET_YES; /* means: discard (for now) */ |
1312 | } | 1312 | } |
@@ -1580,7 +1580,6 @@ process_plaintext_neighbour_queue (struct Neighbour *n) | |||
1580 | */ | 1580 | */ |
1581 | static void | 1581 | static void |
1582 | handle_client_send (void *cls, | 1582 | handle_client_send (void *cls, |
1583 | struct GNUNET_SERVER_Handle *server, | ||
1584 | struct GNUNET_SERVER_Client *client, | 1583 | struct GNUNET_SERVER_Client *client, |
1585 | const struct GNUNET_MessageHeader *message); | 1584 | const struct GNUNET_MessageHeader *message); |
1586 | 1585 | ||
@@ -1612,7 +1611,7 @@ send_connect_continuation (void *cls, size_t size, void *buf) | |||
1612 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1611 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1613 | "Connection to peer `%4s' succeeded, retrying original send request\n", | 1612 | "Connection to peer `%4s' succeeded, retrying original send request\n", |
1614 | GNUNET_i2s (&sm->peer)); | 1613 | GNUNET_i2s (&sm->peer)); |
1615 | handle_client_send (NULL, NULL, NULL, &sm->header); | 1614 | handle_client_send (NULL, NULL, &sm->header); |
1616 | GNUNET_free (sm); | 1615 | GNUNET_free (sm); |
1617 | return 0; | 1616 | return 0; |
1618 | } | 1617 | } |
@@ -1623,7 +1622,6 @@ send_connect_continuation (void *cls, size_t size, void *buf) | |||
1623 | */ | 1622 | */ |
1624 | static void | 1623 | static void |
1625 | handle_client_send (void *cls, | 1624 | handle_client_send (void *cls, |
1626 | struct GNUNET_SERVER_Handle *server, | ||
1627 | struct GNUNET_SERVER_Client *client, | 1625 | struct GNUNET_SERVER_Client *client, |
1628 | const struct GNUNET_MessageHeader *message) | 1626 | const struct GNUNET_MessageHeader *message) |
1629 | { | 1627 | { |
diff --git a/src/include/gnunet_server_lib.h b/src/include/gnunet_server_lib.h index 4e4f35e26..44db9ce70 100644 --- a/src/include/gnunet_server_lib.h +++ b/src/include/gnunet_server_lib.h | |||
@@ -64,13 +64,10 @@ struct GNUNET_SERVER_Client; | |||
64 | * received. | 64 | * received. |
65 | * | 65 | * |
66 | * @param cls closure | 66 | * @param cls closure |
67 | * @param server the server handling the message | ||
68 | * @param client identification of the client | 67 | * @param client identification of the client |
69 | * @param message the actual message | 68 | * @param message the actual message |
70 | */ | 69 | */ |
71 | typedef void (*GNUNET_SERVER_MessageCallback) (void *cls, | 70 | typedef void (*GNUNET_SERVER_MessageCallback) (void *cls, |
72 | struct GNUNET_SERVER_Handle * | ||
73 | server, | ||
74 | struct GNUNET_SERVER_Client * | 71 | struct GNUNET_SERVER_Client * |
75 | client, | 72 | client, |
76 | const struct | 73 | const struct |
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c index b81c7b6ee..0d383c0f1 100644 --- a/src/peerinfo/gnunet-service-peerinfo.c +++ b/src/peerinfo/gnunet-service-peerinfo.c | |||
@@ -385,9 +385,7 @@ bind_address (const struct GNUNET_PeerIdentity *peer, | |||
385 | */ | 385 | */ |
386 | static void | 386 | static void |
387 | send_to_each_host (const struct GNUNET_PeerIdentity *only, | 387 | send_to_each_host (const struct GNUNET_PeerIdentity *only, |
388 | int trust_change, | 388 | int trust_change, struct GNUNET_SERVER_Client *client) |
389 | struct GNUNET_SERVER_Client *client, | ||
390 | struct GNUNET_SERVER_Handle *server) | ||
391 | { | 389 | { |
392 | struct HostEntry *pos; | 390 | struct HostEntry *pos; |
393 | struct InfoMessage *im; | 391 | struct InfoMessage *im; |
@@ -550,13 +548,11 @@ cron_clean_data_hosts (void *cls, | |||
550 | * Handle ADD-message. | 548 | * Handle ADD-message. |
551 | * | 549 | * |
552 | * @param cls closure | 550 | * @param cls closure |
553 | * @param server the server handling the message | ||
554 | * @param client identification of the client | 551 | * @param client identification of the client |
555 | * @param message the actual message | 552 | * @param message the actual message |
556 | */ | 553 | */ |
557 | static void | 554 | static void |
558 | handle_add (void *cls, | 555 | handle_add (void *cls, |
559 | struct GNUNET_SERVER_Handle *server, | ||
560 | struct GNUNET_SERVER_Client *client, | 556 | struct GNUNET_SERVER_Client *client, |
561 | const struct GNUNET_MessageHeader *message) | 557 | const struct GNUNET_MessageHeader *message) |
562 | { | 558 | { |
@@ -589,20 +585,18 @@ handle_add (void *cls, | |||
589 | * Handle GET-message. | 585 | * Handle GET-message. |
590 | * | 586 | * |
591 | * @param cls closure | 587 | * @param cls closure |
592 | * @param server the server handling the message | ||
593 | * @param client identification of the client | 588 | * @param client identification of the client |
594 | * @param message the actual message | 589 | * @param message the actual message |
595 | */ | 590 | */ |
596 | static void | 591 | static void |
597 | handle_get (void *cls, | 592 | handle_get (void *cls, |
598 | struct GNUNET_SERVER_Handle *server, | ||
599 | struct GNUNET_SERVER_Client *client, | 593 | struct GNUNET_SERVER_Client *client, |
600 | const struct GNUNET_MessageHeader *message) | 594 | const struct GNUNET_MessageHeader *message) |
601 | { | 595 | { |
602 | const struct ListPeerMessage *lpm; | 596 | const struct ListPeerMessage *lpm; |
603 | 597 | ||
604 | lpm = (const struct ListPeerMessage *) message; | 598 | lpm = (const struct ListPeerMessage *) message; |
605 | send_to_each_host (&lpm->peer, ntohl (lpm->trust_change), client, server); | 599 | send_to_each_host (&lpm->peer, ntohl (lpm->trust_change), client); |
606 | } | 600 | } |
607 | 601 | ||
608 | 602 | ||
@@ -610,20 +604,18 @@ handle_get (void *cls, | |||
610 | * Handle GET-ALL-message. | 604 | * Handle GET-ALL-message. |
611 | * | 605 | * |
612 | * @param cls closure | 606 | * @param cls closure |
613 | * @param server the server handling the message | ||
614 | * @param client identification of the client | 607 | * @param client identification of the client |
615 | * @param message the actual message | 608 | * @param message the actual message |
616 | */ | 609 | */ |
617 | static void | 610 | static void |
618 | handle_get_all (void *cls, | 611 | handle_get_all (void *cls, |
619 | struct GNUNET_SERVER_Handle *server, | ||
620 | struct GNUNET_SERVER_Client *client, | 612 | struct GNUNET_SERVER_Client *client, |
621 | const struct GNUNET_MessageHeader *message) | 613 | const struct GNUNET_MessageHeader *message) |
622 | { | 614 | { |
623 | const struct ListAllPeersMessage *lpm; | 615 | const struct ListAllPeersMessage *lpm; |
624 | 616 | ||
625 | lpm = (const struct ListAllPeersMessage *) message; | 617 | lpm = (const struct ListAllPeersMessage *) message; |
626 | send_to_each_host (NULL, ntohl (lpm->trust_change), client, server); | 618 | send_to_each_host (NULL, ntohl (lpm->trust_change), client); |
627 | } | 619 | } |
628 | 620 | ||
629 | 621 | ||
diff --git a/src/resolver/gnunet-service-resolver.c b/src/resolver/gnunet-service-resolver.c index dbdecdfe5..ac50f02d0 100644 --- a/src/resolver/gnunet-service-resolver.c +++ b/src/resolver/gnunet-service-resolver.c | |||
@@ -368,13 +368,11 @@ get_ip_from_hostname (struct GNUNET_SERVER_Client *client, | |||
368 | * Handle GET-message. | 368 | * Handle GET-message. |
369 | * | 369 | * |
370 | * @param cls closure | 370 | * @param cls closure |
371 | * @param server the server handling the message | ||
372 | * @param client identification of the client | 371 | * @param client identification of the client |
373 | * @param message the actual message | 372 | * @param message the actual message |
374 | */ | 373 | */ |
375 | static void | 374 | static void |
376 | handle_get (void *cls, | 375 | handle_get (void *cls, |
377 | struct GNUNET_SERVER_Handle *server, | ||
378 | struct GNUNET_SERVER_Client *client, | 376 | struct GNUNET_SERVER_Client *client, |
379 | const struct GNUNET_MessageHeader *message) | 377 | const struct GNUNET_MessageHeader *message) |
380 | { | 378 | { |
diff --git a/src/statistics/gnunet-service-statistics.c b/src/statistics/gnunet-service-statistics.c index 0e7b4853d..676db1b02 100644 --- a/src/statistics/gnunet-service-statistics.c +++ b/src/statistics/gnunet-service-statistics.c | |||
@@ -259,7 +259,6 @@ matches (const struct StatsEntry *e, const char *service, const char *name) | |||
259 | * Handle GET-message. | 259 | * Handle GET-message. |
260 | * | 260 | * |
261 | * @param cls closure | 261 | * @param cls closure |
262 | * @param server the server handling the message | ||
263 | * @param client identification of the client | 262 | * @param client identification of the client |
264 | * @param message the actual message | 263 | * @param message the actual message |
265 | * @return GNUNET_OK to keep the connection open, | 264 | * @return GNUNET_OK to keep the connection open, |
@@ -267,7 +266,6 @@ matches (const struct StatsEntry *e, const char *service, const char *name) | |||
267 | */ | 266 | */ |
268 | static void | 267 | static void |
269 | handle_get (void *cls, | 268 | handle_get (void *cls, |
270 | struct GNUNET_SERVER_Handle *server, | ||
271 | struct GNUNET_SERVER_Client *client, | 269 | struct GNUNET_SERVER_Client *client, |
272 | const struct GNUNET_MessageHeader *message) | 270 | const struct GNUNET_MessageHeader *message) |
273 | { | 271 | { |
@@ -308,13 +306,11 @@ handle_get (void *cls, | |||
308 | * Handle SET-message. | 306 | * Handle SET-message. |
309 | * | 307 | * |
310 | * @param cls closure | 308 | * @param cls closure |
311 | * @param server the server handling the message | ||
312 | * @param client identification of the client | 309 | * @param client identification of the client |
313 | * @param message the actual message | 310 | * @param message the actual message |
314 | */ | 311 | */ |
315 | static void | 312 | static void |
316 | handle_set (void *cls, | 313 | handle_set (void *cls, |
317 | struct GNUNET_SERVER_Handle *server, | ||
318 | struct GNUNET_SERVER_Client *client, | 314 | struct GNUNET_SERVER_Client *client, |
319 | const struct GNUNET_MessageHeader *message) | 315 | const struct GNUNET_MessageHeader *message) |
320 | { | 316 | { |
diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c index f68cf9396..be78d260a 100644 --- a/src/statistics/statistics_api.c +++ b/src/statistics/statistics_api.c | |||
@@ -369,9 +369,8 @@ receive_stats (void *cls, const struct GNUNET_MessageHeader *msg) | |||
369 | GNUNET_CLIENT_receive (h->client, | 369 | GNUNET_CLIENT_receive (h->client, |
370 | &receive_stats, | 370 | &receive_stats, |
371 | h, | 371 | h, |
372 | GNUNET_TIME_absolute_get_remaining (h-> | 372 | GNUNET_TIME_absolute_get_remaining |
373 | current-> | 373 | (h->current->timeout)); |
374 | timeout)); | ||
375 | return; | 374 | return; |
376 | } | 375 | } |
377 | GNUNET_break (0); | 376 | GNUNET_break (0); |
@@ -422,8 +421,8 @@ transmit_get (struct GNUNET_STATISTICS_Handle *handle, size_t size, void *buf) | |||
422 | GNUNET_CLIENT_receive (handle->client, | 421 | GNUNET_CLIENT_receive (handle->client, |
423 | &receive_stats, | 422 | &receive_stats, |
424 | handle, | 423 | handle, |
425 | GNUNET_TIME_absolute_get_remaining (handle->current-> | 424 | GNUNET_TIME_absolute_get_remaining (handle-> |
426 | timeout)); | 425 | current->timeout)); |
427 | return msize; | 426 | return msize; |
428 | } | 427 | } |
429 | 428 | ||
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 08745c378..6d160a76e 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -1632,9 +1632,8 @@ cleanup_validation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1632 | GNUNET_NO, | 1632 | GNUNET_NO, |
1633 | GNUNET_SCHEDULER_PRIORITY_IDLE, | 1633 | GNUNET_SCHEDULER_PRIORITY_IDLE, |
1634 | GNUNET_SCHEDULER_NO_PREREQUISITE_TASK, | 1634 | GNUNET_SCHEDULER_NO_PREREQUISITE_TASK, |
1635 | GNUNET_TIME_absolute_get_remaining (pos-> | 1635 | GNUNET_TIME_absolute_get_remaining |
1636 | timeout), | 1636 | (pos->timeout), &cleanup_validation, NULL); |
1637 | &cleanup_validation, NULL); | ||
1638 | } | 1637 | } |
1639 | 1638 | ||
1640 | 1639 | ||
@@ -1725,7 +1724,9 @@ check_hello_validated (void *cls, | |||
1725 | { | 1724 | { |
1726 | first_call = GNUNET_YES; | 1725 | first_call = GNUNET_YES; |
1727 | chvc->e = GNUNET_malloc (sizeof (struct ValidationList)); | 1726 | chvc->e = GNUNET_malloc (sizeof (struct ValidationList)); |
1728 | GNUNET_HELLO_get_key (h != NULL ? h : chvc->hello, &chvc->e->publicKey); | 1727 | GNUNET_assert (GNUNET_OK == |
1728 | GNUNET_HELLO_get_key (h != NULL ? h : chvc->hello, | ||
1729 | &chvc->e->publicKey)); | ||
1729 | chvc->e->timeout = | 1730 | chvc->e->timeout = |
1730 | GNUNET_TIME_relative_to_absolute (HELLO_VERIFICATION_TIMEOUT); | 1731 | GNUNET_TIME_relative_to_absolute (HELLO_VERIFICATION_TIMEOUT); |
1731 | chvc->e->next = pending_validations; | 1732 | chvc->e->next = pending_validations; |
@@ -1777,10 +1778,9 @@ check_hello_validated (void *cls, | |||
1777 | GNUNET_NO, | 1778 | GNUNET_NO, |
1778 | GNUNET_SCHEDULER_PRIORITY_IDLE, | 1779 | GNUNET_SCHEDULER_PRIORITY_IDLE, |
1779 | GNUNET_SCHEDULER_NO_PREREQUISITE_TASK, | 1780 | GNUNET_SCHEDULER_NO_PREREQUISITE_TASK, |
1780 | GNUNET_TIME_absolute_get_remaining (chvc-> | 1781 | GNUNET_TIME_absolute_get_remaining |
1781 | e-> | 1782 | (chvc->e->timeout), &cleanup_validation, |
1782 | timeout), | 1783 | NULL); |
1783 | &cleanup_validation, NULL); | ||
1784 | GNUNET_free (chvc); | 1784 | GNUNET_free (chvc); |
1785 | } | 1785 | } |
1786 | 1786 | ||
@@ -1935,6 +1935,11 @@ process_ping (struct TransportPlugin *plugin, | |||
1935 | "Trying to transmit PONG using inbound connection\n"); | 1935 | "Trying to transmit PONG using inbound connection\n"); |
1936 | #endif | 1936 | #endif |
1937 | n = find_neighbour (sender); | 1937 | n = find_neighbour (sender); |
1938 | if (n == NULL) | ||
1939 | { | ||
1940 | GNUNET_break (0); | ||
1941 | return; | ||
1942 | } | ||
1938 | transmit_to_peer (NULL, &vcr.header, GNUNET_YES, n); | 1943 | transmit_to_peer (NULL, &vcr.header, GNUNET_YES, n); |
1939 | } | 1944 | } |
1940 | 1945 | ||
@@ -2350,13 +2355,11 @@ plugin_env_receive (void *cls, | |||
2350 | * by any client which causes us to add it to our list. | 2355 | * by any client which causes us to add it to our list. |
2351 | * | 2356 | * |
2352 | * @param cls closure (always NULL) | 2357 | * @param cls closure (always NULL) |
2353 | * @param server the server handling the message | ||
2354 | * @param client identification of the client | 2358 | * @param client identification of the client |
2355 | * @param message the actual message | 2359 | * @param message the actual message |
2356 | */ | 2360 | */ |
2357 | static void | 2361 | static void |
2358 | handle_start (void *cls, | 2362 | handle_start (void *cls, |
2359 | struct GNUNET_SERVER_Handle *server, | ||
2360 | struct GNUNET_SERVER_Client *client, | 2363 | struct GNUNET_SERVER_Client *client, |
2361 | const struct GNUNET_MessageHeader *message) | 2364 | const struct GNUNET_MessageHeader *message) |
2362 | { | 2365 | { |
@@ -2429,13 +2432,11 @@ handle_start (void *cls, | |||
2429 | * Handle HELLO-message. | 2432 | * Handle HELLO-message. |
2430 | * | 2433 | * |
2431 | * @param cls closure (always NULL) | 2434 | * @param cls closure (always NULL) |
2432 | * @param server the server handling the message | ||
2433 | * @param client identification of the client | 2435 | * @param client identification of the client |
2434 | * @param message the actual message | 2436 | * @param message the actual message |
2435 | */ | 2437 | */ |
2436 | static void | 2438 | static void |
2437 | handle_hello (void *cls, | 2439 | handle_hello (void *cls, |
2438 | struct GNUNET_SERVER_Handle *server, | ||
2439 | struct GNUNET_SERVER_Client *client, | 2440 | struct GNUNET_SERVER_Client *client, |
2440 | const struct GNUNET_MessageHeader *message) | 2441 | const struct GNUNET_MessageHeader *message) |
2441 | { | 2442 | { |
@@ -2454,13 +2455,11 @@ handle_hello (void *cls, | |||
2454 | * Handle SEND-message. | 2455 | * Handle SEND-message. |
2455 | * | 2456 | * |
2456 | * @param cls closure (always NULL) | 2457 | * @param cls closure (always NULL) |
2457 | * @param server the server handling the message | ||
2458 | * @param client identification of the client | 2458 | * @param client identification of the client |
2459 | * @param message the actual message | 2459 | * @param message the actual message |
2460 | */ | 2460 | */ |
2461 | static void | 2461 | static void |
2462 | handle_send (void *cls, | 2462 | handle_send (void *cls, |
2463 | struct GNUNET_SERVER_Handle *server, | ||
2464 | struct GNUNET_SERVER_Client *client, | 2463 | struct GNUNET_SERVER_Client *client, |
2465 | const struct GNUNET_MessageHeader *message) | 2464 | const struct GNUNET_MessageHeader *message) |
2466 | { | 2465 | { |
@@ -2515,13 +2514,11 @@ handle_send (void *cls, | |||
2515 | * Handle SET_QUOTA-message. | 2514 | * Handle SET_QUOTA-message. |
2516 | * | 2515 | * |
2517 | * @param cls closure (always NULL) | 2516 | * @param cls closure (always NULL) |
2518 | * @param server the server handling the message | ||
2519 | * @param client identification of the client | 2517 | * @param client identification of the client |
2520 | * @param message the actual message | 2518 | * @param message the actual message |
2521 | */ | 2519 | */ |
2522 | static void | 2520 | static void |
2523 | handle_set_quota (void *cls, | 2521 | handle_set_quota (void *cls, |
2524 | struct GNUNET_SERVER_Handle *server, | ||
2525 | struct GNUNET_SERVER_Client *client, | 2522 | struct GNUNET_SERVER_Client *client, |
2526 | const struct GNUNET_MessageHeader *message) | 2523 | const struct GNUNET_MessageHeader *message) |
2527 | { | 2524 | { |
@@ -2562,13 +2559,11 @@ handle_set_quota (void *cls, | |||
2562 | * Handle TRY_CONNECT-message. | 2559 | * Handle TRY_CONNECT-message. |
2563 | * | 2560 | * |
2564 | * @param cls closure (always NULL) | 2561 | * @param cls closure (always NULL) |
2565 | * @param server the server handling the message | ||
2566 | * @param client identification of the client | 2562 | * @param client identification of the client |
2567 | * @param message the actual message | 2563 | * @param message the actual message |
2568 | */ | 2564 | */ |
2569 | static void | 2565 | static void |
2570 | handle_try_connect (void *cls, | 2566 | handle_try_connect (void *cls, |
2571 | struct GNUNET_SERVER_Handle *server, | ||
2572 | struct GNUNET_SERVER_Client *client, | 2567 | struct GNUNET_SERVER_Client *client, |
2573 | const struct GNUNET_MessageHeader *message) | 2568 | const struct GNUNET_MessageHeader *message) |
2574 | { | 2569 | { |
diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index eb69f4386..f7e06a9cd 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c | |||
@@ -1006,8 +1006,9 @@ receiveContentCallback (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
1006 | cpy = sizeof (GNUNET_MessageHeader) - httpSession->cs.client.rpos1; | 1006 | cpy = sizeof (GNUNET_MessageHeader) - httpSession->cs.client.rpos1; |
1007 | if (cpy > have) | 1007 | if (cpy > have) |
1008 | cpy = have; | 1008 | cpy = have; |
1009 | memcpy (&httpSession->cs.client. | 1009 | memcpy (&httpSession->cs. |
1010 | rbuff1[httpSession->cs.client.rpos1], &inbuf[poff], cpy); | 1010 | client.rbuff1[httpSession->cs.client.rpos1], &inbuf[poff], |
1011 | cpy); | ||
1011 | httpSession->cs.client.rpos1 += cpy; | 1012 | httpSession->cs.client.rpos1 += cpy; |
1012 | have -= cpy; | 1013 | have -= cpy; |
1013 | poff += cpy; | 1014 | poff += cpy; |
@@ -1027,8 +1028,9 @@ receiveContentCallback (void *ptr, size_t size, size_t nmemb, void *ctx) | |||
1027 | httpSession->cs.client.rpos2; | 1028 | httpSession->cs.client.rpos2; |
1028 | if (cpy > have) | 1029 | if (cpy > have) |
1029 | cpy = have; | 1030 | cpy = have; |
1030 | memcpy (&httpSession->cs.client. | 1031 | memcpy (&httpSession->cs. |
1031 | rbuff2[httpSession->cs.client.rpos2], &inbuf[poff], cpy); | 1032 | client.rbuff2[httpSession->cs.client.rpos2], &inbuf[poff], |
1033 | cpy); | ||
1032 | have -= cpy; | 1034 | have -= cpy; |
1033 | poff += cpy; | 1035 | poff += cpy; |
1034 | httpSession->cs.client.rpos2 += cpy; | 1036 | httpSession->cs.client.rpos2 += cpy; |
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c index c87056e71..9d82bead9 100644 --- a/src/transport/plugin_transport_tcp.c +++ b/src/transport/plugin_transport_tcp.c | |||
@@ -620,14 +620,16 @@ process_pending_messages (struct Session *session) | |||
620 | return; | 620 | return; |
621 | session->transmit_handle | 621 | session->transmit_handle |
622 | = GNUNET_SERVER_notify_transmit_ready (session->client, | 622 | = GNUNET_SERVER_notify_transmit_ready (session->client, |
623 | htons (session->pending_messages-> | 623 | htons (session-> |
624 | msg->size) + | 624 | pending_messages->msg-> |
625 | (session->pending_messages-> | 625 | size) + |
626 | is_welcome ? 0 : sizeof (struct | 626 | (session-> |
627 | DataMessage)), | 627 | pending_messages->is_welcome ? 0 : |
628 | sizeof (struct DataMessage)), | ||
628 | GNUNET_TIME_absolute_get_remaining | 629 | GNUNET_TIME_absolute_get_remaining |
629 | (session->pending_messages[0]. | 630 | (session-> |
630 | timeout), &do_transmit, session); | 631 | pending_messages[0].timeout), |
632 | &do_transmit, session); | ||
631 | } | 633 | } |
632 | 634 | ||
633 | 635 | ||
@@ -1354,13 +1356,11 @@ tcp_plugin_address_suggested (void *cls, const void *addr, size_t addrlen) | |||
1354 | * our welcome. | 1356 | * our welcome. |
1355 | * | 1357 | * |
1356 | * @param cls closure | 1358 | * @param cls closure |
1357 | * @param server the server handling the message | ||
1358 | * @param client identification of the client | 1359 | * @param client identification of the client |
1359 | * @param message the actual message | 1360 | * @param message the actual message |
1360 | */ | 1361 | */ |
1361 | static void | 1362 | static void |
1362 | handle_tcp_welcome (void *cls, | 1363 | handle_tcp_welcome (void *cls, |
1363 | struct GNUNET_SERVER_Handle *server, | ||
1364 | struct GNUNET_SERVER_Client *client, | 1364 | struct GNUNET_SERVER_Client *client, |
1365 | const struct GNUNET_MessageHeader *message) | 1365 | const struct GNUNET_MessageHeader *message) |
1366 | { | 1366 | { |
@@ -1464,13 +1464,11 @@ delayed_done (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1464 | * compute latency and forward. | 1464 | * compute latency and forward. |
1465 | * | 1465 | * |
1466 | * @param cls closure | 1466 | * @param cls closure |
1467 | * @param server the server handling the message | ||
1468 | * @param client identification of the client | 1467 | * @param client identification of the client |
1469 | * @param message the actual message | 1468 | * @param message the actual message |
1470 | */ | 1469 | */ |
1471 | static void | 1470 | static void |
1472 | handle_tcp_data (void *cls, | 1471 | handle_tcp_data (void *cls, |
1473 | struct GNUNET_SERVER_Handle *server, | ||
1474 | struct GNUNET_SERVER_Client *client, | 1472 | struct GNUNET_SERVER_Client *client, |
1475 | const struct GNUNET_MessageHeader *message) | 1473 | const struct GNUNET_MessageHeader *message) |
1476 | { | 1474 | { |
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c index d6d4e2a96..8bca5084d 100644 --- a/src/transport/transport_api.c +++ b/src/transport/transport_api.c | |||
@@ -1350,9 +1350,8 @@ request_connect (void *cls, size_t size, void *buf) | |||
1350 | GNUNET_NO, | 1350 | GNUNET_NO, |
1351 | GNUNET_SCHEDULER_PRIORITY_KEEP, | 1351 | GNUNET_SCHEDULER_PRIORITY_KEEP, |
1352 | GNUNET_SCHEDULER_NO_PREREQUISITE_TASK, | 1352 | GNUNET_SCHEDULER_NO_PREREQUISITE_TASK, |
1353 | GNUNET_TIME_absolute_get_remaining (th-> | 1353 | GNUNET_TIME_absolute_get_remaining |
1354 | timeout), | 1354 | (th->timeout), &transmit_timeout, th); |
1355 | &transmit_timeout, th); | ||
1356 | insert_transmit_handle (&h->connect_wait_head, th); | 1355 | insert_transmit_handle (&h->connect_wait_head, th); |
1357 | return sizeof (struct TryConnectMessage); | 1356 | return sizeof (struct TryConnectMessage); |
1358 | } | 1357 | } |
@@ -1653,9 +1652,8 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg) | |||
1653 | default: | 1652 | default: |
1654 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 1653 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
1655 | _ | 1654 | _ |
1656 | ("Received unexpected message of type %u from `%4s' in %s:%u\n"), | 1655 | ("Received unexpected message of type %u in %s:%u\n"), |
1657 | ntohs (msg->type), GNUNET_i2s (&im->peer), __FILE__, | 1656 | ntohs (msg->type), __FILE__, __LINE__); |
1658 | __LINE__); | ||
1659 | GNUNET_break (0); | 1657 | GNUNET_break (0); |
1660 | break; | 1658 | break; |
1661 | } | 1659 | } |
diff --git a/src/util/client.c b/src/util/client.c index 9dd70f266..e9b3f985a 100644 --- a/src/util/client.c +++ b/src/util/client.c | |||
@@ -202,8 +202,8 @@ check_complete (struct GNUNET_CLIENT_Connection *conn) | |||
202 | { | 202 | { |
203 | if ((conn->received_pos >= sizeof (struct GNUNET_MessageHeader)) && | 203 | if ((conn->received_pos >= sizeof (struct GNUNET_MessageHeader)) && |
204 | (conn->received_pos >= | 204 | (conn->received_pos >= |
205 | ntohs (((const struct GNUNET_MessageHeader *) conn->received_buf)-> | 205 | ntohs (((const struct GNUNET_MessageHeader *) conn-> |
206 | size))) | 206 | received_buf)->size))) |
207 | conn->msg_complete = GNUNET_YES; | 207 | conn->msg_complete = GNUNET_YES; |
208 | } | 208 | } |
209 | 209 | ||
diff --git a/src/util/crypto_rsa.c b/src/util/crypto_rsa.c index b61729e06..c5a6140f6 100644 --- a/src/util/crypto_rsa.c +++ b/src/util/crypto_rsa.c | |||
@@ -219,8 +219,8 @@ GNUNET_CRYPTO_rsa_key_get_public (const struct GNUNET_CRYPTO_RsaPrivateKey | |||
219 | GNUNET_CRYPTO_RSA_KEY_LENGTH - GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH; | 219 | GNUNET_CRYPTO_RSA_KEY_LENGTH - GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH; |
220 | GNUNET_assert (0 == | 220 | GNUNET_assert (0 == |
221 | gcry_mpi_print (GCRYMPI_FMT_USG, | 221 | gcry_mpi_print (GCRYMPI_FMT_USG, |
222 | &result-> | 222 | &result->key |
223 | key[GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH], | 223 | [GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH], |
224 | size, &size, skey[1])); | 224 | size, &size, skey[1])); |
225 | adjust (&result->key[GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH], size, | 225 | adjust (&result->key[GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH], size, |
226 | GNUNET_CRYPTO_RSA_KEY_LENGTH - | 226 | GNUNET_CRYPTO_RSA_KEY_LENGTH - |
@@ -704,6 +704,7 @@ GNUNET_CRYPTO_rsa_key_create_from_file (const char *filename) | |||
704 | enc = GNUNET_malloc (sbuf.st_size); | 704 | enc = GNUNET_malloc (sbuf.st_size); |
705 | GNUNET_assert (sbuf.st_size == READ (fd, enc, sbuf.st_size)); | 705 | GNUNET_assert (sbuf.st_size == READ (fd, enc, sbuf.st_size)); |
706 | len = ntohs (enc->len); | 706 | len = ntohs (enc->len); |
707 | ret = NULL; | ||
707 | if ((len != sbuf.st_size) || (NULL == (ret = rsa_decode_key (enc)))) | 708 | if ((len != sbuf.st_size) || (NULL == (ret = rsa_decode_key (enc)))) |
708 | { | 709 | { |
709 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 710 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
diff --git a/src/util/network.c b/src/util/network.c index 22c1ca632..7fd6f6c47 100644 --- a/src/util/network.c +++ b/src/util/network.c | |||
@@ -294,8 +294,9 @@ GNUNET_NETWORK_socket_create_from_accept (struct GNUNET_SCHEDULER_Handle | |||
294 | inet_ntop (fam, | 294 | inet_ntop (fam, |
295 | (fam == AF_INET6) | 295 | (fam == AF_INET6) |
296 | ? (const void *) &((struct sockaddr_in6 *) | 296 | ? (const void *) &((struct sockaddr_in6 *) |
297 | &addr)-> | 297 | &addr)->sin6_addr : (const |
298 | sin6_addr : (const void *) | 298 | void |
299 | *) | ||
299 | &((struct sockaddr_in *) &addr)->sin_addr, | 300 | &((struct sockaddr_in *) &addr)->sin_addr, |
300 | msg, sizeof (msg))); | 301 | msg, sizeof (msg))); |
301 | } | 302 | } |
diff --git a/src/util/os_network.c b/src/util/os_network.c index cb5ccb12a..4268772df 100644 --- a/src/util/os_network.c +++ b/src/util/os_network.c | |||
@@ -135,9 +135,10 @@ GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc, | |||
135 | pTable->table[dwIfIdx].dwPhysAddrLen); | 135 | pTable->table[dwIfIdx].dwPhysAddrLen); |
136 | 136 | ||
137 | snprintf (szEntry, 1000, "%s (%s - %I64u)", | 137 | snprintf (szEntry, 1000, "%s (%s - %I64u)", |
138 | pszIfName ? pszIfName : (char *) pTable-> | 138 | pszIfName ? pszIfName : (char *) |
139 | table[dwIfIdx].bDescr, inet_ntop (AF_INET, &dwIP, dst, | 139 | pTable->table[dwIfIdx].bDescr, inet_ntop (AF_INET, |
140 | INET_ADDRSTRLEN), | 140 | &dwIP, dst, |
141 | INET_ADDRSTRLEN), | ||
141 | *((unsigned long long *) bPhysAddr)); | 142 | *((unsigned long long *) bPhysAddr)); |
142 | szEntry[1000] = 0; | 143 | szEntry[1000] = 0; |
143 | 144 | ||
diff --git a/src/util/scheduler.c b/src/util/scheduler.c index 0d30910e0..a20b3da06 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c | |||
@@ -874,8 +874,8 @@ GNUNET_SCHEDULER_add_select (struct GNUNET_SCHEDULER_Handle * sched, | |||
874 | task->timeout = GNUNET_TIME_relative_to_absolute (delay); | 874 | task->timeout = GNUNET_TIME_relative_to_absolute (delay); |
875 | task->priority = | 875 | task->priority = |
876 | check_priority ((prio == | 876 | check_priority ((prio == |
877 | GNUNET_SCHEDULER_PRIORITY_KEEP) ? sched-> | 877 | GNUNET_SCHEDULER_PRIORITY_KEEP) ? sched->current_priority |
878 | current_priority : prio); | 878 | : prio); |
879 | task->nfds = nfds; | 879 | task->nfds = nfds; |
880 | task->run_on_shutdown = run_on_shutdown; | 880 | task->run_on_shutdown = run_on_shutdown; |
881 | task->next = sched->pending; | 881 | task->next = sched->pending; |
diff --git a/src/util/server.c b/src/util/server.c index 91bc8cc7a..939814725 100644 --- a/src/util/server.c +++ b/src/util/server.c | |||
@@ -565,7 +565,7 @@ GNUNET_SERVER_inject (struct GNUNET_SERVER_Handle *server, | |||
565 | } | 565 | } |
566 | if (sender != NULL) | 566 | if (sender != NULL) |
567 | sender->suspended++; | 567 | sender->suspended++; |
568 | mh->callback (mh->callback_cls, server, sender, message); | 568 | mh->callback (mh->callback_cls, sender, message); |
569 | found = GNUNET_YES; | 569 | found = GNUNET_YES; |
570 | } | 570 | } |
571 | i++; | 571 | i++; |
diff --git a/src/util/service.c b/src/util/service.c index af71db692..cf9703235 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -545,13 +545,11 @@ write_test (void *cls, size_t size, void *buf) | |||
545 | * Handler for TEST message. | 545 | * Handler for TEST message. |
546 | * | 546 | * |
547 | * @param cls closure (refers to service) | 547 | * @param cls closure (refers to service) |
548 | * @param server the server handling the message | ||
549 | * @param client identification of the client | 548 | * @param client identification of the client |
550 | * @param message the actual message | 549 | * @param message the actual message |
551 | */ | 550 | */ |
552 | static void | 551 | static void |
553 | handle_test (void *cls, | 552 | handle_test (void *cls, |
554 | struct GNUNET_SERVER_Handle *server, | ||
555 | struct GNUNET_SERVER_Client *client, | 553 | struct GNUNET_SERVER_Client *client, |
556 | const struct GNUNET_MessageHeader *message) | 554 | const struct GNUNET_MessageHeader *message) |
557 | { | 555 | { |
@@ -569,13 +567,11 @@ handle_test (void *cls, | |||
569 | * Handler for SHUTDOWN message. | 567 | * Handler for SHUTDOWN message. |
570 | * | 568 | * |
571 | * @param cls closure (refers to service) | 569 | * @param cls closure (refers to service) |
572 | * @param server the server handling the message | ||
573 | * @param client identification of the client | 570 | * @param client identification of the client |
574 | * @param message the actual message | 571 | * @param message the actual message |
575 | */ | 572 | */ |
576 | static void | 573 | static void |
577 | handle_shutdown (void *cls, | 574 | handle_shutdown (void *cls, |
578 | struct GNUNET_SERVER_Handle *server, | ||
579 | struct GNUNET_SERVER_Client *client, | 575 | struct GNUNET_SERVER_Client *client, |
580 | const struct GNUNET_MessageHeader *message) | 576 | const struct GNUNET_MessageHeader *message) |
581 | { | 577 | { |
@@ -805,8 +801,7 @@ setup_service (struct GNUNET_SERVICE_Context *sctx) | |||
805 | { | 801 | { |
806 | if (GNUNET_SYSERR == | 802 | if (GNUNET_SYSERR == |
807 | (disablev6 = GNUNET_CONFIGURATION_get_value_yesno (sctx->cfg, | 803 | (disablev6 = GNUNET_CONFIGURATION_get_value_yesno (sctx->cfg, |
808 | sctx-> | 804 | sctx->serviceName, |
809 | serviceName, | ||
810 | "DISABLEV6"))) | 805 | "DISABLEV6"))) |
811 | return GNUNET_SYSERR; | 806 | return GNUNET_SYSERR; |
812 | } | 807 | } |
diff --git a/src/util/test_client.c b/src/util/test_client.c index 5c2e552e9..3545b9fa9 100644 --- a/src/util/test_client.c +++ b/src/util/test_client.c | |||
@@ -70,7 +70,6 @@ copy_msg (void *cls, size_t size, void *buf) | |||
70 | */ | 70 | */ |
71 | static void | 71 | static void |
72 | echo_cb (void *cls, | 72 | echo_cb (void *cls, |
73 | struct GNUNET_SERVER_Handle *server, | ||
74 | struct GNUNET_SERVER_Client *client, | 73 | struct GNUNET_SERVER_Client *client, |
75 | const struct GNUNET_MessageHeader *message) | 74 | const struct GNUNET_MessageHeader *message) |
76 | { | 75 | { |
diff --git a/src/util/test_crypto_ksk.c b/src/util/test_crypto_ksk.c index c8555b5de..efce7cc05 100644 --- a/src/util/test_crypto_ksk.c +++ b/src/util/test_crypto_ksk.c | |||
@@ -128,8 +128,8 @@ testEncryptDecrypt (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey) | |||
128 | } | 128 | } |
129 | printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n", | 129 | printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n", |
130 | ITER, | 130 | ITER, |
131 | (unsigned long long) GNUNET_TIME_absolute_get_duration (start). | 131 | (unsigned long long) |
132 | value, ok); | 132 | GNUNET_TIME_absolute_get_duration (start).value, ok); |
133 | if (ok == 0) | 133 | if (ok == 0) |
134 | return GNUNET_OK; | 134 | return GNUNET_OK; |
135 | else | 135 | else |
@@ -179,8 +179,8 @@ testSignVerify (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey) | |||
179 | } | 179 | } |
180 | printf ("%d RSA sign/verify operations %llums\n", | 180 | printf ("%d RSA sign/verify operations %llums\n", |
181 | ITER, | 181 | ITER, |
182 | (unsigned long long) GNUNET_TIME_absolute_get_duration (start). | 182 | (unsigned long long) |
183 | value); | 183 | GNUNET_TIME_absolute_get_duration (start).value); |
184 | return ok; | 184 | return ok; |
185 | } | 185 | } |
186 | 186 | ||
diff --git a/src/util/test_crypto_rsa.c b/src/util/test_crypto_rsa.c index e71decca8..4456d68f4 100644 --- a/src/util/test_crypto_rsa.c +++ b/src/util/test_crypto_rsa.c | |||
@@ -83,8 +83,8 @@ testEncryptDecrypt () | |||
83 | } | 83 | } |
84 | printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n", | 84 | printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n", |
85 | ITER, | 85 | ITER, |
86 | (unsigned long long) GNUNET_TIME_absolute_get_duration (start). | 86 | (unsigned long long) |
87 | value, ok); | 87 | GNUNET_TIME_absolute_get_duration (start).value, ok); |
88 | GNUNET_CRYPTO_rsa_key_free (hostkey); | 88 | GNUNET_CRYPTO_rsa_key_free (hostkey); |
89 | if (ok == 0) | 89 | if (ok == 0) |
90 | return GNUNET_OK; | 90 | return GNUNET_OK; |
@@ -123,8 +123,8 @@ testEncryptPerformance () | |||
123 | } | 123 | } |
124 | printf ("%d RSA encrypt operations %llu ms (%d failures)\n", | 124 | printf ("%d RSA encrypt operations %llu ms (%d failures)\n", |
125 | ITER, | 125 | ITER, |
126 | (unsigned long long) GNUNET_TIME_absolute_get_duration (start). | 126 | (unsigned long long) |
127 | value, ok); | 127 | GNUNET_TIME_absolute_get_duration (start).value, ok); |
128 | GNUNET_CRYPTO_rsa_key_free (hostkey); | 128 | GNUNET_CRYPTO_rsa_key_free (hostkey); |
129 | if (ok != 0) | 129 | if (ok != 0) |
130 | return GNUNET_SYSERR; | 130 | return GNUNET_SYSERR; |
@@ -182,8 +182,8 @@ testEncryptDecryptSK () | |||
182 | } | 182 | } |
183 | printf ("%d RSA encrypt/decrypt SK operations %llus (%d failures)\n", | 183 | printf ("%d RSA encrypt/decrypt SK operations %llus (%d failures)\n", |
184 | ITER, | 184 | ITER, |
185 | (unsigned long long) GNUNET_TIME_absolute_get_duration (start). | 185 | (unsigned long long) |
186 | value, ok); | 186 | GNUNET_TIME_absolute_get_duration (start).value, ok); |
187 | GNUNET_CRYPTO_rsa_key_free (hostkey); | 187 | GNUNET_CRYPTO_rsa_key_free (hostkey); |
188 | if (ok != 0) | 188 | if (ok != 0) |
189 | return GNUNET_SYSERR; | 189 | return GNUNET_SYSERR; |
@@ -237,8 +237,8 @@ testSignVerify () | |||
237 | } | 237 | } |
238 | printf ("%d RSA sign/verify operations %llums\n", | 238 | printf ("%d RSA sign/verify operations %llums\n", |
239 | ITER, | 239 | ITER, |
240 | (unsigned long long) GNUNET_TIME_absolute_get_duration (start). | 240 | (unsigned long long) |
241 | value); | 241 | GNUNET_TIME_absolute_get_duration (start).value); |
242 | GNUNET_CRYPTO_rsa_key_free (hostkey); | 242 | GNUNET_CRYPTO_rsa_key_free (hostkey); |
243 | return ok; | 243 | return ok; |
244 | } | 244 | } |
diff --git a/src/util/test_network_addressing.c b/src/util/test_network_addressing.c index 8312b721f..cf50f4ec1 100644 --- a/src/util/test_network_addressing.c +++ b/src/util/test_network_addressing.c | |||
@@ -117,6 +117,7 @@ run_accept (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
117 | expect.sin_port = v4->sin_port; | 117 | expect.sin_port = v4->sin_port; |
118 | expect.sin_addr.s_addr = htonl (INADDR_LOOPBACK); | 118 | expect.sin_addr.s_addr = htonl (INADDR_LOOPBACK); |
119 | GNUNET_assert (0 == memcmp (&expect, v4, alen)); | 119 | GNUNET_assert (0 == memcmp (&expect, v4, alen)); |
120 | GNUNET_free (addr); | ||
120 | GNUNET_NETWORK_socket_destroy (lsock); | 121 | GNUNET_NETWORK_socket_destroy (lsock); |
121 | GNUNET_NETWORK_receive (asock, | 122 | GNUNET_NETWORK_receive (asock, |
122 | 1024, | 123 | 1024, |
diff --git a/src/util/test_server.c b/src/util/test_server.c index e3df0b456..475d411db 100644 --- a/src/util/test_server.c +++ b/src/util/test_server.c | |||
@@ -40,7 +40,6 @@ static struct GNUNET_SCHEDULER_Handle *sched; | |||
40 | 40 | ||
41 | static void | 41 | static void |
42 | recv_fin_cb (void *cls, | 42 | recv_fin_cb (void *cls, |
43 | struct GNUNET_SERVER_Handle *server, | ||
44 | struct GNUNET_SERVER_Client *client, | 43 | struct GNUNET_SERVER_Client *client, |
45 | const struct GNUNET_MessageHeader *message) | 44 | const struct GNUNET_MessageHeader *message) |
46 | { | 45 | { |
@@ -177,7 +176,6 @@ copy_msg (void *cls, size_t size, void *buf) | |||
177 | 176 | ||
178 | static void | 177 | static void |
179 | recv_cb (void *cls, | 178 | recv_cb (void *cls, |
180 | struct GNUNET_SERVER_Handle *server, | ||
181 | struct GNUNET_SERVER_Client *argclient, | 179 | struct GNUNET_SERVER_Client *argclient, |
182 | const struct GNUNET_MessageHeader *message) | 180 | const struct GNUNET_MessageHeader *message) |
183 | { | 181 | { |
diff --git a/src/util/test_server_disconnect.c b/src/util/test_server_disconnect.c index 60604b35c..7eab48284 100644 --- a/src/util/test_server_disconnect.c +++ b/src/util/test_server_disconnect.c | |||
@@ -67,7 +67,6 @@ server_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
67 | 67 | ||
68 | static void | 68 | static void |
69 | recv_cb (void *cls, | 69 | recv_cb (void *cls, |
70 | struct GNUNET_SERVER_Handle *server, | ||
71 | struct GNUNET_SERVER_Client *argclient, | 70 | struct GNUNET_SERVER_Client *argclient, |
72 | const struct GNUNET_MessageHeader *message) | 71 | const struct GNUNET_MessageHeader *message) |
73 | { | 72 | { |
diff --git a/src/util/test_server_with_client.c b/src/util/test_server_with_client.c index 4ca2b5bc3..22cf2cded 100644 --- a/src/util/test_server_with_client.c +++ b/src/util/test_server_with_client.c | |||
@@ -59,7 +59,6 @@ send_done (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
59 | 59 | ||
60 | static void | 60 | static void |
61 | recv_cb (void *cls, | 61 | recv_cb (void *cls, |
62 | struct GNUNET_SERVER_Handle *server, | ||
63 | struct GNUNET_SERVER_Client *argclient, | 62 | struct GNUNET_SERVER_Client *argclient, |
64 | const struct GNUNET_MessageHeader *message) | 63 | const struct GNUNET_MessageHeader *message) |
65 | { | 64 | { |
diff --git a/src/util/test_service.c b/src/util/test_service.c index b5cf0805e..ab8eca359 100644 --- a/src/util/test_service.c +++ b/src/util/test_service.c | |||
@@ -92,7 +92,6 @@ ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
92 | 92 | ||
93 | static void | 93 | static void |
94 | recv_cb (void *cls, | 94 | recv_cb (void *cls, |
95 | struct GNUNET_SERVER_Handle *server, | ||
96 | struct GNUNET_SERVER_Client *client, | 95 | struct GNUNET_SERVER_Client *client, |
97 | const struct GNUNET_MessageHeader *message) | 96 | const struct GNUNET_MessageHeader *message) |
98 | { | 97 | { |