Skip to content

Commit

Permalink
core: add helper function for flag reset
Browse files Browse the repository at this point in the history
- add helper function for flag reset (needed for bugfix in #GH1674)
- patch from: Julien Chavanton jchavanton at gmail dot com

(cherry picked from commit 253d35c)
(cherry picked from commit d2b805d)
  • Loading branch information
henningw authored and miconda committed Apr 3, 2019
1 parent 22d92ae commit e08fbc7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/flags.c
Expand Up @@ -51,6 +51,11 @@ int resetflag( struct sip_msg* msg, flag_t flag ) {
return 1;
}

int resetflags( struct sip_msg* msg, flag_t flags ) {
msg->flags &= ~ flags;
return 1;
}

int isflagset( struct sip_msg* msg, flag_t flag ) {
return (msg->flags & (1<<flag)) ? 1 : -1;
}
Expand Down
1 change: 1 addition & 0 deletions src/core/flags.h
Expand Up @@ -40,6 +40,7 @@ struct sip_msg;

int setflag( struct sip_msg* msg, flag_t flag );
int resetflag( struct sip_msg* msg, flag_t flag );
int resetflags( struct sip_msg* msg, flag_t flags );
int isflagset( struct sip_msg* msg, flag_t flag );


Expand Down

0 comments on commit e08fbc7

Please sign in to comment.