Module: sip-router
Branch: master
Commit: 5fd8a1bdaae82decdb606901fe7bf3e6e9149803
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5fd8a1b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Tue Sep 2 10:29:22 2014 +0200
msilo: proper walk through sent list for cleanup
- reported by Bhupendra Singh
---
modules/msilo/ms_msg_list.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/msilo/ms_msg_list.c b/modules/msilo/ms_msg_list.c
index 9952483..61ad66f 100644
--- a/modules/msilo/ms_msg_list.c
+++ b/modules/msilo/ms_msg_list.c
@@ -251,7 +251,8 @@ errorx:
*/
int msg_list_check(msg_list ml)
{
- msg_list_el p0;
+ msg_list_el p0;
+ msg_list_el p1;
if(!ml)
goto errorx;
@@ -265,6 +266,7 @@ int msg_list_check(msg_list ml)
p0 = ml->lsent;
while(p0)
{
+ p1 = p0->next;
if(p0->flag & MS_MSG_DONE || p0->flag & MS_MSG_ERRO)
{
LM_DBG("mid:%d got reply\n", p0->msgid);
@@ -287,7 +289,7 @@ int msg_list_check(msg_list ml)
ml->ldone = p0;
ml->nrdone++;
}
- p0 = p0->next;
+ p0 = p1;
}
lock_release(&ml->sem_done);