forked from mirrors/linphone-iphone
Fix invalid read when a CallSession tries to notify a Call that has been destroyed.
This commit is contained in:
parent
bbd6c58dfd
commit
68ca9907c1
5 changed files with 20 additions and 0 deletions
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "conference/local-conference-p.h"
|
||||
#include "conference/participant-p.h"
|
||||
#include "conference/session/media-session-p.h"
|
||||
#include "local-conference-call-p.h"
|
||||
|
||||
// =============================================================================
|
||||
|
|
@ -50,6 +51,13 @@ LocalConferenceCall::LocalConferenceCall (
|
|||
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 {
|
||||
return Call::getCore();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ public:
|
|||
SalCallOp *op,
|
||||
const MediaSessionParams *msp
|
||||
);
|
||||
virtual ~LocalConferenceCall ();
|
||||
|
||||
std::shared_ptr<Core> getCore () const;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include "conference/remote-conference-p.h"
|
||||
#include "conference/participant-p.h"
|
||||
#include "conference/session/media-session-p.h"
|
||||
#include "remote-conference-call-p.h"
|
||||
|
||||
// =============================================================================
|
||||
|
|
@ -50,6 +51,13 @@ RemoteConferenceCall::RemoteConferenceCall (
|
|||
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 {
|
||||
return Call::getCore();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ public:
|
|||
SalCallOp *op,
|
||||
const MediaSessionParams *msp
|
||||
);
|
||||
virtual ~RemoteConferenceCall ();
|
||||
|
||||
std::shared_ptr<Core> getCore () const;
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,8 @@ class LINPHONE_PUBLIC CallSession : public Object, public CoreAccessor {
|
|||
friend class ClientGroupChatRoomPrivate;
|
||||
friend class Conference;
|
||||
friend class CorePrivate;
|
||||
friend class LocalConferenceCall;
|
||||
friend class RemoteConferenceCall;
|
||||
friend class ServerGroupChatRoom;
|
||||
friend class ServerGroupChatRoomPrivate;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue