From 4e06fb4de9bc2b5bf1910ef76ed1d4413d53a363 Mon Sep 17 00:00:00 2001 From: KRKeegan Date: Mon, 11 Nov 2013 17:25:00 -0800 Subject: [PATCH] Insteon: Fix Bug Which Converted Object Names to Lowercase It looks like the routine lc is greedy and will convert multiple concatenated strings. Closed #309 --- lib/Insteon/BaseInsteon.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Insteon/BaseInsteon.pm b/lib/Insteon/BaseInsteon.pm index c25350b06..7328b1d66 100644 --- a/lib/Insteon/BaseInsteon.pm +++ b/lib/Insteon/BaseInsteon.pm @@ -1432,7 +1432,7 @@ sub link_to_interface } elsif ($step == 2){ #Add Link from PLM->object $success_callback = $success_callback_prefix . "\"3\")"; - my $link_info = "deviceid=" . lc $self->device_id . " group=$p_group is_controller=0 " . + my $link_info = "deviceid=" . lc ($self->device_id) . " group=$p_group is_controller=0 " . "callback=$success_callback failure_callback=$failure_callback"; $self->interface->add_link($link_info); } @@ -1454,7 +1454,7 @@ sub link_to_interface elsif ($step == 4){ #Add surrogate link on PLM if surrogate exists $success_callback = $success_callback_prefix . "\"5\")"; my $surrogate_group = $$self{surrogate}->group; - my %link_info = ( deviceid=> lc $self->device_id, + my %link_info = ( deviceid=> lc($self->device_id), group => $surrogate_group, is_controller => 1, callback => "$success_callback", failure_callback=> "$failure_callback", @@ -1542,7 +1542,7 @@ sub unlink_to_interface elsif ($step == 1) { #Delete link on the PLM $success_callback = $success_callback_prefix . "'2')"; $self->interface->delete_link( - deviceid => lc $self->device_id, + deviceid => lc($self->device_id), group=> $p_group, is_controller=>0, callback=>$success_callback, failure_callback=>$failure_callback); @@ -1566,7 +1566,7 @@ sub unlink_to_interface elsif ($step == 3){ #Delete surrogate link on PLM if surrogate exists $success_callback = $success_callback_prefix . "'4')"; my $surrogate_group = $$self{surrogate}->group; - my %link_info = ( deviceid=> lc $self->device_id, + my %link_info = ( deviceid=> lc($self->device_id), group => $surrogate_group, is_controller => 1, callback => "$success_callback", failure_callback=> "$failure_callback",