Skip to content

Commit

Permalink
Merge pull request #29 from krkeegan/253afad710f4c8bac5f08a842e14dc4a…
Browse files Browse the repository at this point in the history
…df74f1fb

Fix for Issue #26. Mered after krkeegan has been running this fix for 3 weeks without issues.
  • Loading branch information
hollie committed Jan 13, 2013
2 parents 45356a7 + 253afad commit 88c7b8f
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions lib/Insteon/BaseInterface.pm
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,20 @@ sub on_standard_insteon_received
$self->transmit_in_progress(1);
# ask the object to process the received message and update its state
$object->_process_message($self, %cleanup_msg);
$self->clear_active_message();
# Only clear active message if the cleanup received is really meant for the active message
if (($msg{extra} == $self->active_message->setby->group)
&& ($object->message_type($msg{cmd_code}) eq $self->active_message->command)){
$self->clear_active_message();
&main::print_log("[Insteon::BaseInterface] DEBUG3: Cleanup message received, "
. "matched active message, cleared the active message") if $main::Debug{insteon} >= 3;
}
else {
&main::print_log("[Insteon::BaseInterface] DEBUG3: Cleanup message received, but "
. "active message not cleared b/c group/command in recent message "
. $msg{extra}."/".$object->message_type($msg{cmd_code}). " did not match group in "
. "prior sent message group/command " . $self->active_message->setby->group
."/".$self->active_message->command) if $main::Debug{insteon} >= 3;
}
}
else
{
Expand Down Expand Up @@ -512,4 +525,4 @@ sub _aldb
}


1
1

0 comments on commit 88c7b8f

Please sign in to comment.