speeling and coverity fix
[oweals/gnunet.git] / src / transport / test_quota_compliance.c
index 56d3cb5a4fc10e4a7777b1335c5dcab4ce527f79..f48f158782b0ea687f575d8c13a4eebe3a638114 100644 (file)
@@ -391,10 +391,10 @@ measurement_end (void *cls,
          quota_allowed = current_quota_p2;
 
 
-  if (MEASUREMENT_SOFT_LIMIT > (quota_allowed/10))
+  if (MEASUREMENT_SOFT_LIMIT > (quota_allowed/3))
          delta = MEASUREMENT_SOFT_LIMIT;
   else
-         delta = (quota_allowed/10);
+         delta = (quota_allowed/3);
 
   /* Throughput is far too slow. This is to prevent the test to exit with success when throughput is 0 */
   if ((total_bytes_sent/(duration.rel_value / 1000)) < 100)
@@ -411,8 +411,15 @@ measurement_end (void *cls,
          ok = 1;
          failed_measurement_counter--;
          if (failed_measurement_counter < 0)
+         {
+                 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                                 "\nQuota measurement failed and no free strike: %i\n",failed_measurement_counter);
                  end();
-         return;
+                 return;
+         }
+         else
+                 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                                 "\nQuota measurement failed and %i free strikes\n",failed_measurement_counter);
   }
 
   /* Throughput is bigger than allowed quota + some extra*/
@@ -430,8 +437,15 @@ measurement_end (void *cls,
          ok = 1;
          failed_measurement_counter--;
          if (failed_measurement_counter < 0)
+         {
+                 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                                 "\nQuota measurement failed and no free strike: %i\n",failed_measurement_counter);
                  end();
-         return;
+                 return;
+         }
+         else
+                 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                                 "\nQuota measurement failed and %i free strikes\n",failed_measurement_counter);
   }
   else
   {