Commit graph

814 commits

Author SHA1 Message Date
Eric House
b61e580b40 ignore .db files 2013-11-07 07:32:15 -08:00
Eric House
a26dced506 drawing tray tiles can fail, e.g. when font info not yet available, so
only clear bits when successful. Fixes problem where tray didn't get
drawn until tiles were somehow invalidated.
2013-11-07 07:29:54 -08:00
Eric House
9f1b0c5121 Specify relative height of scoreboard and tray in board_figureLayout,
and allow those to be 0.
2013-11-04 06:19:33 -08:00
Eric House
f0b554213b assert rect isn't too small to inset 2013-11-04 05:59:18 -08:00
Eric House
184ac28ebc fix to compile, and in gtk case to work, when COMMON_LAYOUT defined 2013-11-03 12:15:53 -08:00
Eric House
88b380503e add function, not compiled by default, to return bounding rect of all
non-empty tiles. As a test, add menu that uses it to grey out that
region.
2013-10-27 21:51:30 -07:00
Eric House
fe8bb0932c delete messages whose games have been deleted 2013-10-09 20:41:14 -07:00
Eric House
24509662e8 fix so standalone games don't crash! 2013-10-09 07:36:21 -07:00
Eric House
3b87c9562c formatting 2013-10-01 07:50:00 -07:00
Eric House
4d4f76c8ae assert not registering with RELAY_ID 2013-09-26 08:37:39 -07:00
Eric House
9169659c80 cleanup: let conversion to including devid and change in devid happen at different rates 2013-09-18 08:05:19 -07:00
Eric House
2629c07256 Address problem with devids (e.g. GCM): until now when you got a new
devid you tossed your relayID and reregistered.  Which meant any
existing messages meant for your relayID were orphaned, and any open
games didn't know who they belonged to until you reconnected to them
with your new relayID.  So: modify the UDP protocol (though not on
Android yet) to include both relayID and devid with registration, with
one or the other an empty string if not present or not changed from
earlier.  I can't fix existing clients that are dropping their
relayIDs, but when one does a re-connect without a relayID I can look
it up from the existing game record, then reuse it rather than issue a
new one.  Better than nothing -- and that protocol will be obsolete
soon anyway.
2013-09-14 21:06:14 -07:00
Eric House
c115752852 supply in linux client, and look for and store on relay, os version 2013-09-07 16:17:31 -07:00
Eric House
b3342c6e8a for --clean-start option, try not to remove games not created by this script. 2013-08-28 07:29:23 -07:00
Eric House
063b01d3d8 change most len-as-short+bytes strings to vli+bytes; add device model
to what's passed for device registration, and store it in a new column
in devices table.
2013-08-25 21:20:26 -07:00
Eric House
d10e9f6235 use vlis for acks in both directions 2013-08-25 16:59:07 -07:00
Eric House
7e02db78db change function name spelling 2013-08-25 16:14:42 -07:00
Eric House
91235f3be7 begin process of using variable-length-ints in udp protocol. Works
between linux client and relay, but unrelased features of Android
client will be broken until fixed.
2013-08-25 12:34:35 -07:00
Eric House
45998fd2c0 don't assert when packet size short is unexpectedly large. Not sure
why this happens, but it's not a reason to abort a test.
2013-08-21 21:28:47 -07:00
Eric House
2157706dcd add client version and a desc string to devices DB and to reg info sent to relay 2013-08-20 08:09:45 -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
8ad549d2bd query on null db fails, doesn't assert 2013-08-16 19:15:28 -07:00
Eric House
42bbc946ae quote variable and echo when switching to udp 2013-08-15 07:20:22 -07:00
Eric House
ae21b6f0d8 use new --use-udp flag and, by default, switch devices from tcp- to
udp-based connections over time at a configurable rate.
2013-08-07 21:12:08 -07:00
Eric House
71ea59e7fb separate whether app is using udp from whether it stores games in a
sqlite3 db so that it can switch mid-game -- that being something that
needs testing.
2013-08-07 21:09:48 -07:00
Eric House
b9450589c8 add new commandline option --use-udp. Not yet used. 2013-08-06 21:10:42 -07:00
Eric House
da54b1e5fb add keepalive timers 2013-08-02 08:01:16 -07:00
Eric House
63ad3a196b debug build asserts that packet is meant for this device, but
non-debug should drop those that aren't.
2013-07-29 07:30:46 -07:00
Eric House
d8a4b5ce29 include udp maxInterval, the number of seconds the relay's configured
to assume an address is still good when it hasn't heard from it, in
reg response reply, send that reply always, and read and log the new
field on clients.  It will eventually be used to implement a
keepalive.
2013-07-29 07:27:30 -07:00
Eric House
6418513a6d don't try to read from socket if == -1 2013-07-22 06:15:35 -07:00
Eric House
3a14b12cc5 exit when number of core files changes, not if it's non-zero 2013-07-20 12:52:32 -07:00
Eric House
49a2d099f0 include packet num in every udp packet. They start over on app
reboot, but add a bit of help with debugging.
2013-07-20 11:57:10 -07:00
Eric House
27d9f3de45 Don't enable chat when more than 128 messages are in queue to prevent
an extremely unlikely cause of stalls -- and make tests trip over full
queues less often.
2013-07-18 07:37:45 -07:00
Eric House
3f59b31d51 Log received udp messages as b64-encoded strings. These match what the
relay's now logging
2013-07-18 07:07:25 -07:00
Eric House
1e6ff9b33c include seed in chat messages to make sure they're unique 2013-07-18 07:06:20 -07:00
Eric House
93a7c7f817 fix to compile when DEBUG not defined 2013-07-17 06:52:35 -07:00
Eric House
d6fd79be44 log, and be more aggressive about closing, sockets on which errors occur 2013-07-16 06:43:30 -07:00
Eric House
e6e7154c82 close socket rather than proceed with what looks like a bad packet/connection 2013-07-16 06:42:21 -07:00
Eric House
27e90c2d2c exit as soon as there's a core file 2013-07-15 07:16:35 -07:00
Eric House
8a4e766b32 make 50% of games communicate via UDP by default 2013-07-11 20:39:40 -07:00
Eric House
491b288631 assert that the seed's preserved for curses version too (where
clientToken is otherwise ignored since there's only one game per app
instance)
2013-07-11 20:39:10 -07:00
Eric House
9db54a5461 make linux version's gameToken combine game's seed with rowid so we
can test that the relay is keeping them straight
2013-07-11 20:01:17 -07:00
Eric House
d6658c5c08 don't show other_disconnected error message 2013-07-10 23:14:48 -07:00
Eric House
7dfd19a7a2 name change 2013-07-10 23:14:24 -07:00
Eric House
a522266ce4 add message checksumming for android too by making it part of util
(compiled out by default)
2013-07-10 08:05:47 -07:00
Eric House
4bde445c48 fix so gtk mode works too by providing storage for CurGameInfo 2013-07-09 18:19:22 -07:00
Eric House
5a20cc282c fix so curses app works well enough that discon_ok2.sh script runs
successfully.  GTK mode is untested and certainly broken.
2013-07-09 18:10:41 -07:00
Eric House
48fbf15a69 needed to quote variable 2013-07-09 18:07:03 -07:00
Eric House
f5696334a9 changes to get the merged code to compile but not included by git in the commit 2013-07-09 07:25:23 -07:00
Eric House
d50c808f96 Merge branch 'android_branch' into gtk_multigame
Conflicts:
	xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java
	xwords4/common/comms.c
	xwords4/linux/cursesmain.c
	xwords4/linux/cursesmain.h
	xwords4/linux/gtkmain.c
	xwords4/linux/gtkmain.h
	xwords4/linux/linuxmain.c
	xwords4/linux/main.h
	xwords4/linux/scripts/discon_ok2.sh
	xwords4/relay/xwrelay.cpp

(Note: The curses app crashes on exit with mempool assertions, but that's a problem before the merge.)
2013-07-09 07:18:00 -07:00