[asterisk-commits] dlee: branch dlee/ari-async-bridge r395900 - /team/dlee/ari-async-bridge/res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jul 31 13:22:12 CDT 2013
Author: dlee
Date: Wed Jul 31 13:22:10 2013
New Revision: 395900
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=395900
Log:
In case I give up
Modified:
team/dlee/ari-async-bridge/res/res_stasis_recording.c
Modified: team/dlee/ari-async-bridge/res/res_stasis_recording.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/ari-async-bridge/res/res_stasis_recording.c?view=diff&rev=395900&r1=395899&r2=395900
==============================================================================
--- team/dlee/ari-async-bridge/res/res_stasis_recording.c (original)
+++ team/dlee/ari-async-bridge/res/res_stasis_recording.c Wed Jul 31 13:22:10 2013
@@ -225,10 +225,11 @@
recording = data;
ast_assert(recording != NULL);
- ao2_lock(recording);
- recording->state = STASIS_APP_RECORDING_STATE_RECORDING;
- recording_publish(recording);
- ao2_unlock(recording);
+ if (stasis_app_get_bridge(control)) {
+ ast_log(LOG_ERROR, "Cannot record channel while in bridge\n");
+ recording_fail(recording);
+ return NULL;
+ }
switch (recording->options->terminate_on) {
case STASIS_APP_RECORDING_TERMINATE_NONE:
@@ -251,6 +252,11 @@
recording_fail(recording);
return NULL;
}
+
+ ao2_lock(recording);
+ recording->state = STASIS_APP_RECORDING_STATE_RECORDING;
+ recording_publish(recording);
+ ao2_unlock(recording);
ast_play_and_record_full(chan,
recording->options->beep ? "beep" : NULL,
More information about the asterisk-commits
mailing list