Commit graph

2356 commits

Author SHA1 Message Date
ehouse
13037b059d Move WSACleanup into main where it can be called once per launch
rather than per use of relay, parallel to WSAStartup.
2009-03-08 20:01:47 +00:00
ehouse
96dfb453a9 Use nwgamest support for separate config button beside role combo, and
remove hack responding to tap (without change) on that combo.
2009-03-08 20:00:20 +00:00
ehouse
b770c51f58 call gi_initPlayerInfo() for defaults when not provided on commandline. 2009-03-08 19:57:27 +00:00
ehouse
42ab780680 Go back to combo box for role, and add config button beside it using new support in nwgamest. 2009-03-08 19:56:48 +00:00
ehouse
85811b7951 include strerror output in logging when socket read fails 2009-03-08 19:56:01 +00:00
ehouse
7a4a9b0e71 Add functions names to log statements. 2009-03-08 19:54:50 +00:00
ehouse
f7e6e584ad Add support for a config button as a cleaner alternative to launching
comms config dialogs on changes to host type (which often involved
platform-specific hackery to trigger the dialog when user doesn't want
to change role)
2009-03-08 19:54:14 +00:00
ehouse
bcc4783fee relay name defaults to eehouse.org, easier to set at compile time for testing 2009-03-08 19:47:36 +00:00
ehouse
8e31a3c5cb Close down relay connection when comms going away. Fixes crashes when
new game is standalone and prev used relay.  Add logging code in comms.
2009-03-06 13:43:03 +00:00
ehouse
c2d00ee2ae cleanup for new compiler: -D option, winsock2.h, fix warning 2009-03-06 04:53:56 +00:00
ehouse
d279664b00 swprintf->_snwprintf to make newer cegcc happy 2009-03-06 04:52:06 +00:00
ehouse
cf5a10084e do loglevel and ports via the general-purpose config mech. No special
cases remain.
2009-03-05 13:49:01 +00:00
ehouse
952a73fdbb Make refresh interval configurable. 2009-03-02 05:29:06 +00:00
ehouse
54693142bd Change config class from having a method for every configurable value
to returing values for string keys so adding a new config doesn't mean
modifying that class.  Then add new config for addr passed to bind so
relay can be run to accept http connections from remote machines.
2009-03-02 01:50:14 +00:00
ehouse
f09994153c use PID as cookie so creation order visible on relay during testing 2009-03-02 01:46:10 +00:00
ehouse
eccfbb5ccc don't pass wrong proc ptr 2009-03-02 01:45:16 +00:00
ehouse
f312f8fdb3 in web console list hosts present rather than just the count 2009-02-28 19:35:32 +00:00
ehouse
b88112b311 Reset all relay-related variable on new game. Fixes bug where devices
couldn't switch roles or join a new game.
2009-02-28 19:27:45 +00:00
ehouse
4db8c5cddf Make all of a non-server's players local. 2009-02-28 19:25:46 +00:00
ehouse
9b4ff54f03 fix checkServerRole which was incorrectly counting players in client
case.
2009-02-28 19:25:08 +00:00
ehouse
a9ca60729d plug memory leak by closing relay socket when quitting 2009-02-28 19:19:42 +00:00
ehouse
ae7caae236 Lots of changes to make gtk version better test with relay: make
possible to start without specifying comms params, to switch roles
and/or number of players when starting new game; clean up dialogs,
esp. use notebook widget to have tab switch between comms types.
2009-02-28 18:52:44 +00:00
ehouse
08e5711b22 include pid in log for better multi-device debugging 2009-02-28 18:50:21 +00:00
ehouse
f751b1ebd9 test script, first draft. 2009-02-28 16:31:34 +00:00
ehouse
8ad14327e2 fix assertion on exit: nuke mempool after everything it contains; call
gtk_main_quit rather than gtk_exit() so can exit from main()
2009-02-28 16:31:03 +00:00
ehouse
a0cb733125 Add an http interface (read-only web console). 2009-02-28 16:15:59 +00:00
ehouse
498f8fdb45 Empty out queue and use existing code to re-add elems we want to keep.
Candidate for 4.2.
2009-02-28 16:11:09 +00:00
ehouse
48627a3f11 assert queue ok after deleting. Candidate for moving to 4.2 branch if
to be used for Palm.
2009-02-28 15:06:12 +00:00
ehouse
45d41d2872 Fix crasher: removing ACK'd messages left list in inconsistent state.
Candidate for moving to 4.2 branch if to be used for Palm.
2009-02-28 14:40:50 +00:00
ehouse
5d243cb4f7 minimal test for comparing cegcc versions 2009-02-25 03:45:14 +00:00
ehouse
66e4053f06 start adding conns dialog 2009-02-24 04:34:37 +00:00
ehouse
14c1e9fd8b Create type to hold array rather than passing array whose lenght is assumed. 2009-02-23 04:01:15 +00:00
ehouse
7581f35c4b add tarball target to help 2009-02-21 17:15:09 +00:00
ehouse
7248ee8ad9 Make it possible to see comms dialog in read-only mode when role
selector is disabled (for game info use of new game dialog.)
2009-02-21 17:03:30 +00:00
ehouse
ae0b8211fe Toward a palm build whose only comms mode is relay (no IR, which was
always default.)  Plays half a robot-robot game via relay as client --
that is, debugging remains.
2009-02-17 05:54:28 +00:00
ehouse
d5cede0150 Add enum to debug-only logging. 2009-02-14 16:24:06 +00:00
ehouse
3026549ab3 Draw arrow only if inval bit set and cell is otherwise unoccupied.
Fixes wince bug where tile dragged onto arrow disappears.  Should be
merged to 4.2 branch.
2009-02-14 16:23:18 +00:00
ehouse
7c7eb2310c Use new bufqueue util 2009-02-09 02:51:43 +00:00
ehouse
771b9d9169 Add simple helper for keeping a queue of buffers in a single array. 2009-02-09 02:44:58 +00:00
ehouse
e5447c5029 fix leak of packet buffers; get rid of multithread code. 2009-02-07 18:20:16 +00:00
ehouse
11e63134c4 commented-out setting of default relay host name 2009-02-07 18:18:24 +00:00
ehouse
628b39ba65 detect duplicate initial connect packets by checking what socket they're on. 2009-02-07 18:17:17 +00:00
ehouse
1fa517693a log size of incoming packets 2009-02-07 18:15:17 +00:00
ehouse
f42142f52e validate initial message correctly when comms heartbeat not being
used; improve logging.
2009-02-07 18:14:28 +00:00
ehouse
5c2f7496b8 If platform doesn't provide a game id, use current seconds. 2009-02-07 18:12:46 +00:00
ehouse
d4de570358 Handle case where packet contains several messages; attempt to send on
socket-writable and on receiving message to be sent; cleanup.  With
this change full robot-vs-robot game has worked over relay, but not
reliably.  I think it's the relay's fault.  Still tested only on Win32.
2009-02-01 16:46:00 +00:00
ehouse
8026322e8d Put back code initiating connection when starting client game. 2009-02-01 16:43:01 +00:00
ehouse
62d247ee49 Helps to compile platforms too before checking in... 2009-02-01 16:20:18 +00:00
ehouse
4b969503e3 new files into svn:ignore 2009-02-01 16:03:31 +00:00
ehouse
7a24d40d1f Attempt to detect connections that are duplicates by checking if that
socket is already in a connection.  This doesn't seem to always work,
and I may be leaking cref instances when it does, so needs debugging
still.
2009-02-01 16:00:20 +00:00