]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
testing a media bug change
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 19 Jun 2007 18:25:17 +0000 (18:25 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 19 Jun 2007 18:25:17 +0000 (18:25 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5391 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_core_media_bug.c
src/switch_ivr_async.c

index 72b468db19549d96304834b3e33e88bc6a0ff19f..e5610a95d853e17656a0d53845783e8af640c7df 100644 (file)
@@ -156,10 +156,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_add(switch_core_session_t
                                                                                                                  switch_media_bug_callback_t callback,
                                                                                                                  void *user_data, time_t stop_time, switch_media_bug_flag_t flags, switch_media_bug_t **new_bug)
 {
-       switch_media_bug_t *bug, *bp;
+       switch_media_bug_t *bug;//, *bp;
        switch_size_t bytes;
 
        if (flags & SMBF_WRITE_REPLACE) {
+#if 0
                switch_thread_rwlock_wrlock(session->bug_rwlock);
                for (bp = session->bugs; bp; bp = bp->next) {
                        if (switch_test_flag(bp, SMBF_WRITE_REPLACE)) {
@@ -169,9 +170,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_add(switch_core_session_t
                        }
                }
                switch_thread_rwlock_unlock(session->bug_rwlock);
+#endif
        }
 
        if (flags & SMBF_READ_REPLACE) {
+#if 0
                switch_thread_rwlock_wrlock(session->bug_rwlock);
                for (bp = session->bugs; bp; bp = bp->next) {
                        if (switch_test_flag(bp, SMBF_READ_REPLACE)) {
@@ -181,6 +184,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_add(switch_core_session_t
                        }
                }
                switch_thread_rwlock_unlock(session->bug_rwlock);
+#endif
        }
 
        if (!(bug = switch_core_session_alloc(session, sizeof(*bug)))) {
index e7544ea6d269cf1530cd09216870453a3f211a48..e2150583789477522aa442f57dbc67b46671554e 100644 (file)
@@ -605,7 +605,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_tone_detect_session(switch_core_sessi
          }
 
          for(i = 0; i < cont->index; i++) {
-                 if (!strcasecmp(key, cont->list[cont->index].key )) {
+                 if (!switch_strlen_zero(cont->list[cont->index].key) && !strcasecmp(key, cont->list[cont->index].key)) {
                          switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Renabling %s\n", key);
                          cont->list[cont->index].up = 1;
                          teletone_multi_tone_init(&cont->list[i].mt, &cont->list[i].map);