static void vnc_display_close(VncDisplay *vs)

{

    if (!vs)

        return;

    vs->enabled = false;

    vs->is_unix = false;

    if (vs->lsock != NULL) {

        if (vs->lsock_tag) {

            g_source_remove(vs->lsock_tag);

        }

        object_unref(OBJECT(vs->lsock));

        vs->lsock = NULL;

    }

    vs->ws_enabled = false;

    if (vs->lwebsock != NULL) {

        if (vs->lwebsock_tag) {

            g_source_remove(vs->lwebsock_tag);

        }

        object_unref(OBJECT(vs->lwebsock));

        vs->lwebsock = NULL;

    }

    vs->auth = VNC_AUTH_INVALID;

    vs->subauth = VNC_AUTH_INVALID;

    if (vs->tlscreds) {

        object_unparent(OBJECT(vs->tlscreds));


    }

    g_free(vs->tlsaclname);

    vs->tlsaclname = NULL;

}
static void vnc_display_close(VncDisplay *vs)

{

    if (!vs)

        return;

    vs->enabled = false;

    vs->is_unix = false;

    if (vs->lsock != NULL) {

        if (vs->lsock_tag) {

            g_source_remove(vs->lsock_tag);

        }

        object_unref(OBJECT(vs->lsock));

        vs->lsock = NULL;

    }

    vs->ws_enabled = false;

    if (vs->lwebsock != NULL) {

        if (vs->lwebsock_tag) {

            g_source_remove(vs->lwebsock_tag);

        }

        object_unref(OBJECT(vs->lwebsock));

        vs->lwebsock = NULL;

    }

    vs->auth = VNC_AUTH_INVALID;

    vs->subauth = VNC_AUTH_INVALID;

    if (vs->tlscreds) {

        object_unparent(OBJECT(vs->tlscreds));


    }

    g_free(vs->tlsaclname);

    vs->tlsaclname = NULL;

}
static void FUNC_0(VncDisplay *VAR_0)

{

    if (!VAR_0)

        return;

    VAR_0->enabled = false;

    VAR_0->is_unix = false;

    if (VAR_0->lsock != NULL) {

        if (VAR_0->lsock_tag) {

            g_source_remove(VAR_0->lsock_tag);

        }

        object_unref(OBJECT(VAR_0->lsock));

        VAR_0->lsock = NULL;

    }

    VAR_0->ws_enabled = false;

    if (VAR_0->lwebsock != NULL) {

        if (VAR_0->lwebsock_tag) {

            g_source_remove(VAR_0->lwebsock_tag);

        }

        object_unref(OBJECT(VAR_0->lwebsock));

        VAR_0->lwebsock = NULL;

    }

    VAR_0->auth = VNC_AUTH_INVALID;

    VAR_0->subauth = VNC_AUTH_INVALID;

    if (VAR_0->tlscreds) {

        object_unparent(OBJECT(VAR_0->tlscreds));


    }

    g_free(VAR_0->tlsaclname);

    VAR_0->tlsaclname = NULL;

}
static void FUNC_0(VncDisplay *VAR_0)
{ if (!VAR_0)
return; VAR_0->enabled = false; VAR_0->is_unix = false; if (VAR_0->lsock != NULL) { if (VAR_0->lsock_tag) { g_source_remove(VAR_0->lsock_tag); } object_unref(OBJECT(VAR_0->lsock)); VAR_0->lsock = NULL; } VAR_0->ws_enabled = false; if (VAR_0->lwebsock != NULL) { if (VAR_0->lwebsock_tag) { g_source_remove(VAR_0->lwebsock_tag); } object_unref(OBJECT(VAR_0->lwebsock)); VAR_0->lwebsock = NULL; } VAR_0->auth = VNC_AUTH_INVALID; VAR_0->subauth = VNC_AUTH_INVALID; if (VAR_0->tlscreds) { object_unparent(OBJECT(VAR_0->tlscreds)); } g_free(VAR_0->tlsaclname); VAR_0->tlsaclname = NULL; }