X-Git-Url: http://git.archive.openwrt.org/?p=project%2Frpcd.git;a=blobdiff_plain;f=luci2.c;h=ece2af38f4e5861f0041dd3ba8fbfbc64f91ddd5;hp=283d7cfba926c4b14074684c2f099ad688da88a3;hb=f1aa60efc5435d0897417959793794d4ec195ad2;hpb=cc288ccea51f4fc6a318582466e807c4c33bc6e5;ds=sidebyside diff --git a/luci2.c b/luci2.c index 283d7cf..ece2af3 100644 --- a/luci2.c +++ b/luci2.c @@ -338,14 +338,14 @@ rpc_luci2_init_list(struct ubus_context *ctx, struct ubus_object *obj, while (fgets(path, sizeof(path) - 1, f)) { - p = strtok(path, "="); + p = strtok(path, "= \t"); - if (!strcmp(p, "START") && !!(p = strtok(NULL, " \t\n"))) + if (!strcmp(p, "START") && !!(p = strtok(NULL, "= \t\n"))) { n = atoi(p); blobmsg_add_u32(&buf, "start", n); } - else if (!strcmp(p, "STOP") && !!(p = strtok(NULL, " \t\n"))) + else if (!strcmp(p, "STOP") && !!(p = strtok(NULL, "= \t\n"))) { blobmsg_add_u32(&buf, "stop", atoi(p)); break;