gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r37739 - in gnunet/src: psyc social


From: gnunet
Subject: [GNUnet-SVN] r37739 - in gnunet/src: psyc social
Date: Fri, 19 Aug 2016 21:58:20 +0200

Author: tg
Date: 2016-08-19 21:58:20 +0200 (Fri, 19 Aug 2016)
New Revision: 37739

Modified:
   gnunet/src/psyc/psyc_api.c
   gnunet/src/social/gnunet-service-social.c
   gnunet/src/social/social_api.c
   gnunet/src/social/test_social.c
Log:
psyc, social

Modified: gnunet/src/psyc/psyc_api.c
===================================================================
--- gnunet/src/psyc/psyc_api.c  2016-08-19 16:35:48 UTC (rev 37738)
+++ gnunet/src/psyc/psyc_api.c  2016-08-19 19:58:20 UTC (rev 37739)
@@ -573,11 +573,10 @@
 
   if (NULL != chn->mq)
   {
-    struct GNUNET_MQ_Envelope *last = GNUNET_MQ_get_last_envelope (chn->mq);
-    if (NULL != last)
+    struct GNUNET_MQ_Envelope *env = GNUNET_MQ_get_last_envelope (chn->mq);
+    if (NULL != env)
     {
-      GNUNET_MQ_notify_sent (last,
-                             (GNUNET_MQ_NotifyCallback) channel_cleanup, chn);
+      GNUNET_MQ_notify_sent (env, (GNUNET_MQ_NotifyCallback) channel_cleanup, 
chn);
     }
     else
     {
@@ -619,17 +618,16 @@
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Master client disconnected (%d), re-connecting\n",
        (int) error);
+  if (NULL != chn->tmit)
+  {
+    GNUNET_PSYC_transmit_destroy (chn->tmit);
+    chn->tmit = NULL;
+  }
   if (NULL != chn->mq)
   {
     GNUNET_MQ_destroy (chn->mq);
     chn->mq = NULL;
   }
-  if (NULL != chn->tmit)
-  {
-    GNUNET_PSYC_transmit_destroy (chn->tmit);
-    chn->tmit = NULL;
-  }
-
   chn->reconnect_task = GNUNET_SCHEDULER_add_delayed (chn->reconnect_delay,
                                                       master_reconnect,
                                                       mst);
@@ -919,16 +917,16 @@
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Slave client disconnected (%d), re-connecting\n",
        (int) error);
+  if (NULL != chn->tmit)
+  {
+    GNUNET_PSYC_transmit_destroy (chn->tmit);
+    chn->tmit = NULL;
+  }
   if (NULL != chn->mq)
   {
     GNUNET_MQ_destroy (chn->mq);
     chn->mq = NULL;
   }
-  if (NULL != chn->tmit)
-  {
-    GNUNET_PSYC_transmit_destroy (chn->tmit);
-    chn->tmit = NULL;
-  }
   chn->reconnect_task = GNUNET_SCHEDULER_add_delayed (chn->reconnect_delay,
                                                       slave_reconnect,
                                                       slv);

Modified: gnunet/src/social/gnunet-service-social.c
===================================================================
--- gnunet/src/social/gnunet-service-social.c   2016-08-19 16:35:48 UTC (rev 
37738)
+++ gnunet/src/social/gnunet-service-social.c   2016-08-19 19:58:20 UTC (rev 
37739)
@@ -507,7 +507,7 @@
   struct Place *plc = &gst->plc;
   struct GNUNET_CONTAINER_MultiHashMap *
     plc_gst = GNUNET_CONTAINER_multihashmap_get (place_guests,
-                                                &plc->pub_key_hash);
+                                                 &plc->pub_key_hash);
   GNUNET_assert (NULL != plc_gst); // FIXME
   GNUNET_CONTAINER_multihashmap_remove (plc_gst, &plc->ego_pub_hash, gst);
 

Modified: gnunet/src/social/social_api.c
===================================================================
--- gnunet/src/social/social_api.c      2016-08-19 16:35:48 UTC (rev 37738)
+++ gnunet/src/social/social_api.c      2016-08-19 19:58:20 UTC (rev 37739)
@@ -1075,11 +1075,10 @@
 
   if (NULL != plc->mq)
   {
-    struct GNUNET_MQ_Envelope *last = GNUNET_MQ_get_last_envelope (plc->mq);
-    if (NULL != last)
+    struct GNUNET_MQ_Envelope *env = GNUNET_MQ_get_last_envelope (plc->mq);
+    if (NULL != env)
     {
-      GNUNET_MQ_notify_sent (last,
-                             (GNUNET_MQ_NotifyCallback) place_cleanup, plc);
+      GNUNET_MQ_notify_sent (env, (GNUNET_MQ_NotifyCallback) place_cleanup, 
plc);
     }
     else
     {
@@ -1132,16 +1131,16 @@
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Host client disconnected (%d), re-connecting\n",
        (int) error);
+  if (NULL != plc->tmit)
+  {
+    GNUNET_PSYC_transmit_destroy (plc->tmit);
+    plc->tmit = NULL;
+  }
   if (NULL != plc->mq)
   {
     GNUNET_MQ_destroy (plc->mq);
     plc->mq = NULL;
   }
-  if (NULL != plc->tmit)
-  {
-    GNUNET_PSYC_transmit_destroy (plc->tmit);
-    plc->tmit = NULL;
-  }
 
   plc->reconnect_task = GNUNET_SCHEDULER_add_delayed (plc->reconnect_delay,
                                                       host_reconnect,
@@ -1634,16 +1633,16 @@
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Guest client disconnected (%d), re-connecting\n",
        (int) error);
+  if (NULL != plc->tmit)
+  {
+    GNUNET_PSYC_transmit_destroy (plc->tmit);
+    plc->tmit = NULL;
+  }
   if (NULL != plc->mq)
   {
     GNUNET_MQ_destroy (plc->mq);
     plc->mq = NULL;
   }
-  if (NULL != plc->tmit)
-  {
-    GNUNET_PSYC_transmit_destroy (plc->tmit);
-    plc->tmit = NULL;
-  }
 
   plc->reconnect_task = GNUNET_SCHEDULER_add_delayed (plc->reconnect_delay,
                                                       guest_reconnect,
@@ -2690,11 +2689,10 @@
 
   if (NULL != app->mq)
   {
-    struct GNUNET_MQ_Envelope *last = GNUNET_MQ_get_last_envelope (app->mq);
-    if (NULL != last)
+    struct GNUNET_MQ_Envelope *env = GNUNET_MQ_get_last_envelope (app->mq);
+    if (NULL != env)
     {
-      GNUNET_MQ_notify_sent (last,
-                             (GNUNET_MQ_NotifyCallback) app_cleanup, app);
+      GNUNET_MQ_notify_sent (env, (GNUNET_MQ_NotifyCallback) app_cleanup, app);
     }
     else
     {

Modified: gnunet/src/social/test_social.c
===================================================================
--- gnunet/src/social/test_social.c     2016-08-19 16:35:48 UTC (rev 37738)
+++ gnunet/src/social/test_social.c     2016-08-19 19:58:20 UTC (rev 37739)
@@ -1123,7 +1123,7 @@
     break;
 
   default:
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "invalid test: %d\n", test);
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Invalid test: #%u\n", test);
     GNUNET_assert (0);
   }
 }




reply via email to

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