[sr-dev] git:4.1: core: fix condition on script callback number done inside EXTRA_DEBUG

Daniel-Constantin Mierla miconda at gmail.com
Wed Feb 5 09:54:09 CET 2014


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Wed Feb  5 09:52:19 2014 +0100

core: fix condition on script callback number done inside EXTRA_DEBUG

- reported by Seudin Kasumovic, FS#388

(cherry picked from commit 740d407be4e35ee945658365ae38a1bba30fafc7)

---

 script_cb.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/script_cb.c b/script_cb.c
index fe17819..b8a053b 100644
--- a/script_cb.c
+++ b/script_cb.c
@@ -162,8 +162,8 @@ int exec_pre_script_cb( struct sip_msg *msg, enum script_cb_type type)
 	unsigned int	flags;
 
 #ifdef EXTRA_DEBUG
-	if (type >= SCRIPT_CB_NUM) {
-		LOG(L_BUG, "exec_pre_script_cb: Uknown callback type\n");
+	if (type > SCRIPT_CB_NUM) {
+		LOG(L_BUG, "Uknown callback type\n");
 		abort();
 	}
 #endif
@@ -185,7 +185,7 @@ int exec_post_script_cb( struct sip_msg *msg, enum script_cb_type type)
 	unsigned int	flags;
 
 #ifdef EXTRA_DEBUG
-	if (type >= SCRIPT_CB_NUM) {
+	if (type > SCRIPT_CB_NUM) {
 		LOG(L_BUG, "exec_pre_script_cb: Uknown callback type\n");
 		abort();
 	}




More information about the sr-dev mailing list