From 5c26586f89ac1486f036984e9312f9963e6f8741 Mon Sep 17 00:00:00 2001 From: Rosiak Date: Thu, 4 Aug 2016 22:34:29 +0200 Subject: [PATCH] Comware Version Fix Be able to discover the version && features on older versions && newer. --- includes/polling/os/comware.inc.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/polling/os/comware.inc.php b/includes/polling/os/comware.inc.php index c7b2195a27..556c46e31c 100644 --- a/includes/polling/os/comware.inc.php +++ b/includes/polling/os/comware.inc.php @@ -8,5 +8,6 @@ echo 'Comware OS...'; $hardware = snmp_get($device, 'sysObjectID.0', '-Osqv', 'SNMPv2-MIB:HH3C-PRODUCT-ID-MIB'); -preg_match('/Software Version (.+), Release ([a-zA-Z0-9]+)/', $poll_device['sysDescr'], $match); -list(,$version,$features) = $match; +$data = str_replace(",","",$poll_device['sysDescr']); +$version = $data['6']; +$features = $data['8'];