Commit graph

1196 commits

Author SHA1 Message Date
Eric House
a34f4e4954 don't save unset channelSeed 2015-02-09 07:28:11 -08:00
Eric House
9e403ac6b2 add assert around the new bit that's -- bitten -- me once already 2015-02-09 06:46:34 -08:00
Eric House
5a28f8dedf fix recent message header hack to not break addressing of messages 2015-02-08 18:42:38 -08:00
Eric House
88dd25fb21 fix channel comparison so messages actually get deleted after they're
ack'd.
2015-02-08 13:39:35 -08:00
Eric House
fb011624bb add another assertion meant to find threading problems, and fix assert
firing because flag was set too late and sometimes bypassed.
2015-02-08 10:37:54 -08:00
Eric House
7e634ecc64 hijack a bit from channelNo to indicate whether message sender is
server or guest so that sender can tell when it receives a message
from itself (and reject it.) This fixes a lot of confusion in testing
where both participants in a networked game are on the same device,
but might also work around e.g. relay bugs.
2015-02-08 09:58:34 -08:00
Eric House
c6b42c539c add assert to ensure there are no thread issues: mutex may be required
if the assert winds up getting hit.
2015-02-08 07:51:08 -08:00
Eric House
17307f910b fix problem with misdelivered message forever locking out future
messages: when comms thinks a message is an init but server drops it,
give comms that info so it can remove it and give the next one a
chance.
2015-02-07 13:24:09 -08:00
Eric House
f039ee8338 reject message for client that arrives for server rather than asserting 2015-02-07 13:20:47 -08:00
Eric House
cf3c219b69 fix non-DEBUG compile 2015-02-07 12:54:46 -08:00
Eric House
951f5462b3 remove assert. Can't always get forceChannel right on creation, and
it's mean to be advisory.
2015-01-12 07:23:50 -08:00
Eric House
688b3944bb fixes to invite: don't allow non-servers to invite; have common code
inform of number of missing even when it hasn't dropped to 0 (so
second invite can be sent for 3+ device games); take down older alerts
before posting new (again since number of missing may have changed)
2015-01-05 07:43:45 -08:00
Eric House
4701fe2b90 pass in number of devices already connected so forceChannel can be set
more correctly; put up alert when device rejects an invitation as a
duplicate.
2015-01-03 09:50:07 -08:00
Eric House
28bfa3c904 make forceChannel part of CurGameInfo rather than comms, since Android
needs to save it there on receipt of an invitation (doesn't create
full game with comms until later.)  Passes discon2 tests and seems to
work on a single Android device. (Haven't tested inviting on Android
yet.)
2014-12-29 07:39:28 -08:00
Eric House
897c4d5786 add param to force a client to connect to host requesting a particular
channel. Works well enough that relay test script works. Not yet
integrated for let alone tested on Android.
2014-12-21 17:40:00 -08:00
Eric House
f0cf77d7d6 fix overwriting of addresses that happened for most (relay-only) games
run by my test script: match records based on channel number only.
This has yet to be tested on multi-addressing Android builds.
2014-12-10 07:54:50 -08:00
Eric House
5935681b82 in getDestID, deal with possibility game was consumated via a
non-relay channel, and allow client to use HOST_ID_SERVER.
2014-12-05 06:19:02 -08:00
Eric House
a6f9f6608a drop relay connect meta-messages (as well as game messages) when relay
send is disabled.
2014-12-02 06:52:48 -08:00
Eric House
53bfe9812d add const 2014-11-24 07:52:03 -08:00
Eric House
a1cdef6ad8 fix log format 2014-11-24 06:30:58 -08:00
Eric House
142861656e don't send when channel address doesn't have the right type yet 2014-11-21 22:53:48 -08:00
Eric House
fbea67e479 don't kill relay when bluetooth turned off: pass comms type into
comms_transportFailed()
2014-11-20 07:12:25 -08:00
Eric House
1d1af9ffb3 fix some asserts: we have BT working now 2014-11-14 07:06:02 -08:00
Eric House
f2ecefd573 copy bt address info too 2014-11-13 07:27:03 -08:00
Eric House
74afdbd8b6 add more asserts 2014-11-12 06:52:58 -08:00
Eric House
c008f55133 add invite button only if I'm a host and am missing players 2014-11-12 06:52:40 -08:00
Eric House
0e2bbfc1ad augment addresses even when message received is a duplicate. Now games
using (fake) SMS and relay work whichever of the address modes is
disabled during the game, on either side.  At least for two-device
games.
2014-11-11 07:46:01 -08:00
Eric House
c087824b47 snapshot with a bit of debugging added, mostly to tranfer to another machine 2014-11-07 20:26:02 -08:00
Eric House
8e616095ad add a bit more logging of channelNos 2014-11-06 20:28:51 -08:00
Eric House
70f4541bbe Merge branch 'android_branch' into android_multi2
Conflicts:
	xwords4/common/comms.c
2014-11-06 20:09:20 -08:00
Eric House
a34a859d18 log channelNo more consistently 2014-11-06 18:44:19 -08:00
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
2426e04a70 fix overwriting of address info so that, AFAICT, both address types
are successfully being used through much of a test game.
2014-11-05 21:57:25 -08:00
Eric House
8aae7ae10a fix crash: don't use comms before initialized 2014-11-05 07:49:17 -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
e1a10508e1 when preprocessing a message, limit search to the address type of the
channel it came in on if known.
2014-11-02 17:24:37 -08:00
Eric House
b624867cb4 add addr_rmType() 2014-10-28 08:03:19 -07:00
Eric House
1789d442ba let me look at another player's tiles, regardless of pref setting,
when game is over
2014-10-27 19:24:22 -07:00
Eric House
2163d25a27 let me look at another player's tiles, regardless of pref setting,
when game is over
2014-10-27 19:23:52 -07:00
Eric House
93f0b626af snapshot: invite sent by NFC connects two devices using relay with BT
ability passed too (though not yet used.)
2014-10-27 07:51:25 -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
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
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
52465b3e1e merge android_branch 2014-10-14 06:57:52 -07:00
Eric House
c73eec567b fix some const confusion the stricter android gcc found 2014-10-14 06:24:41 -07:00
Eric House
0362bf5cc9 Merge branch 'android_branch' into android_multi2
Conflicts:
	xwords4/common/board.c
	xwords4/common/comtypes.h
	xwords4/common/model.c
	xwords4/common/strutils.c
2014-10-13 07:03:20 -07:00
Eric House
b12d12590a don't memcpy 0 bytes 2014-10-09 21:21:41 -07:00
Eric House
4eb836ab2b fix to compile -- graft missed a constant defined earlier 2014-10-09 21:21:27 -07:00