diff options
Diffstat (limited to 'src/transport/plugin_transport_wlan.c')
-rw-r--r-- | src/transport/plugin_transport_wlan.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index ad8d9a7a1..d3bd1ef82 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c | |||
@@ -662,12 +662,13 @@ struct FragmentMessage | |||
662 | struct Radiotap_Send *radioHeader; | 662 | struct Radiotap_Send *radioHeader; |
663 | }; | 663 | }; |
664 | 664 | ||
665 | static void do_transmit (void *cls, | 665 | static void |
666 | const struct GNUNET_SCHEDULER_TaskContext *tc); | 666 | do_transmit (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc); |
667 | static void free_session (struct Plugin *plugin, struct Sessionqueue *queue, | 667 | static void |
668 | int do_free_macendpoint); | 668 | free_session (struct Plugin *plugin, struct Sessionqueue *queue, |
669 | static struct MacEndpoint *create_macendpoint (struct Plugin *plugin, | 669 | int do_free_macendpoint); |
670 | const struct MacAddress *addr); | 670 | static struct MacEndpoint * |
671 | create_macendpoint (struct Plugin *plugin, const struct MacAddress *addr); | ||
671 | 672 | ||
672 | /** | 673 | /** |
673 | * Generates a nice hexdump of a memory area. | 674 | * Generates a nice hexdump of a memory area. |
@@ -1860,8 +1861,9 @@ wlan_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target, | |||
1860 | newmsg = session->pending_message_head; | 1861 | newmsg = session->pending_message_head; |
1861 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME, | 1862 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME, |
1862 | "wlan_plugin_send: a pending message is already in the queue for this client\n remaining time to send this message is %u, queued fragment messages for this mac connection %u\n", | 1863 | "wlan_plugin_send: a pending message is already in the queue for this client\n remaining time to send this message is %u, queued fragment messages for this mac connection %u\n", |
1863 | GNUNET_TIME_absolute_get_remaining (newmsg->timeout). | 1864 | GNUNET_TIME_absolute_get_remaining (newmsg-> |
1864 | rel_value, session->mac->fragment_messages_out_count); | 1865 | timeout).rel_value, |
1866 | session->mac->fragment_messages_out_count); | ||
1865 | } | 1867 | } |
1866 | 1868 | ||
1867 | newmsg = GNUNET_malloc (sizeof (struct PendingMessage)); | 1869 | newmsg = GNUNET_malloc (sizeof (struct PendingMessage)); |
@@ -2263,8 +2265,8 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr) | |||
2263 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, | 2265 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, |
2264 | "Calling plugin->env->receive for session %p; %s; size: %u\n", | 2266 | "Calling plugin->env->receive for session %p; %s; size: %u\n", |
2265 | session, wlan_plugin_address_to_string (NULL, | 2267 | session, wlan_plugin_address_to_string (NULL, |
2266 | session->mac->addr. | 2268 | session->mac-> |
2267 | mac, 6), | 2269 | addr.mac, 6), |
2268 | htons (hdr->size)); | 2270 | htons (hdr->size)); |
2269 | #endif | 2271 | #endif |
2270 | 2272 | ||
@@ -2303,9 +2305,8 @@ wlan_data_helper (void *cls, struct Session_light *session_light, | |||
2303 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, | 2305 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, |
2304 | "Func wlan_data_helper got GNUNET_MESSAGE_TYPE_WLAN_ADVERTISEMENT size: %u; %s\n", | 2306 | "Func wlan_data_helper got GNUNET_MESSAGE_TYPE_WLAN_ADVERTISEMENT size: %u; %s\n", |
2305 | ntohs (hdr->size), wlan_plugin_address_to_string (NULL, | 2307 | ntohs (hdr->size), wlan_plugin_address_to_string (NULL, |
2306 | session_light-> | 2308 | session_light->addr. |
2307 | addr.mac, | 2309 | mac, 6)); |
2308 | 6)); | ||
2309 | #endif | 2310 | #endif |
2310 | 2311 | ||
2311 | if (session_light->macendpoint == NULL) | 2312 | if (session_light->macendpoint == NULL) |
@@ -2373,9 +2374,7 @@ wlan_data_helper (void *cls, struct Session_light *session_light, | |||
2373 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, | 2374 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, |
2374 | "Macendpoint does not exist for this GNUNET_MESSAGE_TYPE_FRAGMENT_ACK size: %u; %s\n", | 2375 | "Macendpoint does not exist for this GNUNET_MESSAGE_TYPE_FRAGMENT_ACK size: %u; %s\n", |
2375 | ntohs (hdr->size), wlan_plugin_address_to_string (NULL, | 2376 | ntohs (hdr->size), wlan_plugin_address_to_string (NULL, |
2376 | session_light-> | 2377 | session_light->addr.mac, |
2377 | addr. | ||
2378 | mac, | ||
2379 | 6)); | 2378 | 6)); |
2380 | #endif | 2379 | #endif |
2381 | return; | 2380 | return; |
@@ -2477,8 +2476,8 @@ macendpoint_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
2477 | return; | 2476 | return; |
2478 | } | 2477 | } |
2479 | if (GNUNET_TIME_absolute_get_remaining | 2478 | if (GNUNET_TIME_absolute_get_remaining |
2480 | (GNUNET_TIME_absolute_add (endpoint->last_activity, MACENDPOINT_TIMEOUT)). | 2479 | (GNUNET_TIME_absolute_add |
2481 | rel_value == 0) | 2480 | (endpoint->last_activity, MACENDPOINT_TIMEOUT)).rel_value == 0) |
2482 | { | 2481 | { |
2483 | free_macendpoint (endpoint->plugin, endpoint); | 2482 | free_macendpoint (endpoint->plugin, endpoint); |
2484 | } | 2483 | } |