Skip to content

Commit

Permalink
adapter: Don't use DBG in mgmt_debug
Browse files Browse the repository at this point in the history
mgmt_debug callback is used to print debug strings from mgmt instances
which includes the file and function names so using DBG would add yet
another set of file and function prefixes which makes the logs
confusing.
  • Loading branch information
Vudentz committed Mar 23, 2022
1 parent b7c8072 commit 62c6037
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -10327,9 +10327,7 @@ static void read_version_complete(uint8_t status, uint16_t length,

static void mgmt_debug(const char *str, void *user_data)
{
const char *prefix = user_data;

info("%s%s", prefix, str);
DBG_IDX(0xffff, "%s", str);
}

int adapter_init(void)
Expand All @@ -10342,8 +10340,7 @@ int adapter_init(void)
return -EIO;
}

if (getenv("MGMT_DEBUG"))
mgmt_set_debug(mgmt_primary, mgmt_debug, "mgmt: ", NULL);
mgmt_set_debug(mgmt_primary, mgmt_debug, NULL, NULL);

DBG("sending read version command");

Expand Down

0 comments on commit 62c6037

Please sign in to comment.