continue;
if (!ubus_subscribe(ctx, &watch_subscribe, id))
return;
- ERROR("failed to suscribe %d\n", id);
+ ERROR("failed to subscribe %d\n", id);
}
}
struct ubus_request_data *req, const char *method,
struct blob_attr *msg)
{
- if (1 || debug >= 3) {
+ if (debug >= 3) {
char *str;
str = blobmsg_format_json(msg, true);
{
watch_event.cb = watch_subscribe_cb;
watch_subscribe.cb = watch_notify_cb;
- if (ubus_register_event_handler(ctx, &watch_event, "ubus.object.add"))
- ERROR("failed to add ubus event handler\n");
if (ubus_register_subscriber(ctx, &watch_subscribe))
ERROR("failed to register ubus subscriber\n");
+ if (ubus_register_event_handler(ctx, &watch_event, "ubus.object.add"))
+ ERROR("failed to add ubus event handler\n");
}