Commit a36cade0 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Fix build with Clang on Linux.

parent 2a4a17bf
......@@ -661,7 +661,7 @@ LinphoneRequestStatus linphone_account_creator_is_account_exist_custom(LinphoneA
return LinphoneRequestMissingArguments;
}
request = linphone_xml_rpc_request_new_with_args("get_phone_number_for_account", LinphoneXmlRpcArgString,
request = linphone_xml_rpc_request_new_with_args(LinphoneXmlRpcArgString, "get_phone_number_for_account",
LinphoneXmlRpcArgString, creator->username ? creator->username : creator->phone_number,
LinphoneXmlRpcArgString, linphone_proxy_config_get_domain(creator->proxy_cfg),
LinphoneXmlRpcArgNone);
......@@ -697,7 +697,7 @@ static LinphoneXmlRpcRequest * _create_account_with_phone_custom(LinphoneAccount
if (!creator->phone_number) {
return NULL;
}
request = linphone_xml_rpc_request_new_with_args("create_phone_account", LinphoneXmlRpcArgString,
request = linphone_xml_rpc_request_new_with_args(LinphoneXmlRpcArgString, "create_phone_account",
LinphoneXmlRpcArgString, creator->phone_number,
LinphoneXmlRpcArgString, creator->username ? creator->username : creator->phone_number,
LinphoneXmlRpcArgString, creator->password ? ha1_for_passwd(creator->username ? creator->username : creator->phone_number, linphone_proxy_config_get_domain(creator->proxy_cfg), creator->password) : "",
......@@ -713,7 +713,7 @@ static LinphoneXmlRpcRequest * _create_account_with_email_custom(LinphoneAccount
if (!creator->username || !creator->email || !creator->password) {
return NULL;
}
request = linphone_xml_rpc_request_new_with_args("create_email_account", LinphoneXmlRpcArgString,
request = linphone_xml_rpc_request_new_with_args(LinphoneXmlRpcArgString, "create_email_account",
LinphoneXmlRpcArgString, creator->username,
LinphoneXmlRpcArgString, creator->email,
LinphoneXmlRpcArgString, ha1_for_passwd(creator->username ? creator->username : creator->phone_number, linphone_proxy_config_get_domain(creator->proxy_cfg), creator->password),
......@@ -775,14 +775,14 @@ LinphoneRequestStatus linphone_account_creator_activate_account_custom(LinphoneA
}
if (creator->phone_number) {
request = linphone_xml_rpc_request_new_with_args("activate_phone_account", LinphoneXmlRpcArgString,
request = linphone_xml_rpc_request_new_with_args(LinphoneXmlRpcArgString, "activate_phone_account",
LinphoneXmlRpcArgString, creator->phone_number,
LinphoneXmlRpcArgString, creator->username ? creator->username : creator->phone_number,
LinphoneXmlRpcArgString, creator->activation_code,
linphone_proxy_config_get_domain(creator->proxy_cfg),
LinphoneXmlRpcArgNone);
} else {
request = linphone_xml_rpc_request_new_with_args("activate_email_account", LinphoneXmlRpcArgString,
request = linphone_xml_rpc_request_new_with_args(LinphoneXmlRpcArgString, "activate_email_account",
LinphoneXmlRpcArgString, creator->username,
LinphoneXmlRpcArgString, creator->activation_code,
linphone_proxy_config_get_domain(creator->proxy_cfg),
......@@ -819,7 +819,7 @@ LinphoneRequestStatus linphone_account_creator_is_account_activated_custom(Linph
}
return LinphoneRequestMissingArguments;
}
request = linphone_xml_rpc_request_new_with_args("is_account_activated", LinphoneXmlRpcArgString,
request = linphone_xml_rpc_request_new_with_args(LinphoneXmlRpcArgString, "is_account_activated",
LinphoneXmlRpcArgString, creator->username ? creator->username : creator->phone_number,
LinphoneXmlRpcArgString, linphone_proxy_config_get_domain(creator->proxy_cfg),
LinphoneXmlRpcArgNone);
......@@ -857,7 +857,7 @@ LinphoneRequestStatus linphone_account_creator_is_phone_number_used_custom(Linph
}
return LinphoneRequestMissingArguments;
}
request = linphone_xml_rpc_request_new_with_args("is_phone_number_used", LinphoneXmlRpcArgString,
request = linphone_xml_rpc_request_new_with_args(LinphoneXmlRpcArgString, "is_phone_number_used",
LinphoneXmlRpcArgString, creator->phone_number,
LinphoneXmlRpcArgString, linphone_proxy_config_get_domain(creator->proxy_cfg),
LinphoneXmlRpcArgNone);
......@@ -892,7 +892,7 @@ LinphoneRequestStatus linphone_account_creator_link_phone_number_with_account_cu
}
return LinphoneRequestMissingArguments;
}
request = linphone_xml_rpc_request_new_with_args("link_phone_number_with_account", LinphoneXmlRpcArgString,
request = linphone_xml_rpc_request_new_with_args(LinphoneXmlRpcArgString, "link_phone_number_with_account",
LinphoneXmlRpcArgString, creator->phone_number,
LinphoneXmlRpcArgString, creator->username,
LinphoneXmlRpcArgString, linphone_proxy_config_get_domain(creator->proxy_cfg),
......@@ -924,7 +924,7 @@ LinphoneRequestStatus linphone_account_creator_is_account_linked_custom(Linphone
if (!creator->username || !linphone_proxy_config_get_domain(creator->proxy_cfg)) {
return LinphoneRequestMissingArguments;
}
request = linphone_xml_rpc_request_new_with_args("get_phone_number_for_account",LinphoneXmlRpcArgString,
request = linphone_xml_rpc_request_new_with_args(LinphoneXmlRpcArgString, "get_phone_number_for_account",
LinphoneXmlRpcArgString, creator->username,
LinphoneXmlRpcArgString, linphone_proxy_config_get_domain(creator->proxy_cfg),
LinphoneXmlRpcArgNone);
......@@ -957,7 +957,7 @@ LinphoneRequestStatus linphone_account_creator_activate_phone_number_link_custom
}
return LinphoneRequestMissingArguments;
}
request = linphone_xml_rpc_request_new_with_args("activate_phone_number_link", LinphoneXmlRpcArgString,
request = linphone_xml_rpc_request_new_with_args(LinphoneXmlRpcArgString, "activate_phone_number_link",
LinphoneXmlRpcArgString, creator->phone_number,
LinphoneXmlRpcArgString, creator->username,
LinphoneXmlRpcArgString, creator->activation_code,
......@@ -1000,7 +1000,7 @@ LinphoneRequestStatus linphone_account_creator_recover_phone_account_custom(Linp
}
return LinphoneRequestMissingArguments;
}
request = linphone_xml_rpc_request_new_with_args("recover_phone_account", LinphoneXmlRpcArgString,
request = linphone_xml_rpc_request_new_with_args(LinphoneXmlRpcArgString, "recover_phone_account",
LinphoneXmlRpcArgString, creator->phone_number,
LinphoneXmlRpcArgString, linphone_proxy_config_get_domain(creator->proxy_cfg),
LinphoneXmlRpcArgString, creator->language,
......@@ -1052,7 +1052,7 @@ LinphoneRequestStatus linphone_account_creator_update_password_custom(LinphoneAc
const char * ha1 = ms_strdup(creator->ha1 ? creator->ha1 : ha1_for_passwd(username, linphone_proxy_config_get_domain(creator->proxy_cfg), creator->password) );
const char * new_ha1 = ms_strdup(ha1_for_passwd(username, linphone_proxy_config_get_domain(creator->proxy_cfg), new_pwd));
request = linphone_xml_rpc_request_new_with_args("update_hash", LinphoneXmlRpcArgString,
request = linphone_xml_rpc_request_new_with_args(LinphoneXmlRpcArgString, "update_hash",
LinphoneXmlRpcArgString, username,
LinphoneXmlRpcArgString, ha1,
LinphoneXmlRpcArgString, new_ha1,
......
......@@ -251,7 +251,7 @@ static void process_response_from_post_xml_rpc_request(void *data, const belle_h
}
static LinphoneXmlRpcRequest * _linphone_xml_rpc_request_new(const char *method, LinphoneXmlRpcArgType return_type) {
static LinphoneXmlRpcRequest * _linphone_xml_rpc_request_new(LinphoneXmlRpcArgType return_type, const char *method) {
LinphoneXmlRpcRequest *request = belle_sip_object_new(LinphoneXmlRpcRequest);
request->callbacks = linphone_xml_rpc_request_cbs_new();
request->status = LinphoneXmlRpcStatusPending;
......@@ -306,18 +306,18 @@ BELLE_SIP_INSTANCIATE_VPTR(LinphoneXmlRpcSession, belle_sip_object_t,
);
LinphoneXmlRpcRequest * linphone_xml_rpc_request_new(const char *method, LinphoneXmlRpcArgType return_type) {
LinphoneXmlRpcRequest *request = _linphone_xml_rpc_request_new(method, return_type);
LinphoneXmlRpcRequest * linphone_xml_rpc_request_new(LinphoneXmlRpcArgType return_type, const char *method) {
LinphoneXmlRpcRequest *request = _linphone_xml_rpc_request_new(return_type, method);
format_request(request);
return request;
}
LinphoneXmlRpcRequest * linphone_xml_rpc_request_new_with_args(const char *method, LinphoneXmlRpcArgType return_type, ...) {
LinphoneXmlRpcRequest * linphone_xml_rpc_request_new_with_args(LinphoneXmlRpcArgType return_type, const char *method, ...) {
bool_t cont = TRUE;
va_list args;
LinphoneXmlRpcArgType arg_type;
LinphoneXmlRpcRequest *request = _linphone_xml_rpc_request_new(method, return_type);
va_start(args, return_type);
LinphoneXmlRpcRequest *request = _linphone_xml_rpc_request_new(return_type, method);
va_start(args, method);
while (cont) {
arg_type = va_arg(args, LinphoneXmlRpcArgType);
switch (arg_type) {
......
......@@ -43,19 +43,19 @@ typedef void (*LinphoneXmlRpcRequestCbsResponseCb)(LinphoneXmlRpcRequest *reques
/**
* Create a new LinphoneXmlRpcRequest object.
* @param[in] method The XML-RPC method to call.
* @param[in] return_type The expected XML-RPC response type.
* @param[in] method The XML-RPC method to call.
* @return A new LinphoneXmlRpcRequest object.
**/
LINPHONE_PUBLIC LinphoneXmlRpcRequest * linphone_xml_rpc_request_new(const char *method, LinphoneXmlRpcArgType return_type);
LINPHONE_PUBLIC LinphoneXmlRpcRequest * linphone_xml_rpc_request_new(LinphoneXmlRpcArgType return_type, const char *method);
/**
* Create a new LinphoneXmlRpcRequest object giving the arguments to the method call.
* @param[in] method The XML-RPC method to call.
* @param[in] return_type The expected XML-RPC response type.
* @param[in] method The XML-RPC method to call.
* @return A new LinphoneXmlRpcRequest object.
**/
LINPHONE_PUBLIC LinphoneXmlRpcRequest * linphone_xml_rpc_request_new_with_args(const char *method, LinphoneXmlRpcArgType return_type, ...);
LINPHONE_PUBLIC LinphoneXmlRpcRequest * linphone_xml_rpc_request_new_with_args(LinphoneXmlRpcArgType return_type, const char *method, ...);
/**
* Acquire a reference to the XML-RPC request.
......
......@@ -359,7 +359,7 @@ LinphoneRequestStatus get_activation_code_account_cb(LinphoneAccountCreator *cre
return LinphoneRequestMissingArguments;
}
request = linphone_xml_rpc_request_new_with_args("get_confirmation_key", LinphoneXmlRpcArgString,
request = linphone_xml_rpc_request_new_with_args(LinphoneXmlRpcArgString, "get_confirmation_key",
LinphoneXmlRpcArgString, creator->username ? creator->username : creator->phone_number,
LinphoneXmlRpcArgString, creator->password,
LinphoneXmlRpcArgString, linphone_proxy_config_get_domain(creator->proxy_cfg),
......@@ -397,7 +397,7 @@ LinphoneRequestStatus delete_account_cb(LinphoneAccountCreator *creator) {
return LinphoneRequestMissingArguments;
}
request = linphone_xml_rpc_request_new_with_args("delete_account", LinphoneXmlRpcArgString,
request = linphone_xml_rpc_request_new_with_args(LinphoneXmlRpcArgString, "delete_account",
LinphoneXmlRpcArgString, creator->username ? creator->username : creator->phone_number,
LinphoneXmlRpcArgString, creator->password,
LinphoneXmlRpcArgString, linphone_proxy_config_get_domain(creator->proxy_cfg),
......
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