Skip to content

Commit

Permalink
Fixed #77
Browse files Browse the repository at this point in the history
In #10 I reverted a change in the xPL message parsing because it apparently caused the xPL processing of messages to stop working. In #10 I had the impression that the change was required to allow MisterHouse to support unsupported messages to be processed.
However, I was wrong there. I misinterpreted the xPL spec. When a message is created, it contains key/value pairs. Only the name of a key/value pair cannot contain a space. The value can. This fix enables processing of messages with spaces in the value of key/value pairs to be processed again.
  • Loading branch information
hollie committed Mar 17, 2013
1 parent f00dbb2 commit d10b2f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/xPL_Items.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,7 @@ sub tie_value_convertor {
sub device_monitor {
my ( $self, $monitor_info ) = @_;
if ($monitor_info) {
my ($key,$value) = $monitor_info =~ /(\S+)\s*[:=]\s*(\S+)/;
my ($key,$value) = $monitor_info =~ /(\S+)\s*[:=]\s*(.+)/;
if ( !( $value or $value =~ /^0/ ) ) {
$value = ($key) ? $key : $monitor_info;
$key = 'device';
Expand Down

0 comments on commit d10b2f3

Please sign in to comment.