Commit graph

47 commits

Author SHA1 Message Date
Eric House
19573af533 a more elegant way of building up params to pass to PQexecParams 2014-04-25 18:45:51 -07:00
Eric House
1f698eae6d use ccache for relay build too 2014-01-25 19:03:50 -08:00
Eric House
e8616735b6 move .o files into an obj directory 2013-10-21 18:52:12 -07:00
Eric House
31fa2ea442 turn on feature where sent messages are marked rather than deleted.
Make default 'epoch' rather than NULL so constraint will work to
prevent duplicates, and fix insertion SQL to not violate constraint.
2013-09-25 06:38:10 -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
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
acca4d14d4 new files to track how long it's been since data's been received from
a UDP address.  The idea's that when there's too long a gap the
address has likely been recycled and we shouldn't send replies to
packets received before the reset.
2013-07-22 07:26:14 -07:00
Eric House
2ce097629f log contents of udp packets as b64-encoded strings for debugging; off
by default.
2013-07-18 06:52:07 -07:00
Eric House
23c66e93ab add flag required to compile on some linux systems 2013-07-05 08:02:22 -07:00
Eric House
5e0fd89c9e update with all relay/ changes from gtk_multigame. This is what the
live relay's running anyway.
2013-02-04 06:08:39 -08:00
Eric House
c567647a8d get rid of mapping of socket->game_connection, which will not work
once UDP sockets and/or per-device (not per-game) connections come
along.  Lots of changes, most not involving code flow but a couple
that did.  So far two gtk games can connect and exchange moves.
Haven't tested reconnection or store-and-forward.
2013-01-12 16:09:24 -08:00
Eric House
2859ec9132 stime is the name of the column in actual use 2012-12-01 10:31:55 -08:00
Eric House
694857dd4e add, but disable with compile flags, ability to mark sent messages
with a timestamp rather than delete them.  Plan is to experiement with
this as a way of keeping devices from sending too many identical
messages when GCM's in use -- since constraints on the msgs table will
not allow identical messages to be added.
2012-11-15 06:25:22 -08:00
Eric House
37c698f41b fix link problem with upgrade from natty to oneiric (Ubuntu): -lpq
param must follow object file list.
2012-10-19 17:54:18 -07:00
Andy2
e886a1aefe lots more changes -- another snapshot, this, rather than stuff
carefully polished and reviewed.  Shows progress, though, in getting
through tests.
2011-06-23 07:12:50 -07:00
Andy2
3ebcc01e86 beginning -- this is a snapshot -- of rewrite of how relay keeps
multiple thread out of a single game.  Add new class that locks
per-cid and start using it.  Very incomplete.
2011-06-22 06:51:26 -07:00
Eric House
63d16a99a2 turn off http view 2011-01-24 22:20:01 -08:00
Andy2
2ec67c8ed1 finish rq to work with current format; add to makefile 2010-09-21 06:26:49 -07:00
Eric House
d0e707a48e get started with test/cmdline app to query relay's new proxy interface. 2010-09-16 20:13:24 -07:00
Eric House
87de53cf96 add new class to interface with postgres database in an experiment to
simplify things by using a db to survive a crash/reboot.  So far (with
next checkin) manages to update a db.  Next need to do queries instead
of searches through in-memory data.
2010-09-11 19:44:37 -07:00
Andy2
f7c5ff619d turn off heartbeats 2010-09-10 01:24:03 -07:00
Andy2
41f8f574b1 use git describe for version info/stamp 2010-07-07 20:26:25 -07:00
Eric House
6456165a92 replace svnversion with gitversion.sh 2010-06-05 07:27:14 -07:00
ehouse
3b62e04d07 don't use -lmcheck. It causes a lot of crashes in places where it
certainly looks as if nothing is wrong.
2009-07-28 05:00:18 +00:00
ehouse
3bf116c936 Add an http interface (read-only web console). 2009-02-28 16:15:59 +00:00
ehouse
03c806e961 add tarball target to help 2009-02-21 17:15:09 +00:00
ehouse
1ac4ef3bc6 Attempt to detect connections that are duplicates by checking if that
socket is already in a connection.  This doesn't seem to always work,
and I may be leaking cref instances when it does, so needs debugging
still.
2009-02-01 16:00:20 +00:00
ehouse
9fc325a334 include new file in tarball 2008-12-31 04:16:55 +00:00
ehouse
32121c5634 include svnversion output in tarball 2008-12-30 05:17:00 +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
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
a8d3dbda66 Print svn rev number as part of usage() 2007-02-07 11:56:30 +00:00
ehouse
767b9f2908 initialize mutex before using; fixes a hang since could never aquire
lock.  (This bug has always been there, but didn't matter before;
maybe pthreads changed.)  Comment out self-spawning stuff until can
fix df-transfer problems.  Other minor changes around logging.
2007-02-06 05:52:22 +00:00
ehouse
5fbc89ae76 add tarball target for exporting enough code to build relay. 2007-02-04 01:22:31 +00:00
ehouse
a8463b9341 link pthreads in a way that works on freebsd too 2006-03-22 04:31:27 +00:00
ehouse
92485783af update email address in header comments: no code change 2006-01-08 01:25:02 +00:00
ehouse
cb3e2910b9 add commented out debug flag 2005-10-14 08:26:19 +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
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
db6f6c258d move to using a formal table-driven state machine for each game (cref
object).  While it makes things more complex at this point, it should
make it easier in the long run to add error handling, timeouts, etc.
2005-07-05 22:05:37 +00:00
ehouse
3054637842 heartbeats: send to clients in connection response; note when
heartbeat and other messages arrive; and periodically reap sockets
that haven't been active in long enough.
2005-06-23 04:26:44 +00:00
ehouse
423ff190ea turn on warnings 2005-04-08 14:11:00 +00:00
ehouse
3f64d755b6 break up compile; new file 2005-03-30 02:00:15 +00:00
ehouse
ab6d11a32a add two new .cpp files 2005-03-19 22:09:03 +00:00
ehouse
39225c8622 first checkin. Works about half the time for one or two games at a
time.  Very fragile.
2005-03-06 18:27:16 +00:00