libubus: fix synchronous ubus_notify without waiting for a timeout

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
Felix Fietkau 2013-03-17 17:55:11 +01:00
parent 3b66d054cc
commit 460301e62d

View file

@ -285,8 +285,10 @@ int ubus_notify(struct ubus_context *ctx, struct ubus_object *obj,
if (ret < 0) if (ret < 0)
return ret; return ret;
if (timeout < 0) if (timeout < 0) {
ubus_abort_request(ctx, &req.req);
return 0; return 0;
}
return ubus_complete_request(ctx, &req.req, timeout); return ubus_complete_request(ctx, &req.req, timeout);
} }