Skip to content

Commit

Permalink
Insteon_PLM: Fix Error in Message Parser Dumping Buffer on Busy
Browse files Browse the repository at this point in the history
Solves issue #158 identified by Chris Dragon

This will trim the leading "15" bytes from the data.  If anything is left it will be placed into the message fragment to be read next time.
  • Loading branch information
krkeegan committed Apr 6, 2013
1 parent 43b7c06 commit 0f2e11d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/Insteon_PLM.pm
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,13 @@ sub _parse_data {
}
$nack_count++;
}
#Remove the leading NACK bytes and place whatever remains into fragment for next read
$parsed_data =~ s/^(15)*//;
if ($parsed_data ne ''){
$$self{_data_fragment} .= $parsed_data;
::print_log("[Insteon_PLM] DEBUG3: Saving parsed data fragment: "
. $parsed_data) if( $main::Debug{insteon} >= 3);
}
}
else
{
Expand Down

0 comments on commit 0f2e11d

Please sign in to comment.