diff --git a/coreapi/proxy.c b/coreapi/proxy.c index e9aadd6c0..a1bf54a07 100644 --- a/coreapi/proxy.c +++ b/coreapi/proxy.c @@ -90,6 +90,7 @@ bool_t linphone_proxy_config_is_registered(const LinphoneProxyConfig *obj){ **/ int linphone_proxy_config_set_server_addr(LinphoneProxyConfig *obj, const char *server_addr){ LinphoneAddress *addr; + char *try=NULL; if (obj->reg_proxy!=NULL) ms_free(obj->reg_proxy); obj->reg_proxy=NULL; @@ -99,13 +100,13 @@ int linphone_proxy_config_set_server_addr(LinphoneProxyConfig *obj, const char * if (!addr){ /*try to prepend 'sip:' */ if (strstr(server_addr,"sip:")==NULL){ - char *try=ms_strdup_printf("sip:%s",server_addr); + try=ms_strdup_printf("sip:%s",server_addr); addr=linphone_address_new(try); ms_free(try); } } if (addr){ - obj->reg_proxy=ms_strdup(server_addr); + obj->reg_proxy=linphone_address_as_string_uri_only(addr); linphone_address_destroy(addr); }else{ ms_warning("Could not parse %s",server_addr); diff --git a/coreapi/sal_eXosip2.c b/coreapi/sal_eXosip2.c index ef052532d..38ba14c91 100644 --- a/coreapi/sal_eXosip2.c +++ b/coreapi/sal_eXosip2.c @@ -16,11 +16,15 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "sal_eXosip2.h" #include "offeranswer.h" - +/*this function is not declared in some versions of eXosip*/ +extern void *eXosip_call_get_reference(int cid); static void _osip_list_set_empty(osip_list_t *l, void (*freefunc)(void*)){ void *data; @@ -595,8 +599,13 @@ static void set_network_origin(SalOp *op, osip_message_t *req){ } static SalOp *find_op(Sal *sal, eXosip_event_t *ev){ - if (ev->cid>0) - return (SalOp*)eXosip_call_get_reference(ev->cid);; + if (ev->cid>0){ +#ifdef HAVE_EXOSIP_GET_REF + return (SalOp*)eXosip_call_get_ref(ev->cid); +#else + return (SalOp*)eXosip_call_get_reference(ev->cid); +#endif + } if (ev->rid>0){ return sal_find_register(sal,ev->rid); } diff --git a/m4/exosip.m4 b/m4/exosip.m4 index d3f89ee30..ae89236c8 100644 --- a/m4/exosip.m4 +++ b/m4/exosip.m4 @@ -24,6 +24,10 @@ AC_CHECK_LIB([eXosip2],[eXosip_get_version], [AC_DEFINE([HAVE_EXOSIP_GET_VERSION],[1],[Defined when eXosip_get_version is available])], [], [-losipparser2 -losip2 ]) +AC_CHECK_LIB([eXosip2],[eXosip_call_get_reference], + [], + [AC_MSG_ERROR([Could not find eXosip_call_get_reference() in eXosip2 !])], + [-losipparser2 -losip2 ]) dnl AC_CHECK_LIB([eXosip2],[eXosip_get_naptr], dnl [AC_DEFINE([HAVE_EXOSIP_NAPTR_SUPPORT],[1],[Defined when eXosip_get_naptr is available])], dnl [],