]> 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:12:33 +0000 (08:12 +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 3dc26807d4b28cb86239a0da5f872f4f909e59fe..602cbc7d0ddf44890473cb4ef4ce507c928599c3 100644 (file)
@@ -3112,7 +3112,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;