int qio_channel_socket_dgram_sync(QIOChannelSocket *ioc,

                                  SocketAddress *localAddr,

                                  SocketAddress *remoteAddr,

                                  Error **errp)

{

    int fd;



    trace_qio_channel_socket_dgram_sync(ioc, localAddr, remoteAddr);

    fd = socket_dgram(remoteAddr, localAddr, errp);

    if (fd < 0) {

        trace_qio_channel_socket_dgram_fail(ioc);

        return -1;

    }



    trace_qio_channel_socket_dgram_complete(ioc, fd);

    if (qio_channel_socket_set_fd(ioc, fd, errp) < 0) {

        close(fd);

        return -1;

    }



    return 0;

}

int qio_channel_socket_dgram_sync(QIOChannelSocket *ioc,

                                  SocketAddress *localAddr,

                                  SocketAddress *remoteAddr,

                                  Error **errp)

{

    int fd;



    trace_qio_channel_socket_dgram_sync(ioc, localAddr, remoteAddr);

    fd = socket_dgram(remoteAddr, localAddr, errp);

    if (fd < 0) {

        trace_qio_channel_socket_dgram_fail(ioc);

        return -1;

    }



    trace_qio_channel_socket_dgram_complete(ioc, fd);

    if (qio_channel_socket_set_fd(ioc, fd, errp) < 0) {

        close(fd);

        return -1;

    }



    return 0;

}

int FUNC_0(QIOChannelSocket *VAR_0,

                                  SocketAddress *VAR_1,

                                  SocketAddress *VAR_2,

                                  Error **VAR_3)

{

    int VAR_4;



    trace_qio_channel_socket_dgram_sync(VAR_0, VAR_1, VAR_2);

    VAR_4 = socket_dgram(VAR_2, VAR_1, VAR_3);

    if (VAR_4 < 0) {

        trace_qio_channel_socket_dgram_fail(VAR_0);

        return -1;

    }



    trace_qio_channel_socket_dgram_complete(VAR_0, VAR_4);

    if (qio_channel_socket_set_fd(VAR_0, VAR_4, VAR_3) < 0) {

        close(VAR_4);

        return -1;

    }



    return 0;

}

int FUNC_0(QIOChannelSocket *VAR_0,
SocketAddress *VAR_1,
SocketAddress *VAR_2,
Error **VAR_3)
{ int VAR_4; trace_qio_channel_socket_dgram_sync(VAR_0, VAR_1, VAR_2); VAR_4 = socket_dgram(VAR_2, VAR_1, VAR_3); if (VAR_4 < 0) { trace_qio_channel_socket_dgram_fail(VAR_0); return -1; } trace_qio_channel_socket_dgram_complete(VAR_0, VAR_4); if (qio_channel_socket_set_fd(VAR_0, VAR_4, VAR_3) < 0) { close(VAR_4); return -1; } return 0; }