[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r37251 - gnunet/src/social
From: |
gnunet |
Subject: |
[GNUnet-SVN] r37251 - gnunet/src/social |
Date: |
Tue, 7 Jun 2016 14:55:01 +0200 |
Author: tg
Date: 2016-06-07 14:55:00 +0200 (Tue, 07 Jun 2016)
New Revision: 37251
Modified:
gnunet/src/social/gnunet-social.c
Log:
social cli: fix shutdown
Modified: gnunet/src/social/gnunet-social.c
===================================================================
--- gnunet/src/social/gnunet-social.c 2016-06-07 11:50:55 UTC (rev 37250)
+++ gnunet/src/social/gnunet-social.c 2016-06-07 12:55:00 UTC (rev 37251)
@@ -204,6 +204,13 @@
}
+static void
+scheduler_shutdown (void *cls)
+{
+ disconnect ();
+}
+
+
/**
* Callback called when the program failed to finish the requested operation
in time.
*/
@@ -1106,10 +1113,6 @@
run (void *cls, char *const *args, const char *cfgfile,
const struct GNUNET_CONFIGURATION_Handle *c)
{
-// GNUNET_SIGNAL_handler_install (SIGINT, disconnect);
-// GNUNET_SIGNAL_handler_install (SIGTERM, disconnect);
-// GNUNET_SIGNAL_handler_install (SIGKILL, disconnect);
-
cfg = c;
if (!opt_method)
@@ -1130,6 +1133,7 @@
op_status = 1;
}
+ GNUNET_SCHEDULER_add_shutdown (scheduler_shutdown, NULL);
if (!opt_follow)
{
timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, timeout, NULL);
@@ -1153,10 +1157,9 @@
if (opt_ego)
{
- GNUNET_assert (GNUNET_OK ==
- GNUNET_CRYPTO_ecdsa_public_key_from_string (opt_ego,
- strlen
(opt_ego),
- &ego_pub_key));
+ GNUNET_CRYPTO_ecdsa_public_key_from_string (opt_ego,
+ strlen (opt_ego),
+ &ego_pub_key);
}
core = GNUNET_CORE_connect (cfg, NULL, &core_connected, NULL, NULL,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r37251 - gnunet/src/social,
gnunet <=