Merged revisions 43422 via svnmerge from
[asterisk/asterisk.git] / apps / app_rpt.c
index decd98b..328cc2a 100644 (file)
@@ -1882,55 +1882,54 @@ static int telem_lookup(struct rpt *myrpt,struct ast_channel *chan, char *node,
 
 static int get_wait_interval(struct rpt *myrpt, int type)
 {
-        int interval;
-        const char *wait_times;
-        char *wait_times_save;
-                                                                                                                  
-        wait_times_save = NULL;
-        wait_times = ast_variable_retrieve(myrpt->cfg, myrpt->name, "wait_times");
-                                                                                                                  
-        if(wait_times){
-                wait_times_save = ast_strdupa(wait_times);
-                if(!wait_times_save){
-                        ast_log(LOG_WARNING, "Out of memory in wait_interval()\n");
-                        wait_times = NULL;
-                }
-        }
-                                                                                                                  
-        switch(type){
-                case DLY_TELEM:
-                        if(wait_times)
-                                interval = retrieve_astcfgint(myrpt,wait_times_save, "telemwait", 500, 5000, 1000);
-                        else
-                                interval = 1000;
-                        break;
-                                                                                                                  
-                case DLY_ID:
-                        if(wait_times)
-                                interval = retrieve_astcfgint(myrpt,wait_times_save, "idwait",250,5000,500);
-                        else
-                                interval = 500;
-                        break;
-                                                                                                                  
-                case DLY_UNKEY:
-                        if(wait_times)
-                                interval = retrieve_astcfgint(myrpt,wait_times_save, "unkeywait",500,5000,1000);
-                        else
-                                interval = 1000;
-                        break;
-                                                                                                                  
-                case DLY_CALLTERM:
-                        if(wait_times)
-                                interval = retrieve_astcfgint(myrpt,wait_times_save, "calltermwait",500,5000,1500);
-                        else
-                                interval = 1500;
-                        break;
-                                                                                                                  
-                default:
-                        return 0;
-        }
+       int interval;
+       const char *wait_times;
+       char *wait_times_save = NULL;
+
+       wait_times = ast_variable_retrieve(cfg, myrpt->name, "wait_times");
+
+       if (wait_times) {
+               wait_times_save = ast_strdupa(wait_times);
+               if (!wait_times_save) {
+                       ast_log(LOG_WARNING, "Out of memory in wait_interval()\n");
+                       wait_times = NULL;
+               }
+       }
+
+       switch (type) {
+       case DLY_TELEM:
+               if (wait_times)
+                       interval = retrieve_astcfgint(wait_times_save, "telemwait", 500, 5000, 1000);
+               else
+                       interval = 1000;
+               break;
+
+       case DLY_ID:
+               if (wait_times)
+                       interval = retrieve_astcfgint(wait_times_save, "idwait", 250, 5000, 500);
+               else
+                       interval = 500;
+               break;
+
+       case DLY_UNKEY:
+               if (wait_times)
+                       interval = retrieve_astcfgint(wait_times_save, "unkeywait", 500, 5000, 1000);
+               else
+                       interval = 1000;
+               break;
+
+       case DLY_CALLTERM:
+               if (wait_times)
+                       interval = retrieve_astcfgint(wait_times_save, "calltermwait", 500, 5000, 1500);
+               else
+                       interval = 1500;
+               break;
+
+       default:
+               return 0;
+       }
        return interval;
-}                                                                                                                  
+}                                                                                                                
 
 
 /*