summaryrefslogtreecommitdiff
path: root/src/transport/gnunet-transport.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-11-23 19:24:08 +0000
committerChristian Grothoff <christian@grothoff.org>2014-11-23 19:24:08 +0000
commite5d9d0d24bc32dcebcd5d2f86ca5cca579bc5dbb (patch)
tree892b7997407e9705e7a4072ffe8397f03c40adb5 /src/transport/gnunet-transport.c
parentb3db692279aec4f8e016ee3ebd83a18ce182bd35 (diff)
-fix sync signalling for plugin monitoring
Diffstat (limited to 'src/transport/gnunet-transport.c')
-rw-r--r--src/transport/gnunet-transport.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c
index 109622567..24be066bc 100644
--- a/src/transport/gnunet-transport.c
+++ b/src/transport/gnunet-transport.c
@@ -1599,6 +1599,9 @@ plugin_monitoring_cb (void *cls,
const char *state;
struct PluginMonitorAddress *addr;
+ if ( (NULL == info) &&
+ (NULL == session) )
+ return; /* in sync with transport service */
if ( (NULL != cpid) &&
(0 != memcmp (&info->address->peer,
cpid,
@@ -1740,6 +1743,14 @@ process_peer_monitoring_cb (void *cls,
}
+/**
+ * Function called with our result of trying to connect to the
+ * transport service. Will retry 10 times, and if we still
+ * fail to connect terminate with an error message.
+ *
+ * @param cls NULL
+ * @param result #GNUNET_OK if we connected to the service
+ */
static void
try_connect_cb (void *cls,
const int result)
@@ -1753,8 +1764,12 @@ try_connect_cb (void *cls,
}
retries++;
if (retries < 10)
- tc_handle = GNUNET_TRANSPORT_try_connect (handle, &pid, try_connect_cb,
- NULL);
+ {
+ tc_handle = GNUNET_TRANSPORT_try_connect (handle,
+ &pid,
+ &try_connect_cb,
+ NULL);
+ }
else
{
FPRINTF (stderr,