[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35339 - gnunet/src/transport
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35339 - gnunet/src/transport |
Date: |
Mon, 2 Mar 2015 21:38:01 +0100 |
Author: grothoff
Date: 2015-03-02 21:38:01 +0100 (Mon, 02 Mar 2015)
New Revision: 35339
Modified:
gnunet/src/transport/gnunet-service-transport_clients.c
gnunet/src/transport/gnunet-service-transport_plugins.c
gnunet/src/transport/plugin_transport_udp.c
Log:
fix #3649/#3591
Modified: gnunet/src/transport/gnunet-service-transport_clients.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_clients.c 2015-03-02
20:04:56 UTC (rev 35338)
+++ gnunet/src/transport/gnunet-service-transport_clients.c 2015-03-02
20:38:01 UTC (rev 35339)
@@ -1259,7 +1259,8 @@
client)) )
{
GNUNET_break (0);
- GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
+ GNUNET_SERVER_receive_done (client,
+ GNUNET_SYSERR);
return;
}
GNUNET_SERVER_disable_receive_done_warning (client);
@@ -1281,19 +1282,23 @@
pc.all = GNUNET_NO;
pc.id = msg->peer;
}
- GST_neighbours_iterate (&send_peer_information, &pc);
+ GST_neighbours_iterate (&send_peer_information,
+ &pc);
if (GNUNET_YES != ntohl (msg->one_shot))
{
- setup_peer_monitoring_client (client, &msg->peer);
+ setup_peer_monitoring_client (client,
+ &msg->peer);
}
else
{
- GNUNET_SERVER_transmit_context_append_data (tc, NULL, 0,
- GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_RESPONSE);
+ GNUNET_SERVER_transmit_context_append_data (tc,
+ NULL,
+ 0,
+
GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_RESPONSE);
}
-
- GNUNET_SERVER_transmit_context_run (tc, GNUNET_TIME_UNIT_FOREVER_REL);
+ GNUNET_SERVER_transmit_context_run (tc,
+ GNUNET_TIME_UNIT_FOREVER_REL);
}
@@ -1396,8 +1401,8 @@
if (0 == GNUNET_SERVER_notification_context_get_size (plugin_nc))
{
- fprintf (stderr, "UNSUB!\n");
- GST_plugins_monitor_subscribe (NULL, NULL);
+ GST_plugins_monitor_subscribe (NULL,
+ NULL);
return;
}
if ( (NULL == info) &&
@@ -1443,9 +1448,13 @@
msg->plugin_name_len = htons (slen);
msg->plugin_address_len = htons (alen);
name = (char *) &msg[1];
- memcpy (name, info->address->transport_name, slen);
+ memcpy (name,
+ info->address->transport_name,
+ slen);
addr = &name[slen];
- memcpy (addr, info->address->address, alen);
+ memcpy (addr,
+ info->address->address,
+ alen);
if (NULL != sync_client)
GNUNET_SERVER_notification_context_unicast (plugin_nc,
sync_client,
@@ -1473,9 +1482,12 @@
{
GNUNET_SERVER_client_mark_monitor (client);
GNUNET_SERVER_disable_receive_done_warning (client);
- GNUNET_SERVER_notification_context_add (plugin_nc, client);
+ GNUNET_SERVER_notification_context_add (plugin_nc,
+ client);
+ GNUNET_assert (NULL == sync_client);
sync_client = client;
- GST_plugins_monitor_subscribe (&plugin_session_info_cb, NULL);
+ GST_plugins_monitor_subscribe (&plugin_session_info_cb,
+ NULL);
}
Modified: gnunet/src/transport/gnunet-service-transport_plugins.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_plugins.c 2015-03-02
20:04:56 UTC (rev 35338)
+++ gnunet/src/transport/gnunet-service-transport_plugins.c 2015-03-02
20:38:01 UTC (rev 35339)
@@ -412,14 +412,18 @@
return "<plugin unknown>";
if (0 == address->address_length)
{
- GNUNET_snprintf (unable_to_show, sizeof (unable_to_show),
+ GNUNET_snprintf (unable_to_show,
+ sizeof (unable_to_show),
"<unable to stringify %u-byte long address of %s
transport>",
(unsigned int) address->address_length,
address->transport_name);
return unable_to_show;
}
- return (NULL != (s = api->address_to_string (NULL, address->address,
- address->address_length)) ? s : "<invalid>");
+ return (NULL != (s = api->address_to_string (NULL,
+ address->address,
+ address->address_length))
+ ? s
+ : "<invalid>");
}
Modified: gnunet/src/transport/plugin_transport_udp.c
===================================================================
--- gnunet/src/transport/plugin_transport_udp.c 2015-03-02 20:04:56 UTC (rev
35338)
+++ gnunet/src/transport/plugin_transport_udp.c 2015-03-02 20:38:01 UTC (rev
35339)
@@ -2397,6 +2397,9 @@
"# UDP sessions active",
GNUNET_CONTAINER_multipeermap_size (plugin->sessions),
GNUNET_NO);
+ notify_session_monitor (plugin,
+ s,
+ GNUNET_TRANSPORT_SS_INIT);
return s;
}
@@ -2522,11 +2525,8 @@
address,
s,
s->scope);
- notify_session_monitor (s->plugin,
+ notify_session_monitor (plugin,
s,
- GNUNET_TRANSPORT_SS_INIT);
- notify_session_monitor (s->plugin,
- s,
GNUNET_TRANSPORT_SS_UP);
}
GNUNET_free (address);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35339 - gnunet/src/transport,
gnunet <=