commit 8d347ebd85edf1304c0623492512b5b59813096f
parent ca79ce97480565e7c28b5df55d8c8570827938b0
Author: Kyle Milz <kyle@getaddrinfo.net>
Date: Sun, 29 May 2016 12:58:05 -0600
server: don't always send 'data' key in test client requests
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/server/SL/Test.pm b/server/SL/Test.pm
@@ -141,7 +141,8 @@ sub communicate {
# If no expected status was passed in assume 'ok'
$exp_status = 'ok' if (! defined $exp_status);
- my $msg_args->{data} = $msg_data;
+ # Only append "data" key if optional parameter $msg_data is defined
+ my $msg_args->{data} = $msg_data if (defined $msg_data);
# device_add is the only message type that does not require device_id as
# a mandatory argument