Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
79604de2
Commit
79604de2
authored
Sep 14, 2017
by
Ghislain MARY
Browse files
Store the NAT policy in the media session, not in the call session.
parent
df45d5f1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
src/conference/session/call-session-p.h
src/conference/session/call-session-p.h
+0
-1
src/conference/session/call-session.cpp
src/conference/session/call-session.cpp
+0
-8
src/conference/session/media-session-p.h
src/conference/session/media-session-p.h
+1
-0
src/conference/session/media-session.cpp
src/conference/session/media-session.cpp
+8
-0
No files found.
src/conference/session/call-session-p.h
View file @
79604de2
...
@@ -93,7 +93,6 @@ protected:
...
@@ -93,7 +93,6 @@ protected:
LinphoneProxyConfig
*
destProxy
=
nullptr
;
LinphoneProxyConfig
*
destProxy
=
nullptr
;
LinphoneErrorInfo
*
ei
=
nullptr
;
LinphoneErrorInfo
*
ei
=
nullptr
;
LinphoneCallLog
*
log
=
nullptr
;
LinphoneCallLog
*
log
=
nullptr
;
LinphoneNatPolicy
*
natPolicy
=
nullptr
;
SalOp
*
op
=
nullptr
;
SalOp
*
op
=
nullptr
;
...
...
src/conference/session/call-session.cpp
View file @
79604de2
...
@@ -59,8 +59,6 @@ CallSessionPrivate::~CallSessionPrivate () {
...
@@ -59,8 +59,6 @@ CallSessionPrivate::~CallSessionPrivate () {
linphone_error_info_unref
(
ei
);
linphone_error_info_unref
(
ei
);
if
(
log
)
if
(
log
)
linphone_call_log_unref
(
log
);
linphone_call_log_unref
(
log
);
if
(
natPolicy
)
linphone_nat_policy_unref
(
natPolicy
);
if
(
op
)
if
(
op
)
sal_op_release
(
op
);
sal_op_release
(
op
);
}
}
...
@@ -786,12 +784,6 @@ void CallSession::configure (LinphoneCallDir direction, LinphoneProxyConfig *cfg
...
@@ -786,12 +784,6 @@ void CallSession::configure (LinphoneCallDir direction, LinphoneProxyConfig *cfg
}
}
d
->
log
=
linphone_call_log_new
(
direction
,
fromAddr
,
toAddr
);
d
->
log
=
linphone_call_log_new
(
direction
,
fromAddr
,
toAddr
);
if
(
d
->
destProxy
)
d
->
natPolicy
=
linphone_proxy_config_get_nat_policy
(
d
->
destProxy
);
if
(
!
d
->
natPolicy
)
d
->
natPolicy
=
linphone_core_get_nat_policy
(
d
->
core
);
linphone_nat_policy_ref
(
d
->
natPolicy
);
if
(
op
)
{
if
(
op
)
{
/* We already have an op for incoming calls */
/* We already have an op for incoming calls */
d
->
op
=
op
;
d
->
op
=
op
;
...
...
src/conference/session/media-session-p.h
View file @
79604de2
...
@@ -261,6 +261,7 @@ private:
...
@@ -261,6 +261,7 @@ private:
RtpProfile
*
textProfile
=
nullptr
;
RtpProfile
*
textProfile
=
nullptr
;
int
mainTextStreamIndex
=
LINPHONE_CALL_STATS_TEXT
;
int
mainTextStreamIndex
=
LINPHONE_CALL_STATS_TEXT
;
LinphoneNatPolicy
*
natPolicy
=
nullptr
;
StunClient
*
stunClient
=
nullptr
;
StunClient
*
stunClient
=
nullptr
;
IceAgent
*
iceAgent
=
nullptr
;
IceAgent
*
iceAgent
=
nullptr
;
...
...
src/conference/session/media-session.cpp
View file @
79604de2
...
@@ -103,6 +103,8 @@ MediaSessionPrivate::~MediaSessionPrivate () {
...
@@ -103,6 +103,8 @@ MediaSessionPrivate::~MediaSessionPrivate () {
linphone_call_stats_unref
(
videoStats
);
linphone_call_stats_unref
(
videoStats
);
if
(
textStats
)
if
(
textStats
)
linphone_call_stats_unref
(
textStats
);
linphone_call_stats_unref
(
textStats
);
if
(
natPolicy
)
linphone_nat_policy_unref
(
natPolicy
);
if
(
stunClient
)
if
(
stunClient
)
delete
stunClient
;
delete
stunClient
;
delete
iceAgent
;
delete
iceAgent
;
...
@@ -4087,6 +4089,12 @@ void MediaSession::configure (LinphoneCallDir direction, LinphoneProxyConfig *cf
...
@@ -4087,6 +4089,12 @@ void MediaSession::configure (LinphoneCallDir direction, LinphoneProxyConfig *cf
L_D
(
MediaSession
);
L_D
(
MediaSession
);
CallSession
::
configure
(
direction
,
cfg
,
op
,
from
,
to
);
CallSession
::
configure
(
direction
,
cfg
,
op
,
from
,
to
);
if
(
d
->
destProxy
)
d
->
natPolicy
=
linphone_proxy_config_get_nat_policy
(
d
->
destProxy
);
if
(
!
d
->
natPolicy
)
d
->
natPolicy
=
linphone_core_get_nat_policy
(
d
->
core
);
linphone_nat_policy_ref
(
d
->
natPolicy
);
if
(
direction
==
LinphoneCallOutgoing
)
{
if
(
direction
==
LinphoneCallOutgoing
)
{
d
->
selectOutgoingIpVersion
();
d
->
selectOutgoingIpVersion
();
d
->
getLocalIp
(
to
);
d
->
getLocalIp
(
to
);
...
...
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