commit 08ce2ca0562162fc323ebcadbc9b3c63b50ecc40
parent 9935a10111d138217f154cd0f207662437cadaac
Author: Kyle Milz <kyle@0x30.net>
Date: Tue, 23 Feb 2016 22:14:56 -0700
server: two comment fixes and one msg handler fix
- message handler fix for device_update so that it matches up with recent
documentation changes
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/server/sl b/server/sl
@@ -23,7 +23,7 @@ my %args;
getopts("p:t", \%args);
# This is used by the parent to create the database if it doesn't already
-# exist, and then each child connects to this db to do queries
+# exist. Each child then connects to this same db to do queries.
my $db_file = "db";
$db_file = File::Temp->new(SUFFIX => '.db', EXLOCK => 0) if ($args{t});
@@ -51,7 +51,7 @@ die "Could not create socket: $!\n" unless($server_socket);
my ($addr, $port) = ($server_socket->sockhost(), $server_socket->sockport());
$log->print_bare("accepting connections on $addr:$port (pid = '$$')\n");
-# Children who have exited will do not have to be waited on with this
+# Children who have exited do not have to be waited on with this
$SIG{CHLD} = 'IGNORE';
# Accept new plain TCP connections and handle them in separate processes
@@ -387,8 +387,7 @@ sub msg_device_add {
sub msg_device_update {
my ($db, $request, $dev) = @_;
- my $hex_token = $request->{pushtoken_hex};
- $db->{update_device}->execute($hex_token, $dev->{num});
+ $db->{update_device}->execute($request, $dev->{num});
# $log->print("push token = '$hex_token'\n");
return make_ok( { data => {} });