Commit 6eeff52a authored by jehan's avatar jehan

remove original auth info from testers

parent 5200810c
......@@ -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);
}
......
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