static void vnc_init_basic_info(SocketAddress *addr,

                                VncBasicInfo *info,

                                Error **errp)

{

    switch (addr->type) {

    case SOCKET_ADDRESS_KIND_INET:

        info->host = g_strdup(addr->u.inet->host);

        info->service = g_strdup(addr->u.inet->port);

        if (addr->u.inet->ipv6) {

            info->family = NETWORK_ADDRESS_FAMILY_IPV6;

        } else {

            info->family = NETWORK_ADDRESS_FAMILY_IPV4;

        }

        break;



    case SOCKET_ADDRESS_KIND_UNIX:

        info->host = g_strdup("");

        info->service = g_strdup(addr->u.q_unix->path);

        info->family = NETWORK_ADDRESS_FAMILY_UNIX;

        break;



    default:

        error_setg(errp, "Unsupported socket kind %d",

                   addr->type);

        break;

    }



    return;

}

static void vnc_init_basic_info(SocketAddress *addr,

                                VncBasicInfo *info,

                                Error **errp)

{

    switch (addr->type) {

    case SOCKET_ADDRESS_KIND_INET:

        info->host = g_strdup(addr->u.inet->host);

        info->service = g_strdup(addr->u.inet->port);

        if (addr->u.inet->ipv6) {

            info->family = NETWORK_ADDRESS_FAMILY_IPV6;

        } else {

            info->family = NETWORK_ADDRESS_FAMILY_IPV4;

        }

        break;



    case SOCKET_ADDRESS_KIND_UNIX:

        info->host = g_strdup("");

        info->service = g_strdup(addr->u.q_unix->path);

        info->family = NETWORK_ADDRESS_FAMILY_UNIX;

        break;



    default:

        error_setg(errp, "Unsupported socket kind %d",

                   addr->type);

        break;

    }



    return;

}

static void FUNC_0(SocketAddress *VAR_0,

                                VncBasicInfo *VAR_1,

                                Error **VAR_2)

{

    switch (VAR_0->type) {

    case SOCKET_ADDRESS_KIND_INET:

        VAR_1->host = g_strdup(VAR_0->u.inet->host);

        VAR_1->service = g_strdup(VAR_0->u.inet->port);

        if (VAR_0->u.inet->ipv6) {

            VAR_1->family = NETWORK_ADDRESS_FAMILY_IPV6;

        } else {

            VAR_1->family = NETWORK_ADDRESS_FAMILY_IPV4;

        }

        break;



    case SOCKET_ADDRESS_KIND_UNIX:

        VAR_1->host = g_strdup("");

        VAR_1->service = g_strdup(VAR_0->u.q_unix->path);

        VAR_1->family = NETWORK_ADDRESS_FAMILY_UNIX;

        break;



    default:

        error_setg(VAR_2, "Unsupported socket kind %d",

                   VAR_0->type);

        break;

    }



    return;

}

static void FUNC_0(SocketAddress *VAR_0,
VncBasicInfo *VAR_1,
Error **VAR_2)
{ switch (VAR_0->type) { case SOCKET_ADDRESS_KIND_INET:
VAR_1->host = g_strdup(VAR_0->u.inet->host); VAR_1->service = g_strdup(VAR_0->u.inet->port); if (VAR_0->u.inet->ipv6) { VAR_1->family = NETWORK_ADDRESS_FAMILY_IPV6; } else { VAR_1->family = NETWORK_ADDRESS_FAMILY_IPV4; } break; case SOCKET_ADDRESS_KIND_UNIX:
VAR_1->host = g_strdup(""); VAR_1->service = g_strdup(VAR_0->u.q_unix->path); VAR_1->family = NETWORK_ADDRESS_FAMILY_UNIX; break; default:
error_setg(VAR_2, "Unsupported socket kind %d",
VAR_0->type); break; } return; }