Include method name in the error log to improve debugging of UBUS object lookups

This commit is contained in:
Amin Ben Romdhane 2025-01-31 14:51:25 +01:00
parent b7e5e0de5a
commit 31d8d5d28e
3 changed files with 6 additions and 6 deletions

View file

@ -1055,7 +1055,7 @@ static int ubus_call_blob_msg(const char *obj, const char *method, struct blob_b
}
if (ubus_lookup_id(ubus_ctx, obj, &id)) {
BBF_ERR("Failed to lookup UBUS object ID for '%s'", obj);
BBF_ERR("Failed to lookup UBUS object ID for '%s' using method '%s'", obj, method);
ubus_free(ubus_ctx);
return -1;
}

View file

@ -111,7 +111,7 @@ static int __dm_ubus_call_internal(const char *obj, const char *method, int time
}
if (ubus_lookup_id(ubus_ctx, obj, &id)) {
BBF_ERR("Failed to lookup UBUS object ID for '%s'", obj);
BBF_ERR("Failed to lookup UBUS object ID for '%s' using method '%s'", obj, method);
return -1;
}
@ -350,7 +350,7 @@ static int dmubus_call_blob_internal(const char *obj, const char *method, json_o
}
if (ubus_lookup_id(ubus_ctx, obj, &id)) {
BBF_ERR("Failed to lookup UBUS object ID for '%s'", obj);
BBF_ERR("Failed to lookup UBUS object ID for '%s' using method '%s'", obj, method);
blob_buf_free(&blob);
return rc;
}
@ -403,7 +403,7 @@ static int dmubus_call_blob_msg_internal(const char *obj, const char *method, st
}
if (ubus_lookup_id(ubus_ctx, obj, &id)) {
BBF_ERR("Failed to lookup UBUS object ID for '%s'", obj);
BBF_ERR("Failed to lookup UBUS object ID for '%s' using method '%s'", obj, method);
return -1;
}

View file

@ -42,7 +42,7 @@ int bbfdm_ubus_invoke_sync(struct bbfdm_ctx *bbfdm_ctx, const char *obj, const c
}
if (ubus_lookup_id(bbfdm_ctx->ubus_ctx, obj, &id)) {
BBFDM_ERR("Failed to lookup UBUS object ID for '%s'", obj);
BBFDM_ERR("Failed to lookup UBUS object ID for '%s' using method '%s'", obj, method);
return -1;
}
@ -67,7 +67,7 @@ int bbfdm_ubus_invoke_async(struct ubus_context *ubus_ctx, const char *obj, cons
}
if (ubus_lookup_id(ubus_ctx, obj, &id)) {
BBFDM_ERR("Failed to lookup UBUS object ID for '%s'", obj);
BBFDM_ERR("Failed to lookup UBUS object ID for '%s' using method '%s'", obj, method);
return -1;
}