rem: if (update_sock_struct_from_via(  &(to),  msg->via1 )==-1)
add: if (update_sock_struct_from_via(  &(to), msg, msg->via1 )==-1)
context: int sl_send_reply(struct sip_msg *msg ,int code ,char *text ){	char               *buf;	unsigned int       len;	union sockaddr_union to;	char *dset;	struct lump_rpl *dset_lump;	int dset_len;	struct bookmark dummy_bm;	if ( msg->first_line.u.request.method_value==METHOD_ACK)	{		LOG(L_WARN, "Warning: sl_send_reply: I won't send a reply for ACK!!\n");		goto error;	}	/* family will be updated in update_sock to whatever appropriate;	   -jiri	to.sin_family = AF_INET; */	if (reply_to_via) {		/* FIXME */		if (update_sock_struct_from_via(  &(to),  msg->via1 )==-1)		{			LOG(L_ERR, "ERROR: sl_send_reply: "				"cannot lookup reply dst: %s\n",				msg->via1->host.s );			goto error;		}	} else update_sock_struct_from_ip( &to, msg );	/* if that is a redirection message, dump current message set to it */	if (code>=300 && code<400) {		dset=print_dset(msg, &dset_len);		if (dset) {			dset_lump=build_lump_rpl(dset, dset_len);			add_lump_rpl(msg, dset_lump);		}	}	/* add a to-tag if there is a To header field without it */	if ( 	/* since RFC3261, we append to-tags anywhere we can, except		 * 100 replies */       		/* msg->first_line.u.request.method_value==METHOD_INVITE && */		code>=180 &&		(msg->to || (parse_headers(msg,HDR_TO, 0)!=-1 && msg->to))		&& (get_to(msg)->tag_value.s==0 || get_to(msg)->tag_value.len==0) ) 	{		calc_crc_suffix( msg, tag_suffix );		buf = build_res_buf_from_sip_req(code,text,sl_tag,TOTAG_VALUE_LEN,											msg ,&len, &dummy_bm);	} else {		buf = build_res_buf_from_sip_req(code,text,0,0,msg ,&len, &dummy_bm);	}	if (!buf)	{		DBG("DEBUG: sl_send_reply: response building failed\n");		goto error;	}		if (msg_send(0, msg->rcv.proto, &to, msg->rcv.proto_reserved1, buf, len)<0)		goto error;		*(sl_timeout) = get_ticks() + SL_RPL_WAIT_TIME;	pkg_free(buf);	update_sl_stats(code);	return 1;error:	update_sl_failures();	return -1;}