Commit 83e1fe3e authored by Simon Morlat's avatar Simon Morlat

Fix crash when trying to access LinphoneCall.getToAddress() while in state OutgoingInit.

parent 35830f15
......@@ -111,7 +111,6 @@ protected:
CallSessionParams *remoteParams = nullptr;
mutable Address diversionAddress;
mutable Address remoteContactAddress;
mutable Address toAddress;
std::string subject;
LinphoneCallDir direction = LinphoneCallOutgoing;
......@@ -1304,8 +1304,7 @@ CallSession::State CallSession::getPreviousState () const {
const Address& CallSession::getToAddress () const {
d->toAddress = Address(d->op->getTo());
return d->toAddress;
return *L_GET_CPP_PTR_FROM_C_OBJECT(linphone_call_log_get_to(d->log));
CallSession::State CallSession::getTransferState () const {
......@@ -49,6 +49,15 @@ void call_state_changed(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState
char* to=linphone_address_as_string(linphone_call_log_get_to(calllog));
char* from=linphone_address_as_string(linphone_call_log_get_from(calllog));
stats* counters;
const LinphoneAddress *to_addr = linphone_call_get_to_address(call);
const LinphoneAddress *remote_addr = linphone_call_get_remote_address(call);
//const LinphoneAddress *from_addr = linphone_call_get_from_address(call);
ms_message(" %s call from [%s] to [%s], new state is [%s]" ,linphone_call_log_get_dir(calllog)==LinphoneCallIncoming?"Incoming":"Outgoing"
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