Commit 26db37b4 authored by smorlat's avatar smorlat
Browse files

fix crash when running linphonecsh register with a password.



git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@340 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent 91a4b216
...@@ -1256,7 +1256,7 @@ static int lpc_cmd_register(LinphoneCore *lc, char *args){ ...@@ -1256,7 +1256,7 @@ static int lpc_cmd_register(LinphoneCore *lc, char *args){
LinphoneAuthInfo *info; LinphoneAuthInfo *info;
osip_from_init(&from); osip_from_init(&from);
if (osip_from_parse(from,identity)==0){ if (osip_from_parse(from,identity)==0){
info=linphone_auth_info_new(from->url->username,NULL,passwd,NULL,NULL); info=linphone_auth_info_new(from->url->username,NULL,passwd,NULL,from->url->host);
linphone_core_add_auth_info(lc,info); linphone_core_add_auth_info(lc,info);
} }
osip_from_free(from); osip_from_free(from);
......
...@@ -571,9 +571,11 @@ void linphone_proxy_config_set_sip_setup(LinphoneProxyConfig *cfg, const char *t ...@@ -571,9 +571,11 @@ void linphone_proxy_config_set_sip_setup(LinphoneProxyConfig *cfg, const char *t
if (!ss) return ; if (!ss) return ;
ssc=sip_setup_context_new(ss,cfg); ssc=sip_setup_context_new(ss,cfg);
if (sip_setup_context_login_account(ssc,cfg->reg_identity,NULL)==0){ if (sip_setup_context_login_account(ssc,cfg->reg_identity,NULL)==0){
char proxy[256]; if (sip_setup_context_get_capabilities(ssc) & SIP_SETUP_CAP_PROXY_PROVIDER){
if (sip_setup_context_get_proxy(ssc,NULL,proxy,sizeof(proxy))==0){ char proxy[256];
linphone_proxy_config_set_server_addr(cfg,proxy); if (sip_setup_context_get_proxy(ssc,NULL,proxy,sizeof(proxy))==0){
linphone_proxy_config_set_server_addr(cfg,proxy);
}
} }
} }
cfg->ssctx=ssc; cfg->ssctx=ssc;
......
...@@ -32,14 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -32,14 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#endif #endif
#endif #endif
#ifdef HAVE_FONIS
extern SipSetup fonis_sip_setup;
#endif
static SipSetup *all_sip_setups[]={ static SipSetup *all_sip_setups[]={
#ifdef HAVE_FONIS
&fonis_sip_setup,
#endif
NULL NULL
}; };
......
...@@ -261,6 +261,7 @@ static void __ortp_logv_out(OrtpLogLevel lev, const char *fmt, va_list args){ ...@@ -261,6 +261,7 @@ static void __ortp_logv_out(OrtpLogLevel lev, const char *fmt, va_list args){
OutputDebugString("\r\n"); OutputDebugString("\r\n");
#else #else
fprintf(__log_file,"ortp-%s-%s" ENDLINE,lname,msg); fprintf(__log_file,"ortp-%s-%s" ENDLINE,lname,msg);
fflush(__log_file);
#endif #endif
ortp_free(msg); ortp_free(msg);
......
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