[sr-dev] git:3.2: core: better check for cloned lumps in shared memory
Daniel-Constantin Mierla
miconda at gmail.com
Tue Nov 29 10:37:37 CET 2011
Module: sip-router
Branch: 3.2
Commit: 50d96b4fa2b8a8b5998c45dc01f08617606aca8d
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=50d96b4fa2b8a8b5998c45dc01f08617606aca8d
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at 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)
---
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);
More information about the sr-dev
mailing list