From 06cbdf5bed92313498ea9a21a747777a2907f897 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Fri, 8 Aug 2014 07:48:52 +0000 Subject: [PATCH] ubox: exit(1) in logd if registering log object with ubus fails Signed-off-by: Alexandru Ardelean --- log/logd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"); } -- 2.11.0