src/utils_cache.c: Replace a left-over hard-coded default of "2" with "timeout_g".
[collectd.git] / src / utils_cache.c
index 648c54d..aeb662d 100644 (file)
@@ -175,7 +175,7 @@ static int uc_send_notification (const char *name)
   }
     
   /* Check if the entry has been updated in the meantime */
-  if ((n.time - ce->last_update) < (2 * ce->interval))
+  if ((n.time - ce->last_update) < (timeout_g * ce->interval))
   {
     ce->state = STATE_OKAY;
     pthread_mutex_unlock (&cache_lock);
@@ -319,7 +319,7 @@ int uc_check_timeout (void)
   while (c_avl_iterator_next (iter, (void *) &key, (void *) &ce) == 0)
   {
     /* If entry has not been updated, add to `keys' array */
-    if ((now - ce->last_update) >= (2 * ce->interval))
+    if ((now - ce->last_update) >= (timeout_g * ce->interval))
     {
       char **tmp;