From af8046d7fd54bbcbe47b91959233966d1e831ece Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 9 Feb 2011 12:20:12 +0100 Subject: [PATCH] allow setting a null ring file --- coreapi/linphonecore.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 9b7a0aeab..d6a56e264 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -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); }