Commit graph

6492 commits

Author SHA1 Message Date
Eric House
af58e7c4e1 comment 2013-01-24 20:27:56 -08:00
Eric House
084643ca82 don't include dead-game messages when fetching for devices 2013-01-24 20:27:36 -08:00
Eric House
7253cfa313 assert that map.insert() is actually doing something in those cases
where I expect it to.
2013-01-24 19:34:20 -08:00
Eric House
036c908b72 remove token from XWPDEV_HAVEMSGS message 2013-01-24 19:33:33 -08:00
Eric House
5f2d628855 update protocol description 2013-01-24 19:33:02 -08:00
Eric House
55c117c9fc fix assert by nulling out variable 2013-01-24 19:25:32 -08:00
Eric House
481e50aaae don't bother pushing do-we-ack decision out of static method 2013-01-24 19:23:05 -08:00
Eric House
498498a2bf remove gameToken param from XWPDEV_HAVEMSGS message since it's for the
whole device rather than one game on it.
2013-01-24 19:20:35 -08:00
Eric House
0fad19e38a make it possible to mix udp and non-udp games (which currently crashes the relay very rarely) 2013-01-24 18:56:10 -08:00
Eric House
481f344ff4 fix failure to clean up on exit 2013-01-24 08:08:53 -08:00
Eric House
cbb82eb5e8 add --via-udp option -- which causes app to crash because the memory
leak detector is working
2013-01-24 08:00:53 -08:00
Eric House
9f3250cb3f make curses version use udp socket when --db param passed. There's no
UI for the DB and the assumption is only one game will be stored but
this should let the test script be modified to test the new protocol.
2013-01-24 07:49:49 -08:00
Eric House
c465a0bb0c add loop to print when packets haven't been ack'd 2013-01-24 07:43:24 -08:00
Eric House
da4d841220 use per-device UDP rather than per-board TCP to communicate with
relay, including latest UDP protocol and acking changes.  Basically
works (in emulator at least) but there are problems especially with
initial game creation.
2013-01-23 07:46:13 -08:00
Eric House
12f70154a0 changes for includes-messageID-please-ack protocol addition 2013-01-23 07:43:58 -08:00
Eric House
ce7cdab3f0 add msgid and acking to protocol -- maybe for debugging only. 2013-01-23 07:40:52 -08:00
Eric House
ff70e3fbc2 fix use of map.insert: check for existing key and overwrite value 2013-01-23 07:35:20 -08:00
Eric House
a3e4e31205 remove logging 2013-01-23 07:28:25 -08:00
Eric House
8c0984fb7a Merge remote-tracking branch 'origin/gtk_multigame' into gtk_multigame 2013-01-22 06:54:42 -08:00
Eric House
2d7977e4b5 fix test: unset TEXT column returns as "", not NULL. 2013-01-22 06:52:50 -08:00
Eric House
c839db4a25 disconnect from relay no matter what the state 2013-01-22 06:12:55 -08:00
Eric House
29acab1ef2 tweak display 2013-01-21 19:44:08 -08:00
Eric House
90b8f966f6 comment out unnecessary assert 2013-01-21 19:40:56 -08:00
Eric House
2744e8698c optionally (compile-time change for now) store message data as
b64-encoded TEXT instead of BYTEA, which on my laptop is getting
corrupted sometimes.
2013-01-21 19:40:20 -08:00
Eric House
d374d0f3d8 optionally (compile-time change for now) store message data as
b64-encoded TEXT instead of BYTEA, which on my laptop is getting
corrupted sometimes.
2013-01-21 19:39:57 -08:00
Eric House
ae9ec31863 don't call g_main_loop_quit() from inside signal handler: it doesn't
work on Ubuntu LTS at least.  Instead write to a "quit pipe" and exit
the loop from the pipe's reader back outside exception context.
2013-01-21 18:57:48 -08:00
Eric House
a6b3cb8cbe add new param JNIThread requires 2013-01-20 21:34:28 -08:00
Eric House
de7c29dcc7 add comms_stop() to jni and use it 2013-01-20 21:33:35 -08:00
Eric House
132a495c4f add explanatory comment 2013-01-20 21:32:19 -08:00
Eric House
991cc8f04c fail in main mode if udp socket not set 2013-01-20 21:03:43 -08:00
Eric House
e79b0bd3eb Merge branch 'gtk_multigame' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into gtk_multigame 2013-01-20 19:27:50 -08:00
Eric House
21570ec9b4 Merge remote-tracking branch 'origin/android_branch' into gtk_multigame 2013-01-20 19:27:25 -08:00
Eric House
3df0484e6a get maintenance mode message into an alert -- and create a new common
superclass for Service subclasses to reuse some code.
2013-01-20 16:07:38 -08:00
Eric House
fd2f4309f4 beginning of android changes to talk udp to the relay: sufficient to
get back (and log, not display) a message when the relay is in
maintenance mode.
2013-01-20 15:29:51 -08:00
Eric House
93ff4f4fcb handle the new length-plus-string format 2013-01-20 13:07:01 -08:00
Eric House
016b16a8b2 change relay alert message format to length-plus-string rather than
null-terminated for easier handling on the java end.
2013-01-20 13:06:34 -08:00
Eric House
3fc31a6fe1 new enum for alert 2013-01-20 10:04:24 -08:00
Eric House
9023440a88 reply with alert to any connection attempt when in maint mode 2013-01-20 10:03:20 -08:00
Eric House
f06d129c24 change env variable name; provided inital board size and dict choices 2013-01-20 09:53:26 -08:00
Eric House
b768d8fccc fall through to using hard-coded maxsocks value 2013-01-20 09:22:35 -08:00
Eric House
3dfb2e04e6 call comms_close in curses too to avoid new assert 2013-01-19 22:53:25 -08:00
Eric House
3313c776ab fix unregister sql error 2013-01-19 22:37:12 -08:00
Eric House
3bcf5d504b add a debug pref for turning on UDP-based networking (ignored so far) 2013-01-19 16:03:29 -08:00
Eric House
360602b3a0 fix compile failure: never meant to check this change in. 2013-01-19 16:02:58 -08:00
Eric House
6797e069bc Merge branch 'android_branch' into gtk_multigame 2013-01-19 15:56:16 -08:00
Eric House
54ad381749 Merge remote-tracking branch 'origin/android_branch' into android_branch 2013-01-19 15:54:40 -08:00
Eric House
0ef3549a4e handle (display) the relay's new error message 2013-01-19 15:18:36 -08:00
Eric House
65e9789c3f add mainentance mode, triggered by a commandline flag, that does
nothing but loop waiting for connections on the UDP socket and sending
them back the error message provided on the commandline.
2013-01-19 15:17:51 -08:00
Eric House
1bb9f9b1bf handle sending of messages generated by games opened only to receive
messages from relay.  And handle report that relayID is bad.
2013-01-19 14:37:49 -08:00
Eric House
63d3f70cdf more changes to storage and fetching of messages and to protocol so
presence of messages is reported on connect (as are bad relayIDs).
Now a game with a robot player in a "closed" game can continue.  Once
the next set of linux-side chances is committed.
2013-01-19 14:34:04 -08:00