mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 03:18:30 +00:00
Introduce an utility macro to set base, offset and
datalen of a frame, which is a very common operation. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -111,6 +111,13 @@ struct ast_frame {
|
|||||||
struct ast_frame *next;
|
struct ast_frame *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define FR_SET_BUF(fr, _base, _ofs, _datalen) \
|
||||||
|
{ \
|
||||||
|
(fr)->data = (char *)_base + (_ofs); \
|
||||||
|
(fr)->offset = (_ofs); \
|
||||||
|
(fr)->datalen = (_datalen); \
|
||||||
|
}
|
||||||
|
|
||||||
/*! Queueing a null frame is fairly common, so we declare a global null frame object
|
/*! Queueing a null frame is fairly common, so we declare a global null frame object
|
||||||
for this purpose instead of having to declare one on the stack */
|
for this purpose instead of having to declare one on the stack */
|
||||||
extern struct ast_frame ast_null_frame;
|
extern struct ast_frame ast_null_frame;
|
||||||
|
|||||||
Reference in New Issue
Block a user