Commit 38bf5cfb authored by jehan's avatar jehan
Browse files

improve local conference tester

parent 555d45d0
......@@ -2730,7 +2730,7 @@ static void linphone_core_init(LinphoneCore * lc, LinphoneCoreCbs *cbs, LpConfig
bool_t push_notification_default = FALSE;
bool_t auto_iterate_default = FALSE;
#if defined(__ANDROID__) || defined(TARGET_OS_IPHONE)
#if __ANDROID__ || TARGET_OS_IPHONE
push_notification_default = TRUE;
auto_iterate_default = TRUE;
#endif
......
......@@ -167,7 +167,7 @@ static void linphone_proxy_config_init(LinphoneCore* lc, LinphoneProxyConfig *cf
cfg->publish = lc ? !!linphone_config_get_default_int(lc->config, "proxy", "publish", FALSE) : FALSE;
bool_t push_allowed_default = FALSE;
#if defined(__ANDROID__) || defined(TARGET_OS_IPHONE)
#if __ANDROID__ || TARGET_OS_IPHONE
push_allowed_default = TRUE;
#endif
cfg->push_notification_allowed = lc ? !!linphone_config_get_default_int(lc->config, "proxy", "push_notification_allowed", push_allowed_default) : push_allowed_default;
......
......@@ -43,6 +43,7 @@
#ifdef HAVE_ADVANCED_IM
#include "conference/handlers/local-conference-list-event-handler.h"
#include "conference/handlers/remote-conference-list-event-handler.h"
#include "conference/participant.h"
#endif
#include "core/core-listener.h"
#include "core/core-p.h"
......@@ -206,7 +207,18 @@ void CorePrivate::uninit() {
shared_ptr<ChatRoom> cr;
for (const auto &chatRoom : chatRooms) {
cr = dynamic_pointer_cast<ChatRoom>(chatRoom);
if (cr) cr->getPrivate()->getImdnHandler()->onLinphoneCoreStop();
if (cr) {
cr->getPrivate()->getImdnHandler()->onLinphoneCoreStop();
#ifdef HAVE_ADVANCED_IM
for (const auto &participant: cr->getParticipants()) {
for (std::shared_ptr<ParticipantDevice> device : participant->getDevices() ) {
//to make sure no more messages are received after Core:uninit because key components like DB are no longuer available. So it's no more possible to handle any singnaling messages properly.
if (device->getSession())
device->getSession()->setListener(nullptr);
}
}
#endif
}
}
chatRoomsById.clear();
......
This diff is collapsed.
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