Daniel Veillard wrote:
  Can we recognize that the connection is on localhost and just serve
the request directly and synchronously instead ?

Yes you can. In real terms what this would mean is that all the functions in qemu_internal.c are changed so that they become:

static int qemuDestroyDomain(virDomainPtr domain) {
    qemud_packet_client req;
    qemud_packet_server reply;
    qemuPrivatePtr priv = (qemuPrivatePtr) domain->conn->privateData;

    req.data.type = QEMUD_CLIENT_PKT_DOMAIN_DESTROY;
req.data.qemud_packet_client_data_u.domainDestroyRequest.id = domain->id;

#if QEMU_INTERNAL_IS_REALLY_LINKED_TO_THE_SERVER
    /* some code to get the fake server & client, and then: */
    qemudDispatchDomainDestroy (server, client, req, rep);
    /* followed by some code to decode the fake "reply packet" */
#else /* existing code: */
if (qemuProcessRequest(domain->conn, priv->qemud_fd, NULL, &req, &reply) < 0) {
        return -1;
    }

    return 0;
#endif
}

So it can be done but qemu_internal is sure going to look ugly afterwards.

Rich.

--
Emerging Technologies, Red Hat  http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF     Mobile: +44 7866 314 421

Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.
Registered in England and Wales under Company Registration No. 3798903
Directors: Michael Cunningham (USA), Charlie Peters (USA) and David
Owens (Ireland)

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

--
Libvir-list mailing list
Libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to