rem: " %s\n", msg->via1->host.s);
add: " %.*s\n", msg->via1->host.len, msg->via1->host.s);
context: int forward_reply(struct sip_msg* msg){	int  r;	char* new_buf;	union sockaddr_union* to;	unsigned int new_len;	struct sr_module *mod;		to=0;	new_buf=0;	/*check if first via host = us */	if (check_via){		for (r=0; r<addresses_no; r++)			if(strcmp(msg->via1->host.s, names[r])==0) break;		if (r==addresses_no){			LOG(L_NOTICE, "ERROR: forward_reply: host in first via!=me :"					" %s\n", msg->via1->host.s);			/* send error msg back? */			goto error;		}	}	/* quick hack, slower for mutliple modules*/	for (mod=modules;mod;mod=mod->next){		if ((mod->exports) && (mod->exports->response_f)){			DBG("forward_reply: found module %s, passing reply to it\n",					mod->exports->name);			if (mod->exports->response_f(msg)==0) goto skip;		}	}		/* we have to forward the reply stateless, so we need second via -bogdan*/	if ((msg->via2==0) || (msg->via2->error!=VIA_PARSE_OK))	{		/* no second via => error */		LOG(L_ERR, "ERROR: forward_msg: no 2nd via found in reply\n");		goto error;	}	to=(union sockaddr_union*)malloc(sizeof(union sockaddr_union));	if (to==0){		LOG(L_ERR, "ERROR: forward_reply: out of memory\n");		goto error;	}	new_buf = build_res_buf_from_sip_res( msg, &new_len);	if (!new_buf){		LOG(L_ERR, "ERROR: forward_reply: building failed\n");		goto error;	}	if (update_sock_struct_from_via( to, msg->via2 )==-1) goto error;	if (udp_send(new_buf,new_len,  to,				sizeof(union sockaddr_union))==-1)	{		STATS_TX_DROPS;		goto error;	} else {#ifdef STATS		int j = msg->first_line.u.reply.statuscode/100;		STATS_TX_RESPONSE(  j );#endif	}	DBG(" reply forwarded to %s:%d\n",msg->via2->host.s,		(unsigned short) msg->via2->port);	pkg_free(new_buf);	free(to);skip:	return 0;error:	if (new_buf) pkg_free(new_buf);	if (to) free(to);	return -1;}