}
+#if 0 // unused as yet
/**
* Send message to all connected parents.
*/
cadet_send_cb, (void *) msg);
return n;
}
+#endif
/**
void **ctx,
const struct GNUNET_MessageHeader *m)
{
- struct Channel *chn = *ctx;
+ //struct Channel *chn = *ctx;
/* @todo FIXME: got replay error response, send request to other members */
struct GNUNET_MULTICAST_Member *
mem = GNUNET_CLIENT_MANAGER_get_user_context_ (client, sizeof (*grp));
grp = &mem->grp;
- struct MulticastReplayResponseMessage *
- res = (struct MulticastReplayResponseMessage *) msg;
-
+ // FIXME: Something is missing here for the code to make sense
+ //struct MulticastReplayResponseMessage *
+ // res = (struct MulticastReplayResponseMessage *) msg;
if (GNUNET_YES == grp->is_disconnecting)
return;
/** exit code */
static int ret = 1;
+/** are we waiting for service to close our connection */
+static char is_disconnecting = 0;
+
/** Task handle for timeout termination. */
struct GNUNET_SCHEDULER_Task *timeout_task;
static void
disconnect ()
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "disconnect()\n");
- GNUNET_SOCIAL_app_disconnect (app, app_disconnected, NULL);
+ // handle that we get called several times from several places, but should we?
+ if (!is_disconnecting++) {
+ GNUNET_SOCIAL_app_disconnect (app, app_disconnected, NULL);
+ }
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "disconnect() called for the #%d time\n", is_disconnecting);
}
timeout (void *cls)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "timeout()\n");
- //disconnect ();
+ disconnect ();
}
static void
schedule_success (void *cls)
{
ret = 0;
- //disconnect ();
+ disconnect ();
}
static void
schedule_fail (void *cls)
{
- //disconnect ();
+ disconnect ();
}
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg, service_name, "SOCKSHOST", &host0))
host0 = NULL; /* you don't want to feed a static string to free(), right? */
- socks5 = GNUNET_CONNECTION_create_from_connect (cfg, host0 || "127.0.0.1", port0);
+ socks5 = GNUNET_CONNECTION_create_from_connect (cfg, (char*)(host0 || "127.0.0.1"), port0);
if (host0) GNUNET_free (host0);
/* Sets to NULL if they do not exist */