diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-11-23 20:12:32 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-11-23 20:12:32 +0000 |
commit | d60c79921cb80f2173d800785ec5d39f6cdbca8c (patch) | |
tree | 0aec29c3348c2daf8babd979963b1212e6fabcfb /src/transport/gnunet-service-transport_clients.c | |
parent | e5d9d0d24bc32dcebcd5d2f86ca5cca579bc5dbb (diff) | |
download | gnunet-d60c79921cb80f2173d800785ec5d39f6cdbca8c.tar.gz gnunet-d60c79921cb80f2173d800785ec5d39f6cdbca8c.zip |
-fix misc monitoring issues
Diffstat (limited to 'src/transport/gnunet-service-transport_clients.c')
-rw-r--r-- | src/transport/gnunet-service-transport_clients.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/transport/gnunet-service-transport_clients.c b/src/transport/gnunet-service-transport_clients.c index 96b3e0bf3..d0aba723d 100644 --- a/src/transport/gnunet-service-transport_clients.c +++ b/src/transport/gnunet-service-transport_clients.c | |||
@@ -1235,7 +1235,6 @@ send_peer_information (void *cls, | |||
1235 | } | 1235 | } |
1236 | 1236 | ||
1237 | 1237 | ||
1238 | |||
1239 | /** | 1238 | /** |
1240 | * Client asked to obtain information about a specific or all peers | 1239 | * Client asked to obtain information about a specific or all peers |
1241 | * Process the request. | 1240 | * Process the request. |
@@ -1399,6 +1398,7 @@ plugin_session_info_cb (void *cls, | |||
1399 | 1398 | ||
1400 | if (0 == GNUNET_SERVER_notification_context_get_size (plugin_nc)) | 1399 | if (0 == GNUNET_SERVER_notification_context_get_size (plugin_nc)) |
1401 | { | 1400 | { |
1401 | fprintf (stderr, "UNSUB!\n"); | ||
1402 | GST_plugins_monitor_subscribe (NULL, NULL); | 1402 | GST_plugins_monitor_subscribe (NULL, NULL); |
1403 | return; | 1403 | return; |
1404 | } | 1404 | } |
@@ -1463,9 +1463,9 @@ clients_handle_monitor_plugins (void *cls, | |||
1463 | { | 1463 | { |
1464 | GNUNET_SERVER_client_mark_monitor (client); | 1464 | GNUNET_SERVER_client_mark_monitor (client); |
1465 | GNUNET_SERVER_disable_receive_done_warning (client); | 1465 | GNUNET_SERVER_disable_receive_done_warning (client); |
1466 | if (0 == GNUNET_SERVER_notification_context_get_size (plugin_nc)) | ||
1467 | GST_plugins_monitor_subscribe (&plugin_session_info_cb, NULL); | ||
1468 | GNUNET_SERVER_notification_context_add (plugin_nc, client); | 1466 | GNUNET_SERVER_notification_context_add (plugin_nc, client); |
1467 | if (1 == GNUNET_SERVER_notification_context_get_size (plugin_nc)) | ||
1468 | GST_plugins_monitor_subscribe (&plugin_session_info_cb, NULL); | ||
1469 | } | 1469 | } |
1470 | 1470 | ||
1471 | 1471 | ||
@@ -1557,7 +1557,8 @@ GST_clients_stop () | |||
1557 | * @param may_drop #GNUNET_YES if the message can be dropped / is payload | 1557 | * @param may_drop #GNUNET_YES if the message can be dropped / is payload |
1558 | */ | 1558 | */ |
1559 | void | 1559 | void |
1560 | GST_clients_broadcast (const struct GNUNET_MessageHeader *msg, int may_drop) | 1560 | GST_clients_broadcast (const struct GNUNET_MessageHeader *msg, |
1561 | int may_drop) | ||
1561 | { | 1562 | { |
1562 | struct TransportClient *tc; | 1563 | struct TransportClient *tc; |
1563 | 1564 | ||
@@ -1579,7 +1580,8 @@ GST_clients_broadcast (const struct GNUNET_MessageHeader *msg, int may_drop) | |||
1579 | */ | 1580 | */ |
1580 | void | 1581 | void |
1581 | GST_clients_unicast (struct GNUNET_SERVER_Client *client, | 1582 | GST_clients_unicast (struct GNUNET_SERVER_Client *client, |
1582 | const struct GNUNET_MessageHeader *msg, int may_drop) | 1583 | const struct GNUNET_MessageHeader *msg, |
1584 | int may_drop) | ||
1583 | { | 1585 | { |
1584 | struct TransportClient *tc; | 1586 | struct TransportClient *tc; |
1585 | 1587 | ||
@@ -1604,9 +1606,10 @@ GST_clients_broadcast_peer_notification (const struct GNUNET_PeerIdentity *peer, | |||
1604 | enum GNUNET_TRANSPORT_PeerState state, | 1606 | enum GNUNET_TRANSPORT_PeerState state, |
1605 | struct GNUNET_TIME_Absolute state_timeout) | 1607 | struct GNUNET_TIME_Absolute state_timeout) |
1606 | { | 1608 | { |
1609 | static struct GNUNET_PeerIdentity all_zeros; | ||
1607 | struct PeerIterateResponseMessage *msg; | 1610 | struct PeerIterateResponseMessage *msg; |
1608 | struct MonitoringClient *mc; | 1611 | struct MonitoringClient *mc; |
1609 | static struct GNUNET_PeerIdentity all_zeros; | 1612 | |
1610 | msg = compose_address_iterate_response_message (peer, address); | 1613 | msg = compose_address_iterate_response_message (peer, address); |
1611 | msg->state = htonl (state); | 1614 | msg->state = htonl (state); |
1612 | msg->state_timeout = GNUNET_TIME_absolute_hton (state_timeout); | 1615 | msg->state_timeout = GNUNET_TIME_absolute_hton (state_timeout); |