Module: sip-router
Branch: master
Commit: 5040ff5cc54f673af80190916de9c1ac5d4c1af9
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5040ff5…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Apr 21 15:04:55 2010 +0200
dialplan: safety check for fetch rows before data init
---
modules/dialplan/dialplan.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/dialplan/dialplan.c b/modules/dialplan/dialplan.c
index ad740b4..d514c4e 100644
--- a/modules/dialplan/dialplan.c
+++ b/modules/dialplan/dialplan.c
@@ -183,14 +183,14 @@ static int mod_init(void)
return -1;
}
+ if(dp_fetch_rows<=0)
+ dp_fetch_rows = 1000;
+
if(init_data() != 0) {
LM_ERR("could not initialize data\n");
return -1;
}
- if(dp_fetch_rows<=0)
- dp_fetch_rows = 1000;
-
return 0;
}