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)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@74272 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
e6c8072514
commit
03dd41e54a
|
@ -2649,13 +2649,13 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
|
|||
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);
|
||||
|
|
|
@ -391,7 +391,7 @@ static int __agent_start_monitoring(struct ast_channel *ast, struct agent_pvt *p
|
|||
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
|
||||
|
|
|
@ -30,6 +30,11 @@ enum AST_MONITORING_STATE {
|
|||
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 {
|
||||
struct ast_filestream *read_stream;
|
||||
|
|
|
@ -61,11 +61,6 @@ AST_MUTEX_DEFINE_STATIC(monitorlock);
|
|||
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;
|
||||
|
||||
static char *monitor_synopsis = "Monitor a channel";
|
||||
|
@ -132,7 +127,14 @@ static int ast_monitor_set_state(struct ast_channel *chan, int state)
|
|||
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)
|
||||
{
|
||||
|
|
Reference in New Issue