From ab5503fca8ef3932bb5211396893012c9ef4ef6d Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 30 Jun 2010 12:09:48 +0200 Subject: [PATCH] add missing sip: for routes --- coreapi/proxy.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/coreapi/proxy.c b/coreapi/proxy.c index 59d767303..4d31f5071 100644 --- a/coreapi/proxy.c +++ b/coreapi/proxy.c @@ -167,7 +167,12 @@ int linphone_proxy_config_set_route(LinphoneProxyConfig *obj, const char *route) ms_free(obj->reg_route); obj->reg_route=NULL; } - obj->reg_route=ms_strdup(route); + if (route!=NULL){ + /*try to prepend 'sip:' */ + if (strstr(route,"sip:")==NULL){ + obj->reg_route=ms_strdup_printf("sip:%s",route); + }else obj->reg_route=ms_strdup(route); + } return 0; }