From 17c9900f75234067aeb77eb76bc3d8b05a7e73a9 Mon Sep 17 00:00:00 2001 From: KRKeegan Date: Mon, 25 Feb 2013 18:44:49 -0800 Subject: [PATCH] Add Debug Message for new Hop Count Added to Hop Array Enabled by setting debug level > 3 --- lib/Insteon/BaseInsteon.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/Insteon/BaseInsteon.pm b/lib/Insteon/BaseInsteon.pm index 6df7634b3..5a49cfc33 100755 --- a/lib/Insteon/BaseInsteon.pm +++ b/lib/Insteon/BaseInsteon.pm @@ -159,7 +159,11 @@ sub default_hop_count { my ($self, $hop_count) = @_; unshift(@{$$self{hop_array}}, $$self{default_hop_count}) if (!defined(@{$$self{hop_array}})); - unshift(@{$$self{hop_array}}, $hop_count) if defined($hop_count); + if (defined($hop_count)){ + ::print_log("[Insteon::BaseObject] DEBUG3: Adding hop count of " . $hop_count . " to hop_array of " + . $self->get_object_name) if $main::Debug{insteon} >= 3; + unshift(@{$$self{hop_array}}, $hop_count) + } pop(@{$$self{hop_array}}) if (scalar(@{$$self{hop_array}}) >20); my $high = 0; foreach (@{$$self{hop_array}}){