Eric House
dff130d6c6
ignore log dir
2018-05-31 21:23:10 -07:00
Eric House
d240e30bf4
test script: log and show tiles left in tray
...
Once the pool count drops to 0, start showing the number of tiles left
in the user's tray. This prevents there being a long time when nothing
seems to be changing *and* the script from exiting early because it
thinks all games are hung.
2018-05-25 21:36:25 -07:00
Eric House
1821d197b9
fix to compile on 32-bit system
2018-05-23 19:48:30 -07:00
Eric House
cee7d696fc
fix stuff to make valgrind happy
2018-04-17 21:13:53 -07:00
Eric House
1b71198d4e
add valgrind option to test script
2018-04-14 10:48:20 -07:00
Eric House
ca54371515
tweaks to test script
...
Make fewer games with > 2 players, as that's rare. Fix calculation of
total number of launches to include games that have ended.
2018-04-14 10:42:53 -07:00
Eric House
317df71588
more valgrind fixes
2018-04-14 10:17:12 -07:00
Eric House
05892c630e
lazy: use glib to avoid gcc warnings
2018-04-14 09:39:27 -07:00
Eric House
3bb6f842b2
fix valgrind-flagged errors
2018-04-14 09:13:43 -07:00
Eric House
afbf5a2218
fix python script to catch relay.py errors
2018-04-06 21:50:13 -07:00
Eric House
89809e051d
compile with latest gcc (untested on old)
2018-04-06 21:49:51 -07:00
Eric House
4504302b3b
make "release" builds compile again
...
Release isn't really a thing on linux, but I'm fixing something that
only reproduces when DEBUG is undefined.
2018-02-18 11:30:54 -08:00
Eric House
19a6672785
don't show current players tiles in list of remaining
2018-01-18 22:02:06 -08:00
Eric House
af58110489
add missing deb packages
2017-12-20 21:45:20 -08:00
Eric House
da1c3f992a
Merge branch 'android_branch' into relay_via_http
2017-12-15 07:20:53 -08:00
Eric House
2e71aedc02
fix --game-dict option
2017-12-09 21:32:05 -08:00
Eric House
8d10dca23e
pull in test scripts from dev branch
2017-12-09 20:39:16 -08:00
Eric House
243eb213bb
make reply messages a param within result
...
Makes it easier to debug by adding stuff on the relay end
2017-12-06 18:57:48 -08:00
Eric House
17d3f14d9e
kill script when no change for two minutes
...
by default -- there's a flag for that too.
2017-12-03 17:05:02 -08:00
Eric House
45bb36e66c
pad log and db file names for better sorting
2017-11-30 07:43:04 -08:00
Eric House
f1b91f4df2
exit if tile line hasn't change in 2 minutes
2017-11-29 20:39:15 -08:00
Eric House
12ab4bdc5c
print total runtime on exit
2017-11-29 20:02:27 -08:00
Eric House
db0d5ef746
tweak display; add signal handler for clean shutdown
2017-11-29 19:32:27 -08:00
Eric House
f9c92ca34f
tweak device-in-game summary
...
Group devices by game so connectivity is easier to watch.
2017-11-28 07:08:41 -08:00
Eric House
039dcdf0cc
print how long run has left
2017-11-19 19:40:29 -08:00
Eric House
ae98425c21
output game progress as a table
2017-11-17 08:06:23 -08:00
Eric House
e7d00cbad4
fix TIMEOUT calculation
2017-11-16 08:29:22 -08:00
Eric House
5ff6f2ca22
fix TIMEOUT calculation
2017-11-16 08:27:51 -08:00
Eric House
ba9b94a0c6
move g_free after last use of ptr
...
(Made same on another branch but couldn't cherry-pick)
2017-11-16 08:18:39 -08:00
Eric House
f45dcb36b1
rewrite of shell script in python3
...
translate the most-used features of my too-big-for-bash script into python3,
which is clearly much better suited. Tried to keep the structure and variable
names intact so that diff has a chance of showing something, but when a class
replaces a bunch of arrays that were being kept in sync there's only so much
you can to. Currently doesn't support stuff like app upgrades and switching
from tcp to udp, but those should be relatively easy to bring over from the
.sh when/if I need them.
2017-11-16 08:15:06 -08:00
Eric House
9d02237f19
add assertion to catch too many players
2017-11-16 08:14:49 -08:00
Eric House
236124319a
rewrite of shell script in python3
...
translate the most-used features of my too-big-for-bash script into python3,
which is clearly much better suited. Tried to keep the structure and variable
names intact so that diff has a chance of showing something, but when a class
replaces a bunch of arrays that were being kept in sync there's only so much
you can to. Currently doesn't support stuff like app upgrades and switching
from tcp to udp, but those should be relatively easy to bring over from the
.sh when/if I need them.
2017-11-16 08:04:18 -08:00
Eric House
8b4042a082
add assertion to catch too many players
2017-11-16 07:59:06 -08:00
Eric House
768b63df24
move free() after last use of ptr
2017-11-15 05:48:45 -08:00
Eric House
033ceab9d1
log outgoing params
2017-11-13 07:26:47 -08:00
Eric House
057728c287
make gtk include an invite ID in rematch invitations
...
otherwise Android refuses to accept the second "" it receives.
2017-11-11 16:39:09 -08:00
Eric House
cb87a849ab
rename dict symlink
...
It breaks rematch that "dict" is being passed to the Android client from
the linux side, and this is easier than figuring out how and when to
dereference the link.
2017-11-11 16:12:06 -08:00
Eric House
e2c6480992
fix linux client
...
everything takes one param now, and post sends an array
2017-11-11 12:57:33 -08:00
Eric House
f2c4c82129
a shot at no-conn connecting
...
Ideally the comms module wouldn't go through its connecting routine in
order to join a game. To that end I added a join() method to relay.py
and code to call it. Joins happen (pairing games, starting new ones,
etc.), but after that communication doesn't. First part of fixing that
would be to make cookieID persistent and transmit it back with the rest
of what join sends (since it's used by all the messages currently sent
in a connected state), but I suspect there's more to be done, and even
that requires a fair number of changes on the relay side. So all that's
wrapped in #ifdef RELAY_VIA_HTTP (and turned off.)
2017-11-10 21:34:02 -08:00
Eric House
ecc247d56d
fix a couple of obvious bugs
2017-11-10 20:30:25 -08:00
Eric House
7efcdf0cb8
script for tracking message delivery
...
The http-based comms flow is stalling. This will help figure out why.
2017-11-04 09:27:33 -07:00
Eric House
1648c9b3e3
tweak to start GTK games and run a long time
...
I'm trying to fix game-start-time right now....
2017-11-04 09:27:33 -07:00
Eric House
3a2953427a
combine adjacent QUERY tasks
...
Trying to reduce the size of the queue. Eventually the lists of relayIDs
will need to be merged.
2017-11-04 09:27:33 -07:00
Eric House
24171d8317
log more about tasks
2017-11-02 07:16:51 -07:00
Eric House
55f5b500e3
cleanup: method names and logging
2017-11-02 06:19:35 -07:00
Eric House
220918e5cd
fix to compile with gdk3.2 (latest Debian)
2017-11-01 05:16:32 -07:00
Eric House
61937ac2d0
use float consistently
...
timeout of 0 was not making the relay.py script happy
2017-10-31 20:07:12 -07:00
Eric House
a1433e5f3d
add kill to relay.py; call from test script using curl
...
It'll eventually get called from Android and maybe linux, but for now
it's cool to have games disappear from the showinplay display when
they're done.
2017-10-31 20:05:07 -07:00
Eric House
8aeba861cf
fix script to move db files again
2017-10-31 06:38:32 -07:00
Eric House
8ee17493ac
log length of task lifetime
...
Need to figure out where the delays are.
2017-10-30 07:12:34 -07:00
Eric House
3d3a986dbd
log count of tasks abandoned in queue on shutdown
...
This confirms that I need to process outgoing messages more quickly,
likely by combining them.
2017-10-29 09:46:51 -07:00
Eric House
1373d0b1db
make min-run configurable
...
With the new http stuff, at least for now, it takes longer to get things
communicated and so killing games after 2 seconds of runtime meant no
moves ever got made. Making it configurable, and passing 10 (seconds)
means nearly all games in a large test run complete reasonably quickly.
2017-10-29 09:26:07 -07:00
Eric House
7b50c90aac
pass timeoutSeconds
...
ACK doesn't need to wait 2 seconds for a reply, and when it does so the
next send waits too. Eventually we'll want to combine messages already
in the queue into a single send. For now, this makes things better.
2017-10-28 20:12:05 -07:00
Eric House
3e9381d946
use a single timer and a queue for received data
...
using g_add_idle() for each piece of data received on the (background)
curl-query thread wasn't working. They were getting starved, and I think
some were considered duplicates and never scheduled. So add a single
timer proc called every 50 ms and a queue that it checks and into which
the network thread can put stuff.
2017-10-28 16:13:11 -07:00
Eric House
3215affd68
tweaks to test script
2017-10-28 15:31:17 -07:00
Eric House
952272172a
always log bytes sent
2017-10-27 05:58:35 -07:00
Eric House
a8f06b53e2
test script; log threadid
2017-10-27 05:57:40 -07:00
Eric House
051b6a7220
change resign-ratio to resign-pct
...
To match the way other pct stuff works, in part because it seemed it
didn't.
2017-10-25 20:00:55 -07:00
Eric House
14d9063ad0
add --room to error message/hint
2017-10-25 06:43:10 -07:00
Eric House
81df91c4db
add commandline option to spec log dir location
2017-10-25 06:34:55 -07:00
Eric House
d05a67ed4b
switch to milliseconds
2017-10-25 06:15:46 -07:00
Eric House
c68a067009
add option to not check moves except manually
2017-10-24 19:18:19 -07:00
Eric House
6ff13e6e23
move 'check moves' menu to main window
2017-10-24 19:14:23 -07:00
Eric House
342d229be1
refactor
2017-10-24 07:07:22 -07:00
Eric House
28bec6d456
implement checkForMoves menu again
2017-10-24 06:20:08 -07:00
Eric House
2cfac68f91
leave out entries without relayIDs
...
SQL is the easiest place to filter
2017-10-23 21:08:14 -07:00
Eric House
c3887b9c77
use a single thread and a protected queue
...
I don't want race conditions between threads talking to the server.
2017-10-23 21:07:05 -07:00
Eric House
4c15723f90
add http option to test script
2017-10-22 11:43:56 -07:00
Eric House
16ee3e9439
rename and make self-initing
2017-10-22 10:05:36 -07:00
Eric House
523fd26eee
make relay hostname configurable
2017-10-22 09:58:01 -07:00
Eric House
f49c81462c
wip: received messages dispatched to games
2017-10-22 09:29:15 -07:00
Eric House
43ffb156fc
wip: successfully get list of moves
2017-10-22 07:30:14 -07:00
Eric House
47a048d553
fetch relayIDs from db
2017-10-21 16:05:54 -07:00
Eric House
a65af79953
add check for being on main thread
2017-10-21 15:23:46 -07:00
Eric House
ec7fde3b62
add relayID to DB and to table
2017-10-21 14:59:10 -07:00
Eric House
a6602fabe0
hide menuitem when not in http mode
2017-10-21 14:24:38 -07:00
Eric House
37162e0471
fix curses commit; refactor & cleanup
2017-10-21 12:11:26 -07:00
Eric House
816df4336c
run post in thread since it takes time
2017-10-20 06:26:46 -07:00
Eric House
3045697d31
wip: process moves received
2017-10-19 21:20:14 -07:00
Eric House
5223ccabe1
add option to run forever
2017-10-19 20:50:33 -07:00
Eric House
4a1e51b54a
call query from C
...
Very rough code that fetches messages and does nothing with them.
2017-10-18 22:03:14 -07:00
Eric House
fbaa1f139e
add test method and implement query() endpoint
2017-10-18 21:18:30 -07:00
Eric House
e6e93c09ab
oops: use the right length
2017-10-18 07:19:43 -07:00
Eric House
c08be98fda
wip: include multiple packets in reponse json
2017-10-18 07:09:05 -07:00
Eric House
b86ffeb2b9
wip: data gets to relay and response handled
...
A device registers and a game can start. But we don't get to being
able to make a move yet.
2017-10-18 06:53:15 -07:00
Eric House
2dc80ac93f
talk to new python script to interface with relay
...
So far uses curl and json-c to send b64-encoded data to new script
which is able to echo the data. Next that script will need to open a
UDP socket to the relay and return results that appear before timeout.
2017-10-17 21:32:11 -07:00
Eric House
36aef059c1
remove assertion: deviceID can change
...
Hit this nuking the devices table mid-game. Games recover with the
assertion removed (and storing the new/non-matching deviceID)
2017-10-07 10:47:44 -07:00
Eric House
2cabf2332c
fix compiler-found (but trivial) error
...
debian's new compiler rocks. Effected only test code I never use, but
still nice to fix.
2017-10-07 08:03:18 -07:00
Eric House
618ee89add
fix crash drawing game timer
...
It's outside the normal begin_/end_draw flow and so cairo wasn't set up
as expected.
2017-09-20 07:26:26 -07:00
Eric House
0b0a50bd5c
add timestamp to chat messages, db and display
...
On send, add current seconds to message. Store and display in android
code. Display layout needs work.
2017-06-10 11:36:45 -07:00
Eric House
6e5973c55b
toward making tile picking work through rotations
...
Make face-up tile picker util method return void and add mechanism for
passing in selected tiles asynchronously, as has been done recently with
the rest of the once-blocking util callbacks. Works perfectly in the gtk
case. Likely crashes in curses (if picking face-up option is on.) In
java all the callbacks are there but rather than put up a UI we pretend
the user says "pick 'em for me" each time. Putting up a UI is next.
2017-03-09 20:36:14 -08:00
Eric House
c271202faa
make bad phonies alert non-blocking
...
Continue conversion of alerts that required blocking the JNI thread. Now
board_commitTurn() takes a second boolean indicating whether phonies
found have been approved by user. Common code informs user, and if he
approves client code calls board_commitTurn() again. In case where
turn's lost there's no call to make back, but there's the undesirable
change that if a robot moves next its move will be reported on top of
the turn-lost alert. Ideally new alerts would appear under, not on top
of, those that have not yet been dismissed.
2017-02-20 07:20:19 -08:00
Eric House
42aef7b85c
add UI to set phoniesAction creating new gtk games
2017-02-19 15:05:40 -08:00
Eric House
5f12d1a03b
assign faces to blanks asynchronously
...
Next step in converting util_ methods that required blocking: blank tile
assignment. Now post a query and add a method that the client code can
call when the user's decided. Include enough state (col, row, and
playerNum) so that it's probably pretty safe.
2017-02-18 19:16:32 -08:00
Eric House
ca6edcfc9a
make trade and move confirm non-blocking
...
Probably breaks curses build, but for gtk and Android
turn move and trade confirmation into a two-step process, making
board_commitTurn() non-interactive when called with a second
parameter. The old blocking util methods now return void and it's up to
the client code to interact (on the main thread) then re-call
board_commitTurn() if appropriate.
2017-02-17 08:58:20 -08:00
Eric House
1f2f4506c4
remove unused query option. Less to convert.
2017-02-17 06:30:54 -08:00
Eric House
2a0b21e5e8
make password fetching non-blocking
...
First attempt to stop blocking the jni thread: instead of returning a
password from a util_ method, have it include enough state that the UI
can return, put up a dialog, and then pass that state and the password
back and have them matched up again. I think this will work for the
remaining blocking Alerts too.
2017-02-17 06:23:44 -08:00
Eric House
4d5278704e
symlink changed!
2017-02-16 19:05:34 -08:00
Eric House
b96d44393a
add and use boolToStr
...
Just to make log messages a bit more helpful. Should be no behavior
change, and no change in code generated in release builds.
2017-01-22 14:15:29 -08:00
Eric House
92029b2443
fix to build with CURSES_ONLY flag
2016-12-22 08:57:54 -08:00
Eric House
55d86d5ca2
don't try drawing snapshot in curses mode
...
Was crashing on game save. Add to main launchParams struct whether we're
in curses or gtk mode and only save snapshot in latter case.
2016-11-09 07:38:41 -08:00
Eric House
3174705d63
gtk: remove assertion failure creating new games
...
I think this was related to changing the order in which save operations
happen and that it's no longer valid to insist that there already be a
rowid at this point, but could be wrong....
2016-09-26 08:24:47 -07:00
Eric House
e07686491c
gtk: summarize before saving
...
Fixes problem with list view always being a move behind, since it's
saving not summarizing that was triggering the refresh, but summarizing
that added the data from which refresh/list view drew.
2016-09-20 08:27:17 -07:00
Eric House
5742c5cb12
gtk: save game on every turn change
...
Idea is to have the games list stay in sync, but in fact it stays one
move behind, at least in a typical standalone human-vs-robot game. So
this is incomplete.
2016-09-19 09:12:23 -07:00
Eric House
7994c42691
allow board cells to be wider than tall
...
There are some screen dimensions, especially with dual-pane mode, where
the board is just bit narrower than the screen. Rather than have narrow
white borders, allow the cells to take up the slack. The API takes an
upper bound on the ratio of width to height so things shouldn't get too
odd looking.
2016-09-15 20:37:29 -07:00
Eric House
baf825e7db
add gtk-3 to set of debs Makefile knows to install
2016-09-13 19:45:29 -07:00
Eric House
b1ce992d23
gtk: don't resize scrollbar
...
Mistaken option to gtk_box_pack_start() meant the scrollbar got
allocated space along with the board when the container expands, not
what you want with a scrollbar.
2016-09-04 20:46:25 -07:00
Eric House
c4efebad71
gtk: add localTurn column; format date
2016-08-26 07:26:33 -07:00
Eric House
1d1e971120
gtk: add initial size/position for window
2016-08-26 07:21:00 -07:00
Eric House
4c923ead08
add isLocal param to server_getCurrentTurn
...
I want to store this information separately in summaries tables so
e.g. games can be displayed sorted by whether it's the local player's
turn.
2016-08-26 06:58:55 -07:00
Eric House
457970b2d2
gtk: the tiniest bit of cleanup
...
Trying and failing to get just the content area of the tree view to
scroll, whether by putting it in its own container or hooking into the
scrollable interface tree view allegedly supports.
2016-08-10 14:53:44 -07:00
Eric House
bf7a38da08
copy more state into board being used for snapshot
2016-08-05 21:19:49 -07:00
Eric House
a275730824
gtk: fix crash when hit rematch button
...
Not all games have a draw context. Check!
2016-08-05 18:37:35 -07:00
Eric House
012b015f82
gtk: save games list window size and position
2016-08-05 18:31:17 -07:00
Eric House
25723bbb0f
put main games window in a scrolling container
2016-08-05 12:02:05 -07:00
Eric House
7f513313b0
fix crash loading new game before snapshot exists
2016-08-05 10:37:42 -07:00
Eric House
0c6283ea63
add board_drawSnapshot
...
Toward something that should work with android: pass a potentially
unique draw context into new method that creates a new board just for
the draw and makes its scoreboard and tray disappear.
2016-08-05 10:23:39 -07:00
Eric House
3c0a128266
produce, store and display actual snapshot
...
Done in a way that won't work for Android just to try out the gtk
way. Tweaks and reuses the existing draw context and board, which is
precisely what the android version can't easily do.
2016-08-05 09:42:55 -07:00
Eric House
aeee2d801a
toward snapshots in gtk version
...
Add new "snap" blob to db and pixbuf column to games display table, and
add code to store and retrieve from db. What's stored now is a
hard-coded file, so next up is generating an actual snapshot from the
game.
2016-08-05 08:29:25 -07:00
Eric House
b4393d5965
fix cursor-hiliting of player in scoreboard
2016-08-04 16:13:54 -07:00
Eric House
df6c1e0d3a
make beginDraw return a boolean so can abort
...
When a gtk3 window's shutting down it appears we can't get a cairo_t*
for it. This change makes it possible to turn that fact into aborting
the whole draw operation.
2016-08-04 15:12:05 -07:00
Eric House
3c7af0023e
fix curses drawtable fallback
2016-08-04 14:16:52 -07:00
Eric House
80f894b869
fix remaining gtk dialogs
2016-08-04 12:43:33 -07:00
Eric House
66e26c1489
hook up draw signal
...
Whenver we get the draw signal, invalidate the whole board and draw
it. This is resulting in a lot of wasted effort that might be mitigated
if I figured out how to get the invalid region out of the cairo_t*
that's passed in, but this is a test app and my machine's pleny fast. So
go with it for now.
2016-08-04 11:41:43 -07:00
Eric House
1892d24317
get all layouts from the same place
2016-08-03 17:56:38 -07:00
Eric House
9521b71be9
fix remtext rendering
2016-08-03 17:35:44 -07:00
Eric House
670f0034af
fix a bunch of color setting
2016-08-03 16:54:45 -07:00
Eric House
eb6fb508bf
fix crash dragging tiles
...
Add new begin() and end() methods around all drawing and get/destroy
cairo context there.
2016-08-03 15:50:17 -07:00
Eric House
b57e50a255
snapshot toward building with gtk3
...
Board renders, but only when touched. Tray and scoreboard skipped for
now. Lots of changed still to go, and some asserts added where I didn't
want to stop to solve a compile problem.
2016-08-03 15:19:12 -07:00
Eric House
2ade75158b
gtk: update constants
2016-08-03 08:20:05 -07:00
Eric House
799e89fdc1
gtk: use accessors instead of peeking at structs
2016-08-03 08:09:47 -07:00
Eric House
bd8e829a06
replace deprecated gtk symbols (lightly tested)
2016-08-03 07:11:02 -07:00
Eric House
2ff7582688
enforce and follow new gtk header rules
2016-08-03 06:15:49 -07:00
Eric House
53e40be2e3
add lastMoveTime to summary table (gtk version)
2016-07-25 08:28:37 -07:00
Eric House
406eb77f54
post notification (rather than just play sound) when turn comes into
...
boarddelegate but it's not visible
2016-04-14 22:16:18 -07:00
Eric House
f288fe2860
use malloc to allocate storate for hci_inquiry instead of the
...
stack. That *seems* to fix it always returning 0, something that
changed with newer version of linux or libbluetooth or who knows
what. BT still doesn't work from linux, but this is a necessary start.
2016-04-09 15:49:11 -07:00
Eric House
9fb5f49595
when a game's opened from an Android db, there's no row data to delete
2016-03-04 19:28:38 -08:00
Eric House
50107949f2
merge local heads
2016-02-18 07:47:46 -08:00
Eric House
53f44af199
fix assertion failure by handling missing case
2016-02-18 07:45:41 -08:00
Eric House
4157169d91
add dict.xwd so I don't have to keep creating it
2016-02-16 20:48:28 -08:00
Eric House
19713a40ad
add param to comms_resendAll to limit type of message sent
...
(e.g. BT). Meant to be used when a single type has become available.
2016-02-02 07:01:48 -08:00
Eric House
22dde029c8
Merge tag 'android_beta_100' into android_branch
...
ready for release
2016-01-03 11:36:37 -08:00
Eric House
a4a135b953
up CV version for testing
2016-01-01 19:30:35 -08:00
Eric House
dd242c3ff5
make undo ratio operate on 1/1000 scale -- and even with this it's
...
overwhelming when more than 40 clients are running.
2015-12-30 21:23:29 -08:00
Eric House
0a91f852cc
add commented-out flag
2015-12-30 05:59:52 -08:00
Eric House
4ed843a529
start UDP at 100% by default since all clients will be that way now
2015-12-29 19:01:15 -08:00
Eric House
e3d6cb74fc
for some reason log files are now considered binary by grep, so -a option's needed
2015-12-29 18:59:52 -08:00
Eric House
87517edd6f
fix counting of messages sent by "Resend messages" menuitem: actually
...
count them, and do so based on new msgNo passed from comms that's
concatenation of channelNo and msgID so that duplicates (over multiple
transports) aren't counted twice.
2015-09-30 06:50:04 -07:00
Eric House
e5cf0ee4fb
Merge branch 'android_branch' into relay_noconn
...
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2015-08-19 07:44:17 -07:00
Eric House
6d7123c27a
fix curses app for standalone games (at least to not crash)
2015-08-19 06:05:18 -07:00
Eric House
47954f82d0
add index of sending player to chat transmission, and on receiving
...
side translate that into showing the sender's name in
notification. Not yet done: replacing silly "not me" in chat listing
with same, but now it should be easy.
Conflicts:
xwords4/android/XWords4/archive/R.java
2015-08-12 07:43:20 -07:00
Eric House
8f7267b3ec
add index of sending player to chat transmission, and on receiving
...
side translate that into showing the sender's name in
notification. Not yet done: replacing silly "not me" in chat listing
with same, but now it should be easy.
2015-08-12 07:36:36 -07:00
Eric House
0bb51e8b93
show a toast when hint can't find anything, on the principle that user
...
should see some response to every action.
Conflicts:
xwords4/android/XWords4/archive/R.java
2015-07-26 12:09:15 -07:00
Eric House
dad39eedde
Remove devID from comms address. It's not needed yet, may never be,
...
and I don't want to store it until it is.
2015-07-22 06:16:29 -07:00
Eric House
5dc8291981
show a toast when hint can't find anything, on the principle that user
...
should see some response to every action.
2015-07-11 16:24:21 -07:00
Eric House
d084ccec2b
provide non-empty default names for linux players
2015-07-11 15:16:32 -07:00
Eric House
1eb82d5285
android doesn't send its devid in the nli struct, so don't assert it's
...
there.
2015-07-11 14:27:01 -07:00
Eric House
1423bc933d
rename common file and methods for consistency with android. No logic
...
change.
2015-07-11 08:40:49 -07:00
Eric House
b5ae54f313
use common/native NetLaunchInfo to implement invite-via-relay that
...
works between linux and Android clients. Required renaming so struct
names and names of fields within match in c and java code. The point
is to test this as the foundation of rematch: now you have to type in
a deviceID in order to invite, which clearly sucks for users. Either
that goes away, or it's replaced with something that scans existing
games and lists past opponents as possible invitees.
2015-07-10 23:19:38 -07:00
Eric House
1f3959fc71
fix rematch initiated by a guest: needs to be host in the game it
...
creates.
2015-07-06 21:18:51 -07:00
Eric House
08e6c2b358
use a static to remember last devid typed
2015-07-06 20:52:22 -07:00
Eric House
0f33228155
get rematch working on linux, at least for two-device games. (Handling
...
the case where one of several guests wants to rematch is a hard
problem for later.) Requires passing old-style relayIDs (connname plus
device index) when devIDs aren't available, which they may not always
be.
2015-07-06 20:28:16 -07:00
Eric House
3a896df199
show game-over dialog (with its Rematch button) when a over game is
...
opened
2015-07-01 18:38:33 -07:00
Eric House
8f794fbd32
beginning of support for invite-by-relay (which is mostly interesting
...
for Rematch): works for linux version, provided you know the relayID
of the device you're inviting. Added to common/ a stream-saving
version of java's NetLaunchInfo I'll probably want to use there too
for cross-platform compatibility (there being no jni support for
json.)
2015-07-01 07:10:45 -07:00
Eric House
1b6ce4861f
don't crash when invitation dialog cancelled
2015-06-28 09:00:41 -07:00
Eric House
d479486521
change defaults so a with-games-ui/udp game interface comes up by
...
default.
2015-06-26 07:35:24 -07:00
Eric House
49dc8e7d10
print index of game being killed so easier to find it in the list of
...
tiles-per-game
2015-05-17 11:53:48 -07:00
Eric House
e66260950e
change final score formatting so it can be properly localized.
...
Note: because the substitution is done in common code I can't use the
positional specifiers (%1$s vs %s) and so this breaks the generated
"translations". The scripts that do the generation need to be fixed to
understand the formatted="false" attribute.
2015-05-13 07:51:32 -07:00
Eric House
09b36814bd
fix to be able to open android xwdb files again. For the record,
...
here's a command that works, providing the game's wordlist and rowid:
run --game-db-file /tmp/xwdb --game-db-id 799809255 --dict-dir \
/var/www/and_wordlists/English --dict-name TWL06_2to15.xwd
2015-04-07 20:22:48 -07:00
Eric House
5f33d99c2e
toward making full use of getQuantityString(): add util method to pass
...
quantity through to java world, use it, convert English <string>
resources to <plurals> (using python script) based on parallel changes
in French, and modify callsites to call getQuantityString() where
R.string.xxx became R.plurals.xxx.
2015-03-18 21:23:30 -07:00
Eric House
6d8f13df9e
Merge remote-tracking branch 'sf/android_branch' into android_multi2
...
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2015-02-19 06:45:11 -08:00
Eric House
59bf77c871
fix occasional assert by increasing buffer size
2015-02-19 06:39:32 -08:00
Eric House
ad6be1bb7e
add debug-only "tag" to open games so logging can more easily track
...
what's going on when multiple participants in a single game are on the
same device. But for a couple of strings passed into the jni the
changes are only in DEBUG code.
2015-02-09 19:15:43 -08:00
Eric House
acf5a01374
Fix assertion failure: comms_msgProcessed() must be called whenever
...
comms_checkIncomingStream() is
2015-02-08 11:29:27 -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
cf3c219b69
fix non-DEBUG compile
2015-02-07 12:54:46 -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
3209fc1b74
log sqlite error codes as strings in attempt to track down the
...
occasional assertions failure.
2014-12-28 21:40:31 -08:00
Eric House
3b7afa4557
pass --server if not setting forceChannel
2014-12-28 21:39:11 -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
d81f022c78
Merge branch 'android_branch' into android_multi2
...
Conflicts:
xwords4/linux/scripts/discon_ok2.sh
2014-12-15 16:48:10 -08:00
Eric House
30d2c84dcc
so tests can continue, comment out an assertion that indicates a relay
...
bug that neverless doesn't prevent games from running to completion.
2014-12-15 16:43:24 -08:00
Eric House
eb5ae9edd3
declare as little-a array so key will be listed in numeric order
2014-12-15 16:41:15 -08:00
Eric House
45ef4fcb65
add --dup-packets calling through to linux client
2014-12-15 16:14:59 -08:00
Eric House
4835afbe4a
simplify and print in order
2014-12-15 15:29:37 -08:00
Eric House
7560156351
summarize the number of tiles left every 20 passes to give better view
...
into games' progress
2014-12-15 15:11:29 -08:00
Eric House
1eb7d01be5
add option to turn on duplicate packets -- which fires an assert on
...
the relay instantly.
2014-12-11 20:23:51 -08:00
Eric House
00d19eada6
log a few more message checksums
2014-12-10 07:48:51 -08:00
Eric House
9ff7cd1ff9
comment out dead code so I stop trying to debug it
2014-12-10 07:47:36 -08:00
Eric House
97092e361c
update grepped string to match changes in logging
2014-12-08 06:23:18 -08:00
Eric House
f84f9aa85f
include timestamp of switch to UDP -- in case it needs to be
...
correlated with logs
2014-12-08 06:20:47 -08:00
Eric House
b2b60d6c48
add commandline params that disable comms types on game creation so
...
relay not connecting initally can be tested.
2014-12-02 06:49:35 -08:00
Eric House
4b30d98bd0
fix to compile with DEBUG off
2014-11-20 07:16:37 -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
c008f55133
add invite button only if I'm a host and am missing players
2014-11-12 06:52:40 -08:00
Eric House
552ab8fa48
fix assertion (leaving the confusion in the code about tracking the
...
open relay socket)
2014-11-11 07:36:55 -08:00
Eric House
ba44863381
add simple tell() as wrapper on ask()
2014-11-11 07:35:56 -08:00
Eric House
10a960930c
collect number to be invited. (Not tested: whether a number other than 1 works)
2014-11-11 07:35:14 -08:00
Eric House
ba6151c385
remove param that causes assert to fire
2014-11-10 07:31:51 -08:00
Eric House
c704b7ff4f
remove dead code
2014-11-10 07:31:33 -08:00
Eric House
786d775878
don't pass null address
2014-11-07 20:25:13 -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
3d9ee4b9f9
use app define, not relay's
2014-11-05 21:45:14 -08:00
Eric House
c516e1f77c
add code to log md5 sums of udp packets sent and received. These match
...
relaycon logging to be added shortly.
2014-11-05 21:42:03 -08:00
Eric House
405b3eef93
remove dead/commented out code
2014-11-05 21:33:54 -08:00
Eric House
564e671b47
quick hack to add checkboxes for turning off transport sends and
...
receives to be used for testing after it's actually hooked up. This
is just the UI.
2014-11-05 18:48:53 -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
fc6ccf217f
fix formatting of types: don't crash on too-small buffer, and add
...
separator only when needed.
2014-11-02 17:25:56 -08:00
Eric House
f853aad904
add checkbox to tab label when selected
2014-11-02 11:55:46 -08:00
Eric House
71fbae622a
clean up code a bit
2014-10-28 20:13:48 -07:00
Eric House
1ca5515b07
Add checkbox to each type tab indicating whther the game will use that
...
addressing type to communicate.
2014-10-28 08:08:11 -07:00
Eric House
9b336bde49
fix crash: must iterate when multiple types are possible
2014-10-28 08:04:05 -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
9886d5a6e6
merge over changes to run with new bash
2014-10-22 18:57:33 -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
14a0ca95fe
don't crash with, and correctly save, multiple addresses
2014-10-15 07:52:35 -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
737af802b0
don't abort if core file count goes down -- I probably removed some
...
old thing
2014-10-15 06:38:43 -07:00
Eric House
3534bc0e49
print usage prettier (with an apparent off-by-one error)
2014-10-01 19:52:07 -07:00
Eric House
b82383a5ad
fix -- I hope -- array syntax that was getting lots of games launched
...
without an app (until it got upgraded)
2014-10-01 19:49:46 -07:00
Eric House
92292ad1fe
fix problems with undeclared variables that older bash didn't mind
2014-09-25 21:45:44 -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
abf12e90da
save a bit of work setting up game manually by assuming two players --
...
but ths must be happening too late because not all takes effect.
2014-09-25 06:35:10 -07:00
Eric House
3668b7d8a7
merge android_branch -> android_shipbt
2014-09-24 20:51:23 -07:00
Eric House
9ad8ad601c
add cur dir to empty dict search path
2014-09-24 07:29:57 -07:00
Eric House
64b30b68d2
merge android_branch -> android_shipbt
2014-09-23 21:33:57 -07:00
Eric House
b4ef9ced87
merge android_branch changes
2014-09-23 21:33:02 -07:00
Eric House
113c7a13d2
print number of devices left
2014-09-23 21:26:46 -07:00
Eric House
49689ab04c
always log error message
2014-09-23 07:30:34 -07:00
Eric House
ab64197ac4
fix recent booboo: it's not an error for server_initClientConnection()
...
to fail here.
2014-09-23 07:30:23 -07:00
Eric House
049cf284c5
toward getting direct-ip addressing working again: add a tab to the
...
connections dialog
2014-09-20 18:08:33 -07:00
Eric House
6f07098cf3
return succes from server_initClientConnection()
2014-09-14 13:42:11 -07:00
Eric House
88248131da
show new client-formatted turn summary in notification; remove old
...
common-formatting code.
2014-08-26 21:37:33 -07:00
Eric House
2d08848715
snapshot: toward having a better description of the last move in
...
notifications.
2014-08-26 06:55:26 -07:00
Eric House
622760b71a
post response to long-tap on player as a gtk dialog rather than just logging it.
2014-08-25 07:52:18 -07:00
Eric House
4231ed1108
fix refcount leak
2014-03-11 21:59:53 -07:00
Eric House
a4302897e2
enlarge dictmgr to track a compile-time defined number of dicts
2014-03-10 21:01:24 -07:00
Eric House
55267f2e42
add memmove
2014-03-10 20:25:38 -07:00
Eric House
6203a23c62
don't crash in networked games
2014-03-10 18:58:16 -07:00
Eric House
5500d36cde
add and use dict manager that caches, using refcount, dicts across games. Allows multiple games to be opened, and open at the same time, with only one instance of a dict ever created. Works on linux; not used or tested yet on Android.
2014-03-09 19:12:21 -07:00
Eric House
a7c114e3f9
refcount dicts. Model "owns" its copy and so increments the refcount when gaining one and decrements the count on any being replaced (and on all on exit). This is setting up the real change, which is to let the java world wrap dicts in objects that hang onto them until they're destroyed, which should fix problems where dicts are referenced after they've been destroyed.
2014-03-08 20:57:27 -08:00
Eric House
8a6adfec34
cleanup -- no logic change
2014-03-08 20:51:49 -08:00
Eric House
7002ff11c7
fix so non-DEBUG build compiles
2014-03-04 07:07:01 -08:00
Eric House
3ecd0a4b03
fix to compile without DEBUG
2014-02-28 04:58:25 -08:00
Eric House
e6564c679c
use ccache if present
2014-01-21 07:10:13 -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
459c12d91f
copy string's null terminator too
2014-01-06 07:05:34 -08:00
Eric House
19c70ccdcb
fix mistaken scoreboard size calc
2014-01-06 06:54:56 -08:00
Eric House
3702a9f326
don't constrain screen size
2014-01-06 06:40:59 -08:00
Eric House
ac969793ea
remove assert preventing large screen
2014-01-06 06:38:08 -08:00
Eric House
83692fd2e8
format rem text as two lines
2014-01-05 13:30:27 -08:00
Eric House
123141e0df
draw scoreboard entries centered
2014-01-05 13:15:09 -08:00
Eric House
b43855a313
fix curses build for 64bit compile and to use common layout (meaning
...
tray is now under the board unstead of to the right). Works on 64-bit
system at least for non-networked games.
2014-01-05 13:04:59 -08:00
Eric House
093a260f1d
fix memory corruption on 64-bit systems
2014-01-02 07:48:12 -08:00
Eric House
abb8da44ba
open game on double-click of row
2014-01-02 07:10:00 -08:00
Eric House
40c04be47b
call sqlite3_initialize() as recommended by docs
2014-01-02 07:09:23 -08:00
Eric House
e15fb02d8a
add ability in ask dialog to display buttons with arbitrary text
...
returning custom results. Use to add "Rematch" option (which so far
only fires an assert when chosen.)
2013-12-30 07:16:52 -08:00
Eric House
35c12eb7bb
add --ask-timeout param
2013-12-30 07:08:43 -08:00
Eric House
6d84dfea7e
cleanup: remove '2' from function and struct names
2013-12-30 07:08:42 -08:00
Eric House
bba0b79763
add logging
2013-12-30 07:08:42 -08:00
Eric House
12932bf788
fix crash on 64-bit system
2013-12-30 06:46:57 -08:00
Eric House
ebdf5ed492
fix to compile on 64-bit system (untested on 32-bit :-)
2013-12-27 19:13:54 -08:00
Eric House
d29840434f
pass, save and restore port; read several messages at once
2013-12-19 08:00:04 -08:00
Eric House
a1d5553266
fix invite button disabling logic
2013-12-19 07:58:32 -08:00
Eric House
75b6ecc325
add missing util function
2013-12-19 07:57:59 -08:00
Eric House
79fae43100
enable invite and commit buttons based on game state
2013-12-19 06:59:34 -08:00
Eric House
0ad18efcff
fix memory leaks
2013-12-17 22:16:52 -08:00
Eric House
bece99bb98
load dict named in invite
2013-12-17 22:11:21 -08:00
Eric House
f45f3bacbf
fix so invitation results in a playable game (though dictionary is not
...
yet available to invitation recipient)
2013-12-17 21:57:10 -08:00
Eric House
6bdd939531
rename field
2013-12-17 20:02:31 -08:00
Eric House
8d20c33b76
snapshot: still not correctly recording return address
2013-12-16 08:06:29 -08:00
Eric House
3c6ecb7ffa
ignore app
2013-12-12 21:10:44 -08:00
Eric House
2a56a0ba98
snapshot: more linux-sms stuff
2013-12-12 21:08:25 -08:00
Eric House
78d8c0398f
another snapshot: invites are received but don't create game correctly yet
2013-12-12 07:58:02 -08:00
Eric House
5f97f8197c
progress on inviting via SMS
2013-12-12 06:08:56 -08:00
Eric House
1b5bda5da8
don't turn on SMS if no phone
2013-12-11 08:04:47 -08:00
Eric House
cad6cb8075
log when inotify kicks off
2013-12-11 08:02:44 -08:00
Eric House
833a3384b3
remove assert; add empty invite button
2013-12-11 08:02:29 -08:00
Eric House
7cffa27a88
snapshot toward implementing fake-sms as per-device rather than per-game
2013-12-11 07:54:26 -08:00
Eric House
a4f274a1f4
preserve and use sms settings
2013-12-11 07:02:44 -08:00
Eric House
f0c5d1f865
toward improving bt support in gtk client: add scan button that only
...
picks up devices currently open for discovery
2013-12-07 10:12:20 -08:00
Eric House
46a5f83bb1
shrink "netstat rect" to reasonable size
2013-11-16 18:25:09 -08:00
Eric House
dfdbd9a8a2
pass scoreWidth separately into formatting code so space can be left
...
for network status icon.
2013-11-09 05:34:23 -08:00
Eric House
b61e580b40
ignore .db files
2013-11-07 07:32:15 -08:00
Eric House
a26dced506
drawing tray tiles can fail, e.g. when font info not yet available, so
...
only clear bits when successful. Fixes problem where tray didn't get
drawn until tiles were somehow invalidated.
2013-11-07 07:29:54 -08:00
Eric House
9f1b0c5121
Specify relative height of scoreboard and tray in board_figureLayout,
...
and allow those to be 0.
2013-11-04 06:19:33 -08:00
Eric House
f0b554213b
assert rect isn't too small to inset
2013-11-04 05:59:18 -08:00
Eric House
184ac28ebc
fix to compile, and in gtk case to work, when COMMON_LAYOUT defined
2013-11-03 12:15:53 -08:00
Eric House
88b380503e
add function, not compiled by default, to return bounding rect of all
...
non-empty tiles. As a test, add menu that uses it to grey out that
region.
2013-10-27 21:51:30 -07:00
Eric House
fe8bb0932c
delete messages whose games have been deleted
2013-10-09 20:41:14 -07:00
Eric House
24509662e8
fix so standalone games don't crash!
2013-10-09 07:36:21 -07:00
Eric House
3b87c9562c
formatting
2013-10-01 07:50:00 -07:00
Eric House
4d4f76c8ae
assert not registering with RELAY_ID
2013-09-26 08:37:39 -07:00
Eric House
9169659c80
cleanup: let conversion to including devid and change in devid happen at different rates
2013-09-18 08:05:19 -07:00
Eric House
2629c07256
Address problem with devids (e.g. GCM): until now when you got a new
...
devid you tossed your relayID and reregistered. Which meant any
existing messages meant for your relayID were orphaned, and any open
games didn't know who they belonged to until you reconnected to them
with your new relayID. So: modify the UDP protocol (though not on
Android yet) to include both relayID and devid with registration, with
one or the other an empty string if not present or not changed from
earlier. I can't fix existing clients that are dropping their
relayIDs, but when one does a re-connect without a relayID I can look
it up from the existing game record, then reuse it rather than issue a
new one. Better than nothing -- and that protocol will be obsolete
soon anyway.
2013-09-14 21:06:14 -07:00
Eric House
c115752852
supply in linux client, and look for and store on relay, os version
2013-09-07 16:17:31 -07:00
Eric House
b3342c6e8a
for --clean-start option, try not to remove games not created by this script.
2013-08-28 07:29:23 -07:00
Eric House
063b01d3d8
change most len-as-short+bytes strings to vli+bytes; add device model
...
to what's passed for device registration, and store it in a new column
in devices table.
2013-08-25 21:20:26 -07:00
Eric House
d10e9f6235
use vlis for acks in both directions
2013-08-25 16:59:07 -07:00
Eric House
7e02db78db
change function name spelling
2013-08-25 16:14:42 -07:00
Eric House
91235f3be7
begin process of using variable-length-ints in udp protocol. Works
...
between linux client and relay, but unrelased features of Android
client will be broken until fixed.
2013-08-25 12:34:35 -07:00
Eric House
45998fd2c0
don't assert when packet size short is unexpectedly large. Not sure
...
why this happens, but it's not a reason to abort a test.
2013-08-21 21:28:47 -07:00
Eric House
2157706dcd
add client version and a desc string to devices DB and to reg info sent to relay
2013-08-20 08:09:45 -07:00
Eric House
47203437cc
register devices more often; add ctrl command to send text message to
...
device if possible, otherwise to post it to the db (mostly for testing).
2013-08-17 14:55:19 -07:00
Eric House
8ad549d2bd
query on null db fails, doesn't assert
2013-08-16 19:15:28 -07:00
Eric House
42bbc946ae
quote variable and echo when switching to udp
2013-08-15 07:20:22 -07:00
Eric House
ae21b6f0d8
use new --use-udp flag and, by default, switch devices from tcp- to
...
udp-based connections over time at a configurable rate.
2013-08-07 21:12:08 -07:00
Eric House
71ea59e7fb
separate whether app is using udp from whether it stores games in a
...
sqlite3 db so that it can switch mid-game -- that being something that
needs testing.
2013-08-07 21:09:48 -07:00
Eric House
b9450589c8
add new commandline option --use-udp. Not yet used.
2013-08-06 21:10:42 -07:00
Eric House
da54b1e5fb
add keepalive timers
2013-08-02 08:01:16 -07:00
Eric House
63ad3a196b
debug build asserts that packet is meant for this device, but
...
non-debug should drop those that aren't.
2013-07-29 07:30:46 -07:00
Eric House
d8a4b5ce29
include udp maxInterval, the number of seconds the relay's configured
...
to assume an address is still good when it hasn't heard from it, in
reg response reply, send that reply always, and read and log the new
field on clients. It will eventually be used to implement a
keepalive.
2013-07-29 07:27:30 -07:00
Eric House
6418513a6d
don't try to read from socket if == -1
2013-07-22 06:15:35 -07:00
Eric House
3a14b12cc5
exit when number of core files changes, not if it's non-zero
2013-07-20 12:52:32 -07:00
Eric House
49a2d099f0
include packet num in every udp packet. They start over on app
...
reboot, but add a bit of help with debugging.
2013-07-20 11:57:10 -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
3f59b31d51
Log received udp messages as b64-encoded strings. These match what the
...
relay's now logging
2013-07-18 07:07:25 -07:00
Eric House
1e6ff9b33c
include seed in chat messages to make sure they're unique
2013-07-18 07:06:20 -07:00
Eric House
93a7c7f817
fix to compile when DEBUG not defined
2013-07-17 06:52:35 -07:00
Eric House
d6fd79be44
log, and be more aggressive about closing, sockets on which errors occur
2013-07-16 06:43:30 -07:00
Eric House
e6e7154c82
close socket rather than proceed with what looks like a bad packet/connection
2013-07-16 06:42:21 -07:00
Eric House
27e90c2d2c
exit as soon as there's a core file
2013-07-15 07:16:35 -07:00
Eric House
8a4e766b32
make 50% of games communicate via UDP by default
2013-07-11 20:39:40 -07:00
Eric House
491b288631
assert that the seed's preserved for curses version too (where
...
clientToken is otherwise ignored since there's only one game per app
instance)
2013-07-11 20:39:10 -07:00
Eric House
9db54a5461
make linux version's gameToken combine game's seed with rowid so we
...
can test that the relay is keeping them straight
2013-07-11 20:01:17 -07:00
Eric House
d6658c5c08
don't show other_disconnected error message
2013-07-10 23:14:48 -07:00
Eric House
7dfd19a7a2
name change
2013-07-10 23:14:24 -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
4bde445c48
fix so gtk mode works too by providing storage for CurGameInfo
2013-07-09 18:19:22 -07:00
Eric House
5a20cc282c
fix so curses app works well enough that discon_ok2.sh script runs
...
successfully. GTK mode is untested and certainly broken.
2013-07-09 18:10:41 -07:00
Eric House
48fbf15a69
needed to quote variable
2013-07-09 18:07:03 -07:00
Eric House
f5696334a9
changes to get the merged code to compile but not included by git in the commit
2013-07-09 07:25:23 -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
923d41e0ee
fix to compile when DEBUG not set
2013-07-07 13:17:26 -07:00
Eric House
4b5af7ebdf
don't try to read from socket after it's been closed
2013-07-04 12:37:55 -07:00
Eric House
6cd3ebd780
improve logging
2013-07-02 18:31:02 -07:00
Eric House
0ac5d6d9e2
don't send more than three unanswered chats per boot -- to avoid
...
filling up the queues in a way that doesn't reflect real use.
2013-07-02 18:30:23 -07:00
Eric House
dd48cea912
don't log string before it's initialized
2013-07-02 07:26:32 -07:00
Eric House
9fca3792cf
don't pile on chat messages when relay isn't even connected: it's an
...
unfair test that doesn't duplicate what users will likely do.
2013-07-02 05:53:58 -07:00
Eric House
9ceb1615b3
replace tabs with spaces
2013-06-30 17:24:33 -07:00
Eric House
070590b3c2
cleanup
2013-06-30 08:34:09 -07:00
Eric House
b506a91068
add commandline params
2013-06-30 08:33:58 -07:00
Eric House
195f873ab0
tweak logging
2013-06-30 07:37:35 -07:00
Eric House
6fbf2d4a8b
use g_compute_checksum_for_data, removing self-written equivalent
2013-06-30 07:36:56 -07:00
Eric House
7efbfab0e5
fix crash in debug version: len of data to be summed needs to be 32 bits!
2013-06-30 06:50:57 -07:00
Eric House
1a73ab26ac
tweak logging
2013-06-28 20:33:27 -07:00
Eric House
17eda4e5e1
move md5sum code into separate function that relay can copy
2013-06-28 20:33:12 -07:00
Eric House
6c756533e3
fix double-dispose crash (but there's still a memory leak)
2013-06-28 20:32:19 -07:00
Eric House
5c284fe6b0
test PID is live before killing it
2013-06-28 18:55:19 -07:00
Eric House
292982a4b4
when splitting packet, queue them and send on timer rather than
...
sleeping the main thread.
2013-06-27 07:00:36 -07:00
Eric House
0bb4f5b0f5
fix occasional memory leak
2013-06-26 00:41:16 -07:00
Eric House
8324b9c770
fix compile error by making HELP another command.
2013-06-26 00:39:58 -07:00
Eric House
7967966982
Merge remote-tracking branch 'origin/android_branch' into local_fix_relay
...
Conflicts:
xwords4/linux/linuxmain.c
xwords4/linux/main.h
2013-06-25 06:18:43 -07:00
Eric House
5612bb000b
quick hack to allow testing intermix of chat with normal moves
2013-06-24 18:37:49 -07:00
Eric House
5842654418
fix pattern
2013-06-24 07:30:38 -07:00
Eric House
aca3a96b54
fix pattern so ended games are detected
2013-06-24 07:18:53 -07:00
Eric House
bc6922cb8b
add option to split tcp packets to test whether relay can handle reassembly.
2013-06-24 06:33:06 -07:00
Eric House
5e22508ff7
kill existing xwords instances as part of --clean-start
2013-06-21 06:58:20 -07:00
Eric House
6446819466
use nice to give the relay a fighting chance
2013-06-21 05:41:23 -07:00
Eric House
5bec10048b
add --clean-start option to speed testing
2013-06-20 06:45:51 -07:00
Eric House
5da4936e43
report unexpected received packet size as an error
2013-06-17 06:42:21 -07:00
Eric House
c8f584dad2
don't listen on stdin if it's been closed
2013-06-10 06:15:36 -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
72a78100b1
fix compile error in non-debug version
2013-05-27 16:18:11 -07:00
Eric House
ffa983db94
use pipe to quit from signal handler since calling g_main_loop_quit()
...
doesn't work with more recent glib versions (and has always been a bad idea)
2013-05-24 21:19:20 -07:00
Eric House
4d96b695e6
toward having commandline params show up as defaults in new game dialog
2013-05-10 07:19:32 -07:00
Eric House
79a212c985
don't put up dict change dialog (which blocks) unless names are
...
different.
2013-05-09 21:37:58 -07:00
Eric House
d74814a806
part of previous (merge) commit that got left out -- files not saved.
2013-05-09 06:33:19 -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
3e9bb1c6b9
fix leak: dispose struct before overwriting it
2013-05-08 06:38:52 -07:00
Eric House
66d42fe5f2
fix a couple of leaks
2013-05-07 07:07:10 -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
e4f52c5678
add assert and comment explaining why non-utf-8-aware hack is safe.
2013-04-18 07:15:14 -07:00
Eric House
2873d08974
fix memory leak
2013-04-13 16:49:20 -07:00
Eric House
195e6bfad3
add option to dump an .xwd file, meant to replace dawg2dict.pl which
...
is becoming a pain to maintain.
2013-04-09 21:10:40 -07:00
Eric House
5912b76cb8
add option to dump an .xwd file, meant to replace dawg2dict.pl which
...
is becoming a pain to maintain.
2013-04-09 21:05: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
168ebeeb5b
fix variable name misspelling
2013-02-22 21:10:46 -08:00
Eric House
c75ecef240
test deletion of games and generation of anonymous relayIDs
2013-01-29 07:42:10 -08:00
Eric House
72e100ccac
use autoincrement primary key, same as on Android
2013-01-28 07:02:33 -08:00
Eric House
4b335ab464
make function static
2013-01-26 18:36:40 -08:00
Eric House
b324a382e2
I've seen read() return 0 after being told there's something on the
...
socket. So in that case loop and try again five time -- in case the
docs are wrong that 0 means EOF? Hmmm.
2013-01-26 11:58:48 -08:00
Eric House
88b20769f9
increase buffer size
2013-01-26 11:56:29 -08:00
Eric House
2aba3c0ce1
load dict early enough to have lang available to comms when it first connects.
2013-01-26 11:56:20 -08:00
Eric House
2e0ff09cf9
fix memory leak and uninstall idle proc on the way out
2013-01-24 21:10:41 -08:00
Eric House
498498a2bf
remove gameToken param from XWPDEV_HAVEMSGS message since it's for the
...
whole device rather than one game on it.
2013-01-24 19:20:35 -08:00
Eric House
0fad19e38a
make it possible to mix udp and non-udp games (which currently crashes the relay very rarely)
2013-01-24 18:56:10 -08:00
Eric House
481f344ff4
fix failure to clean up on exit
2013-01-24 08:08:53 -08:00
Eric House
cbb82eb5e8
add --via-udp option -- which causes app to crash because the memory
...
leak detector is working
2013-01-24 08:00:53 -08:00
Eric House
9f3250cb3f
make curses version use udp socket when --db param passed. There's no
...
UI for the DB and the assumption is only one game will be stored but
this should let the test script be modified to test the new protocol.
2013-01-24 07:49:49 -08:00
Eric House
12f70154a0
changes for includes-messageID-please-ack protocol addition
2013-01-23 07:43:58 -08:00
Eric House
ae9ec31863
don't call g_main_loop_quit() from inside signal handler: it doesn't
...
work on Ubuntu LTS at least. Instead write to a "quit pipe" and exit
the loop from the pipe's reader back outside exception context.
2013-01-21 18:57:48 -08:00
Eric House
e79b0bd3eb
Merge branch 'gtk_multigame' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into gtk_multigame
2013-01-20 19:27:50 -08:00