diff options
author | Luigi Rizzo <rizzo@icir.org> | 2006-04-21 14:49:21 +0000 |
---|---|---|
committer | Luigi Rizzo <rizzo@icir.org> | 2006-04-21 14:49:21 +0000 |
commit | 0dbf814a79fc82b99d14cade9ead82540c8fe6dc (patch) | |
tree | 0610219ce014fe270f72ed2014a957fd3a329a73 /include | |
parent | e61e34e8a1832e4dcf64957d6cf6723f54c735fd (diff) |
- use symbolic constants and macros to play with the debug flag
on the frame counters. Document it in the header file.
- provide a single exit point for a function;
- mark XXX some unclear parts of the code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/channel.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 3096d1656..1fdec4ed3 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -403,9 +403,13 @@ struct ast_channel { unsigned long insmpl; unsigned long outsmpl; - /* Frames in/out counters */ + /* Frames in/out counters. The high bit is a debug mask, so + * the counter is only in the remaining bits + */ unsigned int fin; unsigned int fout; +#define DEBUGCHAN_FLAG 0x80000000 +#define FRAMECOUNT_INC(x) ( ((x) & DEBUGCHAN_FLAG) | ((x++) & ~DEBUGCHAN_FLAG) ) /* Why is the channel hanged up */ int hangupcause; |