Module: kamailio
Branch: master
Commit: fdb0ef987ca2b013104b06ece006f67bf8ae07d3
URL:
https://github.com/kamailio/kamailio/commit/fdb0ef987ca2b013104b06ece006f67…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-07-30T08:55:08+02:00
corex: proper check for iflag lookup return code
---
Modified: src/modules/corex/corex_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/fdb0ef987ca2b013104b06ece006f67…
Patch:
https://github.com/kamailio/kamailio/commit/fdb0ef987ca2b013104b06ece006f67…
---
diff --git a/src/modules/corex/corex_mod.c b/src/modules/corex/corex_mod.c
index 4f3214049b6..f055af88c8d 100644
--- a/src/modules/corex/corex_mod.c
+++ b/src/modules/corex/corex_mod.c
@@ -608,7 +608,7 @@ static int w_msg_iflag_set(sip_msg_t *msg, char *pflag, char *p2)
return -1;
}
fv = msg_lookup_flag(&fname);
- if(fv == 1) {
+ if(fv == -1) {
LM_ERR("unsupported flag name [%.*s]\n", fname.len, fname.s);
return -1;
}
@@ -628,7 +628,7 @@ static int w_msg_iflag_reset(sip_msg_t *msg, char *pflag, char *p2)
return -1;
}
fv = msg_lookup_flag(&fname);
- if(fv < 0) {
+ if(fv == -1) {
LM_ERR("unsupported flag name [%.*s]\n", fname.len, fname.s);
return -1;
}
@@ -648,7 +648,7 @@ static int w_msg_iflag_is_set(sip_msg_t *msg, char *pflag, char *p2)
return -1;
}
fv = msg_lookup_flag(&fname);
- if(fv < 0) {
+ if(fv == -1) {
LM_ERR("unsupported flag name [%.*s]\n", fname.len, fname.s);
return -1;
}