Commit 148ad51d authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Do not notify anymore of a phone number being too short in account manager

parent 37242746
......@@ -17,6 +17,7 @@ This changelog file was started on October 2019. Previous changes were more or l
- Big internal refactoring of how streams are managed within offer/answer exchanges.
- ICE now uses all IP addresses detected on the host.
- Better handling of parameter changes in streams during the session, which avoids unecessary restarts.
- Do not notify phone number being too short in account manager anymore, our dial plan isn't precise enough to garanty phone number is invalid in this case
### Fixed
- Internal refactoring of management of locally played tones, in order to fix race conditions.
......
......@@ -505,10 +505,13 @@ LinphoneAccountCreatorPhoneNumberStatusMask linphone_account_creator_set_phone_n
if (plan->isGeneric()) {
return_status = LinphoneAccountCreatorPhoneNumberStatusInvalidCountryCode;
}
if (size < plan->getNationalNumberLength() - 1) {
// DO NOT NOTIFY ABOUT PHONE NUMBER BEING TOO SHORT,
// OUR DIAL PLAN IMPLEMENTATION ISNT PRECISE ENOUGH TO GARANTY
// THE PHONE NUMBER IS INVALID
/*if (size < plan->getNationalNumberLength() - 1) {
return_status = LinphoneAccountCreatorPhoneNumberStatusTooShort;
goto end;
} else if (size > plan->getNationalNumberLength() + 1) {
} else*/ if (size > plan->getNationalNumberLength() + 1) {
return_status = LinphoneAccountCreatorPhoneNumberStatusTooLong;
goto end;
} else if (return_status & LinphoneAccountCreatorPhoneNumberStatusInvalidCountryCode) {
......
......@@ -252,7 +252,7 @@ static void local_email_ok(void) {
////// PHONE NUMBER //////
static void local_phone_number_too_short(void) {
/*static void local_phone_number_too_short(void) {
LinphoneCoreManager *marie = linphone_core_manager_new2("account_creator_rc", 0);
LinphoneAccountCreator *creator = _linphone_account_creator_new(marie->lc, "");
......@@ -264,7 +264,7 @@ static void local_phone_number_too_short(void) {
linphone_account_creator_unref(creator);
linphone_core_manager_destroy(marie);
}
}*/
static void local_phone_number_too_long(void) {
LinphoneCoreManager *marie = linphone_core_manager_new2("account_creator_rc", 0);
......@@ -979,7 +979,6 @@ static void server_create_account_with_phone_number_arg_username_missing(void) {
LinphoneAccountCreatorCbs *cbs = linphone_account_creator_get_callbacks(creator);
LinphoneAccountCreatorStats *stats = new_linphone_account_creator_stats();
linphone_account_creator_set_phone_number(creator, "0123456", "33");
linphone_account_creator_set_password(creator, "password");
linphone_account_creator_cbs_set_user_data(cbs, stats);
......@@ -1302,7 +1301,6 @@ static void server_activate_account_with_phone_number_activated_arg_username_mis
LinphoneAccountCreatorStats *stats = new_linphone_account_creator_stats();
linphone_account_creator_set_activation_code(creator, "123456789");
linphone_account_creator_set_phone_number(creator, "0123456", "33");
linphone_account_creator_cbs_set_user_data(cbs, stats);
linphone_account_creator_service_set_user_data(
......@@ -2037,7 +2035,6 @@ static void server_update_account_password_arg_username_missing(void) {
LinphoneAccountCreatorCbs *cbs = linphone_account_creator_get_callbacks(creator);
LinphoneAccountCreatorStats *stats = new_linphone_account_creator_stats();
linphone_account_creator_set_phone_number(creator, "0123456", "33");
linphone_account_creator_set_password(creator, "password");
linphone_account_creator_set_user_data(creator, "newpassword");
......@@ -2404,10 +2401,10 @@ test_t account_creator_tests[] = {
"Local - Email Ok",
local_email_ok,
"Local"),
TEST_ONE_TAG(
/*TEST_ONE_TAG(
"Local - Phone number too short",
local_phone_number_too_short,
"Local"),
"Local"),*/
TEST_ONE_TAG(
"Local - Phone number too long",
local_phone_number_too_long,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment