Do not notify message delivery if the core is being shut down.

This commit is contained in:
Ghislain MARY 2018-04-24 11:31:20 +02:00
parent 15b38e3a8b
commit 6a119f971f

View file

@ -604,6 +604,12 @@ static LinphoneChatMessageState chatStatusSal2Linphone(SalMessageDeliveryStatus
}
static void message_delivery_update(SalOp *op, SalMessageDeliveryStatus status) {
auto lc = reinterpret_cast<LinphoneCore *>(op->get_sal()->get_user_pointer());
if (linphone_core_get_global_state(lc) != LinphoneGlobalOn) {
static_cast<SalReferOp *>(op)->reply(SalReasonDeclined);
return;
}
LinphonePrivate::ChatMessage *msg = reinterpret_cast<LinphonePrivate::ChatMessage *>(op->get_user_pointer());
if (!msg)
return; // Do not handle delivery status for isComposing messages.