Module: sip-router
Branch: 4.1
Commit: 2fd085d21fb1a026d31d98541a9e33c568245771
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2fd085d…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: Tue Aug 19 17:21:57 2014 +0200
debugger: fix reset_msgid
Don't change the msg->id when that message has been processed already
(cherry picked from commit 6b2f7d0b9d405d8ffd2310f788254453d6748f0b)
---
modules/debugger/debugger_api.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/debugger/debugger_api.c b/modules/debugger/debugger_api.c
index e6e5f54..39e599b 100644
--- a/modules/debugger/debugger_api.c
+++ b/modules/debugger/debugger_api.c
@@ -268,18 +268,18 @@ int dbg_msgid_filter(struct sip_msg *msg, unsigned int flags, void
*bar)
}
msgid_base = _dbg_pid_list[indx].msgid_base;
lock_release(_dbg_pid_list[indx].lock);
- msgid_new = msg->id - msgid_base;
- LM_DBG("msg->id:%d msgid_base:%d -> %d\n", msg->id, msgid_base,
msgid_new);
- if(msgid_new>0)
+ if(msg->id > msgid_base)
{
+ msgid_new = msg->id - msgid_base;
+ LM_DBG("msg->id:%d msgid_base:%d -> %d\n",
+ msg->id, msgid_base, msgid_new);
msg->id = msgid_new;
- return 1;
}
else
{
- LM_WARN("msgid_new<=0??\n");
- return -1;
+ LM_DBG("msg->id:%d already processed\n", msg->id);
}
+ return 1;
}
/**