mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
test if number to normilize is empty
This commit is contained in:
parent
12f68e20f8
commit
677d4122e8
1 changed files with 4 additions and 0 deletions
|
|
@ -276,6 +276,10 @@ extern "C" jstring Java_org_linphone_core_LinphoneProxyConfigImpl_normalizePhone
|
|||
}
|
||||
const char* number = env->GetStringUTFChars(jnumber, NULL);
|
||||
int len = env->GetStringLength(jnumber);
|
||||
if (len == 0) {
|
||||
ms_warning("cannot normalize empty number");
|
||||
return jnumber;
|
||||
}
|
||||
char targetBuff[2*len];// returned number can be greater than origin (specially in case of prefix insertion
|
||||
linphone_proxy_config_normalize_number((LinphoneProxyConfig*)proxyCfg,number,targetBuff,sizeof(targetBuff));
|
||||
jstring normalizedNumber = env->NewStringUTF(targetBuff);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue