FS-3872 --resolve

This commit is contained in:
Anthony Minessale 2012-02-02 17:38:08 -06:00
parent 12907b454c
commit a72fb34f92
1 changed files with 9 additions and 10 deletions

View File

@ -213,19 +213,14 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_read(switch_media_bug_t *b
return SWITCH_STATUS_FALSE;
}
if (fill) {
fill_read = !do_read;
fill_write = !do_write;
}
if (fill && fill_read && fill_write) {
fill_read = !do_read;
fill_write = !do_write;
if (fill_read && fill_write) {
return SWITCH_STATUS_FALSE;
}
if (!((do_read || fill_read) && (do_write || fill_write))) {
return SWITCH_STATUS_FALSE;
}
if (do_read) {
switch_mutex_lock(bug->read_mutex);
if (switch_buffer_read(bug->raw_read_buffer, &rh, sizeof(rh))) {
@ -336,6 +331,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_read(switch_media_bug_t *b
return SWITCH_STATUS_BREAK;
}
if (fill_read || fill_write) {
return SWITCH_STATUS_FALSE;
}
return SWITCH_STATUS_SUCCESS;
}