]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Fix switch_split_user_domain handling of sips: URLs
authorTravis Cross <tc@traviscross.com>
Sun, 2 Mar 2014 07:56:32 +0000 (07:56 +0000)
committerTravis Cross <tc@traviscross.com>
Sun, 2 Mar 2014 08:11:11 +0000 (08:11 +0000)
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

index 072e9d47eed0f90bab1388dc568b08b1cb10ebc4..84dce2cc8f8b13ea5062e1f42d0119b354ab5992 100644 (file)
@@ -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;