Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop trying to write to address FFFFFFFFFFFFFFF8 #38

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions lib/Insteon/AllLinkDatabase.pm
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ sub delete_orphan_links
: &Insteon::get_object($deviceid,'01');
if (!($linked_device))
{
# no device is known by mh with the ADLB record's deviceid
# no device is known by mh with the ALDB record's deviceid
if ($audit_mode)
{
&::print_log("[Insteon::ALDB_i1] (AUDIT) " . $selfname . " now deleting orphaned link w/ details: "
Expand Down Expand Up @@ -1212,16 +1212,16 @@ sub add_duplicate_link_address
unshift @{$$self{aldb}{duplicates}}, $address;

# now, keep the list sorted!
@{$$self{adlb}{duplicates}} = sort(@{$$self{aldb}{duplicates}});
@{$$self{aldb}{duplicates}} = sort(@{$$self{aldb}{duplicates}});

}

sub delete_duplicate_link_address
{
my ($self, $address) = @_;
my $num_duplicate_link_addresses = 0;

$num_duplicate_link_addresses = @{$$self{aldb}{duplicates}} if (defined $$self{aldb}{duplicates});
my $num_duplicate_link_addresses = 0;
$num_duplicate_link_addresses = @{$$self{aldb}{duplicates}} if (defined $$self{aldb}{duplicates});
if ($num_duplicate_link_addresses)
{
my @temp_duplicates = ();
Expand All @@ -1241,8 +1241,8 @@ sub add_empty_address
{
my ($self, $address) = @_;
# before adding it, make sure that it isn't already in the list!!
my $num_addresses = 0;
$num_addresses = @{$$self{aldb}{empty}} if (defined $$self{aldb}{empty});
my $num_addresses = 0;
$num_addresses = @{$$self{aldb}{empty}} if (defined $$self{aldb}{empty});
my $exists = 0;
if ($num_addresses and $address)
{
Expand All @@ -1262,7 +1262,7 @@ sub add_empty_address
}

# now, keep the list sorted!
@{$$self{adlb}{empty}} = sort(@{$$self{aldb}{empty}});
@{$$self{aldb}{empty}} = sort(@{$$self{aldb}{empty}});

}

Expand Down Expand Up @@ -1298,7 +1298,7 @@ sub get_first_empty_address
$low_address = $new_address if $new_address < $low_address;
}
}
$first_address = sprintf('%04X', $low_address - 8);
$first_address = ($low_address > 0) ? sprintf('%04X', $low_address - 8) : 0;
}

return $first_address;
Expand Down
2 changes: 1 addition & 1 deletion lib/Insteon/BaseInsteon.pm
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ sub _process_message
. $self->get_nack_msg_for( $msg{extra} )
.") for "
. $self->{object_name}
. ". It may be unplugged or have a burned out bulb") if $main::Debug{insteon};
. ". It may be unplugged or have a burned out bulb or this may be a new I2CS type device.") if $main::Debug{insteon};
}
else {
&::print_log("[Insteon::BaseObject] WARN!! encountered a nack message ("
Expand Down