Regenerate patch because of whitespace differences
Related: rhbz2224569
This commit is contained in:
parent
53687fcef9
commit
6903da01e1
@ -1,31 +1,7 @@
|
|||||||
From 51634fd77c836e3cb5acd9b9b72e7ede20321d56 Mon Sep 17 00:00:00 2001
|
diff -up ipmitool-1.8.18/src/plugins/open/open.c.checking-received ipmitool-1.8.18/src/plugins/open/open.c
|
||||||
From: Patrick Venture <venture@google.com>
|
--- ipmitool-1.8.18/src/plugins/open/open.c.checking-received 2023-07-25 17:14:22.112985375 +0200
|
||||||
Date: Tue, 4 Dec 2018 16:47:09 -0800
|
+++ ipmitool-1.8.18/src/plugins/open/open.c 2023-07-25 17:14:22.115985324 +0200
|
||||||
Subject: [PATCH] open: checking received msg id against expectation
|
@@ -336,48 +336,61 @@ ipmi_openipmi_send_cmd(struct ipmi_intf
|
||||||
|
|
||||||
Check the received IPMI response message id against
|
|
||||||
the id expected given the IPMI request. They need to
|
|
||||||
match. It is possible that request A times out,
|
|
||||||
request B is sent, and then request A responds to the
|
|
||||||
request B. The value for request B may be behind it
|
|
||||||
in the queue.
|
|
||||||
|
|
||||||
Note: This may only be possible if the file is kept
|
|
||||||
open between multiple IPMI messages (a common
|
|
||||||
occurrence).
|
|
||||||
|
|
||||||
Resolves: #82
|
|
||||||
|
|
||||||
Signed-off-by: Patrick Venture <venture@google.com>
|
|
||||||
---
|
|
||||||
src/plugins/open/open.c | 83 ++++++++++++++++++++++++-----------------
|
|
||||||
1 file changed, 48 insertions(+), 35 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/plugins/open/open.c b/src/plugins/open/open.c
|
|
||||||
index 4fdabeb..8761a6d 100644
|
|
||||||
--- a/src/plugins/open/open.c
|
|
||||||
+++ b/src/plugins/open/open.c
|
|
||||||
@@ -336,48 +336,61 @@ ipmi_openipmi_send_cmd(struct ipmi_intf *intf, struct ipmi_rq *req)
|
|
||||||
read_timeout.tv_sec = IPMI_OPENIPMI_READ_TIMEOUT;
|
read_timeout.tv_sec = IPMI_OPENIPMI_READ_TIMEOUT;
|
||||||
read_timeout.tv_usec = 0;
|
read_timeout.tv_usec = 0;
|
||||||
do {
|
do {
|
||||||
@ -35,7 +11,14 @@ index 4fdabeb..8761a6d 100644
|
|||||||
- lperror(LOG_ERR, "I/O Error");
|
- lperror(LOG_ERR, "I/O Error");
|
||||||
- if (data != NULL) {
|
- if (data != NULL) {
|
||||||
- free(data);
|
- free(data);
|
||||||
- data = NULL;
|
+ do {
|
||||||
|
+ retval = select(intf->fd + 1, &rset, NULL, NULL, &read_timeout);
|
||||||
|
+ } while (retval < 0 && errno == EINTR);
|
||||||
|
+ if (retval < 0) {
|
||||||
|
+ lperror(LOG_ERR, "I/O Error");
|
||||||
|
+ if (data != NULL) {
|
||||||
|
+ free(data);
|
||||||
|
data = NULL;
|
||||||
- }
|
- }
|
||||||
- return NULL;
|
- return NULL;
|
||||||
- } else if (retval == 0) {
|
- } else if (retval == 0) {
|
||||||
@ -50,22 +33,13 @@ index 4fdabeb..8761a6d 100644
|
|||||||
- lprintf(LOG_ERR, "No data available");
|
- lprintf(LOG_ERR, "No data available");
|
||||||
- if (data != NULL) {
|
- if (data != NULL) {
|
||||||
- free(data);
|
- free(data);
|
||||||
- data = NULL;
|
|
||||||
+ do {
|
|
||||||
+ retval = select(intf->fd + 1, &rset, NULL, NULL, &read_timeout);
|
|
||||||
+ } while (retval < 0 && errno == EINTR);
|
|
||||||
+ if (retval < 0) {
|
|
||||||
+ lperror(LOG_ERR, "I/O Error");
|
|
||||||
+ if (data != NULL) {
|
|
||||||
+ free(data);
|
|
||||||
+ data = NULL;
|
|
||||||
+ }
|
+ }
|
||||||
+ return NULL;
|
+ return NULL;
|
||||||
+ } else if (retval == 0) {
|
+ } else if (retval == 0) {
|
||||||
+ lprintf(LOG_ERR, "No data available");
|
+ lprintf(LOG_ERR, "No data available");
|
||||||
+ if (data != NULL) {
|
+ if (data != NULL) {
|
||||||
+ free(data);
|
+ free(data);
|
||||||
+ data = NULL;
|
data = NULL;
|
||||||
+ }
|
+ }
|
||||||
+ return NULL;
|
+ return NULL;
|
||||||
}
|
}
|
||||||
@ -122,6 +96,3 @@ index 4fdabeb..8761a6d 100644
|
|||||||
|
|
||||||
if (verbose > 4) {
|
if (verbose > 4) {
|
||||||
fprintf(stderr, "Got message:");
|
fprintf(stderr, "Got message:");
|
||||||
--
|
|
||||||
2.40.1
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user