]> git.pond.sub.org Git - empserver/commit
Reimplement max_idle without a separate thread
authorRon Koenderink <rkoenderink@yahoo.ca>
Sun, 1 Feb 2009 12:22:26 +0000 (06:22 -0600)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 1 Feb 2009 16:06:33 +0000 (17:06 +0100)
commit08b94556826ec883ab68c736ad8494118511446c
treec0ca75724b389602124cd72a94dce0d5ad0485ed
parenta7ee69d1126646082ce4354fe4d01057c21c3a83
Reimplement max_idle without a separate thread

Remove the KillIdle thread.  Add timeout to struct iop, initialized in
io_open().  Obey it in io_input() by passing it to empth_select().  If
empth_select() times out, report that back through io_input() to
recvclient() and player_login().  If player_login() receives a timeout
indication, print a message and terminate the session.  If
recvclient() receives a timeout indication, flash a message to the
player and initiate a shut down the player's session.

Create WIN32 sys/time.h to define struct timeval.  This creates some
conflicts with WIN32 windows.h definitions.  Including windows.h in
show.c and info.c creates conflicts, so remove that.  Modify service.c
to include sys/socket.h instead of windows.h to remove the conflict
with sys/time.h.
18 files changed:
include/empio.h
include/empthread.h
include/lwp.h
src/lib/commands/info.c
src/lib/empthread/io.c
src/lib/empthread/lwp.c
src/lib/empthread/ntthread.c
src/lib/empthread/pthread.c
src/lib/lwp/lwpint.h
src/lib/lwp/sel.c
src/lib/player/accept.c
src/lib/player/login.c
src/lib/player/recvclient.c
src/lib/subs/show.c
src/lib/w32/service.c
src/lib/w32/sys/time.h [new file with mode: 0644]
src/server/idle.c [deleted file]
src/server/main.c