Browse Source

ncd: modules: foreach: use the same retry time as the interpreter

ambrop7 14 years ago
parent
commit
b2887a8d15
1 changed files with 2 additions and 3 deletions
  1. 2 3
      ncd/modules/foreach.c

+ 2 - 3
ncd/modules/foreach.c

@@ -59,8 +59,6 @@
 
 #define ModuleLog(i, ...) NCDModuleInst_Backend_Log((i), BLOG_CURRENT_CHANNEL, __VA_ARGS__)
 
-#define RETRY_TIME 5000
-
 #define ISTATE_WORKING 1
 #define ISTATE_UP 2
 #define ISTATE_WAITING 3
@@ -422,7 +420,8 @@ static void func_new (NCDModuleInst *i)
     o->args = arg_args;
     
     // init timer
-    BTimer_Init(&o->timer, RETRY_TIME, (BTimer_handler)timer_handler, o);
+    btime_t retry_time = NCDModuleInst_Backend_InterpGetRetryTime(i);
+    BTimer_Init(&o->timer, retry_time, (BTimer_handler)timer_handler, o);
     
     // count elements
     o->num_elems = NCDValue_ListCount(arg_list);