while ( (NULL != (reply = plugin_pending_head)) &&
(size >= off + (msize = ntohs (reply->msg->size))))
{
-#if DEBUG_DV_MESSAGES
- GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "%s: transmit_notify (plugin) called with size %d (message sent)\n", my_short_id, msize);
-#endif
GNUNET_CONTAINER_DLL_remove (plugin_pending_head,
plugin_pending_tail,
reply);
{
struct GNUNET_DV_MessageReceived *received_msg;
struct PendingMessage *pending_message;
-#if DEBUG_DV_MESSAGES
- struct GNUNET_MessageHeader * packed_message_header;
- struct GNUNET_HELLO_Message *hello_msg;
- struct GNUNET_PeerIdentity hello_identity;
-#endif
char *sender_address;
size_t sender_address_len;
char *packed_msg_start;
packed_msg_start = (char *)&received_msg[1];
packed_msg_start = &packed_msg_start[sender_address_len];
memcpy(packed_msg_start, message, message_size);
-#if DEBUG_DV_MESSAGES
- packed_message_header = (struct GNUNET_MessageHeader *)packed_msg_start;
- if (ntohs(packed_message_header->type) == GNUNET_MESSAGE_TYPE_HELLO)
- {
- hello_msg = (struct GNUNET_HELLO_Message *)packed_msg_start;
- GNUNET_assert(GNUNET_OK == GNUNET_HELLO_get_id(hello_msg, &hello_identity));
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "%s: send_to_plugin: Packed HELLO message is about peer %s\n", my_short_id, GNUNET_i2s(&hello_identity));
- }
-#endif
pending_message = GNUNET_malloc(sizeof(struct PendingMessage) + size);
pending_message->msg = (struct GNUNET_MessageHeader *)&pending_message[1];
memcpy(&pending_message[1], received_msg, size);
size, GNUNET_TIME_UNIT_FOREVER_REL,
&transmit_to_plugin, NULL);
}
-#if DEBUG_DV_MESSAGES
- else
- {
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Failed to queue message for plugin, must be one in progress already!!\n");
- }
-#endif
}
else
{