static struct TransportPlugin *ptail;
-static int
+static int
map_check_it (void *cls,
const struct GNUNET_PeerIdentity * key,
void *value)
}
-static int
+static int
map_cleanup_it (void *cls,
const struct GNUNET_PeerIdentity * key,
void *value)
char line[1024];
int count = -1;
- switch (protocol)
+ switch (protocol)
{
case tcp:
#ifdef MINGW
return cur;
}
-static int
+static int
stats_check_cb (void *cls, const char *subsystem,
const char *name, uint64_t value,
int is_persistent)
GNUNET_NETWORK_STRUCT_END
-static size_t
+static size_t
send_transport_ping_cb (void *cls, size_t size, void *buf)
{
struct PeerContainer * pc = cls;
struct PING ping;
size_t mlen = sizeof (struct PING);
-
+
if (size < mlen)
{
GNUNET_break (0);
return 0;
}
-
+
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending transport ping to `%s'\n", GNUNET_i2s (&pc->id));
ping.header.size = htons (mlen);
ping.header.type = htons (1234);
ping.src = htons (0);
-
+
pc->th_ping = NULL;
-
+
memcpy (buf, &ping, mlen);
return mlen;
}
-static size_t
+static size_t
send_core_ping_cb (void *cls, size_t size, void *buf)
{
struct PeerContainer * pc = cls;
GNUNET_break (0);
return 0;
}
-
+
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending core ping to `%s'\n", GNUNET_i2s (&pc->id));
ping.header.size = htons (mlen);
ping.header.type = htons (1234);
ping.src = htons (1);
-
+
pc->ch_ping = NULL;
-
+
memcpy (buf, &ping, mlen);
return mlen;
}
-static int
+static int
map_ping_it (void *cls,
const struct GNUNET_PeerIdentity * key,
void *value)
}
-static size_t
+static size_t
send_transport_pong_cb (void *cls, size_t size, void *buf)
{
struct PeerContainer * pc = cls;
}
-static size_t
+static size_t
send_core_pong_cb (void *cls, size_t size, void *buf)
{
struct PeerContainer * pc = cls;
struct PING ping;
size_t mlen = sizeof (struct PING);
-
+
if (size < mlen)
{
GNUNET_break (0);
return 0;
}
-
+
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sending core pong to `%s'\n", GNUNET_i2s (&pc->id));
ping.header.size = htons (mlen);
ping.header.type = htons (4321);
ping.src = htons (1);
-
+
pc->ch_pong = NULL;
-
+
memcpy (buf, &ping, mlen);
return mlen;
}
if (NULL != ch)
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Disconnecting from core service\n");
GNUNET_CORE_disconnect (ch);
ch = NULL;
const struct GNUNET_PeerIdentity *peer)
{
GNUNET_assert (transport_connections > 0);
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"TRANSPORT disconnect for peer `%s' (%u total)\n",
- GNUNET_i2s (peer),
+ GNUNET_i2s (peer),
transport_connections);
map_disconnect (peer, th);
transport_connections --;
if ((message->size == ntohs (sizeof (struct PING))) &&
(message->type == ntohs (1234)))
{
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Received %s %s from peer `%s'\n",
"TRANSPORT",
"PING",
}
}
-static int
+static int
core_notify_receive_cb (void *cls,
const struct GNUNET_PeerIdentity * peer,
const struct GNUNET_MessageHeader * message)
static void
-core_init_cb (void *cls,
+core_init_cb (void *cls,
const struct GNUNET_PeerIdentity *my_identity)
{
my_peer_id = *my_identity;