fix(callbacks): do not unref chat messagegit status! It's a shared ptr now!!!

This commit is contained in:
Ronan Abhamon 2017-12-14 11:15:07 +01:00
parent 707d94c34e
commit d8b0a722dc
3 changed files with 2 additions and 6 deletions

View file

@ -549,9 +549,6 @@ static void message_delivery_update(SalOp *op, SalMessageDeliveryStatus status){
if (linphone_chat_message_get_chat_room(chat_msg) != NULL) {
linphone_chat_message_update_state(chat_msg, chatStatusSal2Linphone(status));
}
if (status != SalMessageDeliveryInProgress) { /*only release op if not in progress*/
linphone_chat_message_unref(chat_msg);
}
}
static void info_received(SalOp *op, SalBodyHandler *body_handler) {

View file

@ -535,9 +535,8 @@ public:
>
static inline bctbx_list_t *getResolvedCListFromCppList (const std::list<std::shared_ptr<CppType>> &cppList) {
bctbx_list_t *result = nullptr;
for (const auto &value : cppList) {
for (const auto &value : cppList)
result = bctbx_list_append(result, belle_sip_object_ref(getCBackPtr(value)));
}
return result;
}

View file

@ -491,7 +491,7 @@ void ChatMessagePrivate::send () {
// Start of message modification
// ---------------------------------------
if (applyModifiers) {
if (applyModifiers) {
// Do not multipart or encapsulate with CPIM in an old ChatRoom to maintain backward compatibility
if (q->getChatRoom()->canHandleParticipants()) {
if ((currentSendStep &ChatMessagePrivate::Step::Multipart) == ChatMessagePrivate::Step::Multipart) {