Commit graph

252 commits

Author SHA1 Message Date
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
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
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
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
93526d38d7 cleanup (version upgrade test works) 2014-09-25 22:24:09 -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
4d2f49d33f when sending and don't have an address for channel yet, send the one
comms was created with, which is what client will have to do anyway.
2014-09-14 13:41:12 -07:00
Eric House
23b72467bb don't assert unset cookieID, as that's normal (I think) for unconnected case 2014-03-08 12:47:58 -08:00
Eric House
c1e22dd3cf add summary DB column and jni code to fetch it to store and display number of unacked messages a game has. And add debug-only option to display it in the main list. In the future I want to be able to iterate over all these games and resend their packets (without opening them visually) when an internet connection comes back up. 2014-02-28 18:59:12 -08:00
Eric House
025bcb885b don't move state forward when should be moving back 2014-02-09 19:35:17 -08:00
Eric House
0b132661ca change struct name from r to rr for easier searching; no code change 2014-02-07 21:12:45 -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
de41802f54 rename variable so I don't trip up again 2013-12-17 21:08:27 -08:00
Eric House
4420049bd0 remove duplicate lines (added by merge?) 2013-12-16 08:05:35 -08:00
Eric House
1f877c7567 remove logging 2013-07-29 07:29:01 -07:00
Eric House
a191c6fc2a don't add chats to queue at len 64 rather than 128 2013-07-22 06:12:06 -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
62dacb83d8 fix to compile when DEBUG not defined 2013-07-16 08:17:46 -07:00
Eric House
9e358ad413 don't insert a new message in queue if it's identical to the one
currently at the end.  This mostly happens when devices are making
several initial client connection attempts before succeeding.
2013-07-12 07:34:12 -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
5462a05692 Merge branch 'gtk_multigame' into android_branch 2013-07-09 19:35:26 -07:00
Eric House
bf1cdf225c print queue less frequently 2013-07-09 19:32:49 -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
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
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