p = find_transport (plugin);
if ((p == NULL) || (addr_len == 0) || (addr == NULL))
return NULL;
-
return p->api->address_to_string (NULL,
addr,
addr_len);
- return NULL;
}
struct ClientMessageQueueEntry *q;
uint16_t msize;
+ /* Client==NULL when GNUNET_SERVER_Client disconnected and was
+ * freed in client_disconnect_notification
+ */
+ if (client->client == NULL)
+ {
+ GNUNET_break (0);
+ return;
+ }
+
if ((client->message_count >= MAX_PENDING) && (GNUNET_YES == may_drop))
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
}
else
{
+ GNUNET_SERVER_transmit_context_append_data (tc, NULL, 0,
+ GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_REPLY);
GNUNET_SERVER_transmit_context_run (tc, GNUNET_TIME_UNIT_FOREVER_REL);
}
}
const char *address;
uint16_t size;
struct GNUNET_SERVER_TransmitContext *tc;
- struct GNUNET_TIME_Absolute timeout;
struct GNUNET_TIME_Relative rtimeout;
int32_t numeric;
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
return;
}
- timeout = GNUNET_TIME_absolute_ntoh (alum->timeout);
- rtimeout = GNUNET_TIME_absolute_get_remaining (timeout);
+ rtimeout = GNUNET_TIME_relative_ntoh (alum->timeout);
numeric = ntohl (alum->numeric_only);
lsPlugin = find_transport (nameTransport);
if (NULL == lsPlugin)
uint16_t size;
struct GNUNET_SERVER_TransmitContext *tc;
- struct GNUNET_TIME_Absolute timeout;
struct GNUNET_TIME_Relative rtimeout;
char *addr_buf;
}
peer_address_lookup = (const struct PeerAddressLookupMessage *) message;
- timeout = GNUNET_TIME_absolute_ntoh (peer_address_lookup->timeout);
- rtimeout = GNUNET_TIME_absolute_get_remaining (timeout);
+ rtimeout = GNUNET_TIME_relative_ntoh (peer_address_lookup->timeout);
neighbor_iterator = find_neighbour (&peer_address_lookup->peer);
}
+static const struct GNUNET_MessageHeader *
+do_get_our_hello ()
+{
+ return (const struct GNUNET_MessageHeader*) our_hello;
+}
+
+
/**
* Setup the environment for this plugin.
*/
{
plug->env.cfg = cfg;
plug->env.my_identity = &my_identity;
- plug->env.our_hello = &our_hello;
+ plug->env.get_our_hello = &do_get_our_hello;
plug->env.cls = plug;
plug->env.receive = &plugin_env_receive;
plug->env.notify_address = &plugin_env_notify_address;
pos->message_count--;
GNUNET_free (mqe);
}
- GNUNET_CONTAINER_multihashmap_iterate (neighbours,
- &null_mq_client_pointers,
- pos);
+ if (NULL != neighbours)
+ GNUNET_CONTAINER_multihashmap_iterate (neighbours,
+ &null_mq_client_pointers,
+ pos);
if (prev == NULL)
clients = pos->next;
else