projects
/
project
/
procd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix a bug in the trigger handling code
[project/procd.git]
/
service.c
diff --git
a/service.c
b/service.c
index
5647ae5
..
7776f99
100644
(file)
--- a/
service.c
+++ b/
service.c
@@
-108,10
+108,10
@@
service_update(struct service *s, struct blob_attr *config, struct blob_attr **t
}
if (tb[SERVICE_SET_TRIGGER] && blobmsg_data_len(tb[SERVICE_SET_TRIGGER])) {
}
if (tb[SERVICE_SET_TRIGGER] && blobmsg_data_len(tb[SERVICE_SET_TRIGGER])) {
- s->trigger = malloc(blob_len(tb[SERVICE_SET_TRIGGER]));
+ s->trigger = malloc(blob_
pad_
len(tb[SERVICE_SET_TRIGGER]));
if (!s->trigger)
return -1;
if (!s->trigger)
return -1;
- memcpy(s->trigger, tb[SERVICE_SET_TRIGGER], blob_len(tb[SERVICE_SET_TRIGGER]));
+ memcpy(s->trigger, tb[SERVICE_SET_TRIGGER], blob_
pad_
len(tb[SERVICE_SET_TRIGGER]));
trigger_add(s->trigger, s);
}
trigger_add(s->trigger, s);
}