On 2/1/19 7:01 AM, Vladimir Sementsov-Ogievskiy wrote: > Keep all connection code in one file, to be able to implement reconnect > in further patches. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]> > --- >
> +static QIOChannelSocket *nbd_establish_connection(SocketAddress *saddr,
> + Error **errp)
> +{
> + QIOChannelSocket *sioc;
> + Error *local_err = NULL;
> +
> + sioc = qio_channel_socket_new();
> + qio_channel_set_name(QIO_CHANNEL(sioc), "nbd-client");
> +
> + qio_channel_socket_connect_sync(sioc,
> + saddr,
> + &local_err);
I know it was code motion, but this fits on one line.
Reviewed-by: Eric Blake <[email protected]>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
