Browse code

dialplan: safety check for fetch rows before data init (cherry picked from commit 5040ff5cc54f673af80190916de9c1ac5d4c1af9)

Daniel-Constantin Mierla authored on 21/04/2010 13:04:55 • Andrei Pelinescu-Onciul committed on 28/05/2010 18:48:01
Showing 1 changed files
... ...
@@ -170,14 +170,14 @@ static int mod_init(void)
170 170
 		return -1;
171 171
 	}
172 172
 
173
+	if(dp_fetch_rows<=0)
174
+		dp_fetch_rows = 1000;
175
+
173 176
 	if(init_data() != 0) {
174 177
 		LM_ERR("could not initialize data\n");
175 178
 		return -1;
176 179
 	}
177 180
 
178
-	if(dp_fetch_rows<=0)
179
-		dp_fetch_rows = 1000;
180
-
181 181
 	return 0;
182 182
 }
183 183