Module: sip-router
Branch: master
Commit: 6b2f7d0b9d405d8ffd2310f788254453d6748f0b
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6b2f7d0…
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
---
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 6f4cbb8..05f904e 100644
--- a/modules/debugger/debugger_api.c
+++ b/modules/debugger/debugger_api.c
@@ -273,18 +273,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;
}
char* get_current_route_type_name()