Fix minor edge case in switch_split_user_domain

If the input started with 'sip:sips:' it would have been incorrectly
parsed.
This commit is contained in:
Travis Cross 2014-03-06 04:08:45 +00:00
parent d5fd8c9fc2
commit 9b9bc8b796

View File

@ -3110,7 +3110,7 @@ SWITCH_DECLARE(int) switch_split_user_domain(char *in, char **user, char **domai
/* Remove URL scheme */ /* Remove URL scheme */
if (!strncasecmp(in, "sip:", 4)) in += 4; if (!strncasecmp(in, "sip:", 4)) in += 4;
if (!strncasecmp(in, "sips:", 5)) in += 5; else if (!strncasecmp(in, "sips:", 5)) in += 5;
/* Isolate the host part from the user part */ /* Isolate the host part from the user part */
if ((h = in, p = strchr(h, '@'))) *p = '\0', u = in, h = p+1; if ((h = in, p = strchr(h, '@'))) *p = '\0', u = in, h = p+1;