rpcd: list actual names in luci2.network.switch_list
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 9 Oct 2013 12:35:12 +0000 (12:35 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 9 Oct 2013 12:38:15 +0000 (12:38 +0000)
luci2/src/rpcd/luci2.c

index b317fc435ffdff627ef061293866d28ba62399de..893e8820fc5976367863704db05bb0a9a39da91e 100644 (file)
@@ -1773,8 +1773,8 @@ swconfig_parse_list(struct blob_buf *blob, char *buf, int len, void *priv)
                s->array = blobmsg_open_array(blob, "switches");
        }
 
-       strtok(buf, ":");
-       p = strtok(NULL, " -");
+       strtok(buf, "-");
+       p = strtok(NULL, " \n");
 
        if (p)
                blobmsg_add_string(blob, NULL, p);