Author: arkurth
Date: Wed Aug  9 21:28:58 2017
New Revision: 1804610

URL: http://svn.apache.org/viewvc?rev=1804610&view=rev
Log:
VCL-1069
Added check to make sure the optional $message argument is defined before 
attempting to print it in Windows.pm::get_current_computer_time. It was 
generating an uninitialized concatenation warning in vcld.log if called without 
the optional argument.

In Version_6.pm::activate, added $message argument to call to 
Windows.pm::get_current_computer_time.

Modified:
    vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm
    vcl/trunk/managementnode/lib/VCL/Module/OS/Windows/Version_6.pm

Modified: vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm
URL: 
http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm?rev=1804610&r1=1804609&r2=1804610&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/Module/OS/Windows.pm Wed Aug  9 21:28:58 
2017
@@ -9072,7 +9072,7 @@ sub get_current_computer_time {
        
        my ($current_time) = grep(/\d:/, @$output);
        if ($current_time) {
-               notify($ERRORS{'OK'}, 0, "retrieved current time on 
$computer_name: $current_time ($message)");
+               notify($ERRORS{'OK'}, 0, "retrieved current time on 
$computer_name: $current_time" . (defined($message) ? " ($message)" : ''));
                return $current_time;
        }
        else {

Modified: vcl/trunk/managementnode/lib/VCL/Module/OS/Windows/Version_6.pm
URL: 
http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/Module/OS/Windows/Version_6.pm?rev=1804610&r1=1804609&r2=1804610&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/Module/OS/Windows/Version_6.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/Module/OS/Windows/Version_6.pm Wed Aug  9 
21:28:58 2017
@@ -257,7 +257,7 @@ sub activate {
        else {
                # Display the computer's current time in vcld.log to help 
diagnose the problem
                # Activation fails if the client's time is incorrect
-               $self->get_current_computer_time();
+               $self->get_current_computer_time('after activation failed');
                
                notify($ERRORS{'CRITICAL'}, 0, "failed to activate Windows 
using MAK or KMS methods");
                return;


Reply via email to