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
baa4eebb
Commit
baa4eebb
authored
May 07, 2018
by
Ghislain MARY
Browse files
Use correct naming convention in sal API.
parent
9a4cdb30
Changes
45
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
220 additions
and
220 deletions
+220
-220
coreapi/TunnelManager.cc
coreapi/TunnelManager.cc
+1
-1
coreapi/authentication.c
coreapi/authentication.c
+3
-3
coreapi/callbacks.c
coreapi/callbacks.c
+64
-64
coreapi/carddav.c
coreapi/carddav.c
+1
-1
coreapi/chat.c
coreapi/chat.c
+3
-3
coreapi/error_info.c
coreapi/error_info.c
+2
-2
coreapi/event.c
coreapi/event.c
+15
-15
coreapi/friend.c
coreapi/friend.c
+3
-3
coreapi/friendlist.c
coreapi/friendlist.c
+1
-1
coreapi/linphonecore.c
coreapi/linphonecore.c
+89
-89
coreapi/misc.c
coreapi/misc.c
+1
-1
coreapi/presence.c
coreapi/presence.c
+3
-3
coreapi/proxy.c
coreapi/proxy.c
+10
-10
coreapi/quality_reporting.c
coreapi/quality_reporting.c
+4
-4
coreapi/vcard.cc
coreapi/vcard.cc
+1
-1
src/c-wrapper/api/c-call.cpp
src/c-wrapper/api/c-call.cpp
+3
-3
src/chat/chat-message/chat-message.cpp
src/chat/chat-message/chat-message.cpp
+6
-6
src/chat/chat-room/chat-room.cpp
src/chat/chat-room/chat-room.cpp
+3
-3
src/chat/chat-room/client-group-chat-room.cpp
src/chat/chat-room/client-group-chat-room.cpp
+5
-5
src/chat/chat-room/server-group-chat-room-stub.cpp
src/chat/chat-room/server-group-chat-room-stub.cpp
+2
-2
No files found.
coreapi/TunnelManager.cc
View file @
baa4eebb
...
...
@@ -281,7 +281,7 @@ TunnelManager::~TunnelManager(){
mTunnelClient
->
stop
();
delete
mTunnelClient
;
}
mCore
->
sal
->
set
_t
unnel
(
NULL
);
mCore
->
sal
->
set
T
unnel
(
NULL
);
linphone_core_remove_listener
(
mCore
,
mVTable
);
linphone_core_v_table_destroy
(
mVTable
);
}
...
...
coreapi/authentication.c
View file @
baa4eebb
...
...
@@ -472,10 +472,10 @@ void linphone_core_add_auth_info(LinphoneCore *lc, const LinphoneAuthInfo *info)
lc
->
auth_info
=
bctbx_list_append
(
lc
->
auth_info
,
linphone_auth_info_clone
(
info
));
/* retry pending authentication operations */
for
(
l
=
elem
=
lc
->
sal
->
get
_p
ending
_a
uths
();
elem
!=
NULL
;
elem
=
elem
->
next
){
for
(
l
=
elem
=
lc
->
sal
->
get
P
ending
A
uths
();
elem
!=
NULL
;
elem
=
elem
->
next
){
LinphonePrivate
::
SalOp
*
op
=
static_cast
<
LinphonePrivate
::
SalOp
*>
(
elem
->
data
);
LinphoneAuthInfo
*
ai
;
const
SalAuthInfo
*
req_sai
=
op
->
get
_a
uth
_r
equested
();
const
SalAuthInfo
*
req_sai
=
op
->
get
A
uth
R
equested
();
ai
=
(
LinphoneAuthInfo
*
)
_linphone_core_find_auth_info
(
lc
,
req_sai
->
realm
,
req_sai
->
username
,
req_sai
->
domain
,
FALSE
);
if
(
ai
){
SalAuthInfo
sai
;
...
...
@@ -495,7 +495,7 @@ void linphone_core_add_auth_info(LinphoneCore *lc, const LinphoneAuthInfo *info)
}
/*proxy case*/
for
(
proxy
=
(
bctbx_list_t
*
)
linphone_core_get_proxy_config_list
(
lc
);
proxy
!=
NULL
;
proxy
=
proxy
->
next
)
{
if
(
proxy
->
data
==
op
->
get
_u
ser
_p
ointer
())
{
if
(
proxy
->
data
==
op
->
get
U
ser
P
ointer
())
{
linphone_proxy_config_set_state
((
LinphoneProxyConfig
*
)(
proxy
->
data
),
LinphoneRegistrationProgress
,
"Authentication..."
);
break
;
}
...
...
coreapi/callbacks.c
View file @
baa4eebb
This diff is collapsed.
Click to expand it.
coreapi/carddav.c
View file @
baa4eebb
...
...
@@ -573,7 +573,7 @@ static char* generate_url_from_server_address_and_uid(const char *server_url) {
char
*
result
=
NULL
;
if
(
server_url
)
{
char
*
uuid
=
reinterpret_cast
<
char
*>
(
ms_malloc
(
64
));
if
(
LinphonePrivate
::
Sal
::
generate
_u
uid
(
uuid
,
64
)
==
0
)
{
if
(
LinphonePrivate
::
Sal
::
generate
U
uid
(
uuid
,
64
)
==
0
)
{
char
*
url
=
reinterpret_cast
<
char
*>
(
ms_malloc
(
300
));
snprintf
(
url
,
300
,
"%s/linphone-%s.vcf"
,
server_url
,
uuid
);
ms_debug
(
"Generated url is %s"
,
url
);
...
...
coreapi/chat.c
View file @
baa4eebb
...
...
@@ -127,10 +127,10 @@ int linphone_core_message_received(LinphoneCore *lc, LinphonePrivate::SalOp *op,
const
char
*
peerAddress
;
const
char
*
localAddress
;
if
(
linphone_core_conference_server_enabled
(
lc
))
{
localAddress
=
peerAddress
=
op
->
get
_t
o
();
localAddress
=
peerAddress
=
op
->
get
T
o
();
}
else
{
peerAddress
=
op
->
get
_f
rom
();
localAddress
=
op
->
get
_t
o
();
peerAddress
=
op
->
get
F
rom
();
localAddress
=
op
->
get
T
o
();
}
shared_ptr
<
LinphonePrivate
::
AbstractChatRoom
>
chatRoom
=
L_GET_CPP_PTR_FROM_C_OBJECT
(
lc
)
->
findChatRoom
(
...
...
coreapi/error_info.c
View file @
baa4eebb
...
...
@@ -207,9 +207,9 @@ void linphone_error_info_from_sal_op(LinphoneErrorInfo *ei, const LinphonePrivat
}
else
{
const
SalErrorInfo
*
sei
;
linphone_error_info_reset
(
ei
);
sei
=
op
->
get
_e
rror
_i
nfo
();
sei
=
op
->
get
E
rror
I
nfo
();
linphone_error_info_from_sal
(
ei
,
sei
);
sei
=
op
->
get
_r
eason
_e
rror
_i
nfo
();
sei
=
op
->
get
R
eason
E
rror
I
nfo
();
linphone_error_info_from_sal_reason_ei
(
ei
,
sei
);
}
}
...
...
coreapi/event.c
View file @
baa4eebb
...
...
@@ -119,7 +119,7 @@ void linphone_event_cbs_set_notify_response(LinphoneEventCbs *cbs, LinphoneEvent
static
void
linphone_event_release
(
LinphoneEvent
*
lev
){
if
(
lev
->
op
)
{
/*this will stop the refresher*/
lev
->
op
->
stop
_r
efreshing
();
lev
->
op
->
stop
R
efreshing
();
}
linphone_event_unref
(
lev
);
}
...
...
@@ -133,7 +133,7 @@ static LinphoneEvent * linphone_event_new_base(LinphoneCore *lc, LinphoneSubscri
lev
->
name
=
ms_strdup
(
name
);
if
(
strcmp
(
lev
->
name
,
"conference"
)
==
0
)
lev
->
internal
=
TRUE
;
lev
->
op
->
set
_u
ser
_p
ointer
(
lev
);
lev
->
op
->
set
U
ser
P
ointer
(
lev
);
return
lev
;
}
...
...
@@ -221,7 +221,7 @@ LinphoneReason linphone_event_get_reason(const LinphoneEvent *lev){
LinphoneEvent
*
linphone_core_create_subscribe
(
LinphoneCore
*
lc
,
const
LinphoneAddress
*
resource
,
const
char
*
event
,
int
expires
){
LinphoneEvent
*
lev
=
linphone_event_new
(
lc
,
LinphoneSubscriptionOutgoing
,
event
,
expires
);
linphone_configure_op
(
lc
,
lev
->
op
,
resource
,
NULL
,
TRUE
);
lev
->
op
->
set
_m
anual
_r
efresher
_m
ode
(
!
lp_config_get_int
(
lc
->
config
,
"sip"
,
"refresh_generic_subscribe"
,
1
));
lev
->
op
->
set
M
anual
R
efresher
M
ode
(
!
lp_config_get_int
(
lc
->
config
,
"sip"
,
"refresh_generic_subscribe"
,
1
));
return
lev
;
}
...
...
@@ -229,7 +229,7 @@ LinphoneEvent *linphone_core_create_notify(LinphoneCore *lc, const LinphoneAddre
LinphoneEvent
*
lev
=
linphone_event_new
(
lc
,
LinphoneSubscriptionIncoming
,
event
,
-
1
);
linphone_configure_op
(
lc
,
lev
->
op
,
resource
,
NULL
,
TRUE
);
lev
->
subscription_state
=
LinphoneSubscriptionIncomingReceived
;
lev
->
op
->
set
_e
vent
(
event
);
lev
->
op
->
set
E
vent
(
event
);
lev
->
is_out_of_dialog_op
=
TRUE
;
return
lev
;
}
...
...
@@ -265,10 +265,10 @@ LinphoneStatus linphone_event_send_subscribe(LinphoneEvent *lev, const LinphoneC
}
if
(
lev
->
send_custom_headers
){
lev
->
op
->
set
_s
ent
_c
ustom
_h
eader
(
lev
->
send_custom_headers
);
lev
->
op
->
set
S
ent
C
ustom
H
eader
s
(
lev
->
send_custom_headers
);
sal_custom_header_free
(
lev
->
send_custom_headers
);
lev
->
send_custom_headers
=
NULL
;
}
else
lev
->
op
->
set
_s
ent
_c
ustom
_h
eader
(
NULL
);
}
else
lev
->
op
->
set
S
ent
C
ustom
H
eader
s
(
NULL
);
body_handler
=
sal_body_handler_from_content
(
body
);
auto
subscribeOp
=
dynamic_cast
<
SalSubscribeOp
*>
(
lev
->
op
);
...
...
@@ -347,7 +347,7 @@ static LinphoneEvent *_linphone_core_create_publish(LinphoneCore *core, Linphone
lev
=
linphone_event_new_with_op
(
lc
,
new
SalPublishOp
(
lc
->
sal
),
LinphoneSubscriptionInvalidDir
,
event
);
lev
->
expires
=
expires
;
linphone_configure_op_with_proxy
(
lc
,
lev
->
op
,
resource
,
NULL
,
!!
lp_config_get_int
(
lc
->
config
,
"sip"
,
"publish_msg_with_contact"
,
0
),
cfg
);
lev
->
op
->
set
_m
anual
_r
efresher
_m
ode
(
!
lp_config_get_int
(
lc
->
config
,
"sip"
,
"refresh_generic_publish"
,
1
));
lev
->
op
->
set
M
anual
R
efresher
M
ode
(
!
lp_config_get_int
(
lc
->
config
,
"sip"
,
"refresh_generic_publish"
,
1
));
return
lev
;
}
LinphoneEvent
*
linphone_core_create_publish
(
LinphoneCore
*
lc
,
const
LinphoneAddress
*
resource
,
const
char
*
event
,
int
expires
){
...
...
@@ -374,10 +374,10 @@ static int _linphone_event_send_publish(LinphoneEvent *lev, const LinphoneConten
return
-
1
;
}
if
(
lev
->
send_custom_headers
){
lev
->
op
->
set
_s
ent
_c
ustom
_h
eader
(
lev
->
send_custom_headers
);
lev
->
op
->
set
S
ent
C
ustom
H
eader
s
(
lev
->
send_custom_headers
);
sal_custom_header_free
(
lev
->
send_custom_headers
);
lev
->
send_custom_headers
=
NULL
;
}
else
lev
->
op
->
set
_s
ent
_c
ustom
_h
eader
(
NULL
);
}
else
lev
->
op
->
set
S
ent
C
ustom
H
eader
s
(
NULL
);
body_handler
=
sal_body_handler_from_content
(
body
);
auto
publishOp
=
dynamic_cast
<
SalPublishOp
*>
(
lev
->
op
);
err
=
publishOp
->
publish
(
NULL
,
NULL
,
lev
->
name
,
lev
->
expires
,
body_handler
);
...
...
@@ -413,7 +413,7 @@ LinphoneStatus linphone_event_refresh_publish(LinphoneEvent *lev) {
return
lev
->
op
->
refresh
();
}
void
linphone_event_pause_publish
(
LinphoneEvent
*
lev
)
{
if
(
lev
->
op
)
lev
->
op
->
stop
_r
efreshing
();
if
(
lev
->
op
)
lev
->
op
->
stop
R
efreshing
();
}
void
linphone_event_unpublish
(
LinphoneEvent
*
lev
)
{
lev
->
terminating
=
TRUE
;
/* needed to get clear event*/
...
...
@@ -435,7 +435,7 @@ void linphone_event_add_custom_header(LinphoneEvent *ev, const char *name, const
}
const
char
*
linphone_event_get_custom_header
(
LinphoneEvent
*
ev
,
const
char
*
name
){
const
SalCustomHeader
*
ch
=
ev
->
op
->
get
_r
ecv
_c
ustom
_h
eader
();
const
SalCustomHeader
*
ch
=
ev
->
op
->
get
R
ecv
C
ustom
H
eader
s
();
return
sal_custom_header_find
(
ch
,
name
);
}
...
...
@@ -453,7 +453,7 @@ void linphone_event_terminate(LinphoneEvent *lev){
lev
->
terminating
=
TRUE
;
if
(
lev
->
dir
==
LinphoneSubscriptionIncoming
){
auto
op
=
dynamic_cast
<
SalSubscribeOp
*>
(
lev
->
op
);
op
->
close
_n
otify
();
op
->
close
N
otify
();
}
else
if
(
lev
->
dir
==
LinphoneSubscriptionOutgoing
){
auto
op
=
dynamic_cast
<
SalSubscribeOp
*>
(
lev
->
op
);
op
->
unsubscribe
();
...
...
@@ -511,7 +511,7 @@ const char *linphone_event_get_name(const LinphoneEvent *lev){
static
const
LinphoneAddress
*
_linphone_event_cache_to
(
const
LinphoneEvent
*
lev
)
{
if
(
lev
->
to_address
)
linphone_address_unref
(
lev
->
to_address
);
char
*
buf
=
sal_address_as_string
(
lev
->
op
->
get
_to_a
ddress
());
char
*
buf
=
sal_address_as_string
(
lev
->
op
->
get
ToA
ddress
());
((
LinphoneEvent
*
)
lev
)
->
to_address
=
linphone_address_new
(
buf
);
ms_free
(
buf
);
return
lev
->
to_address
;
...
...
@@ -520,7 +520,7 @@ static const LinphoneAddress *_linphone_event_cache_to (const LinphoneEvent *lev
static
const
LinphoneAddress
*
_linphone_event_cache_from
(
const
LinphoneEvent
*
lev
)
{
if
(
lev
->
from_address
)
linphone_address_unref
(
lev
->
from_address
);
char
*
buf
=
sal_address_as_string
(
lev
->
op
->
get
_f
rom
_a
ddress
());
char
*
buf
=
sal_address_as_string
(
lev
->
op
->
get
F
rom
A
ddress
());
((
LinphoneEvent
*
)
lev
)
->
from_address
=
linphone_address_new
(
buf
);
ms_free
(
buf
);
return
lev
->
from_address
;
...
...
@@ -529,7 +529,7 @@ static const LinphoneAddress *_linphone_event_cache_from (const LinphoneEvent *l
static
const
LinphoneAddress
*
_linphone_event_cache_remote_contact
(
const
LinphoneEvent
*
lev
)
{
if
(
lev
->
remote_contact_address
)
linphone_address_unref
(
lev
->
remote_contact_address
);
char
*
buf
=
sal_address_as_string
(
lev
->
op
->
get
_r
emote
_c
ontact
_a
ddress
());
char
*
buf
=
sal_address_as_string
(
lev
->
op
->
get
R
emote
C
ontact
A
ddress
());
((
LinphoneEvent
*
)
lev
)
->
remote_contact_address
=
linphone_address_new
(
buf
);
ms_free
(
buf
);
return
lev
->
remote_contact_address
;
...
...
coreapi/friend.c
View file @
baa4eebb
...
...
@@ -478,7 +478,7 @@ void linphone_friend_notify(LinphoneFriend *lf, LinphonePresenceModel *presence)
}
for
(
elem
=
lf
->
insubs
;
elem
!=
NULL
;
elem
=
bctbx_list_next
(
elem
)){
auto
op
=
reinterpret_cast
<
SalPresenceOp
*>
(
bctbx_list_get_data
(
elem
));
op
->
notify
_p
resence
((
SalPresenceModel
*
)
presence
);
op
->
notify
P
resence
((
SalPresenceModel
*
)
presence
);
}
}
...
...
@@ -531,7 +531,7 @@ void linphone_friend_invalidate_subscription(LinphoneFriend *lf){
}
static
void
close_presence_notification
(
SalPresenceOp
*
op
)
{
op
->
notify
_p
resence
_c
lose
();
op
->
notify
P
resence
C
lose
();
}
static
void
release_sal_op
(
SalOp
*
op
)
{
...
...
@@ -773,7 +773,7 @@ void linphone_friend_update_subscribes(LinphoneFriend *fr, bool_t only_when_regi
linphone_friend_unsubscribe
(
fr
);
}
else
if
(
!
can_subscribe
&&
fr
->
outsub
){
fr
->
subscribe_active
=
FALSE
;
fr
->
outsub
->
stop
_r
efreshing
();
fr
->
outsub
->
stop
R
efreshing
();
}
}
...
...
coreapi/friendlist.c
View file @
baa4eebb
...
...
@@ -834,7 +834,7 @@ LinphoneFriend * linphone_friend_list_find_friend_by_out_subscribe (
const
bctbx_list_t
*
elem
;
for
(
elem
=
list
->
friends
;
elem
!=
NULL
;
elem
=
bctbx_list_next
(
elem
))
{
LinphoneFriend
*
lf
=
(
LinphoneFriend
*
)
bctbx_list_get_data
(
elem
);
if
(
lf
->
outsub
&&
((
lf
->
outsub
==
op
)
||
lf
->
outsub
->
is
_f
orked
_o
f
(
op
)))
return
lf
;
if
(
lf
->
outsub
&&
((
lf
->
outsub
==
op
)
||
lf
->
outsub
->
is
F
orked
O
f
(
op
)))
return
lf
;
}
return
NULL
;
}
...
...
coreapi/linphonecore.c
View file @
baa4eebb
This diff is collapsed.
Click to expand it.
coreapi/misc.c
View file @
baa4eebb
...
...
@@ -476,7 +476,7 @@ const char * linphone_core_get_echo_canceller_filter_name(const LinphoneCore *lc
* task_fun must return BELLE_SIP_STOP when job is finished.
**/
void
linphone_core_queue_task
(
LinphoneCore
*
lc
,
belle_sip_source_func_t
task_fun
,
void
*
data
,
const
char
*
task_description
){
belle_sip_source_t
*
s
=
lc
->
sal
->
create
_t
imer
(
task_fun
,
data
,
20
,
task_description
);
belle_sip_source_t
*
s
=
lc
->
sal
->
create
T
imer
(
task_fun
,
data
,
20
,
task_description
);
belle_sip_object_unref
(
s
);
}
...
...
coreapi/presence.c
View file @
baa4eebb
...
...
@@ -1563,7 +1563,7 @@ void linphone_subscription_new(LinphoneCore *lc, SalSubscribeOp *op, const char
linphone_friend_add_incoming_subscription
(
lf
,
op
);
lf
->
inc_subscribe_pending
=
TRUE
;
if
(
lp_config_get_int
(
lc
->
config
,
"sip"
,
"notify_pending_state"
,
0
))
{
op
->
notify
_p
ending
_s
tate
();
op
->
notify
P
ending
S
tate
();
}
op
->
accept
();
}
else
{
...
...
@@ -1936,7 +1936,7 @@ void linphone_notify_recv(LinphoneCore *lc, SalOp *op, SalSubscribeStatus ss, Sa
if
(
linphone_core_get_default_friend_list
(
lc
)
!=
NULL
)
lf
=
linphone_core_find_friend_by_out_subscribe
(
lc
,
op
);
if
(
lf
==
NULL
&&
lp_config_get_int
(
lc
->
config
,
"sip"
,
"allow_out_of_subscribe_presence"
,
0
)){
char
*
buf
=
sal_address_as_string_uri_only
(
op
->
get
_f
rom
_a
ddress
());
char
*
buf
=
sal_address_as_string_uri_only
(
op
->
get
F
rom
A
ddress
());
LinphoneAddress
*
addr
=
linphone_address_new
(
buf
);
lf
=
linphone_core_find_friend
(
lc
,
addr
);
ms_free
(
buf
);
...
...
@@ -2000,7 +2000,7 @@ void linphone_subscription_closed(LinphoneCore *lc, SalOp *op){
linphone_friend_remove_incoming_subscription
(
lf
,
op
);
}
else
{
/*case of an op that we already released because the friend was destroyed*/
ms_message
(
"Receiving unsuscribe for unknown in-subscribtion from %s"
,
op
->
get
_f
rom
());
ms_message
(
"Receiving unsuscribe for unknown in-subscribtion from %s"
,
op
->
get
F
rom
());
}
}
...
...
coreapi/proxy.c
View file @
baa4eebb
...
...
@@ -436,7 +436,7 @@ void linphone_proxy_config_enable_publish(LinphoneProxyConfig *cfg, bool_t val){
}
void
linphone_proxy_config_pause_register
(
LinphoneProxyConfig
*
cfg
){
if
(
cfg
->
op
)
cfg
->
op
->
stop
_r
efreshing
();
if
(
cfg
->
op
)
cfg
->
op
->
stop
R
efreshing
();
}
void
linphone_proxy_config_edit
(
LinphoneProxyConfig
*
cfg
){
...
...
@@ -457,7 +457,7 @@ void linphone_proxy_config_apply(LinphoneProxyConfig *cfg,LinphoneCore *lc){
void
linphone_proxy_config_stop_refreshing
(
LinphoneProxyConfig
*
cfg
){
LinphoneAddress
*
contact_addr
=
NULL
;
const
SalAddress
*
sal_addr
=
cfg
->
op
&&
cfg
->
state
==
LinphoneRegistrationOk
?
cfg
->
op
->
get
_c
ontact
_a
ddress
()
:
NULL
;
const
SalAddress
*
sal_addr
=
cfg
->
op
&&
cfg
->
state
==
LinphoneRegistrationOk
?
cfg
->
op
->
get
C
ontact
A
ddress
()
:
NULL
;
if
(
sal_addr
)
{
char
*
buf
=
sal_address_as_string
(
sal_addr
);
contact_addr
=
buf
?
linphone_address_new
(
buf
)
:
NULL
;
...
...
@@ -538,10 +538,10 @@ static void linphone_proxy_config_register(LinphoneProxyConfig *cfg){
guess_contact_for_register
(
cfg
);
if
(
cfg
->
contact_address
)
cfg
->
op
->
set
_c
ontact
_a
ddress
(
L_GET_PRIVATE_FROM_C_OBJECT
(
cfg
->
contact_address
)
->
getInternalAddress
());
cfg
->
op
->
set
_u
ser
_p
ointer
(
cfg
);
cfg
->
op
->
set
C
ontact
A
ddress
(
L_GET_PRIVATE_FROM_C_OBJECT
(
cfg
->
contact_address
)
->
getInternalAddress
());
cfg
->
op
->
set
U
ser
P
ointer
(
cfg
);
if
(
cfg
->
op
->
r
egister
_
(
if
(
cfg
->
op
->
sendR
egister
(
proxy_string
,
cfg
->
reg_identity
,
cfg
->
expires
,
...
...
@@ -568,7 +568,7 @@ static void linphone_proxy_config_register(LinphoneProxyConfig *cfg){
void
linphone_proxy_config_refresh_register
(
LinphoneProxyConfig
*
cfg
){
if
(
cfg
->
reg_sendregister
&&
cfg
->
op
&&
cfg
->
state
!=
LinphoneRegistrationProgress
){
if
(
cfg
->
op
->
re
gister_refresh
(
cfg
->
expires
)
==
0
)
{
if
(
cfg
->
op
->
re
freshRegister
(
cfg
->
expires
)
==
0
)
{
linphone_proxy_config_set_state
(
cfg
,
LinphoneRegistrationProgress
,
"Refresh registration"
);
}
}
...
...
@@ -850,7 +850,7 @@ LinphoneStatus linphone_proxy_config_done(LinphoneProxyConfig *cfg)
if
(
res
==
LinphoneProxyConfigAddressDifferent
)
{
_linphone_proxy_config_unregister
(
cfg
);
}
cfg
->
op
->
set
_u
ser
_p
ointer
(
NULL
);
/*we don't want to receive status for this un register*/
cfg
->
op
->
set
U
ser
P
ointer
(
NULL
);
/*we don't want to receive status for this un register*/
cfg
->
op
->
unref
();
/*but we keep refresher to handle authentication if needed*/
cfg
->
op
=
NULL
;
}
...
...
@@ -1045,7 +1045,7 @@ struct _LinphoneCore * linphone_proxy_config_get_core(const LinphoneProxyConfig
const
char
*
linphone_proxy_config_get_custom_header
(
LinphoneProxyConfig
*
cfg
,
const
char
*
header_name
){
const
SalCustomHeader
*
ch
;
if
(
!
cfg
->
op
)
return
NULL
;
ch
=
cfg
->
op
->
get
_r
ecv
_c
ustom
_h
eader
();
ch
=
cfg
->
op
->
get
R
ecv
C
ustom
H
eader
s
();
return
sal_custom_header_find
(
ch
,
header_name
);
}
...
...
@@ -1416,7 +1416,7 @@ const LinphoneErrorInfo *linphone_proxy_config_get_error_info(const LinphoneProx
}
const
LinphoneAddress
*
linphone_proxy_config_get_service_route
(
const
LinphoneProxyConfig
*
cfg
)
{
return
cfg
->
op
?
(
const
LinphoneAddress
*
)
cfg
->
op
->
get
_s
ervice
_r
oute
()
:
NULL
;
return
cfg
->
op
?
(
const
LinphoneAddress
*
)
cfg
->
op
->
get
S
ervice
R
oute
()
:
NULL
;
}
const
char
*
linphone_proxy_config_get_transport
(
const
LinphoneProxyConfig
*
cfg
)
{
const
char
*
addr
=
NULL
;
...
...
@@ -1496,7 +1496,7 @@ const LinphoneAddress *linphone_proxy_config_get_contact (const LinphoneProxyCon
// Warning : Do not remove, the op can change its contact_address
if
(
!
cfg
->
op
)
return
NULL
;
const
SalAddress
*
salAddr
=
cfg
->
op
->
get
_c
ontact
_a
ddress
();
const
SalAddress
*
salAddr
=
cfg
->
op
->
get
C
ontact
A
ddress
();
if
(
!
salAddr
)
return
NULL
;
if
(
cfg
->
contact_address
)
...
...
coreapi/quality_reporting.c
View file @
baa4eebb
...
...
@@ -380,7 +380,7 @@ static int send_report(LinphoneCall* call, reporting_session_report_t * report,
sal_address_has_uri_param
(
salAddress
,
"maddr"
)
||
linphone_address_get_port
(
request_uri
)
!=
0
)
{
ms_message
(
"Publishing report with custom route %s"
,
collector_uri
);
lev
->
op
->
set
_r
oute
(
collector_uri
);
lev
->
op
->
set
R
oute
(
collector_uri
);
}
if
(
linphone_event_send_publish
(
lev
,
content
)
!=
0
){
...
...
@@ -424,7 +424,7 @@ static const SalStreamDescription * get_media_stream_for_desc(const SalMediaDesc
static
void
update_ip
(
LinphoneCall
*
call
,
int
stats_type
)
{
SalStreamType
sal_stream_type
=
stats_type
==
LINPHONE_CALL_STATS_AUDIO
?
SalAudio
:
stats_type
==
LINPHONE_CALL_STATS_VIDEO
?
SalVideo
:
SalText
;
const
SalStreamDescription
*
local_desc
=
get_media_stream_for_desc
(
_linphone_call_get_local_desc
(
call
),
sal_stream_type
);
const
SalStreamDescription
*
remote_desc
=
get_media_stream_for_desc
(
L_GET_PRIVATE_FROM_C_OBJECT
(
call
)
->
getOp
()
->
get
_r
emote
_m
edia
_d
escription
(),
sal_stream_type
);
const
SalStreamDescription
*
remote_desc
=
get_media_stream_for_desc
(
L_GET_PRIVATE_FROM_C_OBJECT
(
call
)
->
getOp
()
->
get
R
emote
M
edia
D
escription
(),
sal_stream_type
);
LinphoneCallLog
*
log
=
L_GET_CPP_PTR_FROM_C_OBJECT
(
call
)
->
getLog
();
if
(
local_desc
!=
NULL
)
{
...
...
@@ -444,7 +444,7 @@ static void update_ip(LinphoneCall * call, int stats_type) {
if
(
strlen
(
remote_desc
->
rtp_addr
)
>
0
)
{
STR_REASSIGN
(
log
->
reporting
.
reports
[
stats_type
]
->
info
.
remote_addr
.
ip
,
ms_strdup
(
remote_desc
->
rtp_addr
));
}
else
{
STR_REASSIGN
(
log
->
reporting
.
reports
[
stats_type
]
->
info
.
remote_addr
.
ip
,
ms_strdup
(
L_GET_PRIVATE_FROM_C_OBJECT
(
call
)
->
getOp
()
->
get
_r
emote
_m
edia
_d
escription
()
->
addr
));
STR_REASSIGN
(
log
->
reporting
.
reports
[
stats_type
]
->
info
.
remote_addr
.
ip
,
ms_strdup
(
L_GET_PRIVATE_FROM_C_OBJECT
(
call
)
->
getOp
()
->
get
R
emote
M
edia
D
escription
()
->
addr
));
}
}
}
...
...
@@ -511,7 +511,7 @@ void linphone_reporting_update_media_info(LinphoneCall * call, int stats_type) {
if
(
!
media_report_enabled
(
call
,
stats_type
)
||
!
L_GET_PRIVATE_FROM_C_OBJECT
(
call
)
->
getOp
())
return
;
dialog_id
=
L_GET_PRIVATE_FROM_C_OBJECT
(
call
)
->
getOp
()
->
get
_d
ialog
_i
d
();
dialog_id
=
L_GET_PRIVATE_FROM_C_OBJECT
(
call
)
->
getOp
()
->
get
D
ialog
I
d
();
STR_REASSIGN
(
report
->
info
.
call_id
,
ms_strdup
(
log
->
call_id
));
...
...
coreapi/vcard.cc
View file @
baa4eebb
...
...
@@ -367,7 +367,7 @@ bool_t linphone_vcard_generate_unique_id(LinphoneVcard *vCard) {
if
(
linphone_vcard_get_uid
(
vCard
))
{
return
FALSE
;
}
if
(
LinphonePrivate
::
Sal
::
generate
_u
uid
(
uuid
,
sizeof
(
uuid
))
==
0
)
{
if
(
LinphonePrivate
::
Sal
::
generate
U
uid
(
uuid
,
sizeof
(
uuid
))
==
0
)
{
char
vcard_uuid
[
sizeof
(
uuid
)
+
4
];
snprintf
(
vcard_uuid
,
sizeof
(
vcard_uuid
),
"urn:%s"
,
uuid
);
linphone_vcard_set_uid
(
vCard
,
vcard_uuid
);
...
...
src/c-wrapper/api/c-call.cpp
View file @
baa4eebb
...
...
@@ -207,7 +207,7 @@ LinphoneCallState linphone_call_get_state (const LinphoneCall *call) {
bool_t
linphone_call_asked_to_autoanswer
(
LinphoneCall
*
call
)
{
//return TRUE if the unique(for the moment) incoming call asked to be autoanswered
if
(
call
)
return
linphone_call_get_op
(
call
)
->
auto
a
nswer
_a
sked
();
return
linphone_call_get_op
(
call
)
->
auto
A
nswer
A
sked
();
return
FALSE
;
}
...
...
@@ -575,8 +575,8 @@ void linphone_call_ogl_render (const LinphoneCall *call) {
LinphoneStatus
linphone_call_send_info_message
(
LinphoneCall
*
call
,
const
LinphoneInfoMessage
*
info
)
{
SalBodyHandler
*
body_handler
=
sal_body_handler_from_content
(
linphone_info_message_get_content
(
info
));
linphone_call_get_op
(
call
)
->
set
_s
ent
_c
ustom
_h
eader
(
linphone_info_message_get_headers
(
info
));
return
linphone_call_get_op
(
call
)
->
send
_i
nfo
(
nullptr
,
nullptr
,
body_handler
);
linphone_call_get_op
(
call
)
->
set
S
ent
C
ustom
H
eader
s
(
linphone_info_message_get_headers
(
info
));
return
linphone_call_get_op
(
call
)
->
send
I
nfo
(
nullptr
,
nullptr
,
body_handler
);
}
LinphoneCallStats
*
linphone_call_get_stats
(
LinphoneCall
*
call
,
LinphoneStreamType
type
)
{
...
...
src/chat/chat-message/chat-message.cpp
View file @
baa4eebb
...
...
@@ -680,11 +680,11 @@ void ChatMessagePrivate::send () {
core
->
getCCore
(),
op
,
peer
,
getSalCustomHeaders
(),
!!
lp_config_get_int
(
core
->
getCCore
()
->
config
,
"sip"
,
"chat_msg_with_contact"
,
0
)
);
op
->
set
_u
ser
_p
ointer
(
q
);
/* If out of call, directly store msg */
op
->
set
U
ser
P
ointer
(
q
);
/* If out of call, directly store msg */
linphone_address_unref
(
peer
);
}
op
->
set
_f
rom
(
q
->
getFromAddress
().
asString
().
c_str
());
op
->
set
_t
o
(
q
->
getToAddress
().
asString
().
c_str
());
op
->
set
F
rom
(
q
->
getFromAddress
().
asString
().
c_str
());
op
->
set
T
o
(
q
->
getToAddress
().
asString
().
c_str
());
// ---------------------------------------
// Start of message modification
...
...
@@ -721,7 +721,7 @@ void ChatMessagePrivate::send () {
EncryptionChatMessageModifier
ecmm
;
ChatMessageModifier
::
Result
result
=
ecmm
.
encode
(
q
->
getSharedFromThis
(),
errorCode
);
if
(
result
==
ChatMessageModifier
::
Result
::
Error
)
{
sal_error_info_set
((
SalErrorInfo
*
)
op
->
get
_e
rror
_i
nfo
(),
SalReasonNotAcceptable
,
"SIP"
,
errorCode
,
"Unable to encrypt IM"
,
nullptr
);
sal_error_info_set
((
SalErrorInfo
*
)
op
->
get
E
rror
I
nfo
(),
SalReasonNotAcceptable
,
"SIP"
,
errorCode
,
"Unable to encrypt IM"
,
nullptr
);
setState
(
ChatMessage
::
State
::
NotDelivered
);
return
;
}
else
if
(
result
==
ChatMessageModifier
::
Result
::
Suspended
)
{
...
...
@@ -783,7 +783,7 @@ void ChatMessagePrivate::send () {
currentSendStep
=
ChatMessagePrivate
::
Step
::
None
;
if
(
imdnId
.
empty
())
setImdnMessageId
(
op
->
get
_c
all
_i
d
());
/* must be known at that time */
setImdnMessageId
(
op
->
get
C
all
I
d
());
/* must be known at that time */
if
(
lcall
&&
linphone_call_get_op
(
lcall
)
==
op
)
{
/* In this case, chat delivery status is not notified, so unrefing chat message right now */
...
...
@@ -890,7 +890,7 @@ ChatMessage::~ChatMessage () {
}
if
(
d
->
salOp
)
{
d
->
salOp
->
set
_u
ser
_p
ointer
(
nullptr
);
d
->
salOp
->
set
U
ser
P
ointer
(
nullptr
);
d
->
salOp
->
unref
();
}
if
(
d
->
salCustomHeaders
)
...
...
src/chat/chat-room/chat-room.cpp
View file @
baa4eebb
...
...
@@ -235,7 +235,7 @@ LinphoneReason ChatRoomPrivate::onSipMessageReceived (SalOp *op, const SalMessag
LinphoneCore
*
cCore
=
core
->
getCCore
();
msg
=
createChatMessage
(
IdentityAddress
(
op
->
get
_f
rom
())
==
q
->
getLocalAddress
()
IdentityAddress
(
op
->
get
F
rom
())
==
q
->
getLocalAddress
()
?
ChatMessage
::
Direction
::
Outgoing
:
ChatMessage
::
Direction
::
Incoming
);
...
...
@@ -252,9 +252,9 @@ LinphoneReason ChatRoomPrivate::onSipMessageReceived (SalOp *op, const SalMessag
msg
->
setInternalContent
(
content
);
msg
->
getPrivate
()
->
setTime
(
message
->
time
);
msg
->
getPrivate
()
->
setImdnMessageId
(
op
->
get
_c
all
_i
d
());
msg
->
getPrivate
()
->
setImdnMessageId
(
op
->
get
C
all
I
d
());
const
SalCustomHeader
*
ch
=
op
->
get
_r
ecv
_c
ustom
_h
eader
();
const
SalCustomHeader
*
ch
=
op
->
get
R
ecv
C
ustom
H
eader
s
();
if
(
ch
)
msg
->
getPrivate
()
->
setSalCustomHeaders
(
sal_custom_header_clone
(
ch
));
...
...
src/chat/chat-room/client-group-chat-room.cpp
View file @
baa4eebb
...
...
@@ -110,13 +110,13 @@ void ClientGroupChatRoomPrivate::confirmJoining (SalCallOp *op) {
auto
focus
=
qConference
->
getPrivate
()
->
focus
;
bool
previousSession
=
(
focus
->
getPrivate
()
->
getSession
()
!=
nullptr
);
auto
session
=
focus
->
getPrivate
()
->
createSession
(
*
q
,
nullptr
,
false
,
this
);
session
->
configure
(
LinphoneCallIncoming
,
nullptr
,
op
,
Address
(
op
->
get
_f
rom
()),
Address
(
op
->
get
_t
o
()));
session
->
configure
(
LinphoneCallIncoming
,
nullptr
,
op
,
Address
(
op
->
get
F
rom
()),
Address
(
op
->
get
T
o
()));
session
->
startIncomingNotification
(
false
);
if
(
!
previousSession
)
{
setState
(
ClientGroupChatRoom
::
State
::
CreationPending
);
// Handle participants addition
list
<
IdentityAddress
>
identAddresses
=
ClientGroupChatRoom
::
parseResourceLists
(
op
->
get
_r
emote
_b
ody
());
list
<
IdentityAddress
>
identAddresses
=
ClientGroupChatRoom
::
parseResourceLists
(
op
->
get
R
emote
B
ody
());
for
(
const
auto
&
addr
:
identAddresses
)
{
auto
participant
=
q
->
findParticipant
(
addr
);
if
(
!
participant
)
{
...
...
@@ -351,7 +351,7 @@ void ClientGroupChatRoom::addParticipant (const IdentityAddress &addr, const Cal
linphone_address_unref
(
lAddr
);
Address
referToAddr
=
addr
;
referToAddr
.
setParam
(
"text"
);
referOp
->
send
_r
efer
(
referToAddr
.
getPrivate
()
->
getInternalAddress
());
referOp
->
send
R
efer
(
referToAddr
.
getPrivate
()
->
getInternalAddress
());
referOp
->
unref
();
}
}
...
...
@@ -402,7 +402,7 @@ void ClientGroupChatRoom::removeParticipant (const shared_ptr<Participant> &part
Address
referToAddr
=
participant
->
getAddress
();
referToAddr
.
setParam
(
"text"
);
referToAddr
.
setUriParam
(
"method"
,
"BYE"
);
referOp
->
send
_r
efer
(
referToAddr
.
getPrivate
()
->
getInternalAddress
());
referOp
->
send
R
efer
(
referToAddr
.
getPrivate
()
->
getInternalAddress
());
referOp
->
unref
();
}
...
...
@@ -444,7 +444,7 @@ void ClientGroupChatRoom::setParticipantAdminStatus (const shared_ptr<Participan
Address
referToAddr
=
participant
->
getAddress
();
referToAddr
.
setParam
(
"text"
);
referToAddr
.
setParam
(
"admin"
,
Utils
::
toString
(
isAdmin
));
referOp
->
send
_r
efer
(
referToAddr
.
getPrivate
()
->
getInternalAddress
());
referOp
->
send
R
efer
(
referToAddr
.
getPrivate
()
->
getInternalAddress
());
referOp
->
unref
();
}
...
...
src/chat/chat-room/server-group-chat-room-stub.cpp
View file @
baa4eebb
...
...
@@ -139,8 +139,8 @@ void ServerGroupChatRoomPrivate::onCallSessionSetReleased (const shared_ptr<Call
// =============================================================================
ServerGroupChatRoom
::
ServerGroupChatRoom
(
const
shared_ptr
<
Core
>
&
core
,
SalCallOp
*
op
)
:
ChatRoom
(
*
new
ServerGroupChatRoomPrivate
,
core
,
ChatRoomId
(
IdentityAddress
(
op
->
get
_t
o
()),
IdentityAddress
(
op
->
get
_t
o
()))),
LocalConference
(
core
,
IdentityAddress
(
op
->
get
_t
o
()),
nullptr
)
{
:
ChatRoom
(
*
new
ServerGroupChatRoomPrivate
,
core
,
ChatRoomId
(
IdentityAddress
(
op
->
get
T
o
()),
IdentityAddress
(
op
->
get
T
o
()))),
LocalConference
(
core
,
IdentityAddress
(
op
->
get
T
o
()),
nullptr
)
{
L_D
();
d
->
chatRoomListener
=
d
;
}
...
...
Prev
1
2
3
Next
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