}
}
+
/**
* 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--;
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;
}