return; /* Message send already in progress */
if ((pending != NULL) && (coreAPI != NULL))
- core_transmit_handle = GNUNET_CORE_notify_transmit_ready (coreAPI, pending->importance, pending->timeout, &pending->recipient, pending->msg_size, &core_transmit_notify, NULL);
+ core_transmit_handle = GNUNET_CORE_notify_transmit_ready (coreAPI,
+ GNUNET_YES,
+ pending->importance,
+ pending->timeout,
+ &pending->recipient,
+ pending->msg_size,
+ &core_transmit_notify, NULL);
}
+
/**
* Function called to notify a client about the socket
* being ready to queue more data. "buf" will be
GNUNET_SCHEDULER_add_now(&try_core_send, NULL);
/*if (reply != NULL)
- core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, reply->importance, reply->timeout, &reply->recipient, reply->msg_size, &core_transmit_notify, NULL);*/
+ core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, GNUNET_YES, reply->importance, reply->timeout, &reply->recipient, reply->msg_size, &core_transmit_notify, NULL);*/
return off;
}
p2p_dv_MESSAGE_NeighborInfo *message;
struct PendingMessage *pending_message;
- if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN)
+ if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
{
#if DEBUG_DV_GOSSIP
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
GNUNET_SCHEDULER_add_now(try_core_send, NULL);
/*if (core_transmit_handle == NULL)
- core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, default_dv_priority, GNUNET_TIME_relative_get_forever(), &to->identity, sizeof(p2p_dv_MESSAGE_NeighborInfo), &core_transmit_notify, NULL);*/
+ core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, GNUNET_YES, default_dv_priority, GNUNET_TIME_relative_get_forever(), &to->identity, sizeof(p2p_dv_MESSAGE_NeighborInfo), &core_transmit_notify, NULL);*/
}
GNUNET_CONTAINER_DLL_remove (referrer->referee_head,
referrer->referee_tail, referee);
}
- GNUNET_CONTAINER_heap_remove_node (neighbor_max_heap, referee->max_loc);
- GNUNET_CONTAINER_heap_remove_node (neighbor_min_heap, referee->min_loc);
+ GNUNET_CONTAINER_heap_remove_node (referee->max_loc);
+ GNUNET_CONTAINER_heap_remove_node (referee->min_loc);
GNUNET_CONTAINER_multihashmap_remove_all (extended_neighbors,
&referee->identity.hashPubKey);
GNUNET_free_non_null (referee->pkey);
GNUNET_SCHEDULER_add_now(try_core_send, NULL);
/*if (core_transmit_handle == NULL)
- core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, default_dv_priority, GNUNET_TIME_relative_get_forever(), ¬ify->identity, sizeof(p2p_dv_MESSAGE_Disconnect), &core_transmit_notify, NULL);*/
+ core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, GNUNET_YES, default_dv_priority, GNUNET_TIME_relative_get_forever(), ¬ify->identity, sizeof(p2p_dv_MESSAGE_Disconnect), &core_transmit_notify, NULL);*/
return GNUNET_YES;
}
* @param cls closure
* @param peer id of the peer, NULL for last call
* @param hello hello message for the peer (can be NULL)
+ * @param err_msg NULL if successful, otherwise contains error message
*/
static void
process_peerinfo (void *cls,
const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_HELLO_Message *hello)
+ const struct GNUNET_HELLO_Message *hello,
+ const char *err_msg)
{
struct PeerIteratorContext *peerinfo_iterator = cls;
struct DirectNeighbor *neighbor = peerinfo_iterator->neighbor;
char *neighbor_pid;
#endif
int sent;
-
+ if (err_msg != NULL)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ _("Error in communication with PEERINFO service\n"));
+ /* return; */
+ }
if (peer == NULL)
{
if (distant->pkey == NULL)