From nobody Sun Feb 8 19:03:12 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; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554295573763190.6795337475237; Wed, 3 Apr 2019 05:46:13 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9904C821D8; Wed, 3 Apr 2019 12:46:12 +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 73E7517D4E; Wed, 3 Apr 2019 12:46:12 +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 28B9A3FB11; Wed, 3 Apr 2019 12:46:12 +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 x33Cj0Lb010711 for ; Wed, 3 Apr 2019 08:45:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id 788735C237; Wed, 3 Apr 2019 12:45:00 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id F334C5C708 for ; Wed, 3 Apr 2019 12:44:59 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 3 Apr 2019 14:44:53 +0200 Message-Id: <2bc6f3438e5f9bf0d73abc4e25e708a8e912c73e.1554295433.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/5] rpc: ssh: Use virStrToLong_i instead of virParseNumber 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: , 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 03 Apr 2019 12:46:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/rpc/virnetlibsshsession.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/rpc/virnetlibsshsession.c b/src/rpc/virnetlibsshsession.c index b9143239b9..039d8a278c 100644 --- a/src/rpc/virnetlibsshsession.c +++ b/src/rpc/virnetlibsshsession.c @@ -157,6 +157,7 @@ static int virNetLibsshSessionOnceInit(void) { const char *dbgLevelStr; + int dbgLevel; if (!VIR_CLASS_NEW(virNetLibsshSession, virClassForObjectLockable())) return -1; @@ -172,10 +173,9 @@ virNetLibsshSessionOnceInit(void) #endif dbgLevelStr =3D virGetEnvAllowSUID("LIBVIRT_LIBSSH_DEBUG"); - if (dbgLevelStr) { - int dbgLevel =3D virParseNumber(&dbgLevelStr); + if (dbgLevelStr && + virStrToLong_i(dbgLevelStr, NULL, 10, &dbgLevel) >=3D 0) ssh_set_log_level(dbgLevel); - } return 0; } --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list