Fix empty ubus output

This commit is contained in:
Vivek Kumar Dutta 2024-12-09 15:58:30 +05:30
parent f08359f40d
commit 3725024ea0

View file

@ -72,10 +72,14 @@ static void fill_optional_data(bbfdm_data_t *data, struct blob_attr *msg)
struct blob_attr *attr; struct blob_attr *attr;
size_t rem; size_t rem;
if (!data || !msg) if (!data)
return; return;
data->bbf_ctx.dm_type = BBFDM_BOTH; data->bbf_ctx.dm_type = BBFDM_BOTH;
if (!msg)
return;
blobmsg_for_each_attr(attr, msg, rem) { blobmsg_for_each_attr(attr, msg, rem) {
if (is_str_eq(blobmsg_name(attr), "proto")) { if (is_str_eq(blobmsg_name(attr), "proto")) {