diff --git a/src/chat/chat-room/chat-room.cpp b/src/chat/chat-room/chat-room.cpp index b5b5c55df..516a35aa8 100644 --- a/src/chat/chat-room/chat-room.cpp +++ b/src/chat/chat-room/chat-room.cpp @@ -163,13 +163,13 @@ LinphoneReason ChatRoomPrivate::messageReceived (SalOp *op, const SalMessage *sa if (msg->getPrivate()->getContentType() == ContentType::ImIsComposing) { isComposingReceived(msg->getFromAddress(), msg->getPrivate()->getText()); increaseMsgCount = FALSE; - if (lp_config_get_int(cCore->config, "sip", "deliver_imdn", 0) != 1) { + if (lp_config_get_int(linphone_core_get_config(cCore), "sip", "deliver_imdn", 0) != 1) { goto end; } } else if (msg->getPrivate()->getContentType() == ContentType::Imdn) { imdnReceived(msg->getPrivate()->getText()); increaseMsgCount = FALSE; - if (lp_config_get_int(cCore->config, "sip", "deliver_imdn", 0) != 1) { + if (lp_config_get_int(linphone_core_get_config(cCore), "sip", "deliver_imdn", 0) != 1) { goto end; } } diff --git a/src/chat/chat-room/real-time-text-chat-room.cpp b/src/chat/chat-room/real-time-text-chat-room.cpp index 2f3d7a853..1a8dde51d 100644 --- a/src/chat/chat-room/real-time-text-chat-room.cpp +++ b/src/chat/chat-room/real-time-text-chat-room.cpp @@ -76,7 +76,7 @@ void RealTimeTextChatRoomPrivate::realtimeTextReceived (uint32_t character, Linp pendingMessage->getPrivate()->setState(ChatMessage::State::Delivered); pendingMessage->getPrivate()->setDirection(ChatMessage::Direction::Incoming); - if (lp_config_get_int(cCore->config, "misc", "store_rtt_messages", 1) == 1) + if (lp_config_get_int(linphone_core_get_config(cCore), "misc", "store_rtt_messages", 1) == 1) pendingMessage->getPrivate()->store(); chatMessageReceived(pendingMessage); diff --git a/src/core/core-chat-room.cpp b/src/core/core-chat-room.cpp index bf75776d8..164be345d 100644 --- a/src/core/core-chat-room.cpp +++ b/src/core/core-chat-room.cpp @@ -145,11 +145,10 @@ shared_ptr Core::findOneToOneChatRoom ( } shared_ptr Core::createClientGroupChatRoom (const string &subject) { - L_D(); return L_GET_CPP_PTR_FROM_C_OBJECT( _linphone_client_group_chat_room_new( - d->cCore, - linphone_core_get_conference_factory_uri(d->cCore), + getCCore(), + linphone_core_get_conference_factory_uri(getCCore()), L_STRING_TO_C(subject) ) ); @@ -187,9 +186,7 @@ shared_ptr Core::getOrCreateBasicChatRoom (const IdentityAddress &peer } shared_ptr Core::getOrCreateBasicChatRoomFromUri (const string &peerAddress, bool isRtt) { - L_D(); - - LinphoneAddress *address = linphone_core_interpret_url(d->cCore, L_STRING_TO_C(peerAddress)); + LinphoneAddress *address = linphone_core_interpret_url(getCCore(), L_STRING_TO_C(peerAddress)); if (!address) { lError() << "Cannot make a valid address with: `" << peerAddress << "`."; return nullptr; diff --git a/src/core/core-p.h b/src/core/core-p.h index 3b79cbf58..d5cec3542 100644 --- a/src/core/core-p.h +++ b/src/core/core-p.h @@ -48,7 +48,6 @@ public: std::shared_ptr createBasicChatRoom (const ChatRoomId &chatRoomId, bool isRtt); std::unique_ptr mainDb; - LinphoneCore *cCore = nullptr; private: std::list> calls;