mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 12:52:33 +00:00
Redesigned 'optional API' support.
This patch provides a new implementation of the optional API support defined in asterisk/optional_api.h; this new version provides solves compatibility issues with the use of linker version scripts for suppressing global symbols. In addition, there is now a functional (and tested!) implementation for Mac OS/X, so module writers no longer need to use special tests before calling optional API functions. All future implementations must provide these same semantics, so that module writers can rely on them. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -4256,18 +4256,16 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
|
||||
else
|
||||
which = peer;
|
||||
ast_channel_unlock(qe->chan);
|
||||
if (ast_monitor_start) {
|
||||
if (monitorfilename) {
|
||||
ast_monitor_start(which, qe->parent->monfmt, monitorfilename, 1, X_REC_IN | X_REC_OUT);
|
||||
} else if (qe->chan->cdr && ast_monitor_start) {
|
||||
ast_monitor_start(which, qe->parent->monfmt, qe->chan->cdr->uniqueid, 1, X_REC_IN | X_REC_OUT);
|
||||
} else if (ast_monitor_start) {
|
||||
/* 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, X_REC_IN | X_REC_OUT);
|
||||
}
|
||||
if (monitorfilename) {
|
||||
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, 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, X_REC_IN | X_REC_OUT);
|
||||
}
|
||||
if (!ast_strlen_zero(monexec) && ast_monitor_setjoinfiles) {
|
||||
if (!ast_strlen_zero(monexec)) {
|
||||
ast_monitor_setjoinfiles(which, 1);
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user