Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
1618beac
Commit
1618beac
authored
Aug 11, 2011
by
Tristan Matthews
Browse files
* #6624: fix segfault on servercallfailure
don't call methods on deleted objects!
parent
d74a1e78
Changes
3
Hide whitespace changes
Inline
Side-by-side
sflphone-common/src/audio/audiortp/AudioSymmetricRtpSession.cpp
View file @
1618beac
...
...
@@ -62,6 +62,7 @@ AudioSymmetricRtpSession::~AudioSymmetricRtpSession()
void
AudioSymmetricRtpSession
::
final
()
{
delete
_rtpThread
;
_rtpThread
=
0
;
}
AudioSymmetricRtpSession
::
AudioRtpThread
::
AudioRtpThread
(
AudioSymmetricRtpSession
*
session
)
:
running
(
true
),
rtpSession
(
session
)
...
...
sflphone-common/src/audio/audiortp/AudioSymmetricRtpSession.h
View file @
1618beac
...
...
@@ -71,10 +71,12 @@ class AudioSymmetricRtpSession : public ost::TimerPort, public ost::SymmetricRTP
virtual
bool
onRTPPacketRecv
(
ost
::
IncomingRTPPkt
&
pkt
)
{
return
AudioRtpSession
::
onRTPPacketRecv
(
pkt
);
}
int
startSymmetricRtpThread
(
void
)
{
assert
(
_rtpThread
);
return
_rtpThread
->
start
();
}
void
stopSymmetricRtpThread
(
void
)
{
assert
(
_rtpThread
);
_rtpThread
->
running
=
false
;
}
...
...
sflphone-common/src/sip/sipvoiplink.cpp
View file @
1618beac
...
...
@@ -658,9 +658,6 @@ Call *SIPVoIPLink::newOutgoingCall (const std::string& id, const std::string& to
// Create a new SIP call
SIPCall
*
call
=
new
SIPCall
(
id
,
Call
::
Outgoing
,
_cp
);
if
(
call
==
NULL
)
{
throw
VoipLinkException
(
"Could not create new SIP call"
);
}
// Find the account associated to this call
account
=
dynamic_cast
<
SIPAccount
*>
(
Manager
::
instance
().
getAccount
(
Manager
::
instance
().
getAccountFromCall
(
id
)));
...
...
@@ -669,7 +666,6 @@ Call *SIPVoIPLink::newOutgoingCall (const std::string& id, const std::string& to
call
->
setConnectionState
(
Call
::
Disconnected
);
call
->
setState
(
Call
::
Error
);
delete
call
;
call
=
NULL
;
// TODO: We should investigate how we could get rid of this error and create a IP2IP call instead
throw
VoipLinkException
(
"Could not get account for this call"
);
}
...
...
@@ -709,7 +705,6 @@ Call *SIPVoIPLink::newOutgoingCall (const std::string& id, const std::string& to
if
(
audiocodec
==
NULL
)
{
_error
(
"UserAgent: Could not instantiate codec"
);
delete
call
;
call
=
NULL
;
throw
VoipLinkException
(
"Could not instantiate codec for early media"
);
}
...
...
@@ -732,7 +727,6 @@ Call *SIPVoIPLink::newOutgoingCall (const std::string& id, const std::string& to
status
=
call
->
getLocalSDP
()
->
createOffer
(
account
->
getActiveCodecs
());
if
(
status
!=
PJ_SUCCESS
)
{
delete
call
;
call
=
NULL
;
throw
VoipLinkException
(
"Could not create local sdp offer for new call"
);
}
...
...
@@ -742,7 +736,6 @@ Call *SIPVoIPLink::newOutgoingCall (const std::string& id, const std::string& to
addCall
(
call
);
}
else
{
delete
call
;
call
=
NULL
;
throw
VoipLinkException
(
"Could not send outgoing INVITE request for new call"
);
}
...
...
@@ -1348,7 +1341,6 @@ SIPVoIPLink::terminateCall (const std::string& id)
if
(
call
)
{
// terminate the sip call
delete
call
;
call
=
0
;
}
}
...
...
@@ -1647,10 +1639,6 @@ SIPVoIPLink::SIPCallServerFailure (SIPCall *call)
std
::
string
id
=
call
->
getCallId
();
Manager
::
instance
().
callFailure
(
id
);
removeCall
(
id
);
if
(
call
->
getAudioRtp
())
{
call
->
getAudioRtp
()
->
stop
();
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment