Browse Source

dialplan: safety check for fetch rows before data init

Daniel-Constantin Mierla 15 years ago
parent
commit
5040ff5cc5
1 changed files with 3 additions and 3 deletions
  1. 3 3
      modules/dialplan/dialplan.c

+ 3 - 3
modules/dialplan/dialplan.c

@@ -183,14 +183,14 @@ static int mod_init(void)
 		return -1;
 		return -1;
 	}
 	}
 
 
+	if(dp_fetch_rows<=0)
+		dp_fetch_rows = 1000;
+
 	if(init_data() != 0) {
 	if(init_data() != 0) {
 		LM_ERR("could not initialize data\n");
 		LM_ERR("could not initialize data\n");
 		return -1;
 		return -1;
 	}
 	}
 
 
-	if(dp_fetch_rows<=0)
-		dp_fetch_rows = 1000;
-
 	return 0;
 	return 0;
 }
 }