}
}
+
/**
* Function to set the timer for the next timeout of the fragment queue
* @param plugin the handle to the plugin struct
*/
static void
-set_next_send (struct Plugin *const plugin)
+set_next_send (struct Plugin *plugin)
{
struct GNUNET_TIME_Relative next_send;
}
fmq = fmq_next;
}
-
session->mac->fragment_messages_out_count--;
session->fragment_messages_out_count--;
plugin->pending_Fragment_Messages--;
struct GNUNET_TRANSPORT_WLAN_RadiotapSendMessage *header,
uint16_t size)
{
- header->header.type = ntohs (GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA);
+ header->header.type = ntohs (GNUNET_MESSAGE_TYPE_WLAN_DATA_TO_HELPER);
header->header.size = ntohs (size);
if (endpoint != NULL)
{
GNUNET_assert (fm != NULL);
fm->timeout_task = GNUNET_SCHEDULER_NO_TASK;
- if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN)
- {
- return;
- }
+ if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
+ return;
free_fragment_message (fm->session->mac->plugin, fm);
}
struct FragmentMessage_queue *fmq;
ssize_t bytes;
-
GNUNET_assert (plugin != NULL);
plugin->server_write_task = GNUNET_SCHEDULER_NO_TASK;
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
}
if (NULL == plugin->sending_messages_head)
{
- /* do_transmit did nothing, should not happen */
- GNUNET_break (0);
+ /* nothing to do right now, check when to go again */
set_next_send (plugin);
return;
}
while (fm != NULL)
{
fmnext = fm->next;
- if (fm->session == queue->content)
- {
- free_fragment_message (plugin, fm);
- }
+ if (fm->session == queue->content)
+ free_fragment_message (plugin, fm);
fm = fmnext;
}
GNUNET_assert (plugin != NULL);
switch (ntohs (hdr->type))
{
- case GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA:
+ case GNUNET_MESSAGE_TYPE_WLAN_DATA_FROM_HELPER:
GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME,
- "Func wlan_process_helper got GNUNET_MESSAGE_TYPE_WLAN_HELPER_DATA size: %u\n",
+ "Got data message from helper with %u bytes\n",
ntohs (hdr->size));
GNUNET_STATISTICS_update (plugin->env->stats,
- _("# wlan WLAN_HELPER_DATA received"), 1,
+ _("# wlan data messages received"), 1,
GNUNET_NO);
//call wlan_process_helper with the message inside, later with wlan: analyze signal
if (ntohs (hdr->size) < sizeof (struct GNUNET_TRANSPORT_WLAN_RadiotapReceiveMessage))