Browse code

switch.c: logging: DBG -> LM_DBG

Ovidiu Sas authored on 13/01/2015 14:57:59
Showing 1 changed files
... ...
@@ -173,11 +173,11 @@ int fix_switch(struct action* t)
173 173
 			rve_destroy(sw_rve);
174 174
 			t->val[0].type=BLOCK_ST;
175 175
 			t->val[0].u.data=0;
176
-			DBG("SWITCH: null switch optimized away\n");
176
+			LM_DBG("null switch optimized away\n");
177 177
 		}else{
178 178
 			t->type=EVAL_T;
179 179
 			t->val[0].type=RVE_ST;
180
-			DBG("SWITCH: null switch turned to EVAL_T\n");
180
+			LM_DBG("null switch turned to EVAL_T\n");
181 181
 		}
182 182
 		return 0;
183 183
 	}
... ...
@@ -215,7 +215,7 @@ int fix_switch(struct action* t)
215 215
 		if ( c->actions && ((ret=fix_actions(c->actions))<0))
216 216
 			goto error;
217 217
 	}
218
-	DBG("SWITCH: %d cases, %d default\n", n, default_found);
218
+	LM_DBG("%d cases, %d default\n", n, default_found);
219 219
 	/*: handle n==0 (no case only a default:) */
220 220
 	if (n==0){
221 221
 		if (default_found){
... ...
@@ -227,10 +227,10 @@ int fix_switch(struct action* t)
227 227
 				t->val[0].u.data=def_a;
228 228
 				t->val[1].type=0;
229 229
 				t->val[1].u.data=0;
230
-				DBG("SWITCH: default only switch optimized away (BLOCK_T)\n");
230
+				LM_DBG("default only switch optimized away (BLOCK_T)\n");
231 231
 				return 0;
232 232
 			}
233
-			DBG("SWITCH: default only switch with side-effect...\n");
233
+			LM_DBG("default only switch with side-effect...\n");
234 234
 		}else{
235 235
 			LM_CRIT("empty switch not expected at this point\n");
236 236
 			ret=E_BUG;
... ...
@@ -304,7 +304,7 @@ int fix_switch(struct action* t)
304 304
 		t->val[1].type=0;
305 305
 		t->val[1].u.data=0;
306 306
 		ret=0;
307
-		DBG("SWITCH: constant switch(%d) with %d cases optimized away to case "
307
+		LM_DBG("constant switch(%d) with %d cases optimized away to case"
308 308
 				" %d \n", val, n, i);
309 309
 		goto end;
310 310
 	}
... ...
@@ -363,8 +363,8 @@ int fix_switch(struct action* t)
363 363
 		t->val[1].type=JUMPTABLE_ST;
364 364
 		t->val[1].u.data=jmp;
365 365
 		ret=0;
366
-		DBG("SWITCH: optimized to jumptable [%d, %d] and %d condtable,"
367
-				"default: %s\n ",
366
+		LM_DBG("optimized to jumptable [%d, %d] and %d condtable,"
367
+				" default: %s\n ",
368 368
 				jmp->first, jmp->last, jmp->rest.n, jmp->rest.def?"yes":"no");
369 369
 	}else{
370 370
 		sct=mk_switch_cond_table(n);
... ...
@@ -382,7 +382,7 @@ int fix_switch(struct action* t)
382 382
 		t->type=SWITCH_COND_T;
383 383
 		t->val[1].type=CONDTABLE_ST;
384 384
 		t->val[1].u.data=sct;
385
-		DBG("SWITCH: optimized to condtable (%d) default: %s\n ",
385
+		LM_DBG("optimized to condtable (%d) default: %s\n",
386 386
 				sct->n, sct->def?"yes":"no");
387 387
 		ret=0;
388 388
 	}
... ...
@@ -439,11 +439,11 @@ static int fix_match(struct action* t)
439 439
 			rve_destroy(m_rve);
440 440
 			t->val[0].type=BLOCK_ST;
441 441
 			t->val[0].u.data=0;
442
-			DBG("MATCH: null switch optimized away\n");
442
+			LM_DBG("null switch optimized away\n");
443 443
 		}else{
444 444
 			t->type=EVAL_T;
445 445
 			t->val[0].type=RVE_ST;
446
-			DBG("MATCH: null switch turned to EVAL_T\n");
446
+			LM_DBG("null switch turned to EVAL_T\n");
447 447
 		}
448 448
 		return 0;
449 449
 	}
... ...
@@ -530,7 +530,7 @@ static int fix_match(struct action* t)
530 530
 		if ( c->actions && ((ret=fix_actions(c->actions))<0))
531 531
 			goto error;
532 532
 	}
533
-	DBG("MATCH: %d cases, %d default\n", n, default_found);
533
+	LM_DBG("%d cases, %d default\n", n, default_found);
534 534
 	/*: handle n==0 (no case only a default:) */
535 535
 	if (n==0){
536 536
 		if (default_found){
... ...
@@ -542,10 +542,10 @@ static int fix_match(struct action* t)
542 542
 				t->val[0].u.data=def_a;
543 543
 				t->val[1].type=0;
544 544
 				t->val[1].u.data=0;
545
-				DBG("MATCH: default only switch optimized away (BLOCK_T)\n");
545
+				LM_DBG("default only switch optimized away (BLOCK_T)\n");
546 546
 				return 0;
547 547
 			}
548
-			DBG("MATCH: default only switch with side-effect...\n");
548
+			LM_DBG("default only switch with side-effect...\n");
549 549
 		}else{
550 550
 			LM_CRIT("empty switch not expected at this point\n");
551 551
 			ret=E_BUG;
... ...
@@ -636,7 +636,7 @@ static int fix_match(struct action* t)
636 636
 				break;
637 637
 			}
638 638
 		}
639
-		DBG("MATCH: constant switch(\"%.*s\") with %d cases optimized away"
639
+		LM_DBG("constant switch(\"%.*s\") with %d cases optimized away"
640 640
 				" to case no. %d\n", s.len, ZSW(s.s), n, i);
641 641
 		/* cleanup */
642 642
 		rval_destroy(rv);
... ...
@@ -670,7 +670,7 @@ static int fix_match(struct action* t)
670 670
 	t->type=MATCH_COND_T;
671 671
 	t->val[1].type=MATCH_CONDTABLE_ST;
672 672
 	t->val[1].u.data=mct;
673
-	DBG("MATCH: optimized to match condtable (%d) default: %s\n ",
673
+	LM_DBG("optimized to match condtable (%d) default: %s\n",
674 674
 				mct->n, mct->def?"yes":"no");
675 675
 		ret=0;
676 676
 end: