diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-12-23 22:08:21 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-12-23 22:08:21 +0000 |
commit | 912d1dc85990d15f2ce7fcfb837dc37cd327833b (patch) | |
tree | e82c187f9ec24c205b4d23fca4d7866eabc7887c /src/util/server.c | |
parent | 996d1af584e8ea60a3e833d4e145bc866a3cba45 (diff) | |
download | gnunet-912d1dc85990d15f2ce7fcfb837dc37cd327833b.tar.gz gnunet-912d1dc85990d15f2ce7fcfb837dc37cd327833b.zip |
-doxygen, indentation
Diffstat (limited to 'src/util/server.c')
-rw-r--r-- | src/util/server.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/util/server.c b/src/util/server.c index 8883d212e..c6d887c31 100644 --- a/src/util/server.c +++ b/src/util/server.c | |||
@@ -175,7 +175,7 @@ struct GNUNET_SERVER_Handle | |||
175 | /** | 175 | /** |
176 | * Set to #GNUNET_YES once we are in 'soft' shutdown where we wait for | 176 | * Set to #GNUNET_YES once we are in 'soft' shutdown where we wait for |
177 | * all non-monitor clients to disconnect before we call | 177 | * all non-monitor clients to disconnect before we call |
178 | * #GNUNET_SERVER_destroy. See 'test_monitor_clients'. Set to | 178 | * #GNUNET_SERVER_destroy. See test_monitor_clients(). Set to |
179 | * #GNUNET_SYSERR once the final destroy task has been scheduled | 179 | * #GNUNET_SYSERR once the final destroy task has been scheduled |
180 | * (we cannot run it in the same task). | 180 | * (we cannot run it in the same task). |
181 | */ | 181 | */ |
@@ -632,20 +632,22 @@ GNUNET_SERVER_create (GNUNET_CONNECTION_AccessCheck access, void *access_cls, | |||
632 | * their requests; however, monitor-clients are likely to 'never' | 632 | * their requests; however, monitor-clients are likely to 'never' |
633 | * disconnect during shutdown and thus will not be considered when | 633 | * disconnect during shutdown and thus will not be considered when |
634 | * determining if the server should continue to exist after | 634 | * determining if the server should continue to exist after |
635 | * 'GNUNET_SERVER_destroy' has been called. | 635 | * #GNUNET_SERVER_destroy() has been called. |
636 | * | 636 | * |
637 | * @param client the client to set the 'monitor' flag on | 637 | * @param client the client to set the 'monitor' flag on |
638 | */ | 638 | */ |
639 | void | 639 | void |
640 | GNUNET_SERVER_client_mark_monitor (struct GNUNET_SERVER_Client *client) | 640 | GNUNET_SERVER_client_mark_monitor (struct GNUNET_SERVER_Client *client) |
641 | { | 641 | { |
642 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
643 | "Marking client as monitor!\n"); | ||
642 | client->is_monitor = GNUNET_YES; | 644 | client->is_monitor = GNUNET_YES; |
643 | } | 645 | } |
644 | 646 | ||
645 | 647 | ||
646 | /** | 648 | /** |
647 | * Helper function for 'test_monitor_clients' to trigger | 649 | * Helper function for #test_monitor_clients() to trigger |
648 | * 'GNUNET_SERVER_destroy' after the stack has unwound. | 650 | * #GNUNET_SERVER_destroy() after the stack has unwound. |
649 | * | 651 | * |
650 | * @param cls the 'struct GNUNET_SERVER_Handle' to destroy | 652 | * @param cls the 'struct GNUNET_SERVER_Handle' to destroy |
651 | * @param tc unused | 653 | * @param tc unused |
@@ -655,6 +657,7 @@ do_destroy (void *cls, | |||
655 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 657 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
656 | { | 658 | { |
657 | struct GNUNET_SERVER_Handle *server = cls; | 659 | struct GNUNET_SERVER_Handle *server = cls; |
660 | |||
658 | GNUNET_SERVER_destroy (server); | 661 | GNUNET_SERVER_destroy (server); |
659 | } | 662 | } |
660 | 663 | ||
@@ -676,8 +679,7 @@ test_monitor_clients (struct GNUNET_SERVER_Handle *server) | |||
676 | if (GNUNET_NO == client->is_monitor) | 679 | if (GNUNET_NO == client->is_monitor) |
677 | return; /* not done yet */ | 680 | return; /* not done yet */ |
678 | server->in_soft_shutdown = GNUNET_SYSERR; | 681 | server->in_soft_shutdown = GNUNET_SYSERR; |
679 | GNUNET_SCHEDULER_add_continuation (&do_destroy, server, | 682 | GNUNET_SCHEDULER_add_now (&do_destroy, server); |
680 | GNUNET_SCHEDULER_REASON_PREREQ_DONE); | ||
681 | } | 683 | } |
682 | 684 | ||
683 | 685 | ||
@@ -925,9 +927,9 @@ GNUNET_SERVER_disable_receive_done_warning (struct GNUNET_SERVER_Client *client) | |||
925 | * @param sender the "pretended" sender of the message | 927 | * @param sender the "pretended" sender of the message |
926 | * can be NULL! | 928 | * can be NULL! |
927 | * @param message message to transmit | 929 | * @param message message to transmit |
928 | * @return GNUNET_OK if the message was OK and the | 930 | * @return #GNUNET_OK if the message was OK and the |
929 | * connection can stay open | 931 | * connection can stay open |
930 | * GNUNET_SYSERR if the connection to the | 932 | * #GNUNET_SYSERR if the connection to the |
931 | * client should be shut down | 933 | * client should be shut down |
932 | */ | 934 | */ |
933 | int | 935 | int |
@@ -1318,8 +1320,8 @@ GNUNET_SERVER_client_drop (struct GNUNET_SERVER_Client *client) | |||
1318 | * | 1320 | * |
1319 | * @param client the client to get the address for | 1321 | * @param client the client to get the address for |
1320 | * @param addr where to store the address | 1322 | * @param addr where to store the address |
1321 | * @param addrlen where to store the length of the address | 1323 | * @param addrlen where to store the length of the @a addr |
1322 | * @return GNUNET_OK on success | 1324 | * @return #GNUNET_OK on success |
1323 | */ | 1325 | */ |
1324 | int | 1326 | int |
1325 | GNUNET_SERVER_client_get_address (struct GNUNET_SERVER_Client *client, | 1327 | GNUNET_SERVER_client_get_address (struct GNUNET_SERVER_Client *client, |
@@ -1553,7 +1555,7 @@ GNUNET_SERVER_client_disconnect (struct GNUNET_SERVER_Client *client) | |||
1553 | * instead of potentially buffering multiple messages. | 1555 | * instead of potentially buffering multiple messages. |
1554 | * | 1556 | * |
1555 | * @param client handle to the client | 1557 | * @param client handle to the client |
1556 | * @return GNUNET_OK on success | 1558 | * @return #GNUNET_OK on success |
1557 | */ | 1559 | */ |
1558 | int | 1560 | int |
1559 | GNUNET_SERVER_client_disable_corking (struct GNUNET_SERVER_Client *client) | 1561 | GNUNET_SERVER_client_disable_corking (struct GNUNET_SERVER_Client *client) |
@@ -1566,7 +1568,7 @@ GNUNET_SERVER_client_disable_corking (struct GNUNET_SERVER_Client *client) | |||
1566 | * Wrapper for transmission notification that calls the original | 1568 | * Wrapper for transmission notification that calls the original |
1567 | * callback and update the last activity time for our connection. | 1569 | * callback and update the last activity time for our connection. |
1568 | * | 1570 | * |
1569 | * @param cls the 'struct GNUNET_SERVER_Client' | 1571 | * @param cls the `struct GNUNET_SERVER_Client` |
1570 | * @param size number of bytes we can transmit | 1572 | * @param size number of bytes we can transmit |
1571 | * @param buf where to copy the message | 1573 | * @param buf where to copy the message |
1572 | * @return number of bytes actually transmitted | 1574 | * @return number of bytes actually transmitted |
@@ -1597,7 +1599,7 @@ transmit_ready_callback_wrapper (void *cls, size_t size, void *buf) | |||
1597 | * @param callback_cls closure for @a callback | 1599 | * @param callback_cls closure for @a callback |
1598 | * @return non-NULL if the notify callback was queued; can be used | 1600 | * @return non-NULL if the notify callback was queued; can be used |
1599 | * to cancel the request using | 1601 | * to cancel the request using |
1600 | * #GNUNET_SERVER_notify_transmit_ready_cancel. | 1602 | * #GNUNET_SERVER_notify_transmit_ready_cancel(). |
1601 | * NULL if we are already going to notify someone else (busy) | 1603 | * NULL if we are already going to notify someone else (busy) |
1602 | */ | 1604 | */ |
1603 | struct GNUNET_SERVER_TransmitHandle * | 1605 | struct GNUNET_SERVER_TransmitHandle * |