import libqb-1.0.3-13.el8

This commit is contained in:
CentOS Sources 2023-03-28 08:48:18 +00:00 committed by Stepan Oksanichenko
parent a4b17696c0
commit 3e20c668e5
2 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,25 @@
diff --git a/lib/ipc_setup.c b/lib/ipc_setup.c
index 23eeabb..0a720c8 100644
--- a/lib/ipc_setup.c
+++ b/lib/ipc_setup.c
@@ -447,6 +447,7 @@ qb_ipcc_us_setup_connect(struct qb_ipcc_connection *c,
int32_t res;
struct qb_ipc_connection_request request;
struct ipc_auth_data *data;
+ int retry_count = 0;
#ifdef QB_LINUX
int off = 0;
int on = 1;
@@ -478,7 +479,12 @@ qb_ipcc_us_setup_connect(struct qb_ipcc_connection *c,
}
qb_ipc_us_ready(&c->setup, NULL, -1, POLLIN);
+retry:
res = qb_ipc_us_recv_msghdr(data);
+ if (res == -EAGAIN && ++retry_count < 10) {
+ usleep(100000);
+ goto retry;
+ }
#ifdef QB_LINUX
setsockopt(c->setup.u.us.sock, SOL_SOCKET, SO_PASSCRED, &off,

View File

@ -3,7 +3,7 @@
Name: libqb
Version: 1.0.3
Release: 12%{?dist}
Release: 13%{?dist}
Summary: An IPC library for high performance servers
Group: System Environment/Libraries
@ -17,6 +17,7 @@ Patch2: bz1714854-improve-shm-security.patch
Patch3: bz1718773-avoid-ipc-deadlock.patch
Patch4: bz1836146-ipc_set_ownership.patch
Patch5: bz1836146-covscan-fixes.patch
Patch6: bz2111711-connretry-recv.patch
BuildRequires: autoconf automake libtool doxygen procps check-devel
# https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B#BuildRequires_and_Requires
@ -38,6 +39,7 @@ and polling.
%patch3 -p1 -b .bz1718773-avoid-ipc-deadlock.patch
%patch4 -p1 -b .bz1836146-ipc_set_ownership.patch
%patch5 -p1 -b .bz1836146-covscan-fixes.patch
%patch6 -p1 -b .bz2111711-connretry-recv.patch
%build
./autogen.sh
@ -103,6 +105,10 @@ The %{name}-tests package contains the %{name} test suite.
%changelog
* Mon Nov 28 2022 Christine Caulfield <ccaulfie@redhat.com> - 1.0.3-13
Add retry when receiving credentials from server
Resolves: rhbz#2111711
* Wed May 20 2020 Christine Caulfield <ccaulfie@redhat.com> - 1.0.3-11
Correctly set socket directory permissions when
qb_ipcs_connection_auth_set() is called