network plugin: Allow port arguments to be numeric.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 19 Aug 2007 15:19:12 +0000 (17:19 +0200)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 19 Aug 2007 15:19:12 +0000 (17:19 +0200)
src/network.c

index 34385bf..84e7773 100644 (file)
@@ -1232,7 +1232,11 @@ static int network_config (const char *key, const char *val)
                                && (fields_num != 2))
                        return (1);
                else if (fields_num == 2)
+               {
+                       if ((service = strchr (fields[1], '.')) != NULL)
+                               *service = '\0';
                        service = fields[1];
+               }
                node = fields[0];
 
                if (strcasecmp ("Listen", key) == 0)