From nobody Wed May 14 23:41:57 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1516641402249534.024040646474; Mon, 22 Jan 2018 09:16:42 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D474E272D1; Mon, 22 Jan 2018 17:16:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AB6EC87CF; Mon, 22 Jan 2018 17:16:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 674A518033DE; Mon, 22 Jan 2018 17:16:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w0MHGRXR028733 for ; Mon, 22 Jan 2018 12:16:27 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3FD115F715; Mon, 22 Jan 2018 17:16:27 +0000 (UTC) Received: from antique-work.brq.redhat.com (unknown [10.43.2.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3EBFC5E1D3; Mon, 22 Jan 2018 17:16:25 +0000 (UTC) From: Pavel Hrdina To: libvir-list@redhat.com Date: Mon, 22 Jan 2018 18:16:06 +0100 Message-Id: <2b837ada4b2689e3af68f3119df584fc335341ff.1516640486.git.phrdina@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: lars@karlitski.net Subject: [libvirt] [dbus RFC 08/11] connect: store connect path in connect structure X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 22 Jan 2018 17:16:41 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This prepares for multiple connection objects since each object will have different path based on the driver name. Signed-off-by: Pavel Hrdina Reviewed-by: Daniel P. Berrange --- src/connect.c | 3 ++- src/connect.h | 1 + src/events.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/connect.c b/src/connect.c index 314277f..3aec99e 100644 --- a/src/connect.c +++ b/src/connect.c @@ -247,12 +247,13 @@ virtDBusConnectNew(virtDBusConnect **connectp, =20 connect->bus =3D sd_bus_ref(bus); connect->uri =3D uri; + connect->connectPath =3D "/org/libvirt/Connect"; =20 connect->enumerateDomains =3D virtDBusConnectEnumarateDomains; =20 r =3D sd_bus_add_object_vtable(connect->bus, NULL, - "/org/libvirt/Connect", + connect->connectPath, "org.libvirt.Connect", virt_connect_vtable, connect); diff --git a/src/connect.h b/src/connect.h index de1aae7..489ce84 100644 --- a/src/connect.h +++ b/src/connect.h @@ -8,6 +8,7 @@ struct virtDBusConnect { sd_bus *bus; const char *uri; + const char *connectPath; virConnectPtr connection; =20 sd_bus_node_enumerator_t enumerateDomains; diff --git a/src/events.c b/src/events.c index 92f280d..d2d7f6b 100644 --- a/src/events.c +++ b/src/events.c @@ -53,7 +53,7 @@ virtDBusEventsDomainLifecycle(virConnectPtr connection VI= R_ATTR_UNUSED, =20 r =3D sd_bus_message_new_signal(connect->bus, &message, - "/org/libvirt/Connect", + connect->connectPath, "org.libvirt.connect", signal); if (r < 0) --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list