Commit 68ca9907 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Fix invalid read when a CallSession tries to notify a Call that has been destroyed.

parent bbd6c58d
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "conference/local-conference-p.h" #include "conference/local-conference-p.h"
#include "conference/participant-p.h" #include "conference/participant-p.h"
#include "conference/session/media-session-p.h"
#include "local-conference-call-p.h" #include "local-conference-call-p.h"
// ============================================================================= // =============================================================================
...@@ -50,6 +51,13 @@ LocalConferenceCall::LocalConferenceCall ( ...@@ -50,6 +51,13 @@ LocalConferenceCall::LocalConferenceCall (
participant->getPrivate()->getSession()->configure(direction, cfg, op, from, to); participant->getPrivate()->getSession()->configure(direction, cfg, op, from, to);
} }
LocalConferenceCall::~LocalConferenceCall () {
L_D();
auto session = d->getActiveSession();
if (session)
session->getPrivate()->setCallSessionListener(nullptr);
}
shared_ptr<Core> LocalConferenceCall::getCore () const { shared_ptr<Core> LocalConferenceCall::getCore () const {
return Call::getCore(); return Call::getCore();
} }
......
...@@ -47,6 +47,7 @@ public: ...@@ -47,6 +47,7 @@ public:
SalCallOp *op, SalCallOp *op,
const MediaSessionParams *msp const MediaSessionParams *msp
); );
virtual ~LocalConferenceCall ();
std::shared_ptr<Core> getCore () const; std::shared_ptr<Core> getCore () const;
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "conference/remote-conference-p.h" #include "conference/remote-conference-p.h"
#include "conference/participant-p.h" #include "conference/participant-p.h"
#include "conference/session/media-session-p.h"
#include "remote-conference-call-p.h" #include "remote-conference-call-p.h"
// ============================================================================= // =============================================================================
...@@ -50,6 +51,13 @@ RemoteConferenceCall::RemoteConferenceCall ( ...@@ -50,6 +51,13 @@ RemoteConferenceCall::RemoteConferenceCall (
participant->getPrivate()->getSession()->configure(direction, cfg, op, from, to); participant->getPrivate()->getSession()->configure(direction, cfg, op, from, to);
} }
RemoteConferenceCall::~RemoteConferenceCall () {
L_D();
auto session = d->getActiveSession();
if (session)
session->getPrivate()->setCallSessionListener(nullptr);
}
shared_ptr<Core> RemoteConferenceCall::getCore () const { shared_ptr<Core> RemoteConferenceCall::getCore () const {
return Call::getCore(); return Call::getCore();
} }
......
...@@ -42,6 +42,7 @@ public: ...@@ -42,6 +42,7 @@ public:
SalCallOp *op, SalCallOp *op,
const MediaSessionParams *msp const MediaSessionParams *msp
); );
virtual ~RemoteConferenceCall ();
std::shared_ptr<Core> getCore () const; std::shared_ptr<Core> getCore () const;
......
...@@ -43,6 +43,8 @@ class LINPHONE_PUBLIC CallSession : public Object, public CoreAccessor { ...@@ -43,6 +43,8 @@ class LINPHONE_PUBLIC CallSession : public Object, public CoreAccessor {
friend class ClientGroupChatRoomPrivate; friend class ClientGroupChatRoomPrivate;
friend class Conference; friend class Conference;
friend class CorePrivate; friend class CorePrivate;
friend class LocalConferenceCall;
friend class RemoteConferenceCall;
friend class ServerGroupChatRoom; friend class ServerGroupChatRoom;
friend class ServerGroupChatRoomPrivate; friend class ServerGroupChatRoomPrivate;
......
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