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
c68dd94a
Commit
c68dd94a
authored
Aug 21, 2014
by
Simon Morlat
Browse files
allow notification of registration_state_changed callback for removed proxy configs.
parent
293ed89d
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
19 deletions
+21
-19
coreapi/callbacks.c
coreapi/callbacks.c
+2
-6
coreapi/linphonecore.c
coreapi/linphonecore.c
+3
-2
coreapi/private.h
coreapi/private.h
+1
-0
coreapi/proxy.c
coreapi/proxy.c
+13
-9
gtk/main.c
gtk/main.c
+1
-1
oRTP
oRTP
+1
-1
No files found.
coreapi/callbacks.c
View file @
c68dd94a
...
...
@@ -843,8 +843,8 @@ static void register_success(SalOp *op, bool_t registered){
LinphoneProxyConfig
*
cfg
=
(
LinphoneProxyConfig
*
)
sal_op_get_user_pointer
(
op
);
char
*
msg
;
if
(
!
cfg
||
cfg
->
deletion_date
!=
0
){
ms_message
(
"Registration success for
remov
ed proxy config, ignored"
);
if
(
!
cfg
){
ms_message
(
"Registration success for
delet
ed proxy config, ignored"
);
return
;
}
linphone_proxy_config_set_state
(
cfg
,
registered
?
LinphoneRegistrationOk
:
LinphoneRegistrationCleared
,
...
...
@@ -868,10 +868,6 @@ static void register_failure(SalOp *op){
ms_warning
(
"Registration failed for unknown proxy config."
);
return
;
}
if
(
cfg
->
deletion_date
!=
0
){
ms_message
(
"Registration failed for removed proxy config, ignored"
);
return
;
}
if
(
details
==
NULL
)
details
=
_
(
"no response timeout"
);
...
...
coreapi/linphonecore.c
View file @
c68dd94a
...
...
@@ -2200,9 +2200,10 @@ static void proxy_update(LinphoneCore *lc){
for
(
elem
=
lc
->
sip_conf
.
deleted_proxies
;
elem
!=
NULL
;
elem
=
next
){
LinphoneProxyConfig
*
cfg
=
(
LinphoneProxyConfig
*
)
elem
->
data
;
next
=
elem
->
next
;
if
(
ms_time
(
NULL
)
-
cfg
->
deletion_date
>
5
)
{
if
(
ms_time
(
NULL
)
-
cfg
->
deletion_date
>
32
)
{
lc
->
sip_conf
.
deleted_proxies
=
ms_list_remove_link
(
lc
->
sip_conf
.
deleted_proxies
,
elem
);
ms_message
(
"clearing proxy config for [%s]"
,
linphone_proxy_config_get_addr
(
cfg
));
ms_message
(
"Proxy config for [%s] is definitely removed from core."
,
linphone_proxy_config_get_addr
(
cfg
));
_linphone_proxy_config_release_ops
(
cfg
);
linphone_proxy_config_destroy
(
cfg
);
}
}
...
...
coreapi/private.h
View file @
c68dd94a
...
...
@@ -407,6 +407,7 @@ void linphone_core_queue_task(LinphoneCore *lc, belle_sip_source_func_t task_fun
LINPHONE_PUBLIC
bool_t
linphone_proxy_config_address_equal
(
const
LinphoneAddress
*
a
,
const
LinphoneAddress
*
b
);
LINPHONE_PUBLIC
bool_t
linphone_proxy_config_is_server_config_changed
(
const
LinphoneProxyConfig
*
obj
);
void
_linphone_proxy_config_unregister
(
LinphoneProxyConfig
*
obj
);
void
_linphone_proxy_config_release_ops
(
LinphoneProxyConfig
*
obj
);
/*chat*/
void
linphone_chat_message_destroy
(
LinphoneChatMessage
*
msg
);
...
...
coreapi/proxy.c
View file @
c68dd94a
...
...
@@ -149,6 +149,17 @@ LinphoneProxyConfig * linphone_core_create_proxy_config(LinphoneCore *lc) {
return
obj
;
}
void
_linphone_proxy_config_release_ops
(
LinphoneProxyConfig
*
obj
){
if
(
obj
->
op
)
{
sal_op_release
(
obj
->
op
);
obj
->
op
=
NULL
;
}
if
(
obj
->
publish_op
){
sal_op_release
(
obj
->
publish_op
);
obj
->
publish_op
=
NULL
;
}
}
void
_linphone_proxy_config_destroy
(
LinphoneProxyConfig
*
obj
){
if
(
obj
->
reg_proxy
!=
NULL
)
ms_free
(
obj
->
reg_proxy
);
if
(
obj
->
reg_identity
!=
NULL
)
ms_free
(
obj
->
reg_identity
);
...
...
@@ -159,12 +170,11 @@ void _linphone_proxy_config_destroy(LinphoneProxyConfig *obj){
if
(
obj
->
realm
!=
NULL
)
ms_free
(
obj
->
realm
);
if
(
obj
->
type
!=
NULL
)
ms_free
(
obj
->
type
);
if
(
obj
->
dial_prefix
!=
NULL
)
ms_free
(
obj
->
dial_prefix
);
if
(
obj
->
op
)
sal_op_release
(
obj
->
op
);
if
(
obj
->
publish_op
)
sal_op_release
(
obj
->
publish_op
);
if
(
obj
->
contact_params
)
ms_free
(
obj
->
contact_params
);
if
(
obj
->
contact_uri_params
)
ms_free
(
obj
->
contact_uri_params
);
if
(
obj
->
saved_proxy
!=
NULL
)
linphone_address_destroy
(
obj
->
saved_proxy
);
if
(
obj
->
saved_identity
!=
NULL
)
linphone_address_destroy
(
obj
->
saved_identity
);
_linphone_proxy_config_release_ops
(
obj
);
}
/**
...
...
@@ -467,9 +477,6 @@ static void linphone_proxy_config_register(LinphoneProxyConfig *obj){
linphone_proxy_config_set_state
(
obj
,
LinphoneRegistrationCleared
,
"Registration cleared"
);
}
_linphone_proxy_config_unregister
(
obj
);
}
}
...
...
@@ -1156,10 +1163,7 @@ void linphone_core_remove_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *cf
linphone_proxy_config_edit
(
cfg
);
linphone_proxy_config_enable_register
(
cfg
,
FALSE
);
linphone_proxy_config_done
(
cfg
);
linphone_proxy_config_update
(
cfg
);
/*so that it has an effect*/
/*as cfg no longer in proxies, unregister will never be issued*/
_linphone_proxy_config_unregister
(
cfg
);
linphone_proxy_config_update
(
cfg
);
}
if
(
lc
->
default_proxy
==
cfg
){
lc
->
default_proxy
=
NULL
;
...
...
gtk/main.c
View file @
c68dd94a
...
...
@@ -1540,7 +1540,7 @@ static void update_registration_status(LinphoneProxyConfig *cfg, LinphoneRegistr
}
while
(
gtk_tree_model_iter_next
(
model
,
&
iter
));
}
if
(
!
found
)
{
g_warning
(
"Could not find proxy config in combo box of identities."
);
/*ignored, this is a notification for a removed proxy config.*/
return
;
}
switch
(
rs
){
...
...
oRTP
@
49fc6895
Subproject commit
00701648593b0fce93b3d519e281dd6f547db670
Subproject commit
49fc68957126d1126be1eb0fcaaa6153480e93e4
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