diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-21 14:49:21 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-21 14:49:21 +0000 |
commit | 27e0e17fc93fe480176a0dc8379178140f787909 (patch) | |
tree | 0610219ce014fe270f72ed2014a957fd3a329a73 /include | |
parent | 8ebf64bdddc08384b4a8c848b9d6020066d0e59b (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: http://svn.digium.com/svn/asterisk/trunk@21933 f38db490-d61c-443f-a65b-d21fe96a405b
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; |