Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/libexec/httpd in bozo_init_prefs(), default to returning 1 (...
details: https://anonhg.NetBSD.org/src/rev/95a7c28b35ea
branches: trunk
changeset: 363506:95a7c28b35ea
user: mrg <mrg%NetBSD.org@localhost>
date: Mon Mar 14 05:58:36 2022 +0000
description:
in bozo_init_prefs(), default to returning 1 (success) and if a
bozo_set_pref() fails, return 0 instead. fixes PR#54785 but with
a different patch.
diffstat:
libexec/httpd/bozohttpd.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diffs (44 lines):
diff -r e37d4270af9b -r 95a7c28b35ea libexec/httpd/bozohttpd.c
--- a/libexec/httpd/bozohttpd.c Mon Mar 14 05:50:08 2022 +0000
+++ b/libexec/httpd/bozohttpd.c Mon Mar 14 05:58:36 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bozohttpd.c,v 1.138 2022/01/04 06:08:14 kim Exp $ */
+/* $NetBSD: bozohttpd.c,v 1.139 2022/03/14 05:58:36 mrg Exp $ */
/* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */
@@ -2520,26 +2520,26 @@
int
bozo_init_prefs(bozohttpd_t *httpd, bozoprefs_t *prefs)
{
- int rv = 0;
+ int rv = 1;
/* make sure everything is clean */
(void) memset(prefs, 0x0, sizeof(*prefs));
/* set up default values */
if (!bozo_set_pref(httpd, prefs, "server software", SERVER_SOFTWARE))
- rv = 1;
+ rv = 0;
if (!bozo_set_pref(httpd, prefs, "index.html", INDEX_HTML))
- rv = 1;
+ rv = 0;
if (!bozo_set_pref(httpd, prefs, "public_html", PUBLIC_HTML))
- rv = 1;
+ rv = 0;
if (!bozo_set_pref(httpd, prefs, "ssl timeout", SSL_TIMEOUT))
- rv = 1;
+ rv = 0;
if (!bozo_set_pref(httpd, prefs, "initial timeout", INITIAL_TIMEOUT))
- rv = 1;
+ rv = 0;
if (!bozo_set_pref(httpd, prefs, "header timeout", HEADER_WAIT_TIME))
- rv = 1;
+ rv = 0;
if (!bozo_set_pref(httpd, prefs, "request timeout", TOTAL_MAX_REQ_TIME))
- rv = 1;
+ rv = 0;
return rv;
}
Home |
Main Index |
Thread Index |
Old Index