add uuid_fileman <uuid> <cmd>:<val> <-- same vals as the callbacks in js and lua to control the currently playing file of a channel from the cli or ESL (for the people who were ignoring me on the conference call so I decided to implement it instead of try to explain it )

This commit is contained in:
Anthony Minessale committed 2010-11-30 15:34:22 -06:00
1 parent 5b15e03f30
commit c4369fc84d
9 files changed
+258 -114

No files matched your search

+40
View File
@@ -36,6 +36,46 @@
#include "private/switch_core_pvt.h"
SWITCH_DECLARE(switch_status_t) switch_core_session_io_read_lock(switch_core_session_t *session)
{
switch_status_t status = SWITCH_STATUS_FALSE;
if (session->io_rwlock) {
if (switch_thread_rwlock_tryrdlock(session->io_rwlock) == SWITCH_STATUS_SUCCESS) {
status = SWITCH_STATUS_SUCCESS;
}
}
return status;
}
SWITCH_DECLARE(switch_status_t) switch_core_session_io_write_lock(switch_core_session_t *session)
{
switch_status_t status = SWITCH_STATUS_FALSE;
if (session->io_rwlock) {
switch_thread_rwlock_wrlock(session->io_rwlock);
status = SWITCH_STATUS_SUCCESS;
}
return status;
}
SWITCH_DECLARE(switch_status_t) switch_core_session_io_rwunlock(switch_core_session_t *session)
{
switch_status_t status = SWITCH_STATUS_FALSE;
if (session->io_rwlock) {
switch_thread_rwlock_unlock(session->io_rwlock);
status = SWITCH_STATUS_SUCCESS;
}
return status;
}
#ifdef SWITCH_DEBUG_RWLOCKS
SWITCH_DECLARE(switch_status_t) switch_core_session_perform_read_lock(switch_core_session_t *session, const char *file, const char *func, int line)
#else