Mostly made changes to allow client_gets to handle reading a buffer
authorStu Mark <theeverything@citadel.org>
Thu, 22 Feb 2001 18:22:39 +0000 (18:22 +0000)
committerStu Mark <theeverything@citadel.org>
Thu, 22 Feb 2001 18:22:39 +0000 (18:22 +0000)
commitdf9cfa890ae9bae4eea546f3f1ae51fafdcf3295
tree2948885e43ba8c8c7098602062ac47f800096bb9
parentacac87112beede73fcfb774b7eca438874aa0436
Mostly made changes to allow client_gets to handle reading a buffer
larger than SIZ. This required changes all over the place.
Most of the changes in source were just putting an i in front of the
cmdbuf variable name for the purpose of having the compiler point out
to me everything that I had to fix. Sorry if this is bothersome, but
I know I fixed every last one of them.
I tried to follow functionality to see where the bigger buffer might
cause a problem dealing with a smaller buffer. In most cases this was
in the extract function and lprintf.
extract is now limited to one token being of max size SIZ. Lprintf now
does a pre-printf to size the buffer it's going to need to print. If
this is a performance problem then we'll have to rewrite lprintf.
Also added getmem, freemem, reallocmem to the debugging version of
the mallok/phree reallok functions. They basically just check for
memory overruns upon freeing the memory. I figured it couldn't hurt
and I thought you might find it useful.
added 2 vars to the citsession to hold the dynamic buffer for input
per session. gets freed on session close, so their should be no
memory leak.
there's a couple of places where I left source in with that are
commented out. This is just for reference so you can see what I did.
remove them if you find them annoying (ex: oldclient_gets())
fiddled with the control file reader to use the new buffer thing too
had to change to make it read right.
for example, clients_gets used to read into the buffer, now
it gets string copies out.
hmmm.. there may be overruns there, let me check that.

One thing I'd like to say is that I couldnt' test everything because
I don't know how to get everything to run, but I changed everything
in the same manner and I tested some of it, so I think the other
changes should be fine. Let me know if you see a problem.
17 files changed:
citadel/ChangeLog
citadel/citserver.c
citadel/control.c
citadel/msgbase.c
citadel/room_ops.c
citadel/serv_bio.c
citadel/serv_chat.c
citadel/serv_imap.c
citadel/serv_network.c
citadel/serv_pop3.c
citadel/serv_smtp.c
citadel/serv_vandelay.c
citadel/serv_vcard.c
citadel/server.h
citadel/sysdep.c
citadel/sysdep_decls.h
citadel/tools.c