allow setting a null ring file

This commit is contained in:
Simon Morlat 2011-02-09 12:20:12 +01:00
parent 6cd830fda4
commit af8046d7fd

View file

@ -2863,8 +2863,10 @@ void linphone_core_set_sound_source(LinphoneCore *lc, char source)
void linphone_core_set_ring(LinphoneCore *lc,const char *path){
if (lc->sound_conf.local_ring!=0){
ms_free(lc->sound_conf.local_ring);
lc->sound_conf.local_ring=NULL;
}
lc->sound_conf.local_ring=ms_strdup(path);
if (path)
lc->sound_conf.local_ring=ms_strdup(path);
if ( linphone_core_ready(lc) && lc->sound_conf.local_ring)
lp_config_set_string(lc->config,"sound","local_ring",lc->sound_conf.local_ring);
}