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",
Asterisk main include file. File version handling, generic pbx functions.
#define ast_calloc(num, len)
A wrapper for calloc()
void ast_autochan_new_channel(struct ast_channel *old_chan, struct ast_channel *new_chan)
Switch what channel autochans point to.
struct ast_autochan * ast_autochan_setup(struct ast_channel *chan)
set up a new ast_autochan structure
void ast_autochan_destroy(struct ast_autochan *autochan)
destroy an ast_autochan structure
"smart" channels that update automatically if a channel is masqueraded
#define ast_autochan_channel_lock(autochan)
Lock the autochan's channel lock.
#define ast_autochan_channel_unlock(autochan)
General Asterisk PBX channel definitions.
const char * ast_channel_name(const struct ast_channel *chan)
#define ast_channel_lock(chan)
#define ast_channel_ref(c)
Increase channel reference count.
#define ast_channel_unref(c)
Decrease channel reference count.
struct ast_autochan_list * ast_channel_autochans(struct ast_channel *chan)
#define ast_channel_unlock(chan)
#define ast_debug(level,...)
Log a DEBUG message.
A set of macros to manage forward-linked lists.
#define AST_LIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
#define AST_LIST_INSERT_TAIL(head, elm, field)
Appends a list entry to the tail of a list.
#define AST_LIST_TRAVERSE_SAFE_END
Closes a safe loop traversal block.
#define AST_LIST_TRAVERSE_SAFE_BEGIN(head, var, field)
Loops safely over (traverses) the entries in a list.
#define AST_LIST_REMOVE_CURRENT(field)
Removes the current entry from a list during a traversal.
#define AST_LIST_APPEND_LIST(head, list, field)
Appends a whole list to the tail of a list.
#define ast_mutex_init(pmutex)
#define ast_mutex_unlock(a)
#define ast_mutex_destroy(a)
#define ast_mutex_lock(a)
Options provided by main asterisk program.
struct ast_channel * chan
struct ast_autochan::@188 list
Main Channel structure associated with a channel.