From 1ef25ae1f360bfc6e8aa048ae10396fdb501ac44 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 28 Jun 2017 11:03:35 -0400 Subject: [PATCH] switch to single quotes where possible --- scripts/zmtelemetry.pl.in | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/zmtelemetry.pl.in b/scripts/zmtelemetry.pl.in index 3b0ec32fe..ccab3ad33 100644 --- a/scripts/zmtelemetry.pl.in +++ b/scripts/zmtelemetry.pl.in @@ -76,7 +76,7 @@ if ( $Config{ZM_TELEMETRY_DATA} ) { if ( sendData($result) ) { $lastCheck = $now; - my $sql = "update Config set Value = ? where Name = 'ZM_TELEMETRY_LAST_UPLOAD'"; + my $sql = q`update Config set Value = ? where Name = 'ZM_TELEMETRY_LAST_UPLOAD'`; my $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() ); my $res = $sth->execute( "$lastCheck" ) or die( "Can't execute: ".$sth->errstr() ); $sth->finish(); @@ -138,7 +138,7 @@ sub sendData { my $resp_msg = $resp->decoded_content; my $resp_code = $resp->code; if ($resp->is_success) { - Info("Telemetry data uploaded successfully."); + Info('Telemetry data uploaded successfully.'); Debug("Telemetry server upload success response message: $resp_msg"); } else { Warning("Telemetry server returned HTTP POST error code: $resp_code"); @@ -153,7 +153,7 @@ sub getUUID { my $uuid= ""; # Verify the current UUID is valid and not nil - if (( $Config{ZM_TELEMETRY_UUID} =~ /([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i ) && ( $Config{ZM_TELEMETRY_UUID} ne "00000000-0000-0000-0000-000000000000" )) { + if (( $Config{ZM_TELEMETRY_UUID} =~ /([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i ) && ( $Config{ZM_TELEMETRY_UUID} ne '00000000-0000-0000-0000-000000000000' )) { $uuid = $Config{ZM_TELEMETRY_UUID}; } else { my $sql = 'SELECT uuid()'; @@ -162,7 +162,7 @@ sub getUUID { $uuid = $Config{ZM_TELEMETRY_UUID} = $sth->fetchrow_array(); $sth->finish(); - $sql = "UPDATE Config set Value = ? WHERE Name = 'ZM_TELEMETRY_UUID'"; + $sql = q`UPDATE Config set Value = ? WHERE Name = 'ZM_TELEMETRY_UUID'`; $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() ); $res = $sth->execute( "$uuid" ) or die( "Can't execute: ".$sth->errstr() ); $sth->finish(); @@ -316,7 +316,6 @@ sub linuxDistro { return ($kernel, $distro, $version); } - 1; __END__