Commit graph

107 commits

Author SHA1 Message Date
ehouse
ff82dd61c0 Fix linked-list bug in removeFromQueue. 2007-02-07 11:58:01 +00:00
ehouse
3028c9e598 deal with case where guest begins new game but connects to host that's
running the old game: the host may reply, but guest must not take that
as evidence of a connection having been established: don't remove sent
messages (this isn't an ACK), and don't assert later on.
2007-02-06 05:49:45 +00:00
ehouse
9a61f5c38b Add assert; don't call comms if has been set to null (fixes device
reset); fix failure to install connCB (removes need to manually resend
messages when client starts up first.)
2007-02-04 17:13:01 +00:00
ehouse
e6ba8c872c fix crash when linux is bt server: if no addr provided it's not a duplicate. 2007-01-09 02:43:09 +00:00
ehouse
02c225c413 Fix so IR-only multi-device build works again. 2007-01-06 16:46:45 +00:00
ehouse
e2f3a55611 reject initial messages coming in on the same address a second time.
Fixes problem that surfaces when clients are more agressive about
resending early in game.
2006-11-11 22:37:36 +00:00
ehouse
d234fc637d make IR the default conn type on Palm, where it's been the only type
until now.
2006-10-15 14:09:17 +00:00
ehouse
cb2990b720 add const to a few formal param declarations 2006-10-15 13:53:17 +00:00
ehouse
5f25ba9f57 remove BEYOND_IR, replacing with XWFEATURE_RELAY and
XWFEATURE_BLUETOOTH.  The goal is to be able to build to support
bluetooth only, or relay/ip only, e.g. for a palm bluetooth beta.
Seems to work.
2006-10-10 01:34:37 +00:00
ehouse
277624eb81 Don't return from middle of function. 2006-10-07 03:37:40 +00:00
ehouse
878acbc759 Fix opening games and messages saved by last shipping version on Palm
by checking version and loading new fields conditionally.  (Not yet
tested for current wince version.)
2006-10-05 01:17:03 +00:00
ehouse
715d01b8a4 Put relay-only fields into a struct for easier identification. No code change. 2006-10-02 14:26:56 +00:00
ehouse
9837d8cca7 Fix longstanding bug removing too few messages from queue on ACK.
Print queue as part of stats.
2006-09-27 01:54:53 +00:00
ehouse
12731c59cb fix ARM crash loading bt game saved on 68K: specify sizeof array
rather than struct wrapping it.
2006-09-23 16:04:53 +00:00
ehouse
04c5401711 What I meant to check in. F***ing emacs. :-) 2006-09-23 15:22:26 +00:00
ehouse
e10d05eff0 On bringup for bluetooth, resend any waiting messages rather than an
empty new one to get the connection started.  This increases the
chances new games will connect without user having to hit resend.
2006-09-23 15:18:01 +00:00
ehouse
8667bb77bf remove over-agressive attempt to detect out-of-order messages that was
breaking IR comms.
2006-09-17 05:06:46 +00:00
ehouse
e627d7f670 do a better job of rejecting messages that have strayed in from a different game. 2006-09-15 07:33:59 +00:00
ehouse
100598a35f Make formal param const; add initial value to relay-only field so
asserts don't fail b/c of uninitialized value; don't typedef array:
make array field of struct.
2006-09-14 01:25:40 +00:00
ehouse
2c5d15a8dd remove param from util_addrChange; add comms_getIsServer; save bt_addr
as part of comms.
2006-09-08 07:14:24 +00:00
ehouse
209da1b042 use stream_getSize to detect corrupt (truncated) messages. 2006-08-29 13:18:12 +00:00
ehouse
74c6b241d7 Put up BT device browser while user is picking connection method
rather than when trying to send for first time, then pass address
through from conns dialog to bt code.
2006-08-26 21:12:10 +00:00
ehouse
0c915e61b0 First shot at bluetooth support (turned off in Makefile by default).
A full robot vs. robot game now works between two Treos.  Added UI to
choose BT as transport mechanism, and added new send proc to establish
socket connection between host and guest.  Works only for two devices:
no piconet yet.  No error recovery, ability to quit game in middle,
start new game, etc.
2006-08-23 04:44:55 +00:00
ehouse
4daabf6fe5 Set -Wunused-parameter for those versions of gcc that support it, and
deal with the output by removing params where possible and elsewhere
by adding XP_UNUSED macro wrapping __attribute__((unused)).  There
should be NO change in function in spite of the large number of files.
2006-08-16 13:44:44 +00:00
ehouse
46cd6e8536 add ifdef for compile with some optional condition 2006-06-16 01:46:47 +00:00
ehouse
b10ca04e07 don't exclude BEYOND_IR-only fields 2006-04-07 03:08:23 +00:00
ehouse
92485783af update email address in header comments: no code change 2006-01-08 01:25:02 +00:00
ehouse
cda5996195 fix unset var warning 2005-10-30 16:14:13 +00:00
ehouse
6835b6d1eb New scheme for accepting and limiting reconnections. Now device must
send player counts, local and expected.  Based on these the relay
accepts connections, declares the game full and ready for message
forwarding, and decides whether to accept a reconnect.
2005-10-02 15:39:38 +00:00
ehouse
c5add889cb make transmitted vars smaller where possible; new relay identifying
scheme where cookie is used only to connect, and is replaced for
reconnects by a relay-generated name that's supposed to be unique
across all games on all relays; let relay assign non-servers' hostIDs
rather than doing 'em randomly; use hostIDs for comms-level protocol's
channelNo where possible to avoid tripping over duplicate messages
2005-10-01 16:01:39 +00:00
ehouse
5c01044e8c send disconnect message to relay before starting a new game. 2005-09-05 15:33:51 +00:00
ehouse
6f8b33a05b reset cookieID for a new game 2005-09-04 20:30:47 +00:00
ehouse
59edec4955 handle OTHER_CONNECT message by resending any unACKed messages. 2005-09-03 18:31:32 +00:00
ehouse
abbd1a072f handle other-disconnected error message 2005-09-03 15:37:49 +00:00
ehouse
ab0e833a9b Receive disconnect events and display message for error codes. 2005-09-03 06:57:01 +00:00
ehouse
39fa5728ef send XWRELAY_RECONNECT 2005-09-02 06:26:33 +00:00
ehouse
24fb48008f cleanup for wince compile 2005-07-23 15:28:15 +00:00
ehouse
3b53363e16 Pass protocol version code with connect request, and return error if
it isn't what relay can handle.  Report error to user.
2005-07-06 01:36:52 +00:00
ehouse
5b3e5fbf18 name change 2005-07-06 00:58:20 +00:00
ehouse
1ae6c010c9 Make cookieID a 32-bit value instead of 16-bit 2005-07-05 23:02:15 +00:00
ehouse
327fb7b001 eliminate unnecessary setHeartbeatTimer call 2005-07-05 20:57:37 +00:00
ehouse
978d840df7 put back functions that never should have been removed. 2005-06-27 05:45:28 +00:00
ehouse
e92234b324 cleanup: make module-local functions static 2005-06-25 05:43:56 +00:00
ehouse
dfccb19667 convert util_setTimer to take procptr; remove timer call on board; add
heartbeat to comms that uses util_setTimer with new timer type.
2005-06-23 04:16:53 +00:00
ehouse
31e1a46087 separate internalization of comms from call to connect to relay since
the first must finish before the caller will have a valid reference to
comms.  call util_addrChange.
2005-04-03 17:00:59 +00:00
ehouse
ad6de22306 add comms_getInitialAddr; protect against recursive sends 2005-04-03 02:49:04 +00:00
ehouse
edceee12a8 add XP_LD so symbian can long 32-bit vals 2005-03-20 19:41:30 +00:00
ehouse
078ab48fa1 fix bad assert 2005-03-20 15:01:59 +00:00
ehouse
d6efb446d1 Wrapping protocol around standard comms stuff that talks to the relay.
Revert previous relay-related changes.
2005-03-19 22:01:38 +00:00
ehouse
219b6ce937 save hostIDs as part of comms; add logging 2005-03-09 15:18:17 +00:00
ehouse
0f9eb528d8 fix conflict with type from Palm headers; fix for non-BEYOND_IR case. 2005-03-08 05:33:38 +00:00
ehouse
cb3a3854e9 add support for relay for use by NAT'd/firewalled devices: cellphones.
Include cookie users will agree on on for relay rendevouz, and
sender/receiver IDs for when there are >2 devices in game.  Supports
games between linux clients now, but needs a lot more work.
2005-03-06 17:56:34 +00:00
ehouse
49e4c1f6e4 keep hostname as well as IP address in CommsAddrRec 2005-01-31 03:31:50 +00:00
ehouse
71142255d6 deal with older stream version 2004-10-08 23:54:57 +00:00
ehouse
f13c0a3473 fix arm<->68K save/open problem by not relying on sizeof and saving
each field explicitly (as I already do everywhere else.)
2004-10-02 03:47:24 +00:00
ehouse
96a241c7d3 reject message with wrong connID 2004-10-01 01:25:55 +00:00
ehouse
5776da0b93 first checkin 2003-11-01 05:35:29 +00:00