Commit eb026848 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Fixed dependency of XmlRPC request over AccountCreator

parent 78c8c61c
......@@ -536,6 +536,7 @@ struct _LinphoneXmlRpcRequest {
char *method;
LinphoneXmlRpcStatus status;
struct _LinphoneXmlRpcArg response;
LinphoneCore *core;
};
BELLE_SIP_DECLARE_VPTR_NO_EXPORT(LinphoneXmlRpcRequest);
......
......@@ -195,13 +195,12 @@ static void process_io_error_from_post_xml_rpc_request(void *data, const belle_s
static void process_auth_requested_from_post_xml_rpc_request(void *data, belle_sip_auth_event_t *event) {
LinphoneXmlRpcRequest *request = (LinphoneXmlRpcRequest *)data;
LinphoneAccountCreator *creator = (LinphoneAccountCreator *)linphone_xml_rpc_request_get_user_data(request);
const char *realm = belle_sip_auth_event_get_realm(event);
const char *username = belle_sip_auth_event_get_username(event);
const char *domain = belle_sip_auth_event_get_domain(event);
const LinphoneAuthInfo *auth_info = linphone_core_find_auth_info(creator->core, realm, username, domain);
const LinphoneAuthInfo *auth_info = linphone_core_find_auth_info(request->core, realm, username, domain);
if (auth_info) {
const char *auth_username = linphone_auth_info_get_username(auth_info);
......@@ -441,7 +440,9 @@ void linphone_xml_rpc_session_set_user_data(LinphoneXmlRpcSession *session, void
}
LinphoneXmlRpcRequest * linphone_xml_rpc_session_create_request(LinphoneXmlRpcSession *session, LinphoneXmlRpcArgType return_type, const char *method) {
return linphone_xml_rpc_request_new(return_type, method);
LinphoneXmlRpcRequest *request = linphone_xml_rpc_request_new(return_type, method);
request->core = session->core;
return request;
}
void linphone_xml_rpc_session_send_request(LinphoneXmlRpcSession *session, LinphoneXmlRpcRequest *request) {
......
......@@ -2130,6 +2130,7 @@ static void server_update_account_password_arg_new_password_missing(void) {
linphone_account_creator_unref(creator);
linphone_core_manager_destroy(marie);
}
/****************** End Update Account ************************/
test_t account_creator_tests[] = {
......
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