Fix test: the loop for creating a random phone number was incorrect and potentally left an invalid character at the end.

This commit is contained in:
Simon Morlat 2016-11-25 18:18:15 +01:00
parent a87a9ecd45
commit ea13fcfe5a

View file

@ -842,10 +842,12 @@ static void long_term_presence_with_phone_without_sip(void) {
for (i = 0; i < MIN((size_t)dialPlan->nnl,sizeof(phone)-1); i++) {
phone[i] = '0' + rand() % 10;
}
phone[i+1]='\0';
phone[i]='\0';
e164=ms_strdup_printf("+%s%s",dialPlan->ccc,phone);
ms_message("Phone number is %s, e164 is %s", phone, e164);
marie = linphone_core_manager_new3("marie_rc", TRUE, e164);
identity = linphone_address_as_string_uri_only(marie->identity);