mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Add new tests for account creator
This commit is contained in:
parent
b41b920426
commit
1deaf92b67
3 changed files with 862 additions and 75 deletions
|
|
@ -378,7 +378,8 @@ void linphone_account_creator_responses_cbs_set_update_account_cb(LinphoneAccoun
|
|||
|
||||
/************************** Start Account Creator data **************************/
|
||||
static void _linphone_account_creator_destroy(LinphoneAccountCreator *creator) {
|
||||
linphone_xml_rpc_session_release(creator->xmlrpc_session); /*this will drop all pending requests if any*/
|
||||
/*this will drop all pending requests if any*/
|
||||
if (creator->xmlrpc_session) linphone_xml_rpc_session_release(creator->xmlrpc_session);
|
||||
linphone_account_creator_requests_cbs_unref(creator->requests_cbs);
|
||||
linphone_account_creator_responses_cbs_unref(creator->responses_cbs);
|
||||
linphone_proxy_config_destroy(creator->proxy_cfg);
|
||||
|
|
@ -408,7 +409,7 @@ LinphoneAccountCreator * linphone_account_creator_new(LinphoneCore *core, const
|
|||
creator->requests_cbs = linphone_account_creator_requests_cbs_new();
|
||||
creator->responses_cbs = linphone_account_creator_reponses_cbs_new();
|
||||
creator->core = core;
|
||||
creator->xmlrpc_session = linphone_xml_rpc_session_new(core, xmlrpc_url);
|
||||
creator->xmlrpc_session = (xmlrpc_url) ? linphone_xml_rpc_session_new(core, xmlrpc_url) : NULL;
|
||||
creator->proxy_cfg = linphone_core_create_proxy_config(core);
|
||||
linphone_account_creator_set_linphone_impl(creator);
|
||||
return creator;
|
||||
|
|
@ -1005,7 +1006,7 @@ static void _activate_phone_number_link_cb_custom(LinphoneXmlRpcRequest *request
|
|||
LinphoneRequestStatus status = LinphoneRequestFailed;
|
||||
const char* resp = linphone_xml_rpc_request_get_string_response(request);
|
||||
if (linphone_xml_rpc_request_get_status(request) == LinphoneXmlRpcStatusOk) {
|
||||
status = (strstr(resp, "ERROR_") == resp) ? LinphoneRequestAccountNotActivated : LinphoneRequestOk;
|
||||
status = (strstr(resp, "ERROR_") == resp) ? LinphoneRequestAccountNotActivated : LinphoneRequestAccountActivated;
|
||||
}
|
||||
creator->responses_cbs->activate_alias_response_cb(creator, status, resp);
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -6,7 +6,7 @@ username_length=4
|
|||
username_max_length=14
|
||||
username_min_length=3
|
||||
username_regex=^[a-z0-9_.\-]*$
|
||||
xmlrpc_url=https://sip2.linphone.org:445/wizard.php
|
||||
xmlrpc_url=https://sip2.linphone.org:446/wizard.php
|
||||
|
||||
[proxy_default_values]
|
||||
reg_proxy=<sip:sip2.linphone.org:5072>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue