Upgrade to 2.0.6
This commit is contained in:
parent
7c63780f17
commit
440d4466b0
46
connretry-recv.patch
Normal file
46
connretry-recv.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
commit 5594d377ac73d37c06bbad1798e87a65f9a12e07
|
||||||
|
Author: Chrissie Caulfield <ccaulfie@redhat.com>
|
||||||
|
Date: Fri Nov 25 07:38:20 2022 +0000
|
||||||
|
|
||||||
|
ipc: Retry receiving credentials if the the message is short (#476)
|
||||||
|
|
||||||
|
ipc: Retry receiving credentials if the the message is short
|
||||||
|
|
||||||
|
rhbz#2111711 refers
|
||||||
|
|
||||||
|
diff --git a/lib/ipc_setup.c b/lib/ipc_setup.c
|
||||||
|
index 0ef9bb6..0de7115 100644
|
||||||
|
--- a/lib/ipc_setup.c
|
||||||
|
+++ b/lib/ipc_setup.c
|
||||||
|
@@ -473,11 +473,15 @@ qb_ipcc_us_setup_connect(struct qb_ipcc_connection *c,
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#define AUTH_RECV_MAX_RETRIES 10
|
||||||
|
+#define AUTH_RECV_SLEEP_TIME_US 100
|
||||||
|
+
|
||||||
|
/* Called from ipcc_connect_continue() when async connect socket is active */
|
||||||
|
int qb_ipcc_setup_connect_continue(struct qb_ipcc_connection *c, struct qb_ipc_connection_response *r)
|
||||||
|
{
|
||||||
|
struct ipc_auth_data *data;
|
||||||
|
int32_t res;
|
||||||
|
+ int retry_count = 0;
|
||||||
|
#ifdef QB_LINUX
|
||||||
|
int off = 0;
|
||||||
|
#endif
|
||||||
|
@@ -486,8 +490,14 @@ int qb_ipcc_setup_connect_continue(struct qb_ipcc_connection *c, struct qb_ipc_c
|
||||||
|
qb_ipcc_us_sock_close(c->setup.u.us.sock);
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+retry:
|
||||||
|
res = qb_ipc_us_recv_msghdr(data);
|
||||||
|
+ if (res == -EAGAIN && ++retry_count < AUTH_RECV_MAX_RETRIES) {
|
||||||
|
+ struct timespec ts = {0, AUTH_RECV_SLEEP_TIME_US*QB_TIME_NS_IN_USEC};
|
||||||
|
+ struct timespec ts_left = {0, 0};
|
||||||
|
+ nanosleep(&ts, &ts_left);
|
||||||
|
+ goto retry;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
#ifdef QB_LINUX
|
||||||
|
setsockopt(c->setup.u.us.sock, SOL_SOCKET, SO_PASSCRED, &off,
|
||||||
Binary file not shown.
BIN
libqb-2.0.6.tar.xz
Normal file
BIN
libqb-2.0.6.tar.xz
Normal file
Binary file not shown.
13
libqb.spec
13
libqb.spec
@ -1,21 +1,25 @@
|
|||||||
Name: libqb
|
Name: libqb
|
||||||
Version: 2.0.0
|
Version: 2.0.6
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: Library providing high performance logging, tracing, ipc, and poll
|
Summary: Library providing high performance logging, tracing, ipc, and poll
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://github.com/ClusterLabs/libqb
|
URL: https://github.com/ClusterLabs/libqb
|
||||||
Source0: https://github.com/ClusterLabs/libqb/releases/download/v%{version}/%{name}-%{version}.tar.xz
|
Source0: https://github.com/ClusterLabs/libqb/releases/download/v%{version}/%{name}-%{version}.tar.xz
|
||||||
|
|
||||||
|
Patch0: connretry-recv.patch
|
||||||
|
|
||||||
BuildRequires: autoconf automake libtool check-devel doxygen gcc procps pkgconfig(glib-2.0)
|
BuildRequires: autoconf automake libtool check-devel doxygen gcc procps pkgconfig(glib-2.0)
|
||||||
BuildRequires: git-core
|
BuildRequires: git-core
|
||||||
# For doxygen2man
|
# For doxygen2man
|
||||||
BuildRequires: libxml2-devel
|
BuildRequires: libxml2-devel make
|
||||||
%description
|
%description
|
||||||
libqb provides high-performance, reusable features for client-server
|
libqb provides high-performance, reusable features for client-server
|
||||||
architecture, such as logging, tracing, inter-process communication (IPC),
|
architecture, such as logging, tracing, inter-process communication (IPC),
|
||||||
and polling.
|
and polling.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -S git_am
|
%setup -q -n %{name}-%{version}
|
||||||
|
%patch0 -p1 -b .connretry-recv.patch
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
@ -73,6 +77,9 @@ This package contains a program to create nicely-formatted man pages from Doxyge
|
|||||||
%{_mandir}/man1/doxygen2man.1.gz
|
%{_mandir}/man1/doxygen2man.1.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Feb 27 2023 li-long315 <lilong@kylinos.cn> - 2.0.6-1
|
||||||
|
- Upgrade to 2.0.6
|
||||||
|
|
||||||
* Fri Apr 08 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 2.0.0-1
|
* Fri Apr 08 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 2.0.0-1
|
||||||
- Upgrade to 2.0.0
|
- Upgrade to 2.0.0
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user