34 #include "asterisk/autochan.h"
48 if (!(autochan =
ast_calloc(1,
sizeof(*autochan)))) {
58 ast_debug(1,
"Created autochan %p to hold channel %s (%p)\n", autochan, chan->
name, chan);
69 if (autochan_iter == autochan) {
71 ast_debug(1,
"Removed autochan %p from the list, about to free it\n", autochan);
90 if (autochan->
chan == old_chan) {
94 ast_debug(1,
"Autochan %p used to hold channel %s (%p) but now holds channel %s (%p)\n",
95 autochan, old_chan->
name, old_chan, new_chan->
name, new_chan);
#define ast_channel_lock(chan)
Main Channel structure associated with a channel.
Asterisk main include file. File version handling, generic pbx functions.
#define ast_channel_unref(c)
Decrease channel reference count.
struct ast_channel * chan
#define AST_LIST_TRAVERSE_SAFE_END
Closes a safe loop traversal block.
#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.
#define AST_LIST_INSERT_TAIL(head, elm, field)
Appends a list entry to the tail of a list.
const ast_string_field name
#define AST_LIST_TRAVERSE(head, var, field)
Loops over (traverses) the entries in a list.
#define ast_channel_unlock(chan)
void ast_autochan_new_channel(struct ast_channel *old_chan, struct ast_channel *new_chan)
Switch what channel autochans point to.
void ast_autochan_destroy(struct ast_autochan *autochan)
destroy an ast_autochan structure
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.
Options provided by main asterisk program.
struct ast_channel::autochans autochans
#define AST_LIST_TRAVERSE_SAFE_BEGIN(head, var, field)
Loops safely over (traverses) the entries in a list.
#define ASTERISK_FILE_VERSION(file, version)
Register/unregister a source code file with the core.
#define AST_LIST_APPEND_LIST(head, list, field)
Appends a whole list to the tail of a list.
struct ast_autochan::@144 list