summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorDavid Vossel <dvossel@digium.com>2010-05-26 19:46:49 +0000
committerDavid Vossel <dvossel@digium.com>2010-05-26 19:46:49 +0000
commit77a96c5a93076926468680267a53140c2f4b842b (patch)
treea2e2c262b493d64222ad1ee9ae67cb477048123d /main
parent07500098c1eafdad2dd6cab5f4e343465c8916d0 (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: https://origsvn.digium.com/svn/asterisk/trunk@266090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-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++) {