Commit 7cd96d33 authored by Simon Morlat's avatar Simon Morlat

fix git version checking when not in a git tree

add linphone_proxy_config_pause_register()
make linphone_core_remove_proxy_config() really send unregister.
parent 09478ccd
......@@ -91,7 +91,7 @@ if HAVE_LD_OUTPUT_DEF
liblinphone_la_LDFLAGS += -Wl,--output-def,liblinphone-$(LIBLINPHONE_SO_CURRENT).def
defexecdir = $(libdir)
defexec_DATA = liblinphone-$(LIBLINPHONE_SO_CURRENT).def
CLEANFILES = $(defexec_DATA)
CLEANFILES += $(defexec_DATA)
liblinphone-$(LIBLINPHONE_SO_CURRENT).def: liblinphone.la
......@@ -156,15 +156,21 @@ AM_CFLAGS+= -DUSE_BELLESIP
AM_CXXFLAGS=$(AM_CFLAGS)
#Make sure that we are in linphone's git tree by doing git log $(top_srcdir)/configure.ac.
#if it is something known to git, then that will be ok to check the git describe number and make sure it is consistent with
#the PACKAGE_VERSION given in configure.ac
make_gitversion_h:
if test "$(GITDESCRIBE)" != "" ; then \
if test "$(GIT_TAG)" != "$(PACKAGE_VERSION)" ; then \
echo "*** PACKAGE_VERSION and git tag differ. Please put them identical."; \
exit 1; \
if test -d $(top_srcdir)/.git ; then \
if test "$(GITDESCRIBE)" != "" ; then \
if test "$(GIT_TAG)" != "$(PACKAGE_VERSION)" ; then \
echo "*** PACKAGE_VERSION and git tag differ. Please put them identical."; \
exit 1; \
fi ; \
$(ECHO) -n "#define LIBLINPHONE_GIT_VERSION \"$(GITDESCRIBE)\"" > $(GITVERSION_FILE_TMP) ; \
elif test "$(GITREVISION)" != "" ; then \
$(ECHO) -n "#define LIBLINPHONE_GIT_VERSION \"$(LINPHONE_VERSION)_$(GITREVISION)\"" > $(GITVERSION_FILE_TMP) ; \
fi ; \
$(ECHO) -n "#define LIBLINPHONE_GIT_VERSION \"$(GITDESCRIBE)\"" > $(GITVERSION_FILE_TMP) ; \
elif test "$(GITREVISION)" != "" ; then \
$(ECHO) -n "#define LIBLINPHONE_GIT_VERSION \"$(LINPHONE_VERSION)_$(GITREVISION)\"" > $(GITVERSION_FILE_TMP) ; \
else \
$(ECHO) -n "" > $(GITVERSION_FILE_TMP) ; \
fi
......
......@@ -908,6 +908,7 @@ LINPHONE_PUBLIC const char *linphone_proxy_config_get_addr(const LinphoneProxyCo
LINPHONE_PUBLIC int linphone_proxy_config_get_expires(const LinphoneProxyConfig *obj);
LINPHONE_PUBLIC bool_t linphone_proxy_config_register_enabled(const LinphoneProxyConfig *obj);
LINPHONE_PUBLIC void linphone_proxy_config_refresh_register(LinphoneProxyConfig *obj);
LINPHONE_PUBLIC void linphone_proxy_config_pause_register(LinphoneProxyConfig *obj);
LINPHONE_PUBLIC const char *linphone_proxy_config_get_contact_parameters(const LinphoneProxyConfig *obj);
LINPHONE_PUBLIC void linphone_proxy_config_set_contact_parameters(LinphoneProxyConfig *obj, const char *contact_params);
LINPHONE_PUBLIC void linphone_proxy_config_set_contact_uri_parameters(LinphoneProxyConfig *obj, const char *contact_uri_params);
......
......@@ -307,6 +307,19 @@ void linphone_proxy_config_set_expires(LinphoneProxyConfig *obj, int val){
void linphone_proxy_config_enable_publish(LinphoneProxyConfig *obj, bool_t val){
obj->publish=val;
}
/**
* Prevent a proxy config from refreshing its registration.
* This is useful to let registrations to expire naturally (or) when the application wants to keep control on when
* refreshes are sent.
* However, linphone_core_set_network_reachable(lc,TRUE) will always request the proxy configs to refresh their registrations.
* The refreshing operations can be resumed with linphone_proxy_config_refresh_register().
* @param obj the proxy config
**/
void linphone_proxy_config_pause_register(LinphoneProxyConfig *obj){
if (obj->op) sal_op_stop_refreshing(obj->op);
}
/**
* Starts editing a proxy configuration.
*
......@@ -327,7 +340,7 @@ void linphone_proxy_config_edit(LinphoneProxyConfig *obj){
linphone_proxy_config_store_server_config(obj);
/*stop refresher in any case*/
if (obj->op) sal_op_stop_refreshing(obj->op);
linphone_proxy_config_pause_register(obj);
}
void linphone_proxy_config_apply(LinphoneProxyConfig *obj,LinphoneCore *lc){
......@@ -1090,7 +1103,7 @@ int linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *cfg){
void linphone_core_remove_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *cfg){
/* check this proxy config is in the list before doing more*/
if (ms_list_find(lc->sip_conf.proxies,cfg)==NULL){
ms_error("linphone_core_remove_proxy_config: LinphoneProxyConfig %p is not known by LinphoneCore (programming error?)",cfg);
ms_error("linphone_core_remove_proxy_config: LinphoneProxyConfig [%p] is not known by LinphoneCore (programming error?)",cfg);
return;
}
lc->sip_conf.proxies=ms_list_remove(lc->sip_conf.proxies,cfg);
......@@ -1102,6 +1115,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*/
}
if (lc->default_proxy==cfg){
lc->default_proxy=NULL;
......
mediastreamer2 @ 71bce450
Subproject commit bcb80cd105e3fe4c96a66ab4b80b87a92dcb21c7
Subproject commit 71bce450a360361039cfdf1967095bcd2a842af3
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment