Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/httpd Fix handling of bozo_set_timeout() timeouts (a...



details:   https://anonhg.NetBSD.org/src/rev/3759a9581463
branches:  trunk
changeset: 446712:3759a9581463
user:      leot <leot%NetBSD.org@localhost>
date:      Sat Dec 15 12:43:24 2018 +0000

description:
Fix handling of bozo_set_timeout() timeouts (and `-T' option parsing)

diffstat:

 libexec/httpd/bozohttpd.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r 9c6fd91752fc -r 3759a9581463 libexec/httpd/bozohttpd.c
--- a/libexec/httpd/bozohttpd.c Sat Dec 15 12:39:22 2018 +0000
+++ b/libexec/httpd/bozohttpd.c Sat Dec 15 12:43:24 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bozohttpd.c,v 1.105 2018/12/15 12:39:22 leot Exp $     */
+/*     $NetBSD: bozohttpd.c,v 1.106 2018/12/15 12:43:24 leot Exp $     */
 
 /*     $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $      */
 
@@ -398,7 +398,7 @@
 bozo_set_timeout(bozohttpd_t *httpd, bozoprefs_t *prefs,
                 const char *target, const char *val)
 {
-       const char *cur, *timeouts[] = {
+       const char **cur, *timeouts[] = {
                "initial timeout",
                "header timeout",
                "request timeout",
@@ -408,9 +408,9 @@
        const size_t minlen = 1;
        size_t len = strlen(target);
 
-       for (cur = timeouts[0]; len >= minlen && *cur; cur++) {
-               if (strncmp(target, cur, len) == 0) {
-                       bozo_set_pref(httpd, prefs, cur, val);
+       for (cur = timeouts; len >= minlen && *cur; cur++) {
+               if (strncmp(target, *cur, len) == 0) {
+                       bozo_set_pref(httpd, prefs, *cur, val);
                        return 0;
                }
        }



Home | Main Index | Thread Index | Old Index