From 9b9bc8b7960b60bd3ca930d074beaa50f9fc2e71 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Thu, 6 Mar 2014 04:08:45 +0000 Subject: [PATCH] Fix minor edge case in switch_split_user_domain If the input started with 'sip:sips:' it would have been incorrectly parsed. --- src/switch_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/switch_utils.c b/src/switch_utils.c index 346e754162..90bea4899a 100644 --- a/src/switch_utils.c +++ b/src/switch_utils.c @@ -3110,7 +3110,7 @@ SWITCH_DECLARE(int) switch_split_user_domain(char *in, char **user, char **domai /* Remove URL scheme */ 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 */ if ((h = in, p = strchr(h, '@'))) *p = '\0', u = in, h = p+1; -- 2.47.2