[asterisk-commits] qwell: trunk r74272 - in /trunk: apps/ channels/ include/asterisk/ res/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jul 10 10:07:26 CDT 2007
Author: qwell
Date: Tue Jul 10 10:07:25 2007
New Revision: 74272
URL: http://svn.digium.com/view/asterisk?view=rev&rev=74272
Log:
Fix building that was broken by recent monitor.h changes. Thanks Russell for pointing this out (and pointing out what I probably did to prevent gcc from fixing it - don't ctrl-C builds)
Modified:
trunk/apps/app_queue.c
trunk/channels/chan_agent.c
trunk/include/asterisk/monitor.h
trunk/res/res_monitor.c
Modified: trunk/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_queue.c?view=diff&rev=74272&r1=74271&r2=74272
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Tue Jul 10 10:07:25 2007
@@ -2649,13 +2649,13 @@
else
which = peer;
if (monitorfilename)
- ast_monitor_start(which, qe->parent->monfmt, monitorfilename, 1 );
+ ast_monitor_start(which, qe->parent->monfmt, monitorfilename, 1, X_REC_IN | X_REC_OUT);
else if (qe->chan->cdr)
- ast_monitor_start(which, qe->parent->monfmt, qe->chan->cdr->uniqueid, 1 );
+ ast_monitor_start(which, qe->parent->monfmt, qe->chan->cdr->uniqueid, 1, X_REC_IN | X_REC_OUT);
else {
/* Last ditch effort -- no CDR, make up something */
snprintf(tmpid, sizeof(tmpid), "chan-%lx", ast_random());
- ast_monitor_start(which, qe->parent->monfmt, tmpid, 1 );
+ ast_monitor_start(which, qe->parent->monfmt, tmpid, 1, X_REC_IN | X_REC_OUT);
}
if (qe->parent->monjoin)
ast_monitor_setjoinfiles(which, 1);
Modified: trunk/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_agent.c?view=diff&rev=74272&r1=74271&r2=74272
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Tue Jul 10 10:07:25 2007
@@ -391,7 +391,7 @@
if ((pointer = strchr(filename, '.')))
*pointer = '-';
snprintf(tmp, sizeof(tmp), "%s%s",savecallsin ? savecallsin : "", filename);
- ast_monitor_start(ast, recordformat, tmp, needlock);
+ ast_monitor_start(ast, recordformat, tmp, needlock, X_REC_IN | X_REC_OUT);
ast_monitor_setjoinfiles(ast, 1);
snprintf(tmp2, sizeof(tmp2), "%s%s.%s", urlprefix ? urlprefix : "", filename, recordformatext);
#if 0
Modified: trunk/include/asterisk/monitor.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/monitor.h?view=diff&rev=74272&r1=74271&r2=74272
==============================================================================
--- trunk/include/asterisk/monitor.h (original)
+++ trunk/include/asterisk/monitor.h Tue Jul 10 10:07:25 2007
@@ -29,6 +29,11 @@
AST_MONITOR_RUNNING,
AST_MONITOR_PAUSED
};
+
+/* Streams recording control */
+#define X_REC_IN 1
+#define X_REC_OUT 2
+#define X_JOIN 4
/*! Responsible for channel monitoring data */
struct ast_channel_monitor {
Modified: trunk/res/res_monitor.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_monitor.c?view=diff&rev=74272&r1=74271&r2=74272
==============================================================================
--- trunk/res/res_monitor.c (original)
+++ trunk/res/res_monitor.c Tue Jul 10 10:07:25 2007
@@ -60,11 +60,6 @@
if (needed) \
ast_channel_unlock(lock); \
} while (0)
-
-/* Streams recording control */
-#define X_REC_IN 1
-#define X_REC_OUT 2
-#define X_JOIN 4
static unsigned long seq = 0;
@@ -132,7 +127,14 @@
return 0;
}
-/* Start monitoring a channel */
+/*! \brief Start monitoring a channel
+ * \param chan ast_channel struct to record
+ * \param format_spec file format to use for recording
+ * \param fname_base filename base to record to
+ * \param need_lock whether to lock the channel mutex
+ * \param stream_action whether to record the input and/or output streams. X_REC_IN | X_REC_OUT is most often used
+ * \returns 0 on success, -1 on failure
+ */
int ast_monitor_start( struct ast_channel *chan, const char *format_spec,
const char *fname_base, int need_lock, int stream_action)
{
More information about the asterisk-commits
mailing list