diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-09 14:25:57 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-09 14:25:57 +0000 |
commit | 7670b6ca640512806ad6fda2807b090cd4f34c41 (patch) | |
tree | 16161d604b4e14781b023303263f3e9471645a3f /channel.c | |
parent | f6339f372684efd389bf84a24fcb706ca778ea9d (diff) |
use an enum for control frame types
support sending control frames with payload
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@26093 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rw-r--r-- | channel.c | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -738,10 +738,25 @@ int ast_queue_hangup(struct ast_channel *chan) } /*! \brief Queue a control frame */ -int ast_queue_control(struct ast_channel *chan, int control) +int ast_queue_control(struct ast_channel *chan, enum ast_control_frame_type control) { struct ast_frame f = { AST_FRAME_CONTROL, }; + + f.subclass = control; + + return ast_queue_frame(chan, &f); +} + +/*! \brief Queue a control frame with payload */ +int ast_queue_control_data(struct ast_channel *chan, enum ast_control_frame_type control, + const void *data, size_t datalen) +{ + struct ast_frame f = { AST_FRAME_CONTROL, }; + f.subclass = control; + f.data = (void *) data; + f.datalen = datalen; + return ast_queue_frame(chan, &f); } |