Eric House
540d3e9622
wire disabling checkboxes into comms. They work -- and show that
...
multi-addressing needs debugging still.
2014-11-06 06:35:28 -08:00
Eric House
b1de8663d6
fix to compile with DEBUG undefined
2014-11-06 06:32:00 -08:00
Eric House
3d9ee4b9f9
use app define, not relay's
2014-11-05 21:45:14 -08:00
Eric House
c516e1f77c
add code to log md5 sums of udp packets sent and received. These match
...
relaycon logging to be added shortly.
2014-11-05 21:42:03 -08:00
Eric House
405b3eef93
remove dead/commented out code
2014-11-05 21:33:54 -08:00
Eric House
564e671b47
quick hack to add checkboxes for turning off transport sends and
...
receives to be used for testing after it's actually hooked up. This
is just the UI.
2014-11-05 18:48:53 -08:00
Eric House
17bc0ab47c
snapshot of work toward communicating when two addresses are in use.
...
An invitation works with relay and (fake) SMS on, and the invited
client connects successfully using both (the second to arrive being
correctly identified as a dupe.) While the game can be played after,
only SMS messages are being received. And opening a saved game
crashes.
2014-11-05 07:41:20 -08:00
Eric House
fc6ccf217f
fix formatting of types: don't crash on too-small buffer, and add
...
separator only when needed.
2014-11-02 17:25:56 -08:00
Eric House
f853aad904
add checkbox to tab label when selected
2014-11-02 11:55:46 -08:00
Eric House
71fbae622a
clean up code a bit
2014-10-28 20:13:48 -07:00
Eric House
1ca5515b07
Add checkbox to each type tab indicating whther the game will use that
...
addressing type to communicate.
2014-10-28 08:08:11 -07:00
Eric House
9b336bde49
fix crash: must iterate when multiple types are possible
2014-10-28 08:04:05 -07:00
Eric House
c3e7b12103
merge android_branch
2014-10-23 06:33:28 -07:00
Eric House
51a1ddfe39
include robot name in report of his score
2014-10-23 06:32:24 -07:00
Eric House
9886d5a6e6
merge over changes to run with new bash
2014-10-22 18:57:33 -07:00
Eric House
878a16b3bc
snapshot: android compiles, and works well enough to exchange moves
...
via relay! Lots of changes, mostly around treating connTypes as a Set
inside the java world. Jni to translate to that is a pain.
2014-10-16 06:45:24 -07:00
Eric House
14a0ca95fe
don't crash with, and correctly save, multiple addresses
2014-10-15 07:52:35 -07:00
Eric House
fe4c7b52f2
snapshot: relay test script works with a second address type set
...
(though with its actual transport stubbed out). Android doesn't even
compile.
2014-10-15 07:26:18 -07:00
Eric House
737af802b0
don't abort if core file count goes down -- I probably removed some
...
old thing
2014-10-15 06:38:43 -07:00
Eric House
3534bc0e49
print usage prettier (with an apparent off-by-one error)
2014-10-01 19:52:07 -07:00
Eric House
b82383a5ad
fix -- I hope -- array syntax that was getting lots of games launched
...
without an app (until it got upgraded)
2014-10-01 19:49:46 -07:00
Eric House
92292ad1fe
fix problems with undeclared variables that older bash didn't mind
2014-09-25 21:45:44 -07:00
Eric House
43bd3c018a
make an addr's conType a bitfield rather than holding a single value.
...
Works for large numbers of relay games in test, but will not yet
actually hold more than one value. Should be safe to merge to main
branch once stream upgrade is verified.
2014-09-25 20:05:37 -07:00
Eric House
abf12e90da
save a bit of work setting up game manually by assuming two players --
...
but ths must be happening too late because not all takes effect.
2014-09-25 06:35:10 -07:00
Eric House
3668b7d8a7
merge android_branch -> android_shipbt
2014-09-24 20:51:23 -07:00
Eric House
9ad8ad601c
add cur dir to empty dict search path
2014-09-24 07:29:57 -07:00
Eric House
64b30b68d2
merge android_branch -> android_shipbt
2014-09-23 21:33:57 -07:00
Eric House
b4ef9ced87
merge android_branch changes
2014-09-23 21:33:02 -07:00
Eric House
113c7a13d2
print number of devices left
2014-09-23 21:26:46 -07:00
Eric House
49689ab04c
always log error message
2014-09-23 07:30:34 -07:00
Eric House
ab64197ac4
fix recent booboo: it's not an error for server_initClientConnection()
...
to fail here.
2014-09-23 07:30:23 -07:00
Eric House
049cf284c5
toward getting direct-ip addressing working again: add a tab to the
...
connections dialog
2014-09-20 18:08:33 -07:00
Eric House
6f07098cf3
return succes from server_initClientConnection()
2014-09-14 13:42:11 -07:00
Eric House
88248131da
show new client-formatted turn summary in notification; remove old
...
common-formatting code.
2014-08-26 21:37:33 -07:00
Eric House
2d08848715
snapshot: toward having a better description of the last move in
...
notifications.
2014-08-26 06:55:26 -07:00
Eric House
622760b71a
post response to long-tap on player as a gtk dialog rather than just logging it.
2014-08-25 07:52:18 -07:00
Eric House
4231ed1108
fix refcount leak
2014-03-11 21:59:53 -07:00
Eric House
a4302897e2
enlarge dictmgr to track a compile-time defined number of dicts
2014-03-10 21:01:24 -07:00
Eric House
55267f2e42
add memmove
2014-03-10 20:25:38 -07:00
Eric House
6203a23c62
don't crash in networked games
2014-03-10 18:58:16 -07:00
Eric House
5500d36cde
add and use dict manager that caches, using refcount, dicts across games. Allows multiple games to be opened, and open at the same time, with only one instance of a dict ever created. Works on linux; not used or tested yet on Android.
2014-03-09 19:12:21 -07:00
Eric House
a7c114e3f9
refcount dicts. Model "owns" its copy and so increments the refcount when gaining one and decrements the count on any being replaced (and on all on exit). This is setting up the real change, which is to let the java world wrap dicts in objects that hang onto them until they're destroyed, which should fix problems where dicts are referenced after they've been destroyed.
2014-03-08 20:57:27 -08:00
Eric House
8a6adfec34
cleanup -- no logic change
2014-03-08 20:51:49 -08:00
Eric House
7002ff11c7
fix so non-DEBUG build compiles
2014-03-04 07:07:01 -08:00
Eric House
3ecd0a4b03
fix to compile without DEBUG
2014-02-28 04:58:25 -08:00
Eric House
e6564c679c
use ccache if present
2014-01-21 07:10:13 -08:00
Eric House
e34cc9007d
fix problems with opening and using wordlists on 64-bit linux by
...
making XP_U32 32 rather than 64 bits. Duh. Do same on Android jni just
in case.
2014-01-07 06:58:20 -08:00
Eric House
459c12d91f
copy string's null terminator too
2014-01-06 07:05:34 -08:00
Eric House
19c70ccdcb
fix mistaken scoreboard size calc
2014-01-06 06:54:56 -08:00
Eric House
3702a9f326
don't constrain screen size
2014-01-06 06:40:59 -08:00
Eric House
ac969793ea
remove assert preventing large screen
2014-01-06 06:38:08 -08:00
Eric House
83692fd2e8
format rem text as two lines
2014-01-05 13:30:27 -08:00
Eric House
123141e0df
draw scoreboard entries centered
2014-01-05 13:15:09 -08:00
Eric House
b43855a313
fix curses build for 64bit compile and to use common layout (meaning
...
tray is now under the board unstead of to the right). Works on 64-bit
system at least for non-networked games.
2014-01-05 13:04:59 -08:00
Eric House
093a260f1d
fix memory corruption on 64-bit systems
2014-01-02 07:48:12 -08:00
Eric House
abb8da44ba
open game on double-click of row
2014-01-02 07:10:00 -08:00
Eric House
40c04be47b
call sqlite3_initialize() as recommended by docs
2014-01-02 07:09:23 -08:00
Eric House
e15fb02d8a
add ability in ask dialog to display buttons with arbitrary text
...
returning custom results. Use to add "Rematch" option (which so far
only fires an assert when chosen.)
2013-12-30 07:16:52 -08:00
Eric House
35c12eb7bb
add --ask-timeout param
2013-12-30 07:08:43 -08:00
Eric House
6d84dfea7e
cleanup: remove '2' from function and struct names
2013-12-30 07:08:42 -08:00
Eric House
bba0b79763
add logging
2013-12-30 07:08:42 -08:00
Eric House
12932bf788
fix crash on 64-bit system
2013-12-30 06:46:57 -08:00
Eric House
ebdf5ed492
fix to compile on 64-bit system (untested on 32-bit :-)
2013-12-27 19:13:54 -08:00
Eric House
d29840434f
pass, save and restore port; read several messages at once
2013-12-19 08:00:04 -08:00
Eric House
a1d5553266
fix invite button disabling logic
2013-12-19 07:58:32 -08:00
Eric House
75b6ecc325
add missing util function
2013-12-19 07:57:59 -08:00
Eric House
79fae43100
enable invite and commit buttons based on game state
2013-12-19 06:59:34 -08:00
Eric House
0ad18efcff
fix memory leaks
2013-12-17 22:16:52 -08:00
Eric House
bece99bb98
load dict named in invite
2013-12-17 22:11:21 -08:00
Eric House
f45f3bacbf
fix so invitation results in a playable game (though dictionary is not
...
yet available to invitation recipient)
2013-12-17 21:57:10 -08:00
Eric House
6bdd939531
rename field
2013-12-17 20:02:31 -08:00
Eric House
8d20c33b76
snapshot: still not correctly recording return address
2013-12-16 08:06:29 -08:00
Eric House
3c6ecb7ffa
ignore app
2013-12-12 21:10:44 -08:00
Eric House
2a56a0ba98
snapshot: more linux-sms stuff
2013-12-12 21:08:25 -08:00
Eric House
78d8c0398f
another snapshot: invites are received but don't create game correctly yet
2013-12-12 07:58:02 -08:00
Eric House
5f97f8197c
progress on inviting via SMS
2013-12-12 06:08:56 -08:00
Eric House
1b5bda5da8
don't turn on SMS if no phone
2013-12-11 08:04:47 -08:00
Eric House
cad6cb8075
log when inotify kicks off
2013-12-11 08:02:44 -08:00
Eric House
833a3384b3
remove assert; add empty invite button
2013-12-11 08:02:29 -08:00
Eric House
7cffa27a88
snapshot toward implementing fake-sms as per-device rather than per-game
2013-12-11 07:54:26 -08:00
Eric House
a4f274a1f4
preserve and use sms settings
2013-12-11 07:02:44 -08:00
Eric House
f0c5d1f865
toward improving bt support in gtk client: add scan button that only
...
picks up devices currently open for discovery
2013-12-07 10:12:20 -08:00
Eric House
46a5f83bb1
shrink "netstat rect" to reasonable size
2013-11-16 18:25:09 -08:00
Eric House
dfdbd9a8a2
pass scoreWidth separately into formatting code so space can be left
...
for network status icon.
2013-11-09 05:34:23 -08:00
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
Eric House
923d41e0ee
fix to compile when DEBUG not set
2013-07-07 13:17:26 -07:00
Eric House
4b5af7ebdf
don't try to read from socket after it's been closed
2013-07-04 12:37:55 -07:00
Eric House
6cd3ebd780
improve logging
2013-07-02 18:31:02 -07:00
Eric House
0ac5d6d9e2
don't send more than three unanswered chats per boot -- to avoid
...
filling up the queues in a way that doesn't reflect real use.
2013-07-02 18:30:23 -07:00
Eric House
dd48cea912
don't log string before it's initialized
2013-07-02 07:26:32 -07:00
Eric House
9fca3792cf
don't pile on chat messages when relay isn't even connected: it's an
...
unfair test that doesn't duplicate what users will likely do.
2013-07-02 05:53:58 -07:00
Eric House
9ceb1615b3
replace tabs with spaces
2013-06-30 17:24:33 -07:00
Eric House
070590b3c2
cleanup
2013-06-30 08:34:09 -07:00
Eric House
b506a91068
add commandline params
2013-06-30 08:33:58 -07:00
Eric House
195f873ab0
tweak logging
2013-06-30 07:37:35 -07:00
Eric House
6fbf2d4a8b
use g_compute_checksum_for_data, removing self-written equivalent
2013-06-30 07:36:56 -07:00
Eric House
7efbfab0e5
fix crash in debug version: len of data to be summed needs to be 32 bits!
2013-06-30 06:50:57 -07:00
Eric House
1a73ab26ac
tweak logging
2013-06-28 20:33:27 -07:00
Eric House
17eda4e5e1
move md5sum code into separate function that relay can copy
2013-06-28 20:33:12 -07:00
Eric House
6c756533e3
fix double-dispose crash (but there's still a memory leak)
2013-06-28 20:32:19 -07:00
Eric House
5c284fe6b0
test PID is live before killing it
2013-06-28 18:55:19 -07:00
Eric House
292982a4b4
when splitting packet, queue them and send on timer rather than
...
sleeping the main thread.
2013-06-27 07:00:36 -07:00
Eric House
0bb4f5b0f5
fix occasional memory leak
2013-06-26 00:41:16 -07:00
Eric House
8324b9c770
fix compile error by making HELP another command.
2013-06-26 00:39:58 -07:00
Eric House
7967966982
Merge remote-tracking branch 'origin/android_branch' into local_fix_relay
...
Conflicts:
xwords4/linux/linuxmain.c
xwords4/linux/main.h
2013-06-25 06:18:43 -07:00
Eric House
5612bb000b
quick hack to allow testing intermix of chat with normal moves
2013-06-24 18:37:49 -07:00
Eric House
5842654418
fix pattern
2013-06-24 07:30:38 -07:00
Eric House
aca3a96b54
fix pattern so ended games are detected
2013-06-24 07:18:53 -07:00
Eric House
bc6922cb8b
add option to split tcp packets to test whether relay can handle reassembly.
2013-06-24 06:33:06 -07:00
Eric House
5e22508ff7
kill existing xwords instances as part of --clean-start
2013-06-21 06:58:20 -07:00
Eric House
6446819466
use nice to give the relay a fighting chance
2013-06-21 05:41:23 -07:00
Eric House
5bec10048b
add --clean-start option to speed testing
2013-06-20 06:45:51 -07:00
Eric House
5da4936e43
report unexpected received packet size as an error
2013-06-17 06:42:21 -07:00
Eric House
c8f584dad2
don't listen on stdin if it's been closed
2013-06-10 06:15:36 -07:00
Eric House
d41c1a4ca8
add new param so pending text can be drawn differently when it's not
...
the player's turn.
2013-05-30 07:17:13 -07:00
Eric House
72a78100b1
fix compile error in non-debug version
2013-05-27 16:18:11 -07:00
Eric House
ffa983db94
use pipe to quit from signal handler since calling g_main_loop_quit()
...
doesn't work with more recent glib versions (and has always been a bad idea)
2013-05-24 21:19:20 -07:00
Eric House
4d96b695e6
toward having commandline params show up as defaults in new game dialog
2013-05-10 07:19:32 -07:00
Eric House
79a212c985
don't put up dict change dialog (which blocks) unless names are
...
different.
2013-05-09 21:37:58 -07:00
Eric House
d74814a806
part of previous (merge) commit that got left out -- files not saved.
2013-05-09 06:33:19 -07:00
Eric House
7d8cddb31f
Merge branch 'android_branch' into gtk_multigame
...
Conflicts:
xwords4/linux/gtkmain.c
xwords4/linux/linuxmain.c
xwords4/relay/xwrelay.cpp
2013-05-08 07:37:55 -07:00
Eric House
3e9bb1c6b9
fix leak: dispose struct before overwriting it
2013-05-08 06:38:52 -07:00
Eric House
66d42fe5f2
fix a couple of leaks
2013-05-07 07:07:10 -07:00
Eric House
5a026ffda3
merge android_wordlists (local branch)
2013-05-01 06:39:31 -07:00
Eric House
541fc546ab
remove that bit from flags -- since we already do the right thing for it.
2013-04-20 19:46:35 -07:00
Eric House
e4f52c5678
add assert and comment explaining why non-utf-8-aware hack is safe.
2013-04-18 07:15:14 -07:00
Eric House
2873d08974
fix memory leak
2013-04-13 16:49:20 -07:00
Eric House
195e6bfad3
add option to dump an .xwd file, meant to replace dawg2dict.pl which
...
is becoming a pain to maintain.
2013-04-09 21:10:40 -07:00
Eric House
5912b76cb8
add option to dump an .xwd file, meant to replace dawg2dict.pl which
...
is becoming a pain to maintain.
2013-04-09 21:05:35 -07:00
Eric House
07cfdad699
fix to support synonyms within specials too -- for linux only so far.
...
Seems to work, though the dawg2dict.pl script is broken.
2013-04-09 07:43:04 -07:00
Eric House
3a628f4375
load new-format dict into linux client, display default faces
...
correctly, and search using alternate as well as default faces. Next:
support for alternate specials.
2013-04-06 11:43:57 -07:00
Eric House
168ebeeb5b
fix variable name misspelling
2013-02-22 21:10:46 -08:00
Eric House
c75ecef240
test deletion of games and generation of anonymous relayIDs
2013-01-29 07:42:10 -08:00
Eric House
72e100ccac
use autoincrement primary key, same as on Android
2013-01-28 07:02:33 -08:00
Eric House
4b335ab464
make function static
2013-01-26 18:36:40 -08:00
Eric House
b324a382e2
I've seen read() return 0 after being told there's something on the
...
socket. So in that case loop and try again five time -- in case the
docs are wrong that 0 means EOF? Hmmm.
2013-01-26 11:58:48 -08:00
Eric House
88b20769f9
increase buffer size
2013-01-26 11:56:29 -08:00
Eric House
2aba3c0ce1
load dict early enough to have lang available to comms when it first connects.
2013-01-26 11:56:20 -08:00
Eric House
2e0ff09cf9
fix memory leak and uninstall idle proc on the way out
2013-01-24 21:10:41 -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
12f70154a0
changes for includes-messageID-please-ack protocol addition
2013-01-23 07:43:58 -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
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
93ff4f4fcb
handle the new length-plus-string format
2013-01-20 13:07:01 -08:00
Eric House
3fc31a6fe1
new enum for alert
2013-01-20 10:04:24 -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
3dfb2e04e6
call comms_close in curses too to avoid new assert
2013-01-19 22:53:25 -08:00
Eric House
0ef3549a4e
handle (display) the relay's new error message
2013-01-19 15:18:36 -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
1519a00004
toward being able to handle messages received for closed game.
...
Receipt seems to work but send in that state doesn't.
2013-01-18 07:49:00 -08:00
Eric House
4163309dae
Let's have just one set of signal handlers
2013-01-17 06:37:53 -08:00
Eric House
2f772c56b2
make gtk app a better test bed: add db and row to window titles,
...
implement delete button and multiple selections, etc.
2013-01-16 21:16:07 -08:00
Eric House
c33c50ee6b
add deleteGame()
2013-01-16 21:11:35 -08:00
Eric House
a6784464ff
first set of networking changes testing per-device communication with
...
relay on behalf of a number of games. Works as long as all the games
are open.
2013-01-16 06:46:33 -08:00
Eric House
a107365c88
change names of two types and variables of that type to make a common
...
pattern more sensible. No code changes.
2013-01-15 19:04:20 -08:00
Eric House
dddb135b9d
add more columns, and update each time game is saved
2013-01-09 06:30:52 -08:00
Eric House
fac3e6b678
fix gtk version to correctly implement util_setIsServer (which only
...
Android did so far) by calling server_initClientConnection(). Now
relay games work with both started as hosts. (GTK UI prevents
starting one as a guest; cmdline is required for that, if it still
works.)
2013-01-08 07:28:30 -08:00
Eric House
5e2bfd20da
add a checkbox -- which apparently won't interact until I "implement
...
the 'activate' virtual method".
2013-01-08 06:32:43 -08:00
Eric House
1cb959c86d
type tree model column correctly
2013-01-07 20:51:59 -08:00
Eric House
76f3bb3413
fix curses version so discon_ok2 tests work again.
2013-01-07 20:40:46 -08:00
Eric House
565b742971
snapshot -- connects to relay but doesn't play yet.
2013-01-07 08:00:47 -08:00
Eric House
469e656464
track open games so don't double-open and can close all on quit
2013-01-07 06:36:34 -08:00
Eric House
f88387da80
lots of changes to separate game data from app data so several games
...
can be open at once. (curses version is almost certainly broken)
2013-01-07 06:10:44 -08:00
Eric House
b61ed7b631
opening saved games and saving of changes now work.
2013-01-05 21:01:26 -08:00
Eric House
a8014a855b
now games are displayed in lists. Next: open them.
2013-01-05 19:40:29 -08:00
Eric House
8238d45350
ignore the db
2013-01-05 19:37:05 -08:00
Eric House
e0dc83ed70
rest of what I just meant to commit.
2013-01-05 16:08:47 -08:00
Eric House
4af30c534c
snapshot. New game button works and game gets saved in DB. Next: display and open from DB.
2013-01-05 16:08:19 -08:00
Eric House
63487dc5d0
assert gdk setup going ok
2013-01-03 08:18:35 -08:00
Eric House
ad2b925a60
print wordlist name as part of error message
2012-12-29 07:47:44 -08:00
Eric House
9598ea3585
fix to compile post API change.
2012-11-13 21:32:42 -08:00
Eric House
c4df31892e
Fix occasional infinite loop of devices sending and receiving the same
...
message over and over when getting updated by GCM. The problem
occurred when one device had an un-ACKable initial message still in
its queue. I call resendAll a lot, which caused that message to get
resent to the other game which then replied without being able to ACK
it so it remained to be sent again. This would continue until users
moved forward in the game. The fix is to add a backoff timer to
resendAll() so that it can't loop. The timer is reset when an ackable
and new message is received, meaning there's been a change in what's
available to resend. And since users calling resendAll manually
expect it to do something, add a force param that ignores the backoff.
seems to fix the problem (but needs a lot of testing.)
2012-11-13 21:25:03 -08:00
Eric House
093fc4d1fa
cleanup
2012-11-13 07:23:07 -08:00
Eric House
2908802017
try to make linux client mimic Android a bit better in saving after
...
any network activity so messages get acked more quickly.
2012-11-13 06:15:36 -08:00
Eric House
6ca966f22a
make test script and linux client mimic case where relay regid is
...
rejected by relay. Client re-registers and a new relay regid is
issued.
2012-11-12 07:27:20 -08:00
Eric House
1316ae4b67
Fix relay devid protocol to deal with case where client submits a
...
ID_TYPE_RELAY id that's not in the devices table (as has happened when
a device switches relay URLs during testing, but might also happen if
I have to delete an entry from the devices table.) In that case,
return ID_TYPE_NONE to the client, which will be its clue to delete
its ID_TYPE_RELAY id and submit the platform-specific id again.
Note: android won't compile this revision thanks to util.h change
2012-11-10 15:05:44 -08:00
Eric House
b53412d98d
Fix to actually work. Grrr.
2012-11-10 14:52:10 -08:00
Eric House
b0f85e02df
use grep of app's help message to determine whether a param is
...
supported so can test with older clients and not crash.
2012-11-09 06:55:38 -08:00
Eric House
03108f311a
Merge branch 'android_branch' into android_gcm
2012-11-05 06:14:21 -08:00
Eric House
59937b8514
modify how devids are handled on the relay and the protocol through
...
which they're communicated to the device. Device is expected to have
a platform-specific notion of ID which the relay stores in a new
devices table and indexes with a 32-bit number which is returned to
the device -- which is encouraged but not required to use it in lieu
of the longer ID in future communications. Modify linux client and
test script to use the relay-supplied id. Some of this is commented
out for now.
2012-11-03 10:58:01 -07:00
Eric House
563422de02
turn on DEVID feature for linux
2012-11-02 05:35:56 -07:00
Eric House
3469975d2a
add, still disabled by compile-time flags, code to transmit device ID
...
(e.g. ID Android devices get via GCM) to relay and to associate it
there with messages that need to be delivered.
2012-10-30 07:01:47 -07:00
Eric House
4ea8569abc
honor --min-devs flag
2012-10-27 08:15:07 -07:00
Eric House
b097e0825e
fix linux crash do to casting problem
2012-10-26 06:49:15 -07:00
Eric House
aec03fc572
When a game's consumated and guest discovers it isn't using the same
...
dict, give chance to switch, and to download if required. Because of
the way the JNI thread works, and JNI's requirement in general that
env instances match up (e.g. dicts must be destroyed in the same
thread that creates them), substituting into a live game is too hard.
So the game's saved with its new dict and then reloaded.
2012-10-24 07:17:21 -07:00
Eric House
13c74cfbd5
protect changeDict feature with compile-time flags (since it can't be
...
used on Android)
2012-10-24 06:46:54 -07:00
Eric House
c69dbda36f
add new game_changeDict() and enough gtk code to test it.
2012-10-23 19:06:00 -07:00
Eric House
4cf595e939
on commandline, only allow assignment of per-player dicts to local
...
players. I don't know what happens when a player's position is
changed when its game is a guest and the hosts rearranges players.
Which is why on Android I'm moving to allowing per-player dicts only
on local-only games.
2012-10-14 19:10:42 -07:00
Eric House
25a1ee451b
resolve links if required to get the actual name of the dict
2012-10-12 20:50:34 -07:00
Eric House
e90c5ee94f
pass index of resigning player into util_notifyGameOver. Not yet
...
passed into java.
2012-10-09 05:31:12 -07:00
Eric House
e64ecfb78d
implement resign on top of existing endGame logic, adding "quitter" as
...
new param passed to remote and changing final score formatting and
menu items to match. Still need to show old menu on android in case
where game has already ended.
2012-10-07 12:47:06 -07:00
Eric House
4e0c7923d9
fix bug with clean target introduced when BUILD_DIR was introduced
2012-10-07 12:14:47 -07:00
Eric House
968340f665
Fix release-build warnings that new compiler flags.
2012-10-07 11:43:50 -07:00
Eric House
fd9b9f85e2
make util_hiliteCell conditional, and remove from android where it
...
wasn't used anyway.
2012-10-05 18:51:32 -07:00
Eric House
6ddd4a61c1
fix compile errors (mostly unused variables) found by gcc on latest
...
Ubuntu (12.04).
2012-09-25 07:28:02 -07:00
Eric House
53774eb807
Merge remote-tracking branch 'origin/android_branch' into android_branch
2012-09-24 20:08:14 -07:00
Eric House
140c982d41
merge from android_branch
2012-09-24 07:39:44 -07:00