Skip Menu |

This queue is for tickets about the Text-DHCPLeases CPAN distribution.

Report information
The Basics
Id: 81319
Status: resolved
Priority: 0/
Queue: Text-DHCPLeases

People
Owner: Nobody in particular
Requestors: simon [...] iodev.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: Simon Elsbrock <simon [...] iodev.org>
Subject: [PATCH] fix incorrect binding state handling
Date: Wed, 21 Nov 2012 11:01:02 +0100
To: bug-Text-DHCPleases [...] rt.cpan.org
From: Simon Elsbrock <simon [...] iodev.org>
In some cases, Text-DHCPLeases returned wrong binding states. This commit fixes the behavior. --- lib/Text/DHCPLeases/Object.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Text/DHCPLeases/Object.pm b/lib/Text/DHCPLeases/Object.pm index 132b535..2a345fd 100644 --- a/lib/Text/DHCPLeases/Object.pm +++ b/lib/Text/DHCPLeases/Object.pm @@ -180,10 +180,12 @@ sub parse{ $obj{tsfp} = $1; }elsif ( /cltt ($DATE);/ ){ $obj{cltt} = $1; - }elsif ( /next binding state (\w+);/ ){ + }elsif ( /^next binding state (\w+);/ ){ $obj{'next_binding_state'} = $1; - }elsif ( /binding state (\w+);/ ){ + }elsif ( /^binding state (\w+);/ ){ $obj{'binding_state'} = $1; + }elsif ( /^rewind binding state (\w+);/ ){ + $obj{'rewind_binding_state'} = $1; }elsif ( /uid (\".*\");/ ){ $obj{uid} = $1; }elsif ( /client-hostname \"(.*)\";/ ){ -- 1.7.10.4
Thank you.