mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 03:28:07 +00:00
remove original auth info from testers
This commit is contained in:
parent
5200810ca8
commit
6eeff52a62
2 changed files with 13 additions and 4 deletions
|
|
@ -187,6 +187,10 @@ LinphoneAddress *account_manager_check_account(AccountManager *m, LinphoneProxyC
|
|||
LinphoneAuthInfo *ai;
|
||||
char *tmp;
|
||||
bool_t create_account=FALSE;
|
||||
const LinphoneAuthInfo *original_ai = linphone_core_find_auth_info(lc
|
||||
,NULL
|
||||
, linphone_address_get_username(id_addr)
|
||||
, linphone_address_get_domain(id_addr));
|
||||
|
||||
if (!account){
|
||||
account=account_new(id_addr,m->unique_id);
|
||||
|
|
@ -203,6 +207,11 @@ LinphoneAddress *account_manager_check_account(AccountManager *m, LinphoneProxyC
|
|||
if (create_account){
|
||||
account_create_on_server(account,cfg);
|
||||
}
|
||||
|
||||
/*remove previous auth info to avoid mismatching*/
|
||||
if (original_ai)
|
||||
linphone_core_remove_auth_info(lc,original_ai);
|
||||
|
||||
ai=linphone_auth_info_new(linphone_address_get_username(account->modified_identity),
|
||||
NULL,
|
||||
account->password,NULL,NULL,linphone_address_get_domain(account->modified_identity));
|
||||
|
|
|
|||
|
|
@ -250,12 +250,12 @@ static void text_message_with_credential_from_auth_cb(void) {
|
|||
LinphoneCoreVTable* vtable = linphone_core_v_table_new();
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc");
|
||||
text_message_with_credential_from_auth_cb_auth_info=linphone_auth_info_clone((LinphoneAuthInfo*)(linphone_core_get_auth_info_list(marie->lc)->data));
|
||||
text_message_with_credential_from_auth_cb_auth_info=linphone_auth_info_clone((LinphoneAuthInfo*)(linphone_core_get_auth_info_list(pauline->lc)->data));
|
||||
|
||||
/*to force cb to be called*/
|
||||
linphone_core_clear_all_auth_info(marie->lc);
|
||||
linphone_core_clear_all_auth_info(pauline->lc);
|
||||
vtable->auth_info_requested=text_message_with_credential_from_auth_cb_auth_info_requested;
|
||||
linphone_core_add_listener(marie->lc, vtable);
|
||||
linphone_core_add_listener(pauline->lc, vtable);
|
||||
|
||||
to = linphone_address_as_string(marie->identity);
|
||||
chat_room = linphone_core_create_chat_room(pauline->lc,to);
|
||||
|
|
@ -669,7 +669,7 @@ static void printHex(char *title, uint8_t *data, uint32_t length) {
|
|||
sprintf (debug_string, "0x%02x, ", data[i]);
|
||||
debug_string+=6;
|
||||
}
|
||||
debug_string = '\0';
|
||||
*debug_string = '\0';
|
||||
ms_message("%s", debug_string_buffer);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue