Commit 62cf56a5 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩 Committed by jehan
Browse files

Fixed dependency of XmlRPC request over AccountCreator

parent 9712df81
...@@ -536,6 +536,7 @@ struct _LinphoneXmlRpcRequest { ...@@ -536,6 +536,7 @@ struct _LinphoneXmlRpcRequest {
char *method; char *method;
LinphoneXmlRpcStatus status; LinphoneXmlRpcStatus status;
struct _LinphoneXmlRpcArg response; struct _LinphoneXmlRpcArg response;
LinphoneCore *core;
}; };
BELLE_SIP_DECLARE_VPTR_NO_EXPORT(LinphoneXmlRpcRequest); 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 ...@@ -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) { static void process_auth_requested_from_post_xml_rpc_request(void *data, belle_sip_auth_event_t *event) {
LinphoneXmlRpcRequest *request = (LinphoneXmlRpcRequest *)data; 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 *realm = belle_sip_auth_event_get_realm(event);
const char *username = belle_sip_auth_event_get_username(event); const char *username = belle_sip_auth_event_get_username(event);
const char *domain = belle_sip_auth_event_get_domain(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) { if (auth_info) {
linphone_auth_info_fill_belle_sip_event(auth_info, event); linphone_auth_info_fill_belle_sip_event(auth_info, event);
...@@ -438,7 +437,9 @@ void linphone_xml_rpc_session_set_user_data(LinphoneXmlRpcSession *session, void ...@@ -438,7 +437,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) { 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) { 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) { ...@@ -2130,6 +2130,7 @@ static void server_update_account_password_arg_new_password_missing(void) {
linphone_account_creator_unref(creator); linphone_account_creator_unref(creator);
linphone_core_manager_destroy(marie); linphone_core_manager_destroy(marie);
} }
/****************** End Update Account ************************/ /****************** End Update Account ************************/
test_t account_creator_tests[] = { 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