]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
extra blank-string protection
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 11 Aug 2008 16:11:50 +0000 (16:11 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 11 Aug 2008 16:11:50 +0000 (16:11 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9237 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_conference/mod_conference.c

index 9071e5d6761dcc5924f638f317ec612c86376997..82bf9a5da9df0eb6163d6570d8d14bb0f77cec75 100644 (file)
@@ -2384,7 +2384,9 @@ static switch_status_t conference_member_play_file(conference_member_t *member,
                expanded = NULL;
        }
        if (!strncasecmp(file, "say:", 4)) {
-               status = conference_member_say(member, file + 4, leadin);
+               if (!switch_strlen_zero(file + 4)) {
+                       status = conference_member_say(member, file + 4, leadin);
+               }
                goto done;
        }
        if (!switch_is_file_path(file)) {
@@ -2393,7 +2395,7 @@ static switch_status_t conference_member_play_file(conference_member_t *member,
                                goto done;
                        }
                        file = dfile;
-               } else {
+               } else if (!switch_strlen_zero(file)) {
                        status = conference_member_say(member, file, leadin);
                        goto done;
                }
@@ -2721,7 +2723,7 @@ static switch_status_t conf_api_sub_mute(conference_member_t *member, switch_str
                return SWITCH_STATUS_GENERR;
 
        switch_clear_flag_locked(member, MFLAG_CAN_SPEAK);
-       if (member->conference->muted_sound) {
+       if (!switch_strlen_zero(member->conference->muted_sound)) {
                conference_member_play_file(member, member->conference->muted_sound, 0);
        } else {
                char msg[512];
@@ -2753,7 +2755,7 @@ static switch_status_t conf_api_sub_unmute(conference_member_t *member, switch_s
        if (stream != NULL) {
                stream->write_function(stream, "OK unmute %u\n", member->id);
        }
-       if (member->conference->unmuted_sound) {
+       if (!switch_strlen_zero(member->conference->unmuted_sound)) {
                conference_member_play_file(member, member->conference->unmuted_sound, 0);
        } else {
                char msg[512];