From nobody Mon Feb 9 06:34:06 2026 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 1510666887477395.0884989746952; Tue, 14 Nov 2017 05:41:27 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D80946014F; Tue, 14 Nov 2017 13:41:25 +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 A48B689D38; Tue, 14 Nov 2017 13:41:25 +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 656C51800C87; Tue, 14 Nov 2017 13:41:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vAEDf33K000811 for ; Tue, 14 Nov 2017 08:41:03 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6A20D8B560; Tue, 14 Nov 2017 13:41:03 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id BC7D98B55D; Tue, 14 Nov 2017 13:41:02 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Tue, 14 Nov 2017 14:40:49 +0100 Message-Id: <8a435c10ffac327d43983c1558aad2bc93abce4d.1510666700.git.eskultet@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH 2/2] daemon: virtlockd: Call virNetDaemonGetServer regardless of post exec 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 14 Nov 2017 13:41:26 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" We need to call it anyway, so the else branch is redundant here. Signed-off-by: Erik Skultety --- It was either this or revert the order of the conditions so that the else branch/block is actually the bigger one, complying with our guidelines. src/locking/lock_daemon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/locking/lock_daemon.c b/src/locking/lock_daemon.c index 0d5e999ef..6751b57bc 100644 --- a/src/locking/lock_daemon.c +++ b/src/locking/lock_daemon.c @@ -1325,10 +1325,11 @@ int main(int argc, char **argv) { ret =3D VIR_LOCK_DAEMON_ERR_NETWORK; goto cleanup; } - } else if (rv =3D=3D 1) { - srv =3D virNetDaemonGetServer(lockDaemon->dmn, "virtlockd"); + virObjectUnref(srv); } + srv =3D virNetDaemonGetServer(lockDaemon->dmn, "virtlockd"); + if (timeout !=3D -1) { VIR_DEBUG("Registering shutdown timeout %d", timeout); virNetDaemonAutoShutdown(lockDaemon->dmn, -- 2.13.6 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list