Module: sip-router
Branch: 3.1
Commit: da2f009cc0c90a529039a8ce5453bf2e6dd9d761
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=da2f009…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Nov 24 15:26:47 2011 +0100
core: better check for cloned lumps in shared memory
- bitwise test for LUMPFLAG_SHMEM
(cherry picked from commit 8652f5f5fb2b10210c65b04772064c452608c728)
(cherry picked from commit 50d96b4fa2b8a8b5998c45dc01f08617606aca8d)
---
data_lump.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/data_lump.c b/data_lump.c
index 433ce2f..5016383 100644
--- a/data_lump.c
+++ b/data_lump.c
@@ -650,7 +650,7 @@ void del_nonshm_lump( struct lump** lump_list )
crt = *lump_list;
while (crt) {
- if (crt->flags!=LUMPFLAG_SHMEM) {
+ if (!(crt->flags&LUMPFLAG_SHMEM)) {
/* unlink it */
foo = crt;
crt = crt->next;
@@ -665,7 +665,7 @@ void del_nonshm_lump( struct lump** lump_list )
prev_r = crt;
while(r){
foo=r; r=r->after;
- if (foo->flags!=LUMPFLAG_SHMEM) {
+ if (!(foo->flags&LUMPFLAG_SHMEM)) {
prev_r->after = r;
free_lump(foo);
pkg_free(foo);
@@ -678,7 +678,7 @@ void del_nonshm_lump( struct lump** lump_list )
prev_r = crt;
while(r){
foo=r; r=r->before;
- if (foo->flags!=LUMPFLAG_SHMEM) {
+ if (!(foo->flags&LUMPFLAG_SHMEM)) {
prev_r->before = r;
free_lump(foo);
pkg_free(foo);