Module: kamailio
Branch: master
Commit: 253d35c84bc1886c9eae774a731452f5d2f521cd
URL:
https://github.com/kamailio/kamailio/commit/253d35c84bc1886c9eae774a731452f…
Author: Henning Westerholt <hw(a)kamailio.org>
Committer: Henning Westerholt <hw(a)kamailio.org>
Date: 2018-11-01T21:27:28+01:00
core: add helper function for flag reset
- add helper function for flag reset (needed for bugfix in #GH1674)
- patch from: Julien Chavanton jchavanton at gmail dot com
---
Modified: src/core/flags.c
Modified: src/core/flags.h
---
Diff:
https://github.com/kamailio/kamailio/commit/253d35c84bc1886c9eae774a731452f…
Patch:
https://github.com/kamailio/kamailio/commit/253d35c84bc1886c9eae774a731452f…
---
diff --git a/src/core/flags.c b/src/core/flags.c
index 5b603706e3..c20f45f67f 100644
--- a/src/core/flags.c
+++ b/src/core/flags.c
@@ -52,6 +52,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;
}
diff --git a/src/core/flags.h b/src/core/flags.h
index e1186dbf79..9f521c8e5f 100644
--- a/src/core/flags.h
+++ b/src/core/flags.h
@@ -44,6 +44,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 );