Browse code

sr_module.c: logging: DBG -> LM_DBG

Ovidiu Sas authored on 13/01/2015 15:21:27
Showing 1 changed files
... ...
@@ -499,7 +499,7 @@ int load_module(char* mod_path)
499 499
 					strcat(path, ".so");
500 500
 
501 501
 				if (stat(path, &stat_buf) == -1) {
502
-					DBG("load_module: module file not found <%s>\n", path);
502
+					LM_DBG("module file not found <%s>\n", path);
503 503
 					pkg_free(path);
504 504
 
505 505
 					/* try path <MODS_DIR>/<modname>/<modname>.so */
... ...
@@ -522,7 +522,7 @@ int load_module(char* mod_path)
522 522
 						strcat(path, ".so");
523 523
 
524 524
 					if (stat(path, &stat_buf) == -1) {
525
-						DBG("load_module: module file not found <%s>\n", path);
525
+						LM_DBG("module file not found <%s>\n", path);
526 526
 						pkg_free(path);
527 527
 						path=0;
528 528
 					}
... ...
@@ -531,7 +531,7 @@ int load_module(char* mod_path)
531 531
 				/* try mod_path - S compat */
532 532
 				if(path==mod_path) {
533 533
 					if (stat(path, &stat_buf) == -1) {
534
-						DBG("load_module: module file not found <%s>\n", path);
534
+						LM_DBG("module file not found <%s>\n", path);
535 535
 						path=0;
536 536
 					}
537 537
 				}
... ...
@@ -550,7 +550,7 @@ int load_module(char* mod_path)
550 550
 					strcat(path, mod_path);
551 551
 
552 552
 					if (stat(path, &stat_buf) == -1) {
553
-						DBG("load_module: module file not found <%s>\n", path);
553
+						LM_DBG("module file not found <%s>\n", path);
554 554
 						pkg_free(path);
555 555
 						path=0;
556 556
 					}
... ...
@@ -564,7 +564,7 @@ int load_module(char* mod_path)
564 564
 			goto error;
565 565
 		}
566 566
 	}
567
-	DBG("load_module: trying to load <%s>\n", path);
567
+	LM_DBG("trying to load <%s>\n", path);
568 568
 
569 569
 	retries=2;
570 570
 	dlflags=RTLD_NOW;
... ...
@@ -668,14 +668,14 @@ sr31_cmd_export_t* find_mod_export_record(char* mod, char* name,
668 668
 					 (cmd->param_no==VAR_PARAM_NO)) &&
669 669
 					((cmd->flags & flags) == flags)
670 670
 				){
671
-					DBG("find_export_record: found <%s> in module %s [%s]\n",
671
+					LM_DBG("find_export_record: found <%s> in module %s [%s]\n",
672 672
 						name, t->exports.name, t->path);
673 673
 					*mod_if_ver=t->orig_mod_interface_ver;
674 674
 					return cmd;
675 675
 				}
676 676
 			}
677 677
 	}
678
-	DBG("find_export_record: <%s> not found \n", name);
678
+	LM_DBG("find_export_record: <%s> not found \n", name);
679 679
 	return 0;
680 680
 }
681 681
 
... ...
@@ -728,7 +728,7 @@ cmd_function find_mod_export(char* mod, char* name, int param_no, int flags)
728 728
 	if (cmd)
729 729
 		return cmd->function;
730 730
 	
731
-	DBG("find_mod_export: <%s> in module <%s> not found\n", name, mod);
731
+	LM_DBG("<%s> in module <%s> not found\n", name, mod);
732 732
 	return 0;
733 733
 }
734 734
 
... ...
@@ -741,7 +741,7 @@ struct sr_module* find_module_by_name(char* mod) {
741 741
 			return t;
742 742
 		}
743 743
 	}
744
-	DBG("find_module_by_name: module <%s> not found\n", mod);
744
+	LM_DBG("module <%s> not found\n", mod);
745 745
 	return 0;
746 746
 }
747 747
 
... ...
@@ -764,13 +764,13 @@ void* find_param_export(struct sr_module* mod, char* name,
764 764
 	for(param = mod->exports.params ;param && param->name ; param++) {
765 765
 		if ((strcmp(name, param->name) == 0) &&
766 766
 			((param->type & PARAM_TYPE_MASK(type_mask)) != 0)) {
767
-			DBG("find_param_export: found <%s> in module %s [%s]\n",
767
+			LM_DBG("found <%s> in module %s [%s]\n",
768 768
 				name, mod->exports.name, mod->path);
769 769
 			*param_type = param->type;
770 770
 			return param->param_pointer;
771 771
 		}
772 772
 	}
773
-	DBG("find_param_export: parameter <%s> not found in module <%s>\n",
773
+	LM_DBG("parameter <%s> not found in module <%s>\n",
774 774
 			name, mod->exports.name);
775 775
 	return 0;
776 776
 }
... ...
@@ -862,7 +862,7 @@ int init_child(int rank)
862 862
 	case PROC_TCP_MAIN: type = "PROC_TCP_MAIN"; break;
863 863
 	default:            type = "CHILD";         break;
864 864
 	}
865
-	DBG("init_child: initializing %s with rank %d\n", type, rank);
865
+	LM_DBG("initializing %s with rank %d\n", type, rank);
866 866
 
867 867
 	if(async_task_child_init(rank)<0)
868 868
 		return -1;
... ...
@@ -894,7 +894,7 @@ static int init_mod_child( struct sr_module* m, int rank )
894 894
 		 */
895 895
 		if (init_mod_child(m->next, rank)!=0) return -1;
896 896
 		if (m->exports.init_child_f) {
897
-			DBG("DEBUG: init_mod_child (%d): %s\n", rank, m->exports.name);
897
+			LM_DBG("rank %d: %s\n", rank, m->exports.name);
898 898
 			if (m->exports.init_child_f(rank)<0) {
899 899
 				LM_ERR("Error while initializing module %s (%s)\n",
900 900
 							m->exports.name, m->path);
... ...
@@ -939,7 +939,7 @@ static int init_mod( struct sr_module* m )
939 939
 		 */
940 940
 		if (init_mod(m->next)!=0) return -1;
941 941
 			if (m->exports.init_f) {
942
-				DBG("DEBUG: init_mod: %s\n", m->exports.name);
942
+				LM_DBG("%s\n", m->exports.name);
943 943
 				if (m->exports.init_f()!=0) {
944 944
 					LM_ERR("Error while initializing module %s (%s)\n",
945 945
 								m->exports.name, m->path);
... ...
@@ -1640,7 +1640,7 @@ int get_str_fparam(str* dst, struct sip_msg* msg, fparam_t* param)
1640 1640
 			avp = search_first_avp(param->v.avp.flags, param->v.avp.name,
1641 1641
 									&val, 0);
1642 1642
 			if (unlikely(!avp)) {
1643
-				DBG("Could not find AVP from function parameter '%s'\n",
1643
+				LM_DBG("Could not find AVP from function parameter '%s'\n",
1644 1644
 						param->orig);
1645 1645
 				return -1;
1646 1646
 			}
... ...
@@ -1705,7 +1705,7 @@ int get_int_fparam(int* dst, struct sip_msg* msg, fparam_t* param)
1705 1705
 			avp = search_first_avp(param->v.avp.flags, param->v.avp.name,
1706 1706
 									&val, 0);
1707 1707
 			if (unlikely(!avp)) {
1708
-				DBG("Could not find AVP from function parameter '%s'\n",
1708
+				LM_DBG("Could not find AVP from function parameter '%s'\n",
1709 1709
 						param->orig);
1710 1710
 				return -1;
1711 1711
 			}
... ...
@@ -1774,7 +1774,7 @@ int get_is_fparam(int* i_dst, str* s_dst, struct sip_msg* msg, fparam_t* param,
1774 1774
 			avp = search_first_avp(param->v.avp.flags, param->v.avp.name,
1775 1775
 									&val, 0);
1776 1776
 			if (unlikely(!avp)) {
1777
-				DBG("Could not find AVP from function parameter '%s'\n",
1777
+				LM_DBG("Could not find AVP from function parameter '%s'\n",
1778 1778
 						param->orig);
1779 1779
 				return -1;
1780 1780
 			}