Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1444?usp=email
to review the following change.
Change subject: multi: Warn about failing read in multi_process_file_closed()
......................................................................
multi: Warn about failing read in multi_process_file_closed()
Handle failure explicitly instead of the implicit
handling by "while (buffer_i < r)".
Backport of 18d1b1fe008a4bbfd5a56ca7bb59f6f8cb58114a and the relevant
type fix of 5e5ead5ba019fc2a8266f77a7d840b30fd545198
Reported-by: Marc Heuse <[email protected]>
Github: openvpn-private-issues#101
Change-Id: I950863eeba67b8c006c794245a1a08752cd79fb0
Signed-off-by: Gert Doering <[email protected]>
---
M src/openvpn/multi.c
1 file changed, 7 insertions(+), 2 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/44/1444/1
diff --git a/src/openvpn/multi.c b/src/openvpn/multi.c
index 94e623b..69497a6 100644
--- a/src/openvpn/multi.c
+++ b/src/openvpn/multi.c
@@ -2830,8 +2830,13 @@
multi_process_file_closed(struct multi_context *m, const unsigned int
mpp_flags)
{
char buffer[INOTIFY_EVENT_BUFFER_SIZE];
- size_t buffer_i = 0;
- int r = read(m->top.c2.inotify_fd, buffer, INOTIFY_EVENT_BUFFER_SIZE);
+ ssize_t buffer_i = 0;
+ ssize_t r = read(m->top.c2.inotify_fd, buffer, INOTIFY_EVENT_BUFFER_SIZE);
+ if (r < 0)
+ {
+ msg(M_WARN | M_ERRNO, "MULTI: multi_process_file_closed error");
+ return;
+ }
while (buffer_i < r)
{
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1444?usp=email
To unsubscribe, or for help writing mail filters, visit
http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: release/2.6
Gerrit-Change-Id: I950863eeba67b8c006c794245a1a08752cd79fb0
Gerrit-Change-Number: 1444
Gerrit-PatchSet: 1
Gerrit-Owner: cron2 <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: flichtenheld <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel