Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
5ae12044
Commit
5ae12044
authored
12 years ago
by
Alexandre Savard
Committed by
Tristan Matthews
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
#9623: fixed tls registration
parent
e8ad9bad
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
daemon/src/sip/siptransport.cpp
+17
-4
17 additions, 4 deletions
daemon/src/sip/siptransport.cpp
with
17 additions
and
4 deletions
daemon/src/sip/siptransport.cpp
+
17
−
4
View file @
5ae12044
...
...
@@ -294,14 +294,26 @@ SipTransport::createTlsTransport(const std::string &remoteAddr,
pjsip_tls_setting
*
tlsSettings
)
{
pjsip_transport
*
transport
=
NULL
;
std
::
string
ipAddr
=
""
;
int
port
=
DEFAULT_SIP_TLS_PORT
;
DEBUG
(
"SipTransport: Create sip transport on %s:%d at destination %s"
,
interface
.
c_str
(),
tlsListenerPort
,
remoteAddr
.
c_str
());
// parse c string
size_t
pos
=
remoteAddr
.
find
(
":"
);
if
(
pos
!=
std
::
string
::
npos
)
{
ipAddr
=
remoteAddr
.
substr
(
0
,
pos
);
port
=
atoi
(
remoteAddr
.
substr
(
pos
+
1
,
remoteAddr
.
length
()
-
pos
).
c_str
());
}
else
{
ipAddr
=
remoteAddr
;
}
pj_str_t
remote
;
pj_cstr
(
&
remote
,
remote
Addr
.
c_str
());
pj_cstr
(
&
remote
,
ip
Addr
.
c_str
());
pj_sockaddr_in
rem_addr
;
pj_sockaddr_in_init
(
&
rem_addr
,
&
remote
,
(
pj_uint16_t
)
DEFAULT_SIP_TLS_PORT
);
DEBUG
(
"SipTransport: Create sip transport on %s:%d at destination %s"
,
interface
.
c_str
(),
tlsListenerPort
,
remoteAddr
.
c_str
());
pj_sockaddr_in_init
(
&
rem_addr
,
&
remote
,
(
pj_uint16_t
)
port
);
// The local tls listener
static
pjsip_tpfactory
*
localTlsListener
=
NULL
;
...
...
@@ -309,6 +321,7 @@ SipTransport::createTlsTransport(const std::string &remoteAddr,
if
(
localTlsListener
==
NULL
)
createTlsListener
(
interface
,
tlsListenerPort
,
tlsSettings
,
&
localTlsListener
);
DEBUG
(
"SipTransport: Get new tls transport from transport manager"
);
pjsip_endpt_acquire_transport
(
endpt_
,
PJSIP_TRANSPORT_TLS
,
&
rem_addr
,
sizeof
rem_addr
,
NULL
,
&
transport
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment