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 tomake assumptions about API use. Let's pass connect stateto APIs. I agree,Orit |