diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-02-07 02:40:40 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2011-02-07 02:40:40 +0100 |
commit | 1643f728e7c99362d1925d6085a376f18cf46b5e (patch) | |
tree | fe61847787db228ed67765f044fdabf47dac6cfb /ubusd_proto.c | |
parent | c4c0a2256d959dec987ece74c05f77e5e418a84c (diff) | |
download | ubus-1643f728e7c99362d1925d6085a376f18cf46b5e.tar.gz |
make ubusd_get_client_by_id static
Diffstat (limited to 'ubusd_proto.c')
-rw-r--r-- | ubusd_proto.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ubusd_proto.c b/ubusd_proto.c index 1a67501..57f9a28 100644 --- a/ubusd_proto.c +++ b/ubusd_proto.c @@ -231,6 +231,17 @@ static int ubusd_handle_invoke(struct ubus_client *cl, struct ubus_msg_buf *ub, return -1; } +static struct ubus_client *ubusd_get_client_by_id(uint32_t id) +{ + struct ubus_id *clid; + + clid = ubus_find_id(&clients, id); + if (!clid) + return NULL; + + return container_of(clid, struct ubus_client, id); +} + static int ubusd_handle_response(struct ubus_client *cl, struct ubus_msg_buf *ub, struct blob_attr **attr) { struct ubus_object *obj; |