[sr-dev] git:3.1: mqueue: decrease number of items when size limit is reached

Elena-Ramona Modroiu ramona at rosdev.ro
Tue Jul 19 09:58:55 CEST 2011


Module: sip-router
Branch: 3.1
Commit: e9a61dd16dffb6e6e74810431741a297b62524c1
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e9a61dd16dffb6e6e74810431741a297b62524c1

Author: Elena-Ramona Modroiu <ramona at asipto.com>
Committer: Elena-Ramona Modroiu <ramona at asipto.com>
Date:   Tue Jul 19 09:46:35 2011 +0200

mqueue: decrease number of items when size limit is reached

- proper counting of intems in the queue
- patch by Denis Chukhryaev

---

 modules/mqueue/mqueue_api.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules/mqueue/mqueue_api.c b/modules/mqueue/mqueue_api.c
index 6007ef0..a86d375 100644
--- a/modules/mqueue/mqueue_api.c
+++ b/modules/mqueue/mqueue_api.c
@@ -343,6 +343,8 @@ int mq_item_add(str *qname, str *key, str *val)
 			mh->ilast = NULL;
 		else
 			mh->ifirst->prev = NULL;
+		mh->csize--;
+		shm_free(mi);
 	}
 	lock_release(&mh->lock);
 	return 0;




More information about the sr-dev mailing list