Allow parsing plugin_instance in parse_option().
authorTommie Gannert <tommie@spotify.com>
Thu, 7 Mar 2013 08:10:03 +0000 (09:10 +0100)
committerFlorian Forster <octo@collectd.org>
Mon, 25 Mar 2013 06:39:45 +0000 (07:39 +0100)
isalnum() is not enough to catch the underscore.

Signed-off-by: Florian Forster <octo@collectd.org>
src/utils_parse_option.c

index 2168cd1..820f14f 100644 (file)
@@ -127,7 +127,7 @@ int parse_option (char **ret_buffer, char **ret_key, char **ret_value)
 
   /* Look for the equal sign */
   buffer = key;
-  while (isalnum ((int) *buffer))
+  while (isalnum ((int) *buffer) || *buffer == '_')
     buffer++;
   if ((*buffer != '=') || (buffer == key))
     return (1);