From 5762a1e94d0e0e657d645a6bc0bc9e84e5511676 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Fri, 4 Nov 2016 08:49:38 +0100 Subject: [PATCH] replace strnstr by strstr because more portable --- coreapi/proxy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coreapi/proxy.c b/coreapi/proxy.c index 66fa4b01a..bac2334b2 100644 --- a/coreapi/proxy.c +++ b/coreapi/proxy.c @@ -634,7 +634,7 @@ char* linphone_proxy_config_normalize_phone_number(LinphoneProxyConfig *proxy, c ccc = linphone_dial_plan_lookup_ccc_from_e164(flatten); if (ccc>-1) { /*e164 like phone number*/ dialplan = *linphone_dial_plan_by_ccc_as_ushort(ccc); - nationnal_significant_number = strnstr(flatten, dialplan.ccc,4 /*+ +maximun 3 digits*/); + nationnal_significant_number = strstr(flatten, dialplan.ccc); if (nationnal_significant_number) { nationnal_significant_number +=strlen(dialplan.ccc); } @@ -649,7 +649,7 @@ char* linphone_proxy_config_normalize_phone_number(LinphoneProxyConfig *proxy, c strncpy(dialplan.ccc,tmpproxy->dial_prefix,sizeof(dialplan.ccc)); } } - if (strnstr(flatten,dialplan.icp,strlen(dialplan.icp))==flatten) { + if (strstr(flatten,dialplan.icp)==flatten) { char *e164 = replace_icp_with_plus(flatten,dialplan.icp); result = linphone_proxy_config_normalize_phone_number(tmpproxy,e164); ms_free(e164);