X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Ftransport%2Fplugin_transport_wlan.c;h=c2565a4a8fb9f198de1c3343266d03008b54525a;hb=56389a7d277b05c9c2968b7ebd529a12f8be15eb;hp=dbede94a87ebc4fc3dbeadf4d71a2306943f4bb6;hpb=b1ab6811dd4518fd54bd99678c3563e92373d1e5;p=oweals%2Fgnunet.git diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index dbede94a8..c2565a4a8 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c @@ -152,6 +152,11 @@ struct PendingMessage */ struct Session { + /** + * To whom are we talking to (set to our identity + * if we are still waiting for the welcome message) + */ + struct GNUNET_PeerIdentity target; /** * API requirement (must be first). @@ -185,12 +190,6 @@ struct Session */ struct PendingMessage *pending_message_tail; - /** - * To whom are we talking to (set to our identity - * if we are still waiting for the welcome message) - */ - struct GNUNET_PeerIdentity target; - /** * When should this session time out? */ @@ -496,6 +495,7 @@ get_radiotap_header (struct MacEndpoint *endpoint, /** * Generate the WLAN hardware header for one packet * + * @param plugin the plugin handle * @param header address to write the header to * @param to_mac_addr address of the recipient * @param size size of the whole packet, needed to calculate the time to send the packet @@ -871,6 +871,13 @@ free_macendpoint (struct MacEndpoint *endpoint) GNUNET_CONTAINER_DLL_remove (plugin->mac_head, plugin->mac_tail, endpoint); + + if (NULL != endpoint->defrag) + { + GNUNET_DEFRAGMENT_context_destroy(endpoint->defrag); + endpoint->defrag = NULL; + } + plugin->mac_count--; if (GNUNET_SCHEDULER_NO_TASK != endpoint->timeout_task) { @@ -1073,7 +1080,7 @@ wlan_plugin_send (void *cls, * @param client pointer to the session this message belongs to * @param hdr start of the message */ -static void +static int process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr) { struct Plugin *plugin = cls; @@ -1237,6 +1244,7 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr) (mas->endpoint == NULL) ? 0 : sizeof (struct GNUNET_TRANSPORT_WLAN_MacAddress)); break; } + return GNUNET_OK; } #undef NUM_ATS @@ -1248,7 +1256,7 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr) * @param client client that send the data (not used) * @param hdr header of the GNUNET_MessageHeader */ -static void +static int handle_helper_message (void *cls, void *client, const struct GNUNET_MessageHeader *hdr) { @@ -1350,6 +1358,7 @@ handle_helper_message (void *cls, void *client, ntohs (hdr->type), ntohs (hdr->size)); break; } + return GNUNET_OK; }