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
5f32fd7e
Commit
5f32fd7e
authored
Oct 18, 2013
by
Simon Morlat
Browse files
stop refreshing register when network is off.
parent
c5dc16ed
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
coreapi/linphonecore.c
coreapi/linphonecore.c
+1
-0
coreapi/private.h
coreapi/private.h
+1
-0
coreapi/proxy.c
coreapi/proxy.c
+11
-0
No files found.
coreapi/linphonecore.c
View file @
5f32fd7e
...
...
@@ -5665,6 +5665,7 @@ static void set_network_reachable(LinphoneCore* lc,bool_t isReachable, time_t cu
LinphoneProxyConfig
*
cfg
=
(
LinphoneProxyConfig
*
)
elem
->
data
;
if
(
linphone_proxy_config_register_enabled
(
cfg
)
)
{
if
(
!
isReachable
)
{
linphone_proxy_config_stop_refreshing
(
cfg
);
linphone_proxy_config_set_state
(
cfg
,
LinphoneRegistrationNone
,
"Registration impossible (network down)"
);
}
else
{
cfg
->
commit
=
TRUE
;
...
...
coreapi/private.h
View file @
5f32fd7e
...
...
@@ -240,6 +240,7 @@ const char *linphone_core_get_nat_address_resolved(LinphoneCore *lc);
int
linphone_proxy_config_send_publish
(
LinphoneProxyConfig
*
cfg
,
LinphonePresenceModel
*
presence
);
void
linphone_proxy_config_set_state
(
LinphoneProxyConfig
*
cfg
,
LinphoneRegistrationState
rstate
,
const
char
*
message
);
void
linphone_proxy_config_stop_refreshing
(
LinphoneProxyConfig
*
obj
);
void
linphone_proxy_config_write_all_to_config_file
(
LinphoneCore
*
lc
);
/*
* returns service route as defined in as defined by rfc3608, might be a list instead of just one.
...
...
coreapi/proxy.c
View file @
5f32fd7e
...
...
@@ -266,6 +266,17 @@ void linphone_proxy_config_apply(LinphoneProxyConfig *obj,LinphoneCore *lc){
linphone_proxy_config_done
(
obj
);
}
void
linphone_proxy_config_stop_refreshing
(
LinphoneProxyConfig
*
obj
){
if
(
obj
->
publish_op
){
sal_op_release
(
obj
->
publish_op
);
obj
->
publish_op
=
NULL
;
}
if
(
obj
->
op
){
sal_op_release
(
obj
->
op
);
obj
->
op
=
NULL
;
}
}
LinphoneAddress
*
guess_contact_for_register
(
LinphoneProxyConfig
*
obj
){
LinphoneAddress
*
ret
=
NULL
;
LinphoneAddress
*
proxy
=
linphone_address_new
(
obj
->
reg_proxy
);
...
...
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