From d10b2f304c2ffd9798e194edd4645f2806cc2b48 Mon Sep 17 00:00:00 2001 From: Lieven Hollevoet Date: Sun, 17 Mar 2013 10:30:24 +0100 Subject: [PATCH] Fixed #77 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. --- lib/xPL_Items.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/xPL_Items.pm b/lib/xPL_Items.pm index cbe2d2d31..19e4aad4d 100644 --- a/lib/xPL_Items.pm +++ b/lib/xPL_Items.pm @@ -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';