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;
}
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;
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);
}
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)
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);
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]);
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;
(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;
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;