sgwdynspeed: allow string values and empty values in the speed file
authorFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 17 Feb 2014 14:34:03 +0000 (15:34 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 17 Feb 2014 14:34:39 +0000 (15:34 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/sgwdynspeed/src/speedFile.c

index 543dd9d..a26ecf2 100644 (file)
@@ -29,7 +29,7 @@ static const char * regexCommentString = "^([[:space:]]*|[[:space:]#]+.*)$";
 
 /** regular expression describing a key/value pair */
 static const char * regexNameValueString =
-               "^[[:space:]]*([^[:space:]]+)[[:space:]]*=[[:space:]]*([[:digit:]]+)[[:space:]]*$";
+               "^[[:space:]]*([^[:space:]]+)[[:space:]]*=[[:space:]]*(.*?)[[:space:]]*$";
 
 /** the number of matches in regexNameValueString */
 static const size_t regexNameValuematchCount = 3;