From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 100871FF0B2 for ; Mon, 24 Aug 2026 10:57:50 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 1ADCE2162C; Mon, 24 Aug 2026 10:57:22 +0200 (CEST) From: Daniel Kral To: pve-devel@lists.proxmox.com Subject: [PATCH cluster 10/12] ipcc: move the data pointer initialization up Date: Mon, 24 Aug 2026 10:56:09 +0200 Message-ID: <20260824085610.111211-12-d.kral@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260824085610.111211-2-d.kral@proxmox.com> References: <20260824085610.111211-2-d.kral@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787561806593 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.952 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: AN463Q3VLO4KLQ3J6BRYM6KO3DWGXDJH X-Message-ID-Hash: AN463Q3VLO4KLQ3J6BRYM6KO3DWGXDJH X-MailFrom: d.kral@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The data pointer does not have to be reassigned in case of a recached connection. Signed-off-by: Daniel Kral --- src/PVE/IPCC.xs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PVE/IPCC.xs b/src/PVE/IPCC.xs index 4661df0..626971c 100644 --- a/src/PVE/IPCC.xs +++ b/src/PVE/IPCC.xs @@ -97,6 +97,11 @@ SV * data; PROTOTYPE: $;$ CODE: { + size_t len = 0; + char *dataptr = NULL; + if (data && SvPOK(data)) + dataptr = SvPV(data, len); + uint8_t retried_cache_connection = 0; pid_t cpid = getpid(); @@ -117,11 +122,6 @@ recache_connection: conn_pid = cpid; } - size_t len = 0; - char *dataptr = NULL; - if (data && SvPOK(data)) - dataptr = SvPV(data, len); - int iov_len = 2; struct iovec iov[iov_len]; -- 2.47.3