gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r37243 - gnunet/src/social


From: gnunet
Subject: [GNUnet-SVN] r37243 - gnunet/src/social
Date: Mon, 6 Jun 2016 22:00:18 +0200

Author: tg
Date: 2016-06-06 22:00:18 +0200 (Mon, 06 Jun 2016)
New Revision: 37243

Modified:
   gnunet/src/social/gnunet-social.c
Log:
debug msgs

Modified: gnunet/src/social/gnunet-social.c
===================================================================
--- gnunet/src/social/gnunet-social.c   2016-06-06 16:11:56 UTC (rev 37242)
+++ gnunet/src/social/gnunet-social.c   2016-06-06 20:00:18 UTC (rev 37243)
@@ -163,6 +163,7 @@
 static void
 disconnected (void *cls)
 {
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "disconnected()\n");
   GNUNET_SCHEDULER_shutdown ();
 }
 
@@ -173,6 +174,7 @@
 static void
 app_disconnected (void *cls)
 {
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "app_disconnected()\n");
   if (hst || gst)
   {
     if (hst)
@@ -197,10 +199,11 @@
 static void
 disconnect ()
 {
-  GNUNET_CORE_disconnect (core);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "disconnect()\n");
   GNUNET_SOCIAL_app_disconnect (app, app_disconnected, NULL);
 }
 
+
 /**
  * Callback called when the program failed to finish the requested operation 
in time.
  */
@@ -207,7 +210,7 @@
 static void
 timeout (void *cls)
 {
-  GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Timeout.\n");
+  GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "timeout()\n");
   disconnect ();
 }
 
@@ -1058,8 +1061,11 @@
  * Establish application connection to receive available egos and places.
  */
 static void
-app_connect ()
+app_connect (void *cls)
 {
+  GNUNET_CORE_disconnect (core);
+  core = NULL;
+
   app = GNUNET_SOCIAL_app_connect (cfg, opt_app,
                                    app_recv_ego,
                                    app_recv_host,
@@ -1076,7 +1082,7 @@
 core_connected (void *cls, const struct GNUNET_PeerIdentity *my_identity)
 {
   this_peer = *my_identity;
-  app_connect ();
+  GNUNET_SCHEDULER_add_now (app_connect, NULL);
 }
 
 
@@ -1095,9 +1101,9 @@
 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);
+//  GNUNET_SIGNAL_handler_install (SIGINT, disconnect);
+//  GNUNET_SIGNAL_handler_install (SIGTERM, disconnect);
+//  GNUNET_SIGNAL_handler_install (SIGKILL, disconnect);
 
   cfg = c;
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]