test
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 3 Apr 2013 07:59:52 +0000 (07:59 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 3 Apr 2013 07:59:52 +0000 (07:59 +0000)
src/ats/gnunet-service-ats_addresses_simplistic.c
src/ats/test_ats_api_scheduling_check_min_bw_alt.c

index aadd20f2edf46a11d1b2b541d4fa5fcdade60ea1..8ce028c120116f10e7374d555e5001fec3663bc3 100644 (file)
@@ -772,7 +772,6 @@ addresse_decrement (struct GAS_SIMPLISTIC_Handle *s,
  * @param type the type to extract in HBO
  * @return the value in HBO or UINT32_MAX in HBO if value does not exist
  */
-
 static int
 get_performance_info (struct ATS_Address *address, uint32_t type)
 {
index bf23ad2aa4a16ed4306c05170854ecf00b95baae..c42feaa2f9f930925b98e24251d75de14e442d45 100644 (file)
@@ -97,8 +97,11 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   die_task = GNUNET_SCHEDULER_NO_TASK;
 
-  if (sched_ats != NULL)
-    GNUNET_ATS_scheduling_done (sched_ats);
+  if (NULL != sched_ats)
+  {
+       GNUNET_ATS_scheduling_done (sched_ats);
+       sched_ats = NULL;
+  }
   free_test_address (&test_addr[0]);
   free_test_address (&test_addr[1]);
   ret = GNUNET_SYSERR;
@@ -114,8 +117,11 @@ end ()
     GNUNET_SCHEDULER_cancel (die_task);
     die_task = GNUNET_SCHEDULER_NO_TASK;
   }
-  GNUNET_ATS_scheduling_done (sched_ats);
-  sched_ats = NULL;
+  if (NULL != sched_ats)
+  {
+       GNUNET_ATS_scheduling_done (sched_ats);
+       sched_ats = NULL;
+  }
   free_test_address (&test_addr[0]);
   free_test_address (&test_addr[1]);
 }