diff options
Diffstat (limited to 'src/transport/plugin_transport_wlan.c')
-rw-r--r-- | src/transport/plugin_transport_wlan.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index 13f414f30..a3d90b598 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c | |||
@@ -1003,12 +1003,13 @@ set_next_beacon_time (struct Plugin *const plugin) | |||
1003 | } | 1003 | } |
1004 | } | 1004 | } |
1005 | 1005 | ||
1006 | |||
1006 | /** | 1007 | /** |
1007 | * Function to set the timer for the next timeout of the fragment queue | 1008 | * Function to set the timer for the next timeout of the fragment queue |
1008 | * @param plugin the handle to the plugin struct | 1009 | * @param plugin the handle to the plugin struct |
1009 | */ | 1010 | */ |
1010 | static void | 1011 | static void |
1011 | set_next_send (struct Plugin *const plugin) | 1012 | set_next_send (struct Plugin *plugin) |
1012 | { | 1013 | { |
1013 | struct GNUNET_TIME_Relative next_send; | 1014 | struct GNUNET_TIME_Relative next_send; |
1014 | 1015 | ||
@@ -1185,7 +1186,6 @@ free_fragment_message (struct Plugin *plugin, struct FragmentMessage *fm) | |||
1185 | } | 1186 | } |
1186 | fmq = fmq_next; | 1187 | fmq = fmq_next; |
1187 | } | 1188 | } |
1188 | |||
1189 | session->mac->fragment_messages_out_count--; | 1189 | session->mac->fragment_messages_out_count--; |
1190 | session->fragment_messages_out_count--; | 1190 | session->fragment_messages_out_count--; |
1191 | plugin->pending_Fragment_Messages--; | 1191 | plugin->pending_Fragment_Messages--; |
@@ -1766,10 +1766,8 @@ fragmentmessage_timeout (void *cls, | |||
1766 | 1766 | ||
1767 | GNUNET_assert (fm != NULL); | 1767 | GNUNET_assert (fm != NULL); |
1768 | fm->timeout_task = GNUNET_SCHEDULER_NO_TASK; | 1768 | fm->timeout_task = GNUNET_SCHEDULER_NO_TASK; |
1769 | if (tc->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) | 1769 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
1770 | { | 1770 | return; |
1771 | return; | ||
1772 | } | ||
1773 | free_fragment_message (fm->session->mac->plugin, fm); | 1771 | free_fragment_message (fm->session->mac->plugin, fm); |
1774 | } | 1772 | } |
1775 | 1773 | ||
@@ -1908,7 +1906,6 @@ do_transmit (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1908 | struct FragmentMessage_queue *fmq; | 1906 | struct FragmentMessage_queue *fmq; |
1909 | ssize_t bytes; | 1907 | ssize_t bytes; |
1910 | 1908 | ||
1911 | |||
1912 | GNUNET_assert (plugin != NULL); | 1909 | GNUNET_assert (plugin != NULL); |
1913 | plugin->server_write_task = GNUNET_SCHEDULER_NO_TASK; | 1910 | plugin->server_write_task = GNUNET_SCHEDULER_NO_TASK; |
1914 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) | 1911 | if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) |
@@ -1926,8 +1923,7 @@ do_transmit (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
1926 | } | 1923 | } |
1927 | if (NULL == plugin->sending_messages_head) | 1924 | if (NULL == plugin->sending_messages_head) |
1928 | { | 1925 | { |
1929 | /* do_transmit did nothing, should not happen */ | 1926 | /* nothing to do right now, check when to go again */ |
1930 | GNUNET_break (0); | ||
1931 | set_next_send (plugin); | 1927 | set_next_send (plugin); |
1932 | return; | 1928 | return; |
1933 | } | 1929 | } |
@@ -2241,10 +2237,8 @@ free_session (struct Plugin *plugin, struct Sessionqueue *queue, | |||
2241 | while (fm != NULL) | 2237 | while (fm != NULL) |
2242 | { | 2238 | { |
2243 | fmnext = fm->next; | 2239 | fmnext = fm->next; |
2244 | if (fm->session == queue->content) | 2240 | if (fm->session == queue->content) |
2245 | { | 2241 | free_fragment_message (plugin, fm); |
2246 | free_fragment_message (plugin, fm); | ||
2247 | } | ||
2248 | fm = fmnext; | 2242 | fm = fmnext; |
2249 | } | 2243 | } |
2250 | 2244 | ||