summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-12-19 20:50:55 +0000
committerMark Spencer <markster@digium.com>2004-12-19 20:50:55 +0000
commitd6a415c262650a635bd789591ec238c8877d7367 (patch)
treebd5360dc721d464d22105d742311582153aeef35 /include
parentbfaa2734a6d5f5bbde53cb7a2f623a0b84e3f379 (diff)
Merge drumkilla's bitfield patch for SIP (bug #3083)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rwxr-xr-xinclude/asterisk/utils.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index b70a1ffca..c1ed65504 100755
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -23,8 +23,8 @@
#define ast_clear_flag(p,flag) ((p)->flags &= ~(flag))
-#define ast_copy_flags(dest,src,flagz) do { dest->flags &= ~(flagz); \
- dest->flags |= (src->flags & flagz); } while(0)
+#define ast_copy_flags(dest,src,flagz) do { (dest)->flags &= ~(flagz); \
+ (dest)->flags |= ((src)->flags & (flagz)); } while(0)
#define ast_set2_flag(p,value,flag) ((value) ? ast_set_flag(p,flag) : ast_clear_flag(p,flag))
@@ -38,6 +38,9 @@ struct ast_hostent {
char buf[1024];
};
+struct ast_flags {
+ int flags;
+};
extern char *ast_strip(char *buf);
extern struct hostent *ast_gethostbyname(const char *host, struct ast_hostent *hp);