[asterisk-commits] trunk r15970 - /trunk/include/asterisk/frame.h
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Mar 28 19:14:40 MST 2006
Author: rizzo
Date: Tue Mar 28 20:14:38 2006
New Revision: 15970
URL: http://svn.digium.com/view/asterisk?rev=15970&view=rev
Log:
Introduce an utility macro to set base, offset and
datalen of a frame, which is a very common operation.
Modified:
trunk/include/asterisk/frame.h
Modified: trunk/include/asterisk/frame.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/frame.h?rev=15970&r1=15969&r2=15970&view=diff
==============================================================================
--- trunk/include/asterisk/frame.h (original)
+++ trunk/include/asterisk/frame.h Tue Mar 28 20:14:38 2006
@@ -110,6 +110,13 @@
/*! Next/Prev for linking stand alone frames */
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
for this purpose instead of having to declare one on the stack */
More information about the asterisk-commits
mailing list