-bringing copyright tags up to FSF standard
[oweals/gnunet.git] / src / transport / plugin_transport_wlan.c
index 9b60aea5c24bb0b9895ff1c0c7f9b3b0a8bf32ca..a5a72e8cc223fcb058a10a204107713273571941 100644 (file)
@@ -1,6 +1,6 @@
 /*
   This file is part of GNUnet
-  (C) 2010-2014 Christian Grothoff (and other contributing authors)
+  Copyright (C) 2010-2014 Christian Grothoff (and other contributing authors)
 
   GNUnet is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published
@@ -949,7 +949,6 @@ fragment_transmission_done (void *cls,
 
   fm->sh = NULL;
   GNUNET_FRAGMENT_context_transmission_done (fm->fragcontext);
-  fm->fragcontext = NULL;
 }
 
 
@@ -1007,7 +1006,6 @@ transmit_fragment (void *cls,
     else
     {
       GNUNET_FRAGMENT_context_transmission_done (fm->fragcontext);
-      fm->fragcontext = NULL;
     }
     GNUNET_STATISTICS_update (endpoint->plugin->env->stats,
                               "# bytes currently in buffers",
@@ -1050,6 +1048,7 @@ free_fragment_message (struct FragmentMessage *fm)
     GNUNET_FRAGMENT_context_destroy (fm->fragcontext,
                                      &endpoint->msg_delay,
                                      &endpoint->ack_delay);
+    fm->fragcontext = NULL;
   }
   if (NULL != fm->timeout_task)
   {
@@ -1564,11 +1563,12 @@ process_data (void *cls,
         break;
       }
     }
-    LOG (GNUNET_ERROR_TYPE_DEBUG,
-        "ACK not matched against any active fragmentation with MAC `%s'\n",
-         wlan_plugin_address_to_string (NULL,
-                                        &mas->endpoint->wlan_addr,
-                                        sizeof (mas->endpoint->wlan_addr)));
+    if (NULL == fm)
+      LOG (GNUNET_ERROR_TYPE_DEBUG,
+           "ACK not matched against any active fragmentation with MAC `%s'\n",
+           wlan_plugin_address_to_string (NULL,
+                                          &mas->endpoint->wlan_addr,
+                                          sizeof (mas->endpoint->wlan_addr)));
     break;
   case GNUNET_MESSAGE_TYPE_WLAN_DATA:
     if (NULL == mas->endpoint)