summaryrefslogtreecommitdiff
path: root/log
diff options
context:
space:
mode:
authorAlexandru Ardelean <ardeleanalex@gmail.com>2014-08-08 07:48:52 +0000
committerJohn Crispin <blogic@openwrt.org>2014-08-13 01:35:40 +0200
commit06cbdf5bed92313498ea9a21a747777a2907f897 (patch)
tree519376186948e45f01636d90154de7d09494d9b5 /log
parentc3d4118eee505f41c4d20a87f326479530837569 (diff)
downloadubox-06cbdf5bed92313498ea9a21a747777a2907f897.tar.gz
ubox: exit(1) in logd if registering log object with ubus fails
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Diffstat (limited to 'log')
-rw-r--r--log/logd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/log/logd.c b/log/logd.c
index f61e666..a9fec9a 100644
--- a/log/logd.c
+++ b/log/logd.c
@@ -164,8 +164,10 @@ ubus_connect_handler(struct ubus_context *ctx)
int ret;
ret = ubus_add_object(ctx, &log_object);
- if (ret)
+ if (ret) {
fprintf(stderr, "Failed to add object: %s\n", ubus_strerror(ret));
+ exit(1);
+ }
fprintf(stderr, "log: connected to ubus\n");
}