gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated: avoid bogus reconnect messa


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: avoid bogus reconnect message
Date: Tue, 26 Feb 2019 09:39:57 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 6eb89731f avoid bogus reconnect message
6eb89731f is described below

commit 6eb89731fdfa66481e4f0b1fc3fca6139d99039f
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Feb 26 09:39:07 2019 +0100

    avoid bogus reconnect message
---
 src/core/core_api_monitor_peers.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/core/core_api_monitor_peers.c 
b/src/core/core_api_monitor_peers.c
index 8820b44d1..0ebb94d7b 100644
--- a/src/core/core_api_monitor_peers.c
+++ b/src/core/core_api_monitor_peers.c
@@ -11,7 +11,7 @@
      WITHOUT ANY WARRANTY; without even the implied warranty of
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      Affero General Public License for more details.
-    
+
      You should have received a copy of the GNU Affero General Public License
      along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
@@ -135,10 +135,11 @@ reconnect (struct GNUNET_CORE_MonitorHandle *mh)
   if (NULL == mh->mq)
     return;
   /* notify callback about reconnect */
-  mh->peer_cb (mh->peer_cb_cls,
-               NULL,
-               GNUNET_CORE_KX_CORE_DISCONNECT,
-               GNUNET_TIME_UNIT_FOREVER_ABS);
+  if (NULL != mh->peer_cb)
+    mh->peer_cb (mh->peer_cb_cls,
+                 NULL,
+                 GNUNET_CORE_KX_CORE_DISCONNECT,
+                 GNUNET_TIME_UNIT_FOREVER_ABS);
   env = GNUNET_MQ_msg (msg,
                        GNUNET_MESSAGE_TYPE_CORE_MONITOR_PEERS);
   GNUNET_MQ_send (mh->mq,
@@ -172,9 +173,9 @@ GNUNET_CORE_monitor_start (const struct 
GNUNET_CONFIGURATION_Handle *cfg,
   GNUNET_assert (NULL != peer_cb);
   mh = GNUNET_new (struct GNUNET_CORE_MonitorHandle);
   mh->cfg = cfg;
+  reconnect (mh);
   mh->peer_cb = peer_cb;
   mh->peer_cb_cls = peer_cb_cls;
-  reconnect (mh);
   if (NULL == mh->mq)
   {
     GNUNET_free (mh);

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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