From ca03c42f4a30c91b547200081d12609c03eb7858 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Mon, 29 Aug 2016 11:24:22 +0200 Subject: [PATCH] account_creator.c: update to latest xmlrpc api --- coreapi/account_creator.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/coreapi/account_creator.c b/coreapi/account_creator.c index 5f568c371..d0106862e 100644 --- a/coreapi/account_creator.c +++ b/coreapi/account_creator.c @@ -727,7 +727,12 @@ static void _recover_phone_account_cb(LinphoneXmlRpcRequest *request) { LinphoneAccountCreatorStatus status = LinphoneAccountCreatorReqFailed; 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) ? LinphoneAccountCreatorReqFailed : LinphoneAccountCreatorOK; + if (strstr(resp, "ERROR_") == resp) { + status = LinphoneAccountCreatorReqFailed; + } else { + status = LinphoneAccountCreatorOK; + set_string(&creator->username, resp, FALSE); + } } creator->callbacks->recover_phone_account(creator, status, resp); }