Revert "Treat failure of ubus_add_object() in ubus_init() as retry-able."

This reverts commit 8a1ef367e2.
This commit is contained in:
Simon Kelley
2021-06-30 12:30:15 +01:00
parent 8a1ef367e2
commit a38bb31727

View File

@@ -104,8 +104,6 @@ static void ubus_disconnect_cb(struct ubus_context *ubus)
} }
} }
/* Note that this cannot log, it either returns a fatal error, or NULL.
If daemon->ubus is left as NULL, it will be called again for another try. */
char *ubus_init() char *ubus_init()
{ {
struct ubus_context *ubus = NULL; struct ubus_context *ubus = NULL;
@@ -119,7 +117,7 @@ char *ubus_init()
if (ret) if (ret)
{ {
ubus_destroy(ubus); ubus_destroy(ubus);
return NULL; return (char *)ubus_strerror(ret);
} }
ubus->connection_lost = ubus_disconnect_cb; ubus->connection_lost = ubus_disconnect_cb;