aboutsummaryrefslogtreecommitdiffstats
path: root/main/app.c
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-05-26 19:46:49 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2010-05-26 19:46:49 +0000
commit2e55ca61dd106eb50b780bcbe81e7f789389fea9 (patch)
treea2e2c262b493d64222ad1ee9ae67cb477048123d /main/app.c
parentd7d771195af0536d7f1cfc4ea02d8b8756537c97 (diff)
do all sip registry parsing before transmit_register
This patch breaks up every part of the sip registry string during config parsing and removes all parsing from transmit_register(). Thanks to Nick_Lewis for contributing this patch! (closes issue #14331) Reported by: Nick_Lewis Patches: chan_sip.c-domparse.patch uploaded by Nick Lewis (license 657) chan_sip.c.patch uploaded by Nick Lewis (license 657) chan_sip.c.domainparse3.patch uploaded by Nick Lewis (license 657) chan_sip.c-domparse4.patch uploaded by Nick Lewis (license 657) chan_sip.c-domparse5.patch uploaded by Nick Lewis (license 657) nicklewispatch.diff uploaded by dvossel (license 671) Tested by: Nick_Lewis, dvossel Review: https://reviewboard.asterisk.org/r/628/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@266090 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/app.c')
-rw-r--r--main/app.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/app.c b/main/app.c
index bfdec4fdd..a171f2611 100644
--- a/main/app.c
+++ b/main/app.c
@@ -1192,12 +1192,16 @@ unsigned int __ast_app_separate_args(char *buf, char delim, int remove_chars, ch
char *scan, *wasdelim = NULL;
int paren = 0, quote = 0;
- if (!buf || !array || !arraylen) {
+ if (!array || !arraylen) {
return 0;
}
memset(array, 0, arraylen * sizeof(*array));
+ if (!buf) {
+ return 0;
+ }
+
scan = buf;
for (argc = 0; *scan && (argc < arraylen - 1); argc++) {