stop_timer ( &tcp->timer );
list_del ( &tcp->list );
ref_put ( &tcp->refcnt );
+ DBGC ( tcp, "TCP %p connection deleted\n", tcp );
return;
}
static int tcp_open_uri ( struct xfer_interface *xfer, struct uri *uri ) {
struct sockaddr_tcpip peer;
+ /* Sanity check */
+ if ( ! uri->host )
+ return -EINVAL;
+
memset ( &peer, 0, sizeof ( peer ) );
peer.st_port = htons ( uri_port ( uri, 0 ) );
return xfer_open_named_socket ( xfer, SOCK_STREAM,