Source-Changes-HG archive

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

[src/trunk]: src/share/man/man3lua drop redundant repeat-until l...



details:   https://anonhg.NetBSD.org/src/rev/b4b4776a4698
branches:  trunk
changeset: 318839:b4b4776a4698
user:      sevan <sevan%NetBSD.org@localhost>
date:      Sun May 06 14:41:01 2018 +0000
description:
drop redundant repeat-until loop for now. read_request & process_function
functions need further investigation as to why this is not required. In the C
daemon, at the end of main.c this is the exact behaviour that's used.

heads up <wiz> regarding infinite loop.

diffstat:

 share/man/man3lua/bozohttpd.3lua |  13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diffs (34 lines):

diff -r 1a4cb644ddad -r b4b4776a4698 share/man/man3lua/bozohttpd.3lua
--- a/share/man/man3lua/bozohttpd.3lua  Sun May 06 14:25:48 2018 +0000
+++ b/share/man/man3lua/bozohttpd.3lua  Sun May 06 14:41:01 2018 +0000
@@ -1,4 +1,4 @@
-.\"     $NetBSD: bozohttpd.3lua,v 1.2 2018/05/05 16:24:26 wiz Exp $
+.\"     $NetBSD: bozohttpd.3lua,v 1.3 2018/05/06 14:41:01 sevan Exp $
 .\"
 .\" Copyright (c) 2018 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 5, 2018
+.Dd May 6, 2018
 .Dt BOZOHTTPD 3lua
 .Os
 .Sh NAME
@@ -74,12 +74,9 @@
 bozo.set_pref(myhttpd, prefs, "port number", "8080")
 bozo.set_pref(myhttpd, prefs, "background", 1)
 bozo.setup(myhttpd, prefs, "www.example.com", "/var/www")
-local numreps = 0
-repeat
-        req = bozo.read_request(myhttpd)
-        bozo.process_request(req)
-        bozo.clean_request(req)
-until numreps == 0
+req = bozo.read_request(myhttpd)
+bozo.process_request(req)
+bozo.clean_request(req)
 .Ed
 .Sh SEE ALSO
 .Xr lua 1 ,



Home | Main Index | Thread Index | Old Index