On Thu, Apr 12, 2018 at 04:32:49PM +0200, Katerina Koukiou wrote:
Signed-off-by: Katerina Koukiou <kkoukiou(a)redhat.com>
---
data/org.libvirt.Domain.xml | 6 ++++++
src/domain.c | 25 +++++++++++++++++++++++++
2 files changed, 31 insertions(+)
[...]
+static void
+virtDBusDomainMigrateSetMaxDowntime(GVariant *inArgs,
+ GUnixFDList *inFDs G_GNUC_UNUSED,
+ const gchar *objectPath,
+ gpointer userData,
+ GVariant **outArgs G_GNUC_UNUSED,
+ GUnixFDList **outFDs G_GNUC_UNUSED,
+ GError **error)
+{
+ virtDBusConnect *connect = userData;
+ g_autoptr(virDomain) domain = NULL;
+ guint64 downtime;
+ guint flags;
+
+ g_variant_get(inArgs, "(tu)", &downtime, &flags);
+
+ domain = virtDBusDomainGetVirDomain(connect, objectPath, error);
+ if (!domain)
+ return;
+
+ if (virDomainMigrateSetMaxDowntime(domain, downtime, flags) < 0)
+ return virtDBusUtilSetLastVirtError(error);
No need for 'return'.
Pavel