Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern sys_recvmmsg: don't defer an error that already get...
details: https://anonhg.NetBSD.org/src/rev/ee4ed9c351b1
branches: trunk
changeset: 994530:ee4ed9c351b1
user: hannken <hannken%NetBSD.org@localhost>
date: Mon Nov 12 09:21:13 2018 +0000
description:
sys_recvmmsg: don't defer an error that already gets returned.
diffstat:
sys/kern/uipc_syscalls.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diffs (42 lines):
diff -r 8042502b303d -r ee4ed9c351b1 sys/kern/uipc_syscalls.c
--- a/sys/kern/uipc_syscalls.c Mon Nov 12 06:55:03 2018 +0000
+++ b/sys/kern/uipc_syscalls.c Mon Nov 12 09:21:13 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_syscalls.c,v 1.198 2018/11/07 09:59:12 hannken Exp $ */
+/* $NetBSD: uipc_syscalls.c,v 1.199 2018/11/12 09:21:13 hannken Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.198 2018/11/07 09:59:12 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.199 2018/11/12 09:21:13 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_pipe.h"
@@ -1124,17 +1124,16 @@
*retval = dg;
- if (error)
- so->so_rerror = error;
-
- fd_putfile(s);
-
/*
* If we succeeded at least once, return 0, hopefully so->so_rerror
* will catch it next time.
*/
- if (dg)
- return 0;
+ if (error && dg > 0) {
+ so->so_rerror = error;
+ error = 0;
+ }
+
+ fd_putfile(s);
return error;
}
Home |
Main Index |
Thread Index |
Old Index