Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
b8795c9a
Commit
b8795c9a
authored
Oct 20, 2011
by
Tristan Matthews
Browse files
* #7246: Print SDP properly
parent
f71da8ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
daemon/src/sip/sdp.cpp
View file @
b8795c9a
...
...
@@ -221,6 +221,16 @@ void Sdp::setLocalMediaCapabilities(const CodecOrder &selectedCodecs)
}
}
namespace
{
void
printSession
(
const
pjmedia_sdp_session
*
session
)
{
char
buffer
[
2048
];
size_t
size
=
pjmedia_sdp_print
(
session
,
buffer
,
sizeof
(
buffer
));
std
::
string
sessionStr
(
buffer
,
size
);
DEBUG
(
"%s"
,
sessionStr
.
c_str
());
}
}
int
Sdp
::
createLocalSession
(
const
CodecOrder
&
selectedCodecs
)
{
setLocalMediaCapabilities
(
selectedCodecs
);
...
...
@@ -259,9 +269,8 @@ int Sdp::createLocalSession(const CodecOrder &selectedCodecs)
if
(
!
srtpCrypto_
.
empty
())
addSdesAttribute
(
srtpCrypto_
);
char
buffer
[
1000
];
pjmedia_sdp_print
(
localSession_
,
buffer
,
sizeof
(
buffer
));
DEBUG
(
"SDP: Local SDP Session:
\n
%s"
,
buffer
);
DEBUG
(
"SDP: Local SDP Session:"
);
printSession
(
localSession_
);
return
pjmedia_sdp_validate
(
localSession_
);
}
...
...
@@ -279,8 +288,8 @@ void Sdp::receiveOffer(const pjmedia_sdp_session* remote,
{
assert
(
remote
);
char
buffer
[
1000
]
;
p
jmedia_sdp_print
(
remote
,
buffer
,
sizeof
(
buffer
)
);
DEBUG
(
"SDP: Remote SDP Session:"
)
;
p
rintSession
(
remote
);
if
(
localSession_
==
NULL
&&
createLocalSession
(
selectedCodecs
)
!=
PJ_SUCCESS
)
{
ERROR
(
"SDP: Failed to create initial offer"
);
...
...
Write
Preview
Supports
Markdown
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