46 if (!(autochan =
ast_calloc(1,
sizeof(*autochan)))) {
53 ast_debug(1,
"Created autochan %p to hold channel %s (%p)\n",
70 if (autochan_iter == autochan) {
72 ast_debug(1,
"Removed autochan %p from the list, about to free it\n", autochan);
95 if (autochan->
chan == old_chan) {
99 ast_debug(1,
"Autochan %p used to hold channel %s (%p) but now holds channel %s (%p)\n",
#define ast_channel_lock(chan)
Main Channel structure associated with a channel.
Asterisk main include file. File version handling, generic pbx functions.
#define ast_autochan_channel_lock(autochan)
Lock the autochan's channel lock.
#define ast_channel_unref(c)
Decrease channel reference count.
struct ast_channel * chan
#define ast_mutex_lock(a)
#define AST_LIST_TRAVERSE_SAFE_END
Closes a safe loop traversal block.
struct ast_autochan::@226 list
#define ast_debug(level,...)
Log a DEBUG message.
General Asterisk PBX channel definitions.
#define AST_LIST_REMOVE_CURRENT(field)
Removes the current entry from a list during a traversal.
A set of macros to manage forward-linked lists.
void ast_autochan_new_channel(struct ast_channel *old_chan, struct ast_channel *new_chan)
Switch what channel autochans point to.
"smart" channels that update automatically if a channel is masqueraded
#define AST_LIST_INSERT_TAIL(head, elm, field)
Appends a list entry to the tail of a list.
void ast_autochan_destroy(struct ast_autochan *autochan)
destroy an ast_autochan structure
#define AST_LIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
#define ast_channel_unlock(chan)
#define ast_calloc(num, len)
A wrapper for calloc()
struct ast_autochan_list * ast_channel_autochans(struct ast_channel *chan)
struct ast_autochan * ast_autochan_setup(struct ast_channel *chan)
set up a new ast_autochan structure
#define ast_channel_ref(c)
Increase channel reference count.
const char * ast_channel_name(const struct ast_channel *chan)
Options provided by main asterisk program.
#define AST_LIST_TRAVERSE_SAFE_BEGIN(head, var, field)
Loops safely over (traverses) the entries in a list.
#define ast_autochan_channel_unlock(autochan)
#define ast_mutex_init(pmutex)
#define ast_mutex_destroy(a)
#define ast_mutex_unlock(a)
#define AST_LIST_APPEND_LIST(head, list, field)
Appends a whole list to the tail of a list.