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);
Main Channel structure associated with a channel.
static int unload_module(void)
#define AST_MODULE_INFO_STANDARD(keystr, desc)
Asterisk main include file. File version handling, generic pbx functions.
static int load_module(void)
#define AST_TEST_REGISTER(cb)
General Asterisk PBX channel definitions.
int ast_channel_fd_add(struct ast_channel *chan, int value)
Add a file descriptor to the channel without a fixed position.
AST_TEST_DEFINE(set_fd_grow)
#define AST_TEST_UNREGISTER(cb)
void ast_hangup(struct ast_channel *chan)
Hang up a channel.
void ast_channel_set_fd(struct ast_channel *chan, int which, int fd)
int ast_channel_fd(const struct ast_channel *chan, int which)
int ast_channel_fd_count(const struct ast_channel *chan)
Retrieve the number of file decriptor positions present on the channel.
#define ASTERISK_GPL_KEY
The text the key() function should return.
#define ast_channel_alloc(needqueue, state, cid_num, cid_name, acctcode, exten, context, assignedids, requestor, amaflag,...)
Create a channel structure.
Asterisk module definitions.