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
This commit is contained in:
David Vossel
2010-05-26 19:46:49 +00:00
parent 07500098c1
commit 77a96c5a93
4 changed files with 244 additions and 96 deletions

View File

@@ -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++) {