From 798574a8a583f9352b3ca073b952939a94fd95fe Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Tue, 10 Apr 2012 00:18:59 -0400 Subject: [PATCH] ... --- gopher-server.rb | 1 + readline2.c | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/gopher-server.rb b/gopher-server.rb index d6b0da3..cd3aedc 100644 --- a/gopher-server.rb +++ b/gopher-server.rb @@ -164,6 +164,7 @@ loop do end client.close() + puts("connection closed") end end diff --git a/readline2.c b/readline2.c index da406af..c7f62b4 100644 --- a/readline2.c +++ b/readline2.c @@ -1,6 +1,6 @@ #include "readline2.h" #include - +#include static LongWord find_crlf(const char *cp, LongWord length) { @@ -87,7 +87,7 @@ Word ReadLine2(Word ipid, rlBuffer *buffer) if (!buffer) return 0; // ? - buffer->bufferhandle = NULL; + buffer->bufferHandle = NULL; buffer->bufferSize = 0; buffer->terminator = 0; buffer->moreFlag = 0; @@ -103,7 +103,7 @@ Word ReadLine2(Word ipid, rlBuffer *buffer) if (state == TCPSCLOSED) return tcperrBadConnection; if (state < TCPSESTABLISHED) return tcperrNoResources; - h = (Handle *)ur->uwTCPDataIn; + h = (Handle)ur->uwTCPDataIn; // should never happen.... if (!h) return tcperrNoResources; cp = *(char **)h; @@ -174,7 +174,7 @@ Word ReadLine2(Word ipid, rlBuffer *buffer) buffer->bufferSize = size; buffer->bufferHandle = h; - buffer->term = term; + buffer->terminator = term; cp = *(char **)h; @@ -183,7 +183,7 @@ Word ReadLine2(Word ipid, rlBuffer *buffer) Word rv; rrBuff rb; - rv = TCPIPReadTCP(ipid, 0, cp, hsize, &rb); + rv = TCPIPReadTCP(ipid, 0, (Ref)cp, hsize, &rb); // tcperrConClosing is the only possible error // (others were handled above via the state).