Browse code

forward.c: logging: DBG -> LM_DBG

Ovidiu Sas authored on 13/01/2015 17:05:27
Showing 1 changed files
... ...
@@ -171,7 +171,7 @@ retry:
171 171
 	su2ip_addr(&ip, &from);
172 172
 	si=find_si(&ip, 0, proto);
173 173
 	if (si==0) goto error;
174
-	DBG("DEBUG: get_out_socket: socket determined: %p\n", si );
174
+	LM_DBG("socket determined: %p\n", si );
175 175
 	if (unlikely(mhomed_sock_cache_disabled)){
176 176
 		close(*temp_sock);
177 177
 		*temp_sock=-1;
... ...
@@ -234,7 +234,7 @@ struct socket_info* get_send_socket2(struct socket_info* force_send_socket,
234 234
 			if (likely(mismatch)) *mismatch=SS_MISMATCH_PROTO;
235 235
 		}
236 236
 		if (unlikely(force_send_socket->address.af!=to->s.sa_family)){
237
-			DBG("get_send_socket: force_send_socket of different af"
237
+			LM_DBG("force_send_socket of different af"
238 238
 					" (dst %d - %s:%s forced %d -%s:%s:%d)\n",
239 239
 					to->s.sa_family, proto2a(proto), su2a(to, sizeof(*to)),
240 240
 					force_send_socket->address.af,
... ...
@@ -409,7 +409,7 @@ int check_self(str* host, unsigned short port, unsigned short proto)
409 409
 	if (grep_sock_info(host, port, proto)) goto found;
410 410
 	/* try to look into the aliases*/
411 411
 	if (grep_aliases(host->s, host->len, port, proto)==0){
412
-		DBG("check_self: host != me\n");
412
+		LM_DBG("host != me\n");
413 413
 		return (_check_self_func_list==NULL)?0:run_check_self_func(host,
414 414
 														port, proto);
415 415
 	}
... ...
@@ -553,8 +553,8 @@ int forward_request(struct sip_msg* msg, str* dst, unsigned short port,
553 553
 		}
554 554
 #endif
555 555
 		 /* send it! */
556
-		DBG("Sending:\n%.*s.\n", (int)len, buf);
557
-		DBG("orig. len=%d, new_len=%d, proto=%d\n",
556
+		LM_DBG("Sending:\n%.*s.\n", (int)len, buf);
557
+		LM_DBG("orig. len=%d, new_len=%d, proto=%d\n",
558 558
 				msg->len, len, send_info->proto );
559 559
 	
560 560
 		if (run_onsend(msg, send_info, buf, len)==0){
... ...
@@ -671,7 +671,7 @@ int update_sock_struct_from_via( union sockaddr_union* to,
671 671
 	}else{
672 672
 		/* "normal" reply, we use rport's & received value if present */
673 673
 		if (via->rport && via->rport->value.s){
674
-			DBG("update_sock_struct_from_via: using 'rport'\n");
674
+			LM_DBG("using 'rport'\n");
675 675
 			port=str2s(via->rport->value.s, via->rport->value.len, &err);
676 676
 			if (err){
677 677
 				LM_ERR("bad rport value(%.*s)\n",
... ...
@@ -680,13 +680,13 @@ int update_sock_struct_from_via( union sockaddr_union* to,
680 680
 			}
681 681
 		}
682 682
 		if (via->received){
683
-			DBG("update_sock_struct_from_via: using 'received'\n");
683
+			LM_DBG("using 'received'\n");
684 684
 			name=&(via->received->value);
685 685
 			/* making sure that we won't do SRV lookup on "received"
686 686
 			 * (possible if no DNS_IP_HACK is used)*/
687 687
 			if (port==0) port=via->port?via->port:SIP_PORT; 
688 688
 		}else{
689
-			DBG("update_sock_struct_from_via: using via host\n");
689
+			LM_DBG("using via host\n");
690 690
 			name=&(via->host);
691 691
 			if (port==0) port=via->port;
692 692
 		}
... ...
@@ -699,7 +699,7 @@ int update_sock_struct_from_via( union sockaddr_union* to,
699 699
 	    Yes -- it happened on generating a 408 by TM; -jiri
700 700
 	    sip_resolvehost now accepts str -janakj
701 701
 	*/
702
-	DBG("update_sock_struct_from_via: trying SRV lookup\n");
702
+	LM_DBG("trying SRV lookup\n");
703 703
 	proto=via->proto;
704 704
 	he=sip_resolvehost(name, &port, &proto);
705 705
 	
... ...
@@ -789,7 +789,7 @@ static int do_forward_reply(struct sip_msg* msg, int mode)
789 789
 		if (msg->via1->i && msg->via1->i->value.s){
790 790
 			s=msg->via1->i->value.s;
791 791
 			len=msg->via1->i->value.len;
792
-			DBG("forward_reply: i=%.*s\n",len, ZSW(s));
792
+			LM_DBG("i=%.*s\n",len, ZSW(s));
793 793
 			if (reverse_hex2int(s, len, (unsigned int*)&dst.id)<0){
794 794
 				LM_ERR("bad via i param \"%.*s\"\n", len, ZSW(s));
795 795
 				dst.id=0;
... ...
@@ -830,7 +830,7 @@ static int do_forward_reply(struct sip_msg* msg, int mode)
830 830
 	STATS_TX_RESPONSE(  (msg->first_line.u.reply.statuscode/100) );
831 831
 #endif
832 832
 
833
-	DBG(" reply forwarded to %.*s:%d\n", 
833
+	LM_DBG("reply forwarded to %.*s:%d\n", 
834 834
 			msg->via2->host.len, msg->via2->host.s,
835 835
 			(unsigned short) msg->via2->port);
836 836