From b22aa39e662500b4c7c3333f2341f91c0a8279e5 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Sun, 2 Mar 2014 07:56:32 +0000 Subject: [PATCH] Fix switch_split_user_domain handling of sips: URLs In commit 7efeabbd88e81ee368de6ced32fed06c8035097b Anthony fixed the handling of sip:example.com and sips:example.com URLs, however he introduced a regression causing URLs starting with 's' to be parsed incorrectly. In commit 7d2456ea27c092825c8d614ac6eee71547374464 Brian fixed the regression, but introduced a regression causing sips:example.com URLs to be handled incorrectly. --- src/switch_utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/switch_utils.c b/src/switch_utils.c index 072e9d47ee..84dce2cc8f 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -3123,7 +3123,8 @@ SWITCH_DECLARE(int) switch_split_user_domain(char *in, char **user, char **domai if (!strncasecmp(in, "sip", 3)) { in += 3; - while(*in == ':') in++; + if (*in == 's') in++; + if (*in == ':') in++; } u = in;