Fixed regexp in DRBD when no Protocol returned. Fixes #NX-669
authorEriks Jenkevics <eriks@netxms.org>
Thu, 7 Dec 2017 12:38:05 +0000 (14:38 +0200)
committerEriks Jenkevics <eriks@netxms.org>
Thu, 7 Dec 2017 13:36:02 +0000 (15:36 +0200)
src/agent/subagents/linux/drbd.cpp

index 630ef2e..db65d73 100644 (file)
@@ -67,7 +67,7 @@ static bool ParseDrbdStatus()
 
        if (regcomp(&pregVersion, "version: (.*) \\(api\\:([0-9]+)\\/proto\\:([0-9\\-]+)\\)", REG_EXTENDED) != 0)
                return false;
-       if (regcomp(&pregDevice, "^[[:space:]]*([0-9]+)\\: cs\\:(.*) (st|ro)\\:(.*)\\/(.*) ds\\:(.*)\\/(.*) ([A-Z]).*", REG_EXTENDED) != 0)
+       if (regcomp(&pregDevice, "^[[:space:]]*([0-9]+)\\: cs\\:(.*) (st|ro)\\:(.*)\\/(.*) ds\\:(.*)\\/([^[:space:]]*) ([^[:space:]]*) .*", REG_EXTENDED) != 0)
        {
                regfree(&pregVersion);
                return false;