From cb1feedb5e1388d7aea8bddef1284690c590874f Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 6 Feb 2011 21:37:37 +0100 Subject: [PATCH] follow blob_get_int* -> blob_get_u* rename --- libubus.c | 14 +++++++------- ubusd_obj.c | 2 +- ubusd_proto.c | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/libubus.c b/libubus.c index d799c1d..d4ba427 100644 --- a/libubus.c +++ b/libubus.c @@ -182,7 +182,7 @@ static bool ubus_get_status(struct ubus_msghdr *hdr, int *ret) if (!attrbuf[UBUS_ATTR_STATUS]) return false; - *ret = blob_get_int32(attrbuf[UBUS_ATTR_STATUS]); + *ret = blob_get_u32(attrbuf[UBUS_ATTR_STATUS]); return true; } @@ -295,7 +295,7 @@ static void ubus_process_invoke(struct ubus_context *ctx, struct ubus_msghdr *hd if (!attrbuf[UBUS_ATTR_OBJID]) return; - objid = blob_get_int32(attrbuf[UBUS_ATTR_OBJID]); + objid = blob_get_u32(attrbuf[UBUS_ATTR_OBJID]); if (!attrbuf[UBUS_ATTR_METHOD]) { ret = UBUS_STATUS_INVALID_ARGUMENT; @@ -446,9 +446,9 @@ static void ubus_lookup_cb(struct ubus_request *ureq, int type, struct blob_attr return; memset(&obj, 0, sizeof(obj)); - obj.id = blob_get_int32(attr[UBUS_ATTR_OBJID]); + obj.id = blob_get_u32(attr[UBUS_ATTR_OBJID]); obj.path = blob_data(attr[UBUS_ATTR_OBJPATH]); - obj.type_id = blob_get_int32(attr[UBUS_ATTR_OBJTYPE]); + obj.type_id = blob_get_u32(attr[UBUS_ATTR_OBJTYPE]); obj.signature = attr[UBUS_ATTR_SIGNATURE]; req->cb(ureq->ctx, &obj, ureq->priv); } @@ -478,7 +478,7 @@ static void ubus_lookup_id_cb(struct ubus_request *req, int type, struct blob_at if (!attr[UBUS_ATTR_OBJID]) return; - *id = blob_get_int32(attr[UBUS_ATTR_OBJID]); + *id = blob_get_u32(attr[UBUS_ATTR_OBJID]); } int ubus_lookup_id(struct ubus_context *ctx, const char *path, uint32_t *id) @@ -542,10 +542,10 @@ static void ubus_add_object_cb(struct ubus_request *req, int type, struct blob_a if (!attrbuf[UBUS_ATTR_OBJID]) return; - obj->id = blob_get_int32(attrbuf[UBUS_ATTR_OBJID]); + obj->id = blob_get_u32(attrbuf[UBUS_ATTR_OBJID]); if (attrbuf[UBUS_ATTR_OBJTYPE]) - obj->type->id = blob_get_int32(attrbuf[UBUS_ATTR_OBJTYPE]); + obj->type->id = blob_get_u32(attrbuf[UBUS_ATTR_OBJTYPE]); obj->avl.key = &obj->id; avl_insert(&req->ctx->objects, &obj->avl); diff --git a/ubusd_obj.c b/ubusd_obj.c index ffd5330..d1e53f8 100644 --- a/ubusd_obj.c +++ b/ubusd_obj.c @@ -115,7 +115,7 @@ struct ubus_object *ubusd_create_object(struct ubus_client *cl, struct blob_attr struct ubus_object_type *type = NULL; if (attr[UBUS_ATTR_OBJTYPE]) - type = ubus_get_obj_type(blob_get_int32(attr[UBUS_ATTR_OBJTYPE])); + type = ubus_get_obj_type(blob_get_u32(attr[UBUS_ATTR_OBJTYPE])); else if (attr[UBUS_ATTR_SIGNATURE]) type = ubus_create_obj_type(attr[UBUS_ATTR_SIGNATURE]); diff --git a/ubusd_proto.c b/ubusd_proto.c index 550e116..1bf6249 100644 --- a/ubusd_proto.c +++ b/ubusd_proto.c @@ -169,7 +169,7 @@ static int ubusd_handle_invoke(struct ubus_client *cl, struct ubus_msg_buf *ub, if (!attr[UBUS_ATTR_METHOD] || !attr[UBUS_ATTR_OBJID]) return UBUS_STATUS_INVALID_ARGUMENT; - id = ubus_find_id(&objects, blob_get_int32(attr[UBUS_ATTR_OBJID])); + id = ubus_find_id(&objects, blob_get_u32(attr[UBUS_ATTR_OBJID])); if (!id) return UBUS_STATUS_NOT_FOUND; @@ -209,7 +209,7 @@ static int ubusd_handle_response(struct ubus_client *cl, struct ubus_msg_buf *ub (ub->hdr.type == UBUS_MSG_DATA && !attr[UBUS_ATTR_DATA])) goto error; - obj = ubusd_find_object(blob_get_int32(attr[UBUS_ATTR_OBJID])); + obj = ubusd_find_object(blob_get_u32(attr[UBUS_ATTR_OBJID])); if (!obj) goto error; @@ -220,7 +220,7 @@ static int ubusd_handle_response(struct ubus_client *cl, struct ubus_msg_buf *ub if (!cl) goto error; - ub->hdr.peer = blob_get_int32(attr[UBUS_ATTR_OBJID]); + ub->hdr.peer = blob_get_u32(attr[UBUS_ATTR_OBJID]); ubus_msg_send(cl, ub, true); return -1; -- 2.25.1