Eric House
b43855a313
fix curses build for 64bit compile and to use common layout (meaning
...
tray is now under the board unstead of to the right). Works on 64-bit
system at least for non-networked games.
2014-01-05 13:04:59 -08:00
Eric House
a33f04e077
fix shutdown to work (by sending signal)
2013-10-25 06:16:17 -07:00
Eric House
bb246fd7e7
rename printf -> catf; no other changes
2013-10-09 20:20:45 -07:00
Eric House
032f8c1f99
add ctrl port command to post UPGRADE message to clients
2013-09-03 06:52:02 -07:00
Eric House
8da0b73744
replace string_printf() with new class derived from std::string with
...
printf() method.
2013-09-02 13:17:42 -07:00
Eric House
a95d620b09
Make ack timeout settable from ctrl port; add ctrl facility to print
...
and nack outstanding acks.
2013-08-31 08:30:25 -07:00
Eric House
c4cf8b3c3c
make 'devs print' take multiple devid args; rename args to argv everywhere.
2013-08-28 19:23:40 -07:00
Eric House
b5f35fab78
unescape things like '\n' in messages
2013-08-28 08:00:21 -07:00
Eric House
2e7433f2b2
change 'devs msg' command to send to a list, or to all
2013-08-28 07:29:23 -07:00
Eric House
cf3437c686
fix argc checking to prevent crashes
2013-08-23 07:44:42 -07:00
Eric House
16aafccec6
to telnet interface add ability to forget device and to send to one
...
not known (which will make message available next time it connects or
via GCM); rename methods.
2013-08-22 06:29:20 -07:00
Eric House
84d06b9fed
use g_shell_parse_argv() to parse input buf (so messages can be in
...
quotes and contain whitespace)
2013-08-19 08:25:06 -07:00
Eric House
0868a33c83
print out whether message is ACK'd or not
2013-08-18 20:52:09 -07:00
Eric House
47203437cc
register devices more often; add ctrl command to send text message to
...
device if possible, otherwise to post it to the db (mostly for testing).
2013-08-17 14:55:19 -07:00
Eric House
6a27bbba94
tweaks to new ctrl command
2013-08-15 19:22:23 -07:00
Eric House
62f0819a82
Toward resurrecting ctrl feature to give runtime info about stuff that
...
isn't in the DB. Step one: comment out the stuff that doesn't compile
and add ability to print all registered devices with their ages.
2013-08-15 08:44:33 -07:00
Eric House
d9ca6f5e11
block TERM and INT from all but the main thread. (Pretty much untested; doesn't fix hang-on-SIGINT.)
2010-10-04 20:03:19 -07:00
Andy2
df1ec1628a
replace killSocket(), which jumped right into crefmgr and could get
...
ahead of processing data arrived on the same socket, with EnqueueKill
that adds to same queue from which data's taken. So if device dies
immediately after sending data there won't be a race between closing
the cref (if this is the last open socket) and handling the data. I'm
still dying with assert fails when running 100 games at once, but much
less frequently
2010-09-18 08:47:56 -07:00
Andy2
5365ea4f4e
fix crash when empty string given on ctrl port
2010-07-07 18:59:48 -07:00
Eric House
8aaaa06bcb
identify rev number as from git
2010-06-05 07:25:24 -07:00
ehouse
43181f5cd2
accept multiple cref ids and names on console
2010-06-03 03:00:35 +00:00
eehouse
3e83f50c84
use strcasecmp rather than strcmp on cookies (room names) to make
...
rooms case insensitive.
2010-05-01 02:49:19 +00:00
ehouse
45bdccd4e8
Format time more compactly
2009-09-18 03:50:01 +00:00
ehouse
493d3c226f
log when crash
2009-08-20 12:12:43 +00:00
ehouse
acbf8180ef
add missing lock(); track and display uptime of daemon child as well as parent
2009-07-31 12:56:04 +00:00
ehouse
503db9cc6f
up copyright
2009-07-30 12:54:17 +00:00
ehouse
8284799abe
Fix crashes resulting from deleting cref instances in one thread while
...
another wanted to operate on them. The root problem is that you can't
dispose of a mutex while somebody's blocking on it. So now the
locking mutexes live inside the cref class. When the lock owner
realizes the cref needs to die, it sets a flag and it's moved to a
recycled list. A thread blocking on the mutex will then get it, but
checks the flag and releases it immediately if it's being recycled.
(Also improve the http interface a bit.) With these changes I've run
31K (and counting) games against the relay without a crash or deadlock
(using sim_real.sh.) The main problem that remains is that sometimes
two games using the same cookie wind up with two crefs (and so never
connect.)
2009-07-28 05:15:26 +00:00
ehouse
8a0d963c95
include abbreviated uptime in stat row
2009-07-16 02:56:25 +00:00
ehouse
fbe95478ba
rename now() as uptime(); drop NTHREADS to 1 for now; include time of
...
server boot in connName and keep counter in memory rather than a file.
2009-03-10 12:52:17 +00:00
ehouse
1b49a26736
do loglevel and ports via the general-purpose config mech. No special
...
cases remain.
2009-03-05 13:49:01 +00:00
ehouse
3bf116c936
Add an http interface (read-only web console).
2009-02-28 16:15:59 +00:00
ehouse
ea6fff8f28
replace int with bool where appropriate; fix to compile with newer g++
2008-12-30 05:13:30 +00:00
ehouse
4c191e0755
Don't specify g++ version; add some consts to fix warnings with newer g++.
2008-05-21 03:49:11 +00:00
ehouse
da93ed5b31
Don't use uninitialized values as port numbers; use match for set as well as get.
2007-12-03 00:45:09 +00:00
ehouse
25c4368231
Start adding ability to listen on multiple sockets and to dynamically
...
change the set listened on. There's still some debugging to do but
nothing that worked before is broken. Also begin to accept unique
prefixes (e.g. g for get) for commands and attributes on the control
port. Note that relay-related code in comms seems broken now, but is
without this checkin.
2007-12-01 15:00:30 +00:00
ehouse
8dbfe4ed79
fix new compiler warnings; daemonize, and add handler to kill child if
...
parent dies so that script can kill based on pid file.
2007-11-13 03:53:10 +00:00
ehouse
0291ec1e75
Turn on self-spawning: main loop should never crash but exists only to
...
respawn child when it does. Add crash command to test this. Add
ability to set logging level from ctrl port.
2007-11-10 05:41:49 +00:00
ehouse
9f23c4b4d9
Replace ints with bools; add rev command; fix bug by reiniting args with each
...
command so they don't hold previous values.
2007-02-07 13:22:40 +00:00
ehouse
92485783af
update email address in header comments: no code change
2006-01-08 01:25:02 +00:00
ehouse
deb0a2d265
shutdown in response to SIGINT
2005-10-23 15:49:48 +00:00
ehouse
4df7b3d75a
add uptime
2005-10-19 03:39:18 +00:00
ehouse
74b6ccbd52
cleanup ctrl printing; repeat most recent command; cleanup internal names.
2005-10-16 01:19:25 +00:00
ehouse
936e3bd110
clean up command help
2005-10-15 16:28:26 +00:00
ehouse
b7e3479989
print prompt
2005-10-14 08:26:56 +00:00
ehouse
4e5f69f4e8
rename states so can format to 80 cols; add log level param. No
...
change to functionality in this checkin.
2005-10-02 16:08:42 +00:00
ehouse
77319b570d
make transmitted vars smaller where possible; new relay identifying
...
scheme where cookie is used only to connect, and is replaced for
reconnects by a relay-generated name that's supposed to be unique
across all games on all relays and includes a hostname read in from
config file; relay assign non-servers' hostIDs.
2005-10-01 16:33:45 +00:00
ehouse
f944b154fc
fix print_cookies to use iterator
2005-09-14 05:14:41 +00:00
ehouse
8f32f4f99a
loads of changes: get settings from config file; remove sockets and
...
kill crefs via state machine, and protect access to a cref so it can
die without another thread being in it; do timers via timeout to
poll() rather than interrupt (and integrate into state machine);
detect when all players are present and change state so new
connections on that cookie will get a new cref.
2005-09-02 06:56:34 +00:00
ehouse
40351e187b
add several new commands
2005-04-20 11:57:26 +00:00
ehouse
a809a057e4
mutex replaced by rwlock
2005-04-08 14:17:28 +00:00