Browse code

select_core.o: logging: DBG->LM_DBG, ERR -> LM_ERR

Ovidiu Sas authored on 13/01/2015 15:04:26
Showing 1 changed files
... ...
@@ -221,7 +221,7 @@ SELECT_uri_header(rpid)
221 221
 int parse_contact_header( struct sip_msg *msg)
222 222
 {
223 223
         if ( !msg->contact && ( parse_headers(msg,HDR_CONTACT_F,0)==-1 || !msg->contact)) {
224
-                DBG("bad msg or missing CONTACT header\n");
224
+                LM_DBG("bad msg or missing CONTACT header\n");
225 225
                 return -1;
226 226
         }
227 227
 
... ...
@@ -526,14 +526,14 @@ int select_sdp_line(str* res, select_t* sel, struct sip_msg* msg)
526 526
 		if (sel->n < 5) return -1;
527 527
 
528 528
 		if (sel->params[4].type != SEL_PARAM_STR) {
529
-			ERR("wrong parameter type");
529
+			LM_ERR("wrong parameter type");
530 530
 			return -1;
531 531
 		}
532 532
 		if ((sel->params[4].v.s.len < 1) ||
533 533
 			(sel->params[4].v.s.len > 2) ||
534 534
 			((sel->params[4].v.s.len == 2) && (sel->params[4].v.s.s[1] != '='))
535 535
 		) {
536
-			ERR("wrong sdp line format: %.*s\n",
536
+			LM_ERR("wrong sdp line format: %.*s\n",
537 537
 				sel->params[4].v.s.len, sel->params[4].v.s.s);
538 538
 			return -1;
539 539
 		}
... ...
@@ -555,7 +555,7 @@ int select_sdp_line(str* res, select_t* sel, struct sip_msg* msg)
555 555
 			/* the requested SDP line is found, return its value */
556 556
 			buf++;
557 557
 			if ((buf >= buf_end) || (*buf != '=')) {
558
-				ERR("wrong SDP line format\n");
558
+				LM_ERR("wrong SDP line format\n");
559 559
 				return -1;
560 560
 			}
561 561
 			buf++;
... ...
@@ -565,14 +565,14 @@ int select_sdp_line(str* res, select_t* sel, struct sip_msg* msg)
565 565
 				line_end++;
566 566
 
567 567
 			if (line_end >= buf_end) {
568
-				ERR("wrong SDP line format\n");
568
+				LM_ERR("wrong SDP line format\n");
569 569
 				return -1;
570 570
 			}
571 571
 			line_end--;
572 572
 			if (*line_end == '\r') line_end--;
573 573
 
574 574
 			if (line_end < buf) {
575
-				ERR("wrong SDP line format\n");
575
+				LM_ERR("wrong SDP line format\n");
576 576
 				return -1;
577 577
 			}
578 578
 
... ...
@@ -621,7 +621,7 @@ int select_anyheader(str* res, select_t* s, struct sip_msg* msg)
621 621
 			s->params[2].v.s.s[s->params[2].v.s.len]=':';
622 622
 			if (parse_hname2(s->params[2].v.s.s,s->params[2].v.s.s+(s->params[2].v.s.len<3?4:s->params[2].v.s.len+1),
623 623
 						&hdr)==0) {
624
-				ERR("select_anyhdr:fixup_call:parse error\n");
624
+				LM_ERR("fixup_call:parse error\n");
625 625
 				return -1;
626 626
 			}
627 627
 			s->params[2].v.s.s[s->params[2].v.s.len]=c;
... ...
@@ -654,7 +654,7 @@ int select_anyheader(str* res, select_t* s, struct sip_msg* msg)
654 654
 
655 655
 	/* we need to be sure we have parsed all headers */
656 656
 	if (!msg->eoh && (parse_headers(msg,HDR_EOH_F,0)==-1 || !msg->eoh)) {
657
-		ERR("bad msg while parsing to EOH \n");
657
+		LM_ERR("bad msg while parsing to EOH \n");
658 658
 		return -1;
659 659
 	}
660 660
 	for (hf=msg->headers; hf; hf=hf->next) {
... ...
@@ -952,7 +952,7 @@ int select_any_params(str* res, select_t* s, struct sip_msg* msg)
952 952
 	if (!res->len) return -1;
953 953
 
954 954
 	if (search_param(*res, wanted->s, wanted->len, res) <= 0) {
955
-		DBG("SELECT ...uri.params.%s NOT FOUND !\n", wanted->s);
955
+		LM_DBG("uri.params.%s NOT FOUND !\n", wanted->s);
956 956
 		return -1;
957 957
 	} else {
958 958
 		return (res->len) ? 0 : 1;
... ...
@@ -962,17 +962,17 @@ int select_any_params(str* res, select_t* s, struct sip_msg* msg)
962 962
 int select_event(str* res, select_t* s, struct sip_msg* msg)
963 963
 {
964 964
 	if (!msg->event && parse_headers(msg, HDR_EVENT_F, 0) == -1) {
965
-		ERR("Error while searching Event header field\n");
965
+		LM_ERR("Error while searching Event header field\n");
966 966
 		return -1;
967 967
 	}
968 968
 
969 969
 	if (!msg->event) {
970
-		DBG("Event header field not found\n");
970
+		LM_DBG("Event header field not found\n");
971 971
 		return -1;
972 972
 	}
973 973
 
974 974
 	if (parse_event(msg->event) < 0) {
975
-		ERR("Error while parsing Event header field\n");
975
+		LM_ERR("Error while parsing Event header field\n");
976 976
 		return -1;
977 977
 	}
978 978
 
... ...
@@ -985,12 +985,12 @@ int select_event(str* res, select_t* s, struct sip_msg* msg)
985 985
 static int parse_rr_header(struct sip_msg *msg)
986 986
 {
987 987
         if ( !msg->record_route && ( parse_headers(msg,HDR_RECORDROUTE_F,0) == -1)) {
988
-                ERR("bad msg or missing Record-Route header\n");
988
+                LM_ERR("bad msg or missing Record-Route header\n");
989 989
                 return -1;
990 990
         }
991 991
 
992 992
 	if (!msg->record_route) {
993
-		DBG("No Record-Route header field found\n");
993
+		LM_DBG("No Record-Route header field found\n");
994 994
 		return -1;
995 995
 	}
996 996
 
... ...
@@ -1056,12 +1056,12 @@ int select_rr_params(str* res, select_t* s, struct sip_msg* msg)
1056 1056
 static inline struct cseq_body* sel_parse_cseq(struct sip_msg* msg)
1057 1057
 {
1058 1058
         if (!msg->cseq && (parse_headers(msg, HDR_CSEQ_F, 0) == -1)) {
1059
-                ERR("Unable to parse CSeq header\n");
1059
+                LM_ERR("Unable to parse CSeq header\n");
1060 1060
                 return 0;
1061 1061
         }
1062 1062
 
1063 1063
 	if (!msg->cseq) {
1064
-		DBG("No CSeqheader field found\n");
1064
+		LM_DBG("No CSeq header field found\n");
1065 1065
 		return 0;
1066 1066
 	}
1067 1067
 
... ...
@@ -1222,7 +1222,7 @@ int select_nameaddr_name(str* res, select_t* s, struct sip_msg* msg)
1222 1222
 	
1223 1223
 	p=find_not_quoted(res, '<');
1224 1224
 	if (!p) {
1225
-		DBG("select_nameaddr_name: no < found, whole string is uri\n");
1225
+		LM_DBG("no < found, whole string is uri\n");
1226 1226
 		res->len=0;
1227 1227
 		return 1;
1228 1228
 	}
... ...
@@ -1238,7 +1238,7 @@ int select_nameaddr_uri(str* res, select_t* s, struct sip_msg* msg)
1238 1238
 	
1239 1239
 	p=find_not_quoted(res, '<');
1240 1240
 	if (!p) {
1241
-		DBG("select_nameaddr_uri: no < found, string up to first semicolon is uri\n");
1241
+		LM_DBG("no < found, string up to first semicolon is uri\n");
1242 1242
 		p = q_memchr(res->s, ';', res->len);
1243 1243
 		if (p)
1244 1244
 			res->len = p-res->s;
... ...
@@ -1250,7 +1250,7 @@ int select_nameaddr_uri(str* res, select_t* s, struct sip_msg* msg)
1250 1250
 	
1251 1251
 	p=find_not_quoted(res, '>');
1252 1252
 	if (!p) {
1253
-		ERR("select_nameaddr_uri: no > found, invalid nameaddr value\n");
1253
+		LM_ERR("no > found, invalid nameaddr value\n");
1254 1254
 		return -1;
1255 1255
 	}
1256 1256
 
... ...
@@ -1270,7 +1270,7 @@ int select_nameaddr_params(str* res, select_t* s, struct sip_msg* msg)
1270 1270
 		res->s=p +1;
1271 1271
 		p=find_not_quoted(res, '>');
1272 1272
 		if (!p) {
1273
-			ERR("select_nameaddr_params: no > found, invalid nameaddr value\n");
1273
+			LM_ERR("no > found, invalid nameaddr value\n");
1274 1274
 			return -1;
1275 1275
 		}
1276 1276
 		res->len=res->len - (p-res->s) -1;
... ...
@@ -1352,7 +1352,7 @@ int select_ip_port(str* res, select_t* s, struct sip_msg* msg)
1352 1352
 				break;
1353 1353
 
1354 1354
 			default:
1355
-				ERR("BUG: select_ip_port: Unknown transport protocol\n");
1355
+				LM_ERR("Unknown transport protocol\n");
1356 1356
 				return -1;
1357 1357
 			}
1358 1358
 		}