diff --git a/src/account/account.cpp b/src/account/account.cpp index 1300d019d7c8df310b79acfddec8ede0b1324a3c..b8d394264ffbcc686dcdda2e9fc9a56e4a268ead 100644 --- a/src/account/account.cpp +++ b/src/account/account.cpp @@ -1767,11 +1767,11 @@ void Account::handleCCMPResponseConferenceList(const HttpResponse &response) { handleResponseConferenceList(this, response); break; case HttpResponse::Status::Timeout: - handleTimeout(this, response); + handleTimeoutConferenceList(this, response); break; case HttpResponse::Status::IOError: case HttpResponse::Status::InvalidRequest: - handleIoError(this, response); + handleIoErrorConferenceList(this, response); break; } } @@ -1782,11 +1782,11 @@ void Account::handleCCMPResponseConferenceInformation(const HttpResponse &respon handleResponseConferenceInformation(this, response); break; case HttpResponse::Status::Timeout: - handleTimeout(this, response); + handleTimeoutConferenceInformation(this, response); break; case HttpResponse::Status::IOError: case HttpResponse::Status::InvalidRequest: - handleIoError(this, response); + handleIoErrorConferenceInformation(this, response); break; } } @@ -1906,6 +1906,24 @@ void Account::handleResponseConferenceList(void *ctx, const HttpResponse &event) } } +void Account::handleIoErrorConferenceList(void *ctx, const HttpResponse &event) { + auto account = static_cast<Account *>(ctx); + const auto ccmpServerUrl = account->getAccountParams()->getCcmpServerUrl(); + const auto &body = event.getBody(); + auto content = body.getBodyAsString(); + lInfo() << "I/O error on retrieving the conference list " << *account << " belongs to from the CCMP server " + << ccmpServerUrl << ": " << content; +} + +void Account::handleTimeoutConferenceList(void *ctx, const HttpResponse &event) { + auto account = static_cast<Account *>(ctx); + const auto ccmpServerUrl = account->getAccountParams()->getCcmpServerUrl(); + const auto &body = event.getBody(); + auto content = body.getBodyAsString(); + lInfo() << "Timeout error on retrieving the conference list " << *account << " belongs to from the CCMP server " + << ccmpServerUrl << ": " << content; +} + void Account::handleResponseConferenceInformation(void *ctx, const HttpResponse &event) { auto account = static_cast<Account *>(ctx); int code = event.getHttpStatusCode(); @@ -2066,19 +2084,23 @@ void Account::handleResponseConferenceInformation(void *ctx, const HttpResponse account->ccmpConferenceInformationResponseReceived(); } -void Account::handleIoError(void *ctx, const HttpResponse &event) { +void Account::handleIoErrorConferenceInformation(void *ctx, const HttpResponse &event) { auto account = static_cast<Account *>(ctx); + const auto ccmpServerUrl = account->getAccountParams()->getCcmpServerUrl(); const auto &body = event.getBody(); auto content = body.getBodyAsString(); - lInfo() << "Account [" << account << "] I/O error : " << content; + lInfo() << *account << ": I/O error on retrieving the information of a conference from the CCMP server " + << ccmpServerUrl << ": " << content; account->ccmpConferenceInformationResponseReceived(); } -void Account::handleTimeout(void *ctx, const HttpResponse &event) { +void Account::handleTimeoutConferenceInformation(void *ctx, const HttpResponse &event) { auto account = static_cast<Account *>(ctx); + const auto ccmpServerUrl = account->getAccountParams()->getCcmpServerUrl(); const auto &body = event.getBody(); auto content = body.getBodyAsString(); - lInfo() << "Account [" << account << "] Timeout error : " << content; + lInfo() << *account << ": Timeout error on retrieving the information of a conference from the CCMP server " + << ccmpServerUrl << ": " << content; account->ccmpConferenceInformationResponseReceived(); } diff --git a/src/account/account.h b/src/account/account.h index 81d1062fab90dca26c29654f068dfe92a9dd768f..1e71b3b79e6447d1b79106b8a1ac910f24b27e97 100644 --- a/src/account/account.h +++ b/src/account/account.h @@ -178,9 +178,11 @@ public: void handleCCMPResponseConferenceInformation(const HttpResponse &response); // CCMP request callback (conference list) static void handleResponseConferenceList(void *ctx, const HttpResponse &event); + static void handleTimeoutConferenceList(void *ctx, const HttpResponse &event); + static void handleIoErrorConferenceList(void *ctx, const HttpResponse &event); static void handleResponseConferenceInformation(void *ctx, const HttpResponse &event); - static void handleTimeout(void *ctx, const HttpResponse &event); - static void handleIoError(void *ctx, const HttpResponse &event); + static void handleTimeoutConferenceInformation(void *ctx, const HttpResponse &event); + static void handleIoErrorConferenceInformation(void *ctx, const HttpResponse &event); private: LinphoneCore *getCCore() const;