-add tests
[oweals/gnunet.git] / src / ats / plugin_ats_ril.c
index 766a9936d8a7c1d6cacfba7902073c68c861e009..ea79207790872c58a9b0357d984ceebf978b8d71 100644 (file)
@@ -1835,7 +1835,7 @@ ril_step_schedule_next (struct GAS_RIL_Handle *solver)
   GNUNET_assert(y <= (double) solver->parameters.step_time_max.rel_value_us);
   GNUNET_assert(y >= (double) solver->parameters.step_time_min.rel_value_us);
 
-  time_next = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MICROSECONDS, (unsigned long long) y);
+  time_next = GNUNET_TIME_relative_saturating_multiply (GNUNET_TIME_UNIT_MICROSECONDS, (unsigned long long) y);
 
 //  LOG (GNUNET_ERROR_TYPE_INFO, "ratio: %f, factor: %f, offset: %f, y: %f\n",
 //      used_ratio,
@@ -2089,8 +2089,8 @@ ril_cut_from_vector (void **old,
   else
   {
     tmpptr = GNUNET_malloc (size);
-    memcpy (tmpptr, oldptr, bytes_before);
-    memcpy (tmpptr + bytes_before, oldptr + (bytes_before + bytes_hole), bytes_after);
+    GNUNET_memcpy (tmpptr, oldptr, bytes_before);
+    GNUNET_memcpy (tmpptr + bytes_before, oldptr + (bytes_before + bytes_hole), bytes_after);
   }
   if (NULL != *old)
   {
@@ -2373,7 +2373,7 @@ GAS_ril_address_property_changed (void *solver,
  */
 static void
 GAS_ril_address_preference_feedback (void *solver,
-                                     struct GNUNET_SERVER_Client *application,
+                                     struct GNUNET_SERVICE_Client *application,
                                      const struct GNUNET_PeerIdentity *peer,
                                      const struct GNUNET_TIME_Relative scope,
                                      enum GNUNET_ATS_PreferenceKind kind,