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
86118ed0
Commit
86118ed0
authored
Aug 26, 2013
by
Tristan Matthews
Browse files
sip: validate STUN config
parent
d67efd5e
Changes
1
Hide whitespace changes
Inline
Side-by-side
daemon/src/sip/siptransport.cpp
View file @
86118ed0
...
...
@@ -204,6 +204,12 @@ pj_status_t SipTransport::createStunResolver(pj_str_t serverName, pj_uint16_t po
pj_stun_config_init
(
&
stunCfg
,
&
cp_
->
factory
,
0
,
pjsip_endpt_get_ioqueue
(
endpt_
),
pjsip_endpt_get_timer_heap
(
endpt_
));
pj_status_t
status
=
pj_stun_config_check_valid
(
&
stunCfg
);
if
(
status
!=
PJ_SUCCESS
)
{
ERROR
(
"STUN config is not valid"
);
return
status
;
}
static
const
pj_stun_sock_cb
stun_sock_cb
=
{
stun_sock_on_rx_data_cb
,
NULL
,
...
...
@@ -211,7 +217,7 @@ pj_status_t SipTransport::createStunResolver(pj_str_t serverName, pj_uint16_t po
};
pj_stun_sock
*
stun_sock
=
NULL
;
pj_status_t
status
=
pj_stun_sock_create
(
&
stunCfg
,
status
=
pj_stun_sock_create
(
&
stunCfg
,
stunResolverName
.
c_str
(),
pj_AF_INET
(),
&
stun_sock_cb
,
NULL
,
NULL
,
&
stun_sock
);
...
...
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