eehouse@eehouse.org
32143d8116
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2011-03-31 18:19:31 -07:00
Andy2
9f76bdede9
hold mutex for slightly shorter time
2011-03-31 18:16:56 -07:00
Eric House
27346cf58b
change AIP to remove several stored messages at a time. Will use
...
later to delete messages after proxy fetches and ACKs them so traffic
isn't repeated.
2011-03-31 18:15:03 -07:00
Eric House
7aeb0a4df0
make default socket timeout 5 seconds, not 20.
2011-03-31 18:13:16 -07:00
Andy2
cd4ddd5dbb
fix help
2011-03-31 06:41:39 -07:00
Andy2
8bb2857e63
The relay is hanging inside recv(). Use setsockopt to set a 20-second
...
receive (and send) timeout on all sockets accept() returns. Sockets
that timeout should then get closed and dropped.
2011-03-12 05:13:54 -08:00
Eric House
e196cfb352
add state table entry lack of which caused a bunch of crashes in a
...
short time on the live relay. I'm not sure why it's needed, why they
happened only this time (likely due to a single device) or
alternatively why I don't see those crashes in testing, but the
addition doesn't break anything.
2011-02-04 05:41:44 -08:00
Eric House
dc82e57f14
add ability to fetch messages for more than one game at a time
2011-01-27 21:08:17 -08:00
Andy2
57ec020330
change format of reply to MSG_GET: include number of messages per
...
device to support fetching for more than one at once. This is
meaningless for rq as written now but a device will want to do this.
2011-01-27 06:37:36 -08:00
Eric House
63d16a99a2
turn off http view
2011-01-24 22:20:01 -08:00
Andy2
42d1a713c9
add new -f flag to invoke new fetch-message proxy command. Write the
...
results to stdout in stream format (len + message). Goal is to be
able to pipe output to the linux clients to test.
2011-01-22 12:54:47 -08:00
Andy2
f96f4a040b
add new proxy command that fetches actual messages stored for a device.
2011-01-22 12:52:26 -08:00
Andy2
96fead3164
add msglen column to msgs table to be used to avoid calculating size
...
later. Stores size of string as it was passed to db, not as stored.
2011-01-21 06:46:49 -08:00
Eric House
725888cb6c
run proxy sockets through same thread pool as game sockets. This
...
prevents race conditions that are turning up when I'm running multiple
threads -- by allowing me to really not be running multiple threads.
Tested with the usual script.
2011-01-20 18:14:56 -08:00
Andy2
b506673946
use only one thread until race condition's fixed
2011-01-19 18:36:50 -08:00
Andy2
3ae62e4704
use an index rather than a ptr to track fd array (so a parallel array
...
can be added)
2011-01-19 18:36:24 -08:00
Eric House
720f78d18a
get rid of ivars used only for http UI
2011-01-04 21:43:10 -08:00
Eric House
11d7de5f0d
display the number of devices (pids) running
2010-12-21 20:52:01 -08:00
Eric House
b65338b643
script for use on relay host
2010-12-07 20:46:02 -08:00
Eric House
d1244da284
script encapsulating sql query that's useful to run (with 'watch') along with discon_ok2.sh
2010-12-02 22:29:36 -08:00
Eric House
ae9dbd1e5c
create mtimes array rather than mtimes timestamp
2010-12-01 21:09:25 -08:00
Eric House
4bd5553596
track mtime per host rather than per game -- make it an array in the db.
2010-12-01 21:08:22 -08:00
Andy2
1720fbbd50
fix parsing of relay ids by replacing separating \n with \0.
2010-11-23 17:46:16 -08:00
Andy2
daecc807c1
don't init nPerDevice, and deal with it not being inited.
2010-11-22 20:43:37 -08:00
Eric House
b91187d6a5
test result when parsing; drop if didn't parse
2010-11-16 20:30:43 -08:00
Eric House
4c6c3c1ded
when marking a device in a dead game, negate its nperdevice entry rather than always using -1.
2010-11-16 20:28:53 -08:00
Andy2
635ae053b6
cut down on printing; don't assert-fail when relay's crashed.
2010-11-15 20:40:59 -08:00
Andy2
2c5c7a0dd1
init m_nRoomsFilled -- not sure when this http view feature broke
2010-11-15 20:08:59 -08:00
Andy2
ea292c7e2f
exclude dead games when looking for open public rooms
2010-11-15 19:01:11 -08:00
Andy2
c6bd2125a4
java uses '/' to delimit device id, so we'll make that standard.
2010-11-15 18:27:36 -08:00
Andy2
c36679fe13
init isDead to false. Fixes prolem where if DB entry's missing the
...
value is uninitialized and so device gets warned that other device
resigned even if none did.
2010-11-15 18:21:40 -08:00
Andy2
d4e810c9cb
delimiter changed
2010-11-15 06:51:05 -08:00
Andy2
ce5738a4e1
write the count
2010-11-15 06:50:09 -08:00
Andy2
edf0c40904
track isDead when creating SafeCref for devgone
2010-11-15 06:49:41 -08:00
Andy2
2c9f2572a8
use GameFull()
2010-11-15 06:48:57 -08:00
Andy2
feca7345dc
add GameFull -- database, not in-memory state, knows if game is full.
2010-11-15 06:48:36 -08:00
eehouse@eehouse.org
14579c6e30
Merge branch 'relay_proxy' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into relay_proxy
2010-11-14 19:40:35 -08:00
Eric House
528ae0c986
allow more than one device death per message
2010-11-14 15:19:38 -08:00
Eric House
a8ac30b180
add -d option to test dev-gone on relay
2010-11-14 15:18:49 -08:00
Andy2
43896ff187
remove unused method and variable
2010-11-12 18:25:15 -08:00
Andy2
0787a06eb5
accept new message from device announcing the death of a game
...
(including seed so it's harder to spoof); respond to that by setting a
DEAD column in the db and flagging the device as gone. Notify any
connected device of the fact. Refuse to accept new connections to
that game. As already-connected devices reconnect, allow them to do
so but send a new status message that their game is dead. Not heavily
tested yet.
2010-11-11 06:40:50 -08:00
Andy2
3d59bc7e39
add new DEAD column to track when a game's been deleted
2010-11-11 06:29:21 -08:00
Andy2
04e1b0c22b
new constants, include new status event type, for relay to accept
...
notification of deleted game and communicate that to others in the
game as they connect.
2010-11-11 06:26:59 -08:00
eehouse@eehouse.org
7929167129
Merge branch 'android_branch' into relay_proxy
2010-11-10 07:06:10 -08:00
Andy2
c8d7ca40a5
use \1 instead of \n as delimiter -- in case somebody passes as string
...
containing a \n.
2010-11-09 18:02:22 -08:00
Andy2
0f111ab363
use PQexecParams instead of PQexec for queries involving strings from
...
users (i.e. room names) to avoid crashes when the contain apostrophes
-- and in general to be safer.
2010-11-09 17:27:33 -08:00
Eric House
2a2f4d4395
been a while since cvs...
2010-11-09 05:53:49 -08:00
Andy2
d2782af487
do case-insensitive comparison of room names
2010-11-06 18:52:10 -07:00
Andy2
d1fcdb69da
double max room name len since the old value was too small -- only
...
filled half a text field on android
2010-11-03 18:38:43 -07:00
Andy2
c7febf0d10
nuke unused constant
2010-11-03 18:30:05 -07:00