Eric House
c7f0090e15
fix script that makes the db
...
I've had it wrong all these years. Thanks Dave!
2017-10-10 20:36:36 -07:00
Eric House
37ecd81c04
change param names
...
about to introduce a second. This will make things clearer. No code
change here though.
2017-10-10 20:17:36 -07:00
Eric House
4717308c4d
make new installs easier
...
Add make target and script option to install debs
2017-10-10 19:56:22 -07:00
Eric House
3e8839636e
preserve hid when recreating games
...
When a device reconnects and there's no record for its
game (e.g. because an ISP's screwed up and the db and its host are
lost), recreate but keep the device's hid (position in the arrays
indicating mostly whether it's the inviter or invitee.) Tested by
running the linux scripts and deleting the games table mid-way
through, but not yet tested with android devices.
2017-10-07 10:14:27 -07:00
Eric House
6f0fb66a0d
fix three-year-old huuuuge memory leak
...
Hadn't run Valgrind in a while. There's another too, but much smaller
and harder to track down.
2017-06-07 08:07:42 -07:00
Eric House
f06e7bdd98
don't drop duplicate reconnect
...
When Android client is backgrounded with a game playing (BoardActivity
on top) then brought to front again it fails to reconnect to relay
because it didn't disconnect and the relay thinks it's still there. The
right fix is in making the java code do the right thing (complete
disconnect), but it seems harmless to just honor the reconnect in this
case. Doesn't even cause leaks, per valgrind.
2017-06-06 06:27:58 -07:00
Eric House
9cd76d887d
fix weird double-bang thing
2016-11-09 07:45:39 -08:00
Eric House
bba16c481e
improve game query script to filter on connnames and clarify filter param
2016-06-12 18:30:19 -07:00
Eric House
3bff4c070a
fix compiler warning
2016-01-21 06:25:19 -08:00
Eric House
2a3bd60740
supply missing param
2015-12-08 07:15:26 -08:00
Eric House
d468866a01
no more variables called socket; all are "sock" now.
2015-11-20 23:15:04 -08:00
Eric House
6800c2afe5
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-07-11 08:27:24 -07:00
Eric House
67f4e4475c
manual bring-over of relay changes for invite support
2015-07-11 08:08:22 -07:00
Relay User
9c7213e42b
Make it possible to launch relay early in machine boot cycle before
...
postgres is running (e.g. from a @reboot shortcut in a crontab) by
having it wait, sleeping periodically, until a connection is
available. Requires new flag be passed into main.
2015-07-11 07:04:24 -07:00
Relay User
8f863f0369
Make it possible to launch relay early in machine boot cycle before
...
postgres is running (e.g. from a @reboot shortcut in a crontab) by
having it wait, sleeping periodically, until a connection is
available. Requires new flag be passed into main.
2015-07-11 07:04:24 -07:00
Relay User
d605686fd6
add teaser to gcm message (matches android client change)
2015-07-11 07:04:24 -07:00
Eric House
dba86a657f
add and handle new INVITE message types. (This can safely be added to shipping relay.)
2015-07-10 23:25:06 -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
6d768972db
fix compile warning. (Not really tested...it's a test app)
2015-07-01 06:35:47 -07:00
Eric House
0102cde2c3
add and handle new INVITE message types. (This can safely be added to shipping relay.)
2015-07-01 06:34:57 -07:00
Eric House
d096b8e8a2
cleanup -- no code change
2015-06-26 06:10:47 -07:00
Eric House
24de5cc486
change order, showing newest first
2015-02-23 18:24:01 -08:00
Eric House
6fe0940187
don't log normal case as error
2015-02-20 07:52:19 -08:00
Eric House
861aeeb53a
don't crash when ctrl-d hit in console
2015-01-07 07:22:45 -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
4123de3560
merge android branch heads
2014-12-15 16:44:32 -08:00
Eric House
26b01acf23
fix crash on duplicate connect packet: drop it, but keep the
...
connection alive if the duplicated packet set up addressing correctly.
2014-12-15 16:42:34 -08:00
Eric House
92fd048eef
signature change: return void instead of always returning true
2014-12-15 15:33:12 -08:00
Eric House
ddc9f7994c
Merge remote-tracking branch 'sf/android_branch' into android_multi2
...
Conflicts:
xwords4/relay/crefmgr.h
2014-12-11 06:22:17 -08:00
Eric House
bf53481aad
log unexpected condition rather than asserting
2014-12-11 06:18:30 -08:00
Eric House
16c4e74e04
ignore client index of 0, since it means the device needs a slot
...
assigned.
2014-12-10 08:04:56 -08:00
Eric House
2e9c033a29
If client provides its index, honor that when placing it in game. This
...
allows a game where indices have already been established over some
transport other than relay to start using the relay mid-game.
2014-12-10 08:03:39 -08:00
Eric House
39b0d40e41
add local variable to prevent some dereferencing
2014-12-10 08:02:20 -08:00
Eric House
68441c60f6
add local variable to prevent some dereferencing
2014-12-10 07:48:38 -08:00
Eric House
c70fcf64a7
ignore client index of 0, since it means the device needs a slot
...
assigned.
2014-12-08 06:22:30 -08:00
Eric House
a80293ba82
include timestamp in "new day" post-crash line
2014-12-05 06:39:10 -08:00
Eric House
b8660470f7
include timestamp in "new day" post-crash line
2014-12-05 06:35:31 -08:00
Eric House
9ba9d258f3
If client provides its index, honor that when placing it in game. This
...
allows a game where indices have already been established over some
transport other than relay to start using the relay mid-game.
2014-12-04 06:03:42 -08:00
Eric House
f3828ab7c9
merge android_branch -> android_multi2
2014-11-22 17:15:22 -08:00
Eric House
83a79963d4
Merge remote branch 'origin/android_branch' into android_branch
2014-11-22 17:11:40 -08:00
Eric House
4b635791d7
crash fix: provide missing param to format string
2014-11-22 17:08:17 -08:00
Eric House
e82589a526
replace overloaded method with diff-named one, avoiding call to wrong
...
one when compiled on old 32-bit Atom. 32-bit issue, or what? This is
quick and sure to fix it. Should be grafted back to main branch.
2014-11-10 06:43:42 -08:00
Eric House
94cfaecfb1
replace overloaded method with diff-named one, avoiding call to wrong
...
one when compiled on old 32-bit Atom. 32-bit issue, or what? This is
quick and sure to fix it. Should be grafted back to main branch.
2014-11-08 23:07:34 -08:00
Eric House
68e7f303b0
oops -- here's the relay md5sum logging. app side went in prior.
2014-11-05 21:42:45 -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
19573af533
a more elegant way of building up params to pass to PQexecParams
2014-04-25 18:45:51 -07:00
Eric House
6eaf7a57b5
fix crash when there's a "'" in model name
2014-04-25 07:41:58 -07:00
Eric House
4de894627a
fix infinite loop -- duh
2014-04-18 06:01:03 -07:00
Eric House
0e4f24dfe9
use fixed string for model rather than clearing it
2014-04-17 08:24:09 -07:00
Eric House
6f0b5c1bea
empty the model string if the client version's lower than what I'm
...
about to release and there's non-ascii stuff in it.
2014-04-17 08:13:01 -07:00
Eric House
f05b1e0525
log model -- can remove later
2014-04-17 07:44:32 -07:00
Eric House
0897ae2ba9
log the bad query
2014-04-17 07:43:58 -07:00
Eric House
ad0f882335
change port to live server's so recovery can be faster
2014-03-12 19:47:14 -07:00
Eric House
5f34fe3317
first cut at script to fetch messages for a game
2014-03-12 19:45:07 -07:00
Eric House
27a5990283
log out-of-date token
2014-02-24 08:00:52 -08:00
Eric House
cd31cd432a
tweak column display
2014-02-24 08:00:43 -08:00
Eric House
b840f7d708
add filter for rooms
2014-02-24 08:00:21 -08:00
Eric House
1f698eae6d
use ccache for relay build too
2014-01-25 19:03:50 -08:00
Eric House
0fb4c19ca7
fix syntax error in table creation sql
2014-01-07 07:17:48 -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
b5bec1e2cd
ignore valgrind core files
2013-11-14 21:48:06 -08:00
Eric House
91b54dd66a
use delete to free what's allocated using new
2013-10-25 06:16:17 -07:00
Eric House
a33f04e077
fix shutdown to work (by sending signal)
2013-10-25 06:16:17 -07:00
Eric House
e8616735b6
move .o files into an obj directory
2013-10-21 18:52:12 -07:00
Eric House
9efb044c4f
simplify construction of one query
2013-10-09 21:13:22 -07:00
Eric House
ec468ef3ba
printf -> catf missed because in ifdef
2013-10-09 20:40:21 -07:00
Eric House
bb246fd7e7
rename printf -> catf; no other changes
2013-10-09 20:20:45 -07:00
Eric House
c34fb48a2c
oops -- init mutex. This may be why the relay's hanging after a
...
crash.
2013-10-09 20:08:29 -07:00
Eric House
7290a41913
tweak; add limit
2013-10-01 00:01:39 -07:00
Eric House
b3723897d5
to prevent duplicate UDP packets (I hope), bind the UDP socket to a
...
single ip address rather than INADDR_ANY. Get that address at runtime
for an interface provided in the config file.
2013-09-30 23:40:12 -07:00
Eric House
945c41c615
Merge remote branch 'origin/android_branch' into android_branch
2013-09-27 05:46:43 -07:00
Eric House
9f38ded122
new script
2013-09-27 05:46:06 -07:00
Eric House
4202f24091
don't allow reregister with a RELAY_ID (a client bug)
2013-09-26 08:37:21 -07:00
Eric House
c1f94681bb
when a message sent via udp from cref isn't acked, add it to stored
...
messages so gcm loop can pick it up.
2013-09-26 07:14:24 -07:00
Eric House
63067dc374
oops: the test is equality with 'epoch'
2013-09-25 07:33:41 -07:00
Eric House
31fa2ea442
turn on feature where sent messages are marked rather than deleted.
...
Make default 'epoch' rather than NULL so constraint will work to
prevent duplicates, and fix insertion SQL to not violate constraint.
2013-09-25 06:38:10 -07:00
Eric House
fb59aa4907
use epoch rather than null as default so constraint will work
2013-09-24 08:37:18 -07:00
Eric House
8862c5f750
move include file up
2013-09-24 08:37:18 -07:00
Eric House
a4de87cfeb
fix constraint, and add stime to it
2013-09-24 08:37:18 -07:00
Eric House
f59a7db85d
update to work with either udp or tcp-sourced stored messages
2013-09-23 07:18:00 -07:00
Eric House
e1a5a2d53a
remove excess logging
2013-09-22 20:35:32 -07:00
Eric House
2e6d49303b
remove logging around hasNoMessages stuff -- too much
2013-09-20 04:54:05 -07:00
Eric House
e12069b45d
fix to work with devids and devtypes being arrays
2013-09-19 06:38:37 -07:00
Eric House
5d49b9b5d6
oops: don't default to clearing relayid
2013-09-18 08:04:12 -07:00
Eric House
9650000fce
add filter option -- sometimes want to see devices not in a current game.
2013-09-18 07:03:25 -07:00
Eric House
af44c6d190
only append to mtimes when appending a new devid
2013-09-15 12:54:47 -07:00
Eric House
b67ea7293d
add mtimes, remove mtime, for devices to track each time the devid
...
changes. Eventually; now it's updated too often.
2013-09-15 12:46:40 -07:00
Eric House
b0e2975994
show specific columns from devices table rather than *
2013-09-15 10:16:11 -07:00
Eric House
c212c0e367
add in-memory cacheing of messageless-connname/hid combos.
2013-09-15 10:04:46 -07:00
Eric House
657d0d2b1f
-l - means log to stderr
2013-09-15 10:04:45 -07:00
Eric House
de1f1cf681
in devices table, replace devid and devtype with array so can track
...
history if/as they change; remove rrcount as no longer needed.
2013-09-15 09:59:51 -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
2cad611ec4
get postgres port from config; send connname only if present
2013-09-11 07:42: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
5b7a039d78
cleanup
2013-09-05 07:53:47 -07:00
Eric House
48e0afc589
add comment
2013-09-03 06:54:42 -07:00
Eric House
032f8c1f99
add ctrl port command to post UPGRADE message to clients
2013-09-03 06:52:02 -07:00
Eric House
8da0b73744
replace string_printf() with new class derived from std::string with
...
printf() method.
2013-09-02 13:17:42 -07:00
Eric House
a95d620b09
Make ack timeout settable from ctrl port; add ctrl facility to print
...
and nack outstanding acks.
2013-08-31 08:30:25 -07:00
Eric House
07c9722433
add ability to forget multiple devices
2013-08-31 08:26:44 -07:00