X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=ubusd_proto.c;h=2e4c2af63934ea48f34c7883dc20cf0f0a04d4ca;hb=0fccce4445b1961451ce3d99a99c1c0defbd4490;hp=283cb771b8cda759126aad0890bb2d8ab73f8775;hpb=a69f062cbd4041229f8d29ef9647bf783df414c1;p=project%2Fubus.git diff --git a/ubusd_proto.c b/ubusd_proto.c index 283cb77..2e4c2af 100644 --- a/ubusd_proto.c +++ b/ubusd_proto.c @@ -289,10 +289,8 @@ static int ubusd_handle_add_watch(struct ubus_client *cl, struct ubus_msg_buf *u { struct ubus_object *obj, *target; - if (!attr[UBUS_ATTR_OBJID] || !attr[UBUS_ATTR_TARGET] || - !attr[UBUS_ATTR_METHOD]) { + if (!attr[UBUS_ATTR_OBJID] || !attr[UBUS_ATTR_TARGET]) return UBUS_STATUS_INVALID_ARGUMENT; - } obj = ubusd_find_object(blob_get_u32(attr[UBUS_ATTR_OBJID])); if (!obj) @@ -308,7 +306,7 @@ static int ubusd_handle_add_watch(struct ubus_client *cl, struct ubus_msg_buf *u if (cl == target->client) return UBUS_STATUS_INVALID_ARGUMENT; - ubus_subscribe(obj, target, blob_data(attr[UBUS_ATTR_METHOD])); + ubus_subscribe(obj, target); return 0; }