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: Orit Wasserman
Subject: Re: [Qemu-devel] [PATCH v2 3/3] Fix address handling in inet_nonblocking_connect
Date: Thu, 13 Sep 2012 10:23:14 -0400 (EDT)





On 13 בספט 2012, at 16:30, "Michael S. Tsirkin" <address@hidden> wrote:

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.
I agree,
Orit

reply via email to

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