From nobody Wed May 14 21:32:46 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 1516714297186381.2331282384438; Tue, 23 Jan 2018 05:31:37 -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 EFA1C6516F; Tue, 23 Jan 2018 13:31:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CD10018AA9; Tue, 23 Jan 2018 13:31:35 +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 97DE63FB1A; Tue, 23 Jan 2018 13:31:35 +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 w0NDOUcY027011 for ; Tue, 23 Jan 2018 08:24:30 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4548C7BB48; Tue, 23 Jan 2018 13:24:30 +0000 (UTC) Received: from t460.redhat.com (unknown [10.33.36.82]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8EF867BB51; Tue, 23 Jan 2018 13:24:26 +0000 (UTC) From: "Daniel P. Berrange" To: libvir-list@redhat.com Date: Tue, 23 Jan 2018 13:23:39 +0000 Message-Id: <20180123132347.21944-4-berrange@redhat.com> In-Reply-To: <20180123132347.21944-1-berrange@redhat.com> References: <20180123132347.21944-1-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 03/11] admin: add support for post-exec restart callbacks 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.26]); Tue, 23 Jan 2018 13:31:36 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" We don't have any per-client private data we need to persist, but the RPC infrastructure requires that we provide the callbacks and serialize an empty JSON object. This makes us future proof going forwards. Signed-off-by: Daniel P. Berrange --- src/admin/admin_server_dispatch.c | 21 +++++++++++++++++++++ src/admin/admin_server_dispatch.h | 5 +++++ 2 files changed, 26 insertions(+) diff --git a/src/admin/admin_server_dispatch.c b/src/admin/admin_server_dis= patch.c index 9f110025a2..b78ff902c0 100644 --- a/src/admin/admin_server_dispatch.c +++ b/src/admin/admin_server_dispatch.c @@ -86,6 +86,27 @@ remoteAdmClientNew(virNetServerClientPtr client ATTRIBUT= E_UNUSED, return priv; } =20 +void *remoteAdmClientNewPostExecRestart(virNetServerClientPtr client, + virJSONValuePtr object ATTRIBUTE_U= NUSED, + void *opaque) +{ + return remoteAdmClientNew(client, opaque); +} + +virJSONValuePtr remoteAdmClientPreExecRestart(virNetServerClientPtr client= ATTRIBUTE_UNUSED, + void *data ATTRIBUTE_UNUSED) +{ + virJSONValuePtr object =3D virJSONValueNewObject(); + + if (!object) + return NULL; + + /* No content to add at this time - just need empty object */ + + return object; +} + + /* Helpers */ =20 static virNetServerPtr diff --git a/src/admin/admin_server_dispatch.h b/src/admin/admin_server_dis= patch.h index ff6cfcd607..c998cf3cba 100644 --- a/src/admin/admin_server_dispatch.h +++ b/src/admin/admin_server_dispatch.h @@ -33,5 +33,10 @@ extern size_t adminNProcs; =20 void remoteAdmClientFree(void *data); void *remoteAdmClientNew(virNetServerClientPtr client, void *opaque); +void *remoteAdmClientNewPostExecRestart(virNetServerClientPtr client, + virJSONValuePtr object, + void *opaque); +virJSONValuePtr remoteAdmClientPreExecRestart(virNetServerClientPtr client, + void *data); =20 #endif /* __ADMIN_SERVER_DISPATCH_H__ */ --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list