Signed-off-by: Felix Fietkau <nbd@nbd.name>
blob_buf_init(&b, 0);
blob_put_int32(&b, UBUS_ATTR_OBJID, obj->id.id);
- if (attr[UBUS_ATTR_SIGNATURE])
+ if (attr[UBUS_ATTR_SIGNATURE] && obj->type)
blob_put_int32(&b, UBUS_ATTR_OBJTYPE, obj->type->id.id);
ubus_proto_send_msg_from_blob(cl, ub, UBUS_MSG_DATA);
int cnt = 0;
void *s;
+ if (!obj->type)
+ return;
+
blob_buf_init(&b, 0);
blob_put_string(&b, UBUS_ATTR_OBJPATH, obj->path.key);