projects
/
project
/
rpcd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
cc288cc
)
luci2: make parsing START and STOP from init scripts more robust
author
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 27 Jun 2013 17:01:06 +0000
(19:01 +0200)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Thu, 27 Jun 2013 17:07:45 +0000
(19:07 +0200)
luci2.c
patch
|
blob
|
history
diff --git
a/luci2.c
b/luci2.c
index
283d7cf
..
ece2af3
100644
(file)
--- 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))
{
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);
}
{
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;
{
blobmsg_add_u32(&buf, "stop", atoi(p));
break;