Browse code

core: fix condition on script callback number done inside EXTRA_DEBUG

- reported by Seudin Kasumovic, FS#388

Daniel-Constantin Mierla authored on 05/02/2014 08:52:19
Showing 1 changed files
... ...
@@ -162,8 +162,8 @@ int exec_pre_script_cb( struct sip_msg *msg, enum script_cb_type type)
162 162
 	unsigned int	flags;
163 163
 
164 164
 #ifdef EXTRA_DEBUG
165
-	if (type >= SCRIPT_CB_NUM) {
166
-		LOG(L_BUG, "exec_pre_script_cb: Uknown callback type\n");
165
+	if (type > SCRIPT_CB_NUM) {
166
+		LOG(L_BUG, "Uknown callback type\n");
167 167
 		abort();
168 168
 	}
169 169
 #endif
... ...
@@ -185,7 +185,7 @@ int exec_post_script_cb( struct sip_msg *msg, enum script_cb_type type)
185 185
 	unsigned int	flags;
186 186
 
187 187
 #ifdef EXTRA_DEBUG
188
-	if (type >= SCRIPT_CB_NUM) {
188
+	if (type > SCRIPT_CB_NUM) {
189 189
 		LOG(L_BUG, "exec_pre_script_cb: Uknown callback type\n");
190 190
 		abort();
191 191
 	}