46 info->name =
"set_fd_grow";
47 info->category =
"/main/channel/";
48 info->summary =
"channel setting file descriptor with growth test";
50 "Test that setting a file descriptor on a high position of a channel results in -1 set on any new positions";
56 mock_channel =
ast_channel_alloc(0,
AST_STATE_DOWN,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL, 0,
"TestChannel");
57 ast_test_validate_cleanup(
test, mock_channel, res,
done);
80 info->name =
"add_fd";
81 info->category =
"/main/channel/";
82 info->summary =
"channel adding file descriptor test";
84 "Test that adding a file descriptor to a channel places it in the expected position";
90 mock_channel =
ast_channel_alloc(0,
AST_STATE_DOWN,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL, 0,
"TestChannel");
91 ast_test_validate_cleanup(
test, mock_channel, res,
done);
Asterisk main include file. File version handling, generic pbx functions.
General Asterisk PBX channel definitions.
void ast_hangup(struct ast_channel *chan)
Hang up a channel.
#define ast_channel_alloc(needqueue, state, cid_num, cid_name, acctcode, exten, context, assignedids, requestor, amaflag,...)
Create a channel structure.
int ast_channel_fd_add(struct ast_channel *chan, int value)
Add a file descriptor to the channel without a fixed position.
int ast_channel_fd(const struct ast_channel *chan, int which)
void ast_channel_set_fd(struct ast_channel *chan, int which, int fd)
int ast_channel_fd_count(const struct ast_channel *chan)
Retrieve the number of file decriptor positions present on the channel.
Asterisk module definitions.
#define AST_MODULE_INFO_STANDARD(keystr, desc)
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_SUCCESS
Main Channel structure associated with a channel.
#define AST_TEST_REGISTER(cb)
#define AST_TEST_UNREGISTER(cb)
AST_TEST_DEFINE(set_fd_grow)
static int load_module(void)
static int unload_module(void)