Commit graph

1043 commits

Author SHA1 Message Date
Eric House
79f07e8751 cleanup 2013-07-09 07:19:20 -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
a3de759d9e fix to compile on Android when DEBUG set 2013-07-07 19:40:07 -07:00
Eric House
923d41e0ee fix to compile when DEBUG not set 2013-07-07 13:17:26 -07:00
Eric House
bbac923f68 assert queueLen at the point where it'll be easier track why it's overgrowing 2013-07-05 21:32:41 -07:00
Eric House
e6248210a5 when formatting final scores, print all players with top score as
Winner (fixing bug that occurred in case of a tie)
2013-07-04 12:37:10 -07:00
Eric House
7229535be7 insist on non-0 channel ID *net of mask*; don't send acks when we
don't have a connID yet, as this confuses the server.  This fixes
assertions in testing that were pretty common when chat was enabled;
it may also fix the reported problem on Android that games get hosed
when people are using chat, as the server's response (without the
assert) was to add a new channel.
2013-07-03 07:39:05 -07:00
Eric House
3364dcbf46 remove unused enum 2013-07-03 07:26:23 -07:00
Eric House
858d00332a when an initial message from a client arrives with channel already
set, drop it (after asserting in debug code.)  I'm not yet sure why
this happens, but giving it a new channel is not the right move.
2013-07-02 18:49:48 -07:00
Eric House
1f63745e34 add more logging in search of channelNo bug 2013-07-01 07:54:38 -07:00
Eric House
c77021231c print checksums of sent and received messages 2013-06-30 08:33:29 -07:00
Eric House
b31858ee5e log rather than assert when hostid changes -- though I'm not seeing
this now that the relay doesn't send packets to the wrong device
2013-06-26 00:42:55 -07:00
Eric House
6d22c3ab86 tweak logging 2013-06-22 05:51:29 -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
8e8b4755b3 bring in changes from gtk_multigame to remove assertion fail when
connname gets changed by relay due to failure to ack it (which happens
when a large number of games is being run in a test.)
2013-05-30 06:48:29 -07:00
Eric House
31c443e4b1 Merge branch 'android_branch' into gtk_multigame
Conflicts:
	xwords4/android/XWords4/src/org/eehouse/android/xw4/GCMIntentService.java
	xwords4/android/XWords4/src/org/eehouse/android/xw4/RelayService.java
2013-05-22 07:01:08 -07:00
Eric House
b58fe30ecc add synonyms to tile counts/values summary 2013-05-14 22:00:22 -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
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
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
567cd2913a Merge remote-tracking branch 'origin/android_branch' into android_branch 2013-04-06 05:32:10 -07:00
Eric House
bd1a909321 assert, in debug-only code, that saved moves alternate between players
and are ordered.  I've seen games in the wild with three moves in a
row by the same player and want to catch this in testing.
2013-03-01 07:49:26 -08:00
Eric House
2bfda1b56d function to print StackMoveType 2013-02-22 21:34:53 -08:00
Eric House
d78a4979da HACK: if gi's notion of gameID is out of sync, force it in (logging
the fact).  I'm not sure why but this is required sometimes on
Android.
2013-01-28 07:01:49 -08:00
Eric House
3e723c72c5 call comms_stop() before closing (removing from memory) a game. 2013-01-28 06:52:32 -08:00
Eric House
3be45a67f7 fix erroneous asserts: it's uncommon but ok for a device to get
assigne a second connname.  (Cause: failure of relay to receive the
device's ACK.)
2013-01-26 18:56:53 -08:00
Eric House
c839db4a25 disconnect from relay no matter what the state 2013-01-22 06:12:55 -08:00
Eric House
f6e7ece578 add comms_stop() and an assert to make sure it's called. Explicit
stop and a message to the relay when using a UDP socket makes up for
there being no notification of connection closing.
2013-01-16 06:31:09 -08:00
Eric House
565b742971 snapshot -- connects to relay but doesn't play yet. 2013-01-07 08:00:47 -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
78670e9650 fix bug: include wordlist name in bad word info passed into util function 2012-12-29 07:48:31 -08:00
Eric House
83b1d4c364 fix compiler warnings 2012-12-08 06:40:21 -08:00
Eric House
5463535265 don't increase backoff if there wasn't actually anything to send. 2012-11-14 05:42:47 -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
cf8d30ce5d tweak logging; fix uninitialized debug-only variable 2012-11-13 21:18:52 -08:00
Eric House
57ea768aaf refuse to send 0-length messages. That may happen only when the stupid
curses client calls server_initClientConnection over and over, but
reduces unnecessary messaging in that case at least.
2012-11-13 07:22:48 -08:00
Eric House
43b1e219f3 add a bit more logging to comms 2012-11-13 06:14:36 -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
f1ee77882b Send devid with RECONN as well as CONN so games present when device
upgrades can also use GCM.  Tested on relay but not device.
2012-11-09 06:54:12 -08:00
Eric House
9ad28908bb assert enum within range 2012-11-06 07:07:14 -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
e66ddc3765 make stream_catString work with null ptr 2012-11-01 21:08:58 -07:00
Eric House
7135e30fe9 add missing ifdef 2012-11-01 07:58:36 -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
e7d5be06e9 fix crash when old client connects to new host by making host use the
right version test in deciding what to send.
2012-10-27 08:52:54 -07:00
Eric House
b097e0825e fix linux crash do to casting problem 2012-10-26 06:49:15 -07:00