static gboolean ga_channel_listen_accept(GIOChannel *channel,

                                         GIOCondition condition, gpointer data)

{

    GAChannel *c = data;

    int ret, client_fd;

    bool accepted = false;

    struct sockaddr_un addr;

    socklen_t addrlen = sizeof(addr);



    g_assert(channel != NULL);



    client_fd = qemu_accept(g_io_channel_unix_get_fd(channel),

                            (struct sockaddr *)&addr, &addrlen);

    if (client_fd == -1) {

        g_warning("error converting fd to gsocket: %s", strerror(errno));

        goto out;

    }

    fcntl(client_fd, F_SETFL, O_NONBLOCK);

    ret = ga_channel_client_add(c, client_fd);

    if (ret) {

        g_warning("error setting up connection");


        goto out;

    }

    accepted = true;



out:

    /* only accept 1 connection at a time */

    return !accepted;

}
static gboolean ga_channel_listen_accept(GIOChannel *channel,

                                         GIOCondition condition, gpointer data)

{

    GAChannel *c = data;

    int ret, client_fd;

    bool accepted = false;

    struct sockaddr_un addr;

    socklen_t addrlen = sizeof(addr);



    g_assert(channel != NULL);



    client_fd = qemu_accept(g_io_channel_unix_get_fd(channel),

                            (struct sockaddr *)&addr, &addrlen);

    if (client_fd == -1) {

        g_warning("error converting fd to gsocket: %s", strerror(errno));

        goto out;

    }

    fcntl(client_fd, F_SETFL, O_NONBLOCK);

    ret = ga_channel_client_add(c, client_fd);

    if (ret) {

        g_warning("error setting up connection");


        goto out;

    }

    accepted = true;



out:

    

    return !accepted;

}
static gboolean FUNC_0(GIOChannel *channel,

                                         GIOCondition condition, gpointer data)

{

    GAChannel *c = data;

    int VAR_0, VAR_1;

    bool accepted = false;

    struct sockaddr_un VAR_2;

    socklen_t addrlen = sizeof(VAR_2);



    g_assert(channel != NULL);



    VAR_1 = qemu_accept(g_io_channel_unix_get_fd(channel),

                            (struct sockaddr *)&VAR_2, &addrlen);

    if (VAR_1 == -1) {

        g_warning("error converting fd to gsocket: %s", strerror(errno));

        goto out;

    }

    fcntl(VAR_1, F_SETFL, O_NONBLOCK);

    VAR_0 = ga_channel_client_add(c, VAR_1);

    if (VAR_0) {

        g_warning("error setting up connection");


        goto out;

    }

    accepted = true;



out:

    

    return !accepted;

}
static gboolean FUNC_0(GIOChannel *channel,
GIOCondition condition, gpointer data)
{ GAChannel *c = data; int VAR_0, VAR_1; bool accepted = false; struct sockaddr_un VAR_2; socklen_t addrlen = sizeof(VAR_2); g_assert(channel != NULL); VAR_1 = qemu_accept(g_io_channel_unix_get_fd(channel),
(struct sockaddr *)&VAR_2, &addrlen); if (VAR_1 == -1) { g_warning("error converting fd to gsocket: %s", strerror(errno)); goto out; } fcntl(VAR_1, F_SETFL, O_NONBLOCK); VAR_0 = ga_channel_client_add(c, VAR_1); if (VAR_0) { g_warning("error setting up connection"); goto out; } accepted = true; out:
return !accepted; }