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
1098142a
Commit
1098142a
authored
Apr 28, 2013
by
Simon Morlat
Browse files
better management of publish
parent
4f454612
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
coreapi/proxy.c
coreapi/proxy.c
+13
-7
No files found.
coreapi/proxy.c
View file @
1098142a
...
...
@@ -251,6 +251,11 @@ void linphone_proxy_config_edit(LinphoneProxyConfig *obj){
sal_unregister
(
obj
->
op
);
}
}
if
(
obj
->
publish_op
){
/*we should certainly cancel our publish by some manner*/
sal_op_release
(
obj
->
publish_op
);
obj
->
publish_op
=
NULL
;
}
}
void
linphone_proxy_config_apply
(
LinphoneProxyConfig
*
obj
,
LinphoneCore
*
lc
)
...
...
@@ -846,13 +851,14 @@ void linphone_proxy_config_set_realm(LinphoneProxyConfig *cfg, const char *realm
int
linphone_proxy_config_send_publish
(
LinphoneProxyConfig
*
proxy
,
LinphoneOnlineStatus
presence_mode
){
int
err
;
SalOp
*
op
=
sal_op_new
(
proxy
->
lc
->
sal
);
sal_op_set_route
(
op
,
proxy
->
reg_proxy
);
err
=
sal_publish
(
op
,
linphone_proxy_config_get_identity
(
proxy
),
linphone_proxy_config_get_identity
(
proxy
),
linphone_online_status_to_sal
(
presence_mode
));
if
(
proxy
->
publish_op
!=
NULL
)
sal_op_release
(
proxy
->
publish_op
);
proxy
->
publish_op
=
op
;
if
(
proxy
->
publish_op
==
NULL
){
proxy
->
publish_op
=
sal_op_new
(
proxy
->
lc
->
sal
);
sal_op_set_route
(
proxy
->
publish_op
,
proxy
->
reg_proxy
);
sal_op_set_from
(
proxy
->
publish_op
,
linphone_proxy_config_get_identity
(
proxy
));
sal_op_set_to
(
proxy
->
publish_op
,
linphone_proxy_config_get_identity
(
proxy
));
}
err
=
sal_publish
(
proxy
->
publish_op
,
NULL
,
NULL
,
linphone_online_status_to_sal
(
presence_mode
));
return
err
;
}
...
...
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