qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 3/3] Fix address handling in inet_nonblocking


From: Michael S. Tsirkin
Subject: Re: [Qemu-devel] [PATCH v2 3/3] Fix address handling in inet_nonblocking_connect
Date: Thu, 13 Sep 2012 16:32:07 +0300

On Thu, Sep 13, 2012 at 03:22:24PM +0200, Markus Armbruster wrote:
> > +/* Struct to store connect state for non blocking connect */
> > +typedef struct ConnectState {
> > +    int fd;
> > +    struct addrinfo *addr_list;
> > +    struct addrinfo *current_addr;
> > +    ConnectHandler *callback;
> > +    void *opaque;
> > +    Error *errp;
> > +} ConnectState;
> > +
> > +static ConnectState connect_state = {
> > +    .fd = -1,
> > +};
> 
> Why does a single connect_state suffice?

Even if it does for the specific use, better not to
make assumptions about API use. Let's pass connect state
to APIs.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]