diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-04-22 19:52:39 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-04-22 19:52:39 +0000 |
commit | e2bf225a32bb93731b574ad698f20acbb92a5803 (patch) | |
tree | dc151b39eb6bb96eaa03c447a92205e8c4254b58 /src/statistics/gnunet-service-statistics.c | |
parent | 9ba0af50e8f41d40163bbac21003261928084c48 (diff) | |
download | gnunet-e2bf225a32bb93731b574ad698f20acbb92a5803.tar.gz gnunet-e2bf225a32bb93731b574ad698f20acbb92a5803.zip |
introducing soft shutdown concept for services; during soft shutdown, services that are still managing non-monitor clients continue to run until those clients disconnect; however, the services do stop to accept new connections (will stop listening); soft shutdown is now used by ats, transport, peerinfo, namestore and most importantly statistics; this should fix #2197
Diffstat (limited to 'src/statistics/gnunet-service-statistics.c')
-rw-r--r-- | src/statistics/gnunet-service-statistics.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/statistics/gnunet-service-statistics.c b/src/statistics/gnunet-service-statistics.c index 2b60d760b..5cced1426 100644 --- a/src/statistics/gnunet-service-statistics.c +++ b/src/statistics/gnunet-service-statistics.c | |||
@@ -651,6 +651,7 @@ handle_watch (void *cls, struct GNUNET_SERVER_Client *client, | |||
651 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); | 651 | GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); |
652 | return; | 652 | return; |
653 | } | 653 | } |
654 | GNUNET_SERVER_client_mark_monitor (client); | ||
654 | ce = make_client_entry (client); | 655 | ce = make_client_entry (client); |
655 | msize = ntohs (message->size); | 656 | msize = ntohs (message->size); |
656 | if (msize < sizeof (struct GNUNET_MessageHeader)) | 657 | if (msize < sizeof (struct GNUNET_MessageHeader)) |
@@ -844,7 +845,7 @@ main (int argc, char *const *argv) | |||
844 | { | 845 | { |
845 | return (GNUNET_OK == | 846 | return (GNUNET_OK == |
846 | GNUNET_SERVICE_run (argc, argv, "statistics", | 847 | GNUNET_SERVICE_run (argc, argv, "statistics", |
847 | GNUNET_SERVICE_OPTION_NONE, &run, NULL)) ? 0 : 1; | 848 | GNUNET_SERVICE_OPTION_SOFT_SHUTDOWN, &run, NULL)) ? 0 : 1; |
848 | } | 849 | } |
849 | 850 | ||
850 | /* end of gnunet-service-statistics.c */ | 851 | /* end of gnunet-service-statistics.c */ |