Commit graph

230 commits

Author SHA1 Message Date
Andy2
f05bfcb3d8 log when dropping message that would mess up cref player counts 2010-07-16 06:23:20 -07:00
Eric House
a52fc5a4fd don't call removeSocket when none was added 2010-07-15 18:21:32 -07:00
Eric House
8e5abb189b add mutex for reconns too; log socket and ip addr connecting on it 2010-07-15 18:14:44 -07:00
Eric House
5ea1f3b470 list newest crefs first 2010-07-15 18:13:01 -07:00
Eric House
78f965b979 replace asserts that have been firing on integrating reconn events
with dropping the reconn messages; move log of state table lookup failure
into cref so cref id can be included
2010-07-14 21:32:19 -07:00
eehouse@eehouse.org
f9d8df8cea don't track xwrelay.conf so local changes don't show as local mods 2010-07-14 06:29:50 -07:00
Andy2
41f8f574b1 use git describe for version info/stamp 2010-07-07 20:26:25 -07:00
Andy2
5365ea4f4e fix crash when empty string given on ctrl port 2010-07-07 18:59:48 -07:00
Eric House
6456165a92 replace svnversion with gitversion.sh 2010-06-05 07:27:14 -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
8bb2fb9b09 track and display in web view the number of games actually joined
rather than the number attempted.
2010-05-28 02:31:27 +00:00
eehouse
c92d919934 log error from read 2010-05-26 02:25:58 +00:00
eehouse
7a279702c0 add sterrror to what's logged when pthread_create fails -- as is
happening often.
2010-05-20 04:28:07 +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
eehouse
4ed87fecb4 add once-per-day date line to logs since they can span weeks now. 2010-05-01 02:48:47 +00:00
eehouse
f4b64fe97d add option, off by default, to stall each message forward by some time
to better simulate network conditions when testing against local relay.
2010-03-28 16:09:07 +00:00
eehouse
e5f3384050 another .gitignore 2010-02-24 04:30:21 +00:00
ehouse
7ac98bfcfb Don't require a timeout waiting for a game to connect initially, and
make no timeout the default.
2009-12-27 18:17:24 +00:00
ehouse
a1be2fb8fc add ports relay is listening on to http display 2009-12-16 02:43:52 +00:00
ehouse
fc17df2a7e When guest connects, check if providing too many players before
reponding to connection request so that we just deny the request (with
new error code) rather than revoking it later.
2009-12-14 04:10:23 +00:00
ehouse
015b0d42d8 include title in head with summary readable in tab 2009-12-08 14:51:03 +00:00
ehouse
26469d734c Modify state machine and return new error codes to force host to
connect first, guests second, with clear error messages if the order's
wrong.  This seems to make it simpler for users to get a connection
right.  Code holding multiple games worth of hosts and guests in a
cref is gone.
2009-12-04 08:03:27 +00:00
ehouse
337c36dfd2 remove unused parameter 2009-12-04 07:59:07 +00:00
ehouse
7ad59e3e2b cleanup 2009-12-04 07:54:14 +00:00
ehouse
55478369e4 listen on only one port by default 2009-11-22 16:29:23 +00:00
ehouse
c1827562dc be consistent is use of variable vs real name 2009-11-10 14:37:42 +00:00
ehouse
2ecf415618 Remove on case where HandleEvents was being called recursively and
creating unexpected state transitions; add assert to catch any future
recursion.
2009-11-09 05:30:42 +00:00
ehouse
393cccb86c Add MSGONLY state to indicate cref being kept alive only to preserve
messages for a latter connection.
2009-11-09 05:29:06 +00:00
ehouse
aae12428da Add limited support for store-and-forward (where limitations include
that all devices must be connected initially and that it's all memory
based so a crash wipes stored messages.)  Accept messages for
forwarding when in the MISSING state, not just the ALLHERE state.
Store messages that can't be sent now, and send any that have
accumulated when a host reconnects.  When a cref loses its last
connection, keep it around unless it has no messages stored (as will
be the case when a game ends.)
2009-11-08 21:35:39 +00:00
ehouse
2d4ae3e44a When forwarding message, lookup cref by socket if cookieID == 0, as
can be the case when through to a non-all-connected game.
2009-11-08 21:32:36 +00:00
ehouse
8e0dad43c7 get rid of overlogged message 2009-11-08 21:25:43 +00:00
ehouse
ed52582ea4 get rid of states and code for checking numbers of players -- since
any number is allowed now.
2009-11-03 05:03:20 +00:00
ehouse
3bdfda6548 Make it possible for multiple games to connect using the same room
name.  All new connections are stored together, and after each
connection an attempt is made to build one complete game with a host
and however many guests.  All remaining devices are moved into a new
pending record in the same state, and the completed game is treated as
always.  Seems to work, though nearly 20% of linux instances are
failing to connect the relay run from the new test script samename.sh.
Need to figure out why.

Also added logging of seed and connname to comms.c since games
launched together can no longer be certain to connect on the relay.
This allows the test script to identify joined games from their logs
and detect success or failure.

This checkin changes the relay protocol, so relay and clients will
both need to be upgraded.
2009-11-02 01:01:47 +00:00
ehouse
11b586cd4b lookup hearbeat recipient by socket rather then cookieID since
cookieID isn't always correct until later
2009-11-02 00:45:54 +00:00
ehouse
7a71c4636b change varible names; remove instance variable than can be on the stack. 2009-11-01 01:38:03 +00:00
ehouse
0e43675abf Address problems matching [re]connections to games: first, go back to
setting connName when all in a game are present.  Second, have every
host include in connections a random number.  That number is made part
of the connName and in general used to test whether a host belongs in
a particular game.  Add this "seed" to web interface.  Means new
versions for relay protocol and game stream format.  Latter is handled
correctly so older games can be opened.
2009-09-26 14:37:49 +00:00
ehouse
030ae52a4b Store start time as time_t rather than string. 2009-09-26 14:05:51 +00:00
ehouse
b219e8b279 Send notification when device disconnnects without closing socket (in
addition to the existing one sent when a socket is closed).
2009-09-20 18:47:47 +00:00
ehouse
ffacbcb36a Move "For" column left. 2009-09-19 04:59:19 +00:00
ehouse
45bdccd4e8 Format time more compactly 2009-09-18 03:50:01 +00:00
ehouse
a9e8f5b493 shorten column headings; don't assign cid until game is full. 2009-09-17 03:42:12 +00:00
ehouse
d5d20293ce print log timestamps with padding 0s for better sorting 2009-09-15 12:54:40 +00:00
ehouse
135048a3cf Extend name change to relay's web interface 2009-09-14 03:31:54 +00:00
ehouse
18e9301e87 rename Cookie to Invite, a change that may change. Rename everywhere
in clients but not in relay where cookie is too pervasive.  (There are
no code changes in this checkin.)
2009-09-14 03:11:11 +00:00
ehouse
6603949b0e Fix bug where device quitting one game to start another with same
cookie winds up connecting to the old game -- by flagging a cref as
full and no longer accepting connections without connNames even when
in the MISSING state.  Required a protocol changes so that devices get
their connNames as early as possible.
2009-09-14 01:55:03 +00:00
ehouse
7eeede45c3 exit if unable to open socket 2009-09-13 15:27:19 +00:00
ehouse
7ca629a2f5 don't log socket closing as an error 2009-09-04 11:02:09 +00:00
ehouse
95a70862be Lock cref before calling method that assumes lock. 2009-08-30 15:18:40 +00:00
ehouse
2a569df97f For privacy, don't show host IP unless connection is local. 2009-08-30 15:16:06 +00:00