Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
savoirfairelinux
jami-daemon
Commits
ec82d742
Commit
ec82d742
authored
Aug 07, 2012
by
Tristan Matthews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* #14408: sip: check that active_remote was found before using
parent
336d20a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
daemon/src/sip/sipvoiplink.cpp
daemon/src/sip/sipvoiplink.cpp
+9
-6
No files found.
daemon/src/sip/sipvoiplink.cpp
View file @
ec82d742
...
...
@@ -1518,10 +1518,13 @@ void sdp_media_update_cb(pjsip_inv_session *inv, pj_status_t status)
}
// Get active session sessions
const
pjmedia_sdp_session
*
remote_sdp
=
0
;
pjmedia_sdp_neg_get_active_remote
(
inv
->
neg
,
&
remote_sdp
);
const
pjmedia_sdp_session
*
remoteSDP
=
0
;
if
(
pjmedia_sdp_neg_get_active_remote
(
inv
->
neg
,
&
remoteSDP
)
!=
PJ_SUCCESS
)
{
ERROR
(
"Active remote not present"
);
return
;
}
if
(
pjmedia_sdp_validate
(
remote
_sdp
)
!=
PJ_SUCCESS
)
{
if
(
pjmedia_sdp_validate
(
remote
SDP
)
!=
PJ_SUCCESS
)
{
ERROR
(
"Invalid remote SDP session"
);
return
;
}
...
...
@@ -1535,7 +1538,7 @@ void sdp_media_update_cb(pjsip_inv_session *inv, pj_status_t status)
// Print SDP session
char
buffer
[
4096
];
memset
(
buffer
,
0
,
sizeof
buffer
);
if
(
pjmedia_sdp_print
(
remote
_sdp
,
buffer
,
sizeof
buffer
)
==
-
1
)
{
if
(
pjmedia_sdp_print
(
remote
SDP
,
buffer
,
sizeof
buffer
)
==
-
1
)
{
ERROR
(
"SDP was too big for buffer"
);
return
;
}
...
...
@@ -1549,7 +1552,7 @@ void sdp_media_update_cb(pjsip_inv_session *inv, pj_status_t status)
DEBUG
(
"Local active SDP Session:
\n
%s"
,
buffer
);
// Set active SDP sessions
sdpSession
->
setActiveRemoteSdpSession
(
remote
_sdp
);
sdpSession
->
setActiveRemoteSdpSession
(
remote
SDP
);
sdpSession
->
setActiveLocalSdpSession
(
local_sdp
);
// Update internal field for
...
...
@@ -1566,7 +1569,7 @@ void sdp_media_update_cb(pjsip_inv_session *inv, pj_status_t status)
// Get the crypto attribute containing srtp's cryptographic context (keys, cipher)
CryptoOffer
crypto_offer
;
call
->
getLocalSDP
()
->
getRemoteSdpCryptoFromOffer
(
remote
_sdp
,
crypto_offer
);
call
->
getLocalSDP
()
->
getRemoteSdpCryptoFromOffer
(
remote
SDP
,
crypto_offer
);
#if HAVE_SDES
bool
nego_success
=
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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