ソースを参照

ncd: modules: foreach: put retry time into a define

ambrop7 14 年 前
コミット
13c8392344
1 ファイル変更3 行追加1 行削除
  1. 3 1
      ncd/modules/foreach.c

+ 3 - 1
ncd/modules/foreach.c

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