From e6d71d722dae3c3f50d481958df9e7289f350f65 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Tue, 11 Apr 2017 14:02:37 +0200 Subject: [PATCH] fix(account_creator): check activation code only if a phone number is used in `activate` --- coreapi/account_creator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreapi/account_creator.c b/coreapi/account_creator.c index 34dbfd24c..a29223f0e 100644 --- a/coreapi/account_creator.c +++ b/coreapi/account_creator.c @@ -793,7 +793,7 @@ static void _activate_account_cb_custom(LinphoneXmlRpcRequest *request) { LinphoneAccountCreatorStatus linphone_account_creator_activate_account_linphone(LinphoneAccountCreator *creator) { LinphoneXmlRpcRequest *request; char *identity = _get_identity(creator); - if (!identity || !creator->activation_code) { + if (!identity || (creator->phone_number && !creator->activation_code)) { if (creator->cbs->is_account_activated_response_cb != NULL) { creator->cbs->is_account_activated_response_cb(creator, LinphoneAccountCreatorStatusMissingArguments, "Missing required parameters"); }