Asterisk - The Open Source Telephony Project
18.5.0
|
Go to the source code of this file.
Data Structures | |
struct | max_forwards |
Channel datastore data for max forwards. More... | |
Macros | |
#define | DEFAULT_MAX_FORWARDS 20 |
Functions | |
int | ast_max_forwards_decrement (struct ast_channel *chan) |
Decrement the max forwards count for a particular channel. More... | |
int | ast_max_forwards_get (struct ast_channel *chan) |
Get the current max forwards for a particular channel. More... | |
int | ast_max_forwards_reset (struct ast_channel *chan) |
Reset the max forwards on a channel to its starting value. More... | |
int | ast_max_forwards_set (struct ast_channel *chan, int starting_count) |
Set the starting max forwards for a particular channel. More... | |
static struct max_forwards * | max_forwards_alloc (int starting_count, int current_count) |
static struct ast_datastore * | max_forwards_datastore_alloc (struct ast_channel *chan, int starting_count) |
static struct ast_datastore * | max_forwards_datastore_find_or_alloc (struct ast_channel *chan) |
static void | max_forwards_destroy (void *data) |
static void * | max_forwards_duplicate (void *data) |
Variables | |
const struct ast_datastore_info | max_forwards_info |
#define DEFAULT_MAX_FORWARDS 20 |
Definition at line 24 of file max_forwards.c.
Referenced by max_forwards_datastore_find_or_alloc().
int ast_max_forwards_decrement | ( | struct ast_channel * | chan | ) |
Decrement the max forwards count for a particular channel.
If the channel has not had max forwards set on it, then the channel will have the default max forwards set on it and that value will not be decremented.
The channel for which the max forwards value should be decremented
0 | Success |
-1 | Failure |
Definition at line 135 of file max_forwards.c.
References max_forwards::current_count, ast_datastore::data, and max_forwards_datastore_find_or_alloc().
Referenced by __ast_request_and_dial(), ast_ari_channels_dial(), begin_dial_prerun(), call_forward_inherit(), dial_exec_full(), do_forward(), findmeexec(), ring_entry(), and wait_for_answer().
int ast_max_forwards_get | ( | struct ast_channel * | chan | ) |
Get the current max forwards for a particular channel.
If the channel has not had max forwards set on it, then the channel will have the default max forwards set on it and that value will be returned.
chan | The channel to get the max forwards for. |
Definition at line 121 of file max_forwards.c.
References max_forwards::current_count, ast_datastore::data, and max_forwards_datastore_find_or_alloc().
Referenced by app_exec(), begin_dial_prerun(), dial_exec_full(), func_channel_read(), and queue_exec().
int ast_max_forwards_reset | ( | struct ast_channel * | chan | ) |
Reset the max forwards on a channel to its starting value.
If the channel has not had max forwards set on it, then the channel will have the default max forwards set on it.
chan | The channel on which to reset the max forwards count. |
0 | Success |
-1 | Failure |
Definition at line 151 of file max_forwards.c.
References max_forwards::current_count, ast_datastore::data, max_forwards_datastore_find_or_alloc(), and max_forwards::starting_count.
Referenced by pre_bridge_setup().
int ast_max_forwards_set | ( | struct ast_channel * | chan, |
int | starting_count | ||
) |
Set the starting max forwards for a particular channel.
starting_count | The value to set the max forwards to. |
chan | The channel on which to set the max forwards. |
0 | Success |
1 | Failure |
Definition at line 105 of file max_forwards.c.
References max_forwards::current_count, ast_datastore::data, max_forwards_datastore_find_or_alloc(), and max_forwards::starting_count.
Referenced by func_channel_write_real().
|
static |
Definition at line 36 of file max_forwards.c.
References ast_malloc, max_forwards::current_count, NULL, and max_forwards::starting_count.
Referenced by max_forwards_datastore_alloc(), and max_forwards_duplicate().
|
static |
Definition at line 69 of file max_forwards.c.
References ast_channel_datastore_add(), ast_datastore_alloc, ast_datastore_free(), ast_datastore::data, DATASTORE_INHERIT_FOREVER, ast_datastore::inheritance, max_forwards_alloc(), and NULL.
Referenced by max_forwards_datastore_find_or_alloc().
|
static |
Definition at line 93 of file max_forwards.c.
References ast_channel_datastore_find(), DEFAULT_MAX_FORWARDS, max_forwards_datastore_alloc(), and NULL.
Referenced by ast_max_forwards_decrement(), ast_max_forwards_get(), ast_max_forwards_reset(), and ast_max_forwards_set().
|
static |
|
static |
Definition at line 51 of file max_forwards.c.
References max_forwards::current_count, max_forwards_alloc(), and max_forwards::starting_count.
const struct ast_datastore_info max_forwards_info |
Definition at line 63 of file max_forwards.c.