Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31c879b0 authored by Chris Manton's avatar Chris Manton
Browse files

Localize audio hashmap debug logging

There is not much point debug logging at osi level

Bug: 188297860
Tag: #refactor
Test: gd/cert/run

Change-Id: I5abb95373105478fa9198205a9e0d218a9a0c65c
parent 39d47fab
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -172,6 +172,12 @@ static void a2dp_open_ctrl_path(struct a2dp_stream_common* common);
/*****************************************************************************
 *   Miscellaneous helper functions
 *****************************************************************************/
static void hash_map_utils_dump_string_keys_string_values(
    std::unordered_map<std::string, std::string>& map) {
  for (const auto& ptr : map) {
    INFO("key: '%s' value: '%s'\n", ptr.first.c_str(), ptr.second.c_str());
  }
}

/* logs timestamp with microsec precision
   pprev is optional in case a dedicated diff is required */
+6 −0
Original line number Diff line number Diff line
@@ -163,6 +163,12 @@ struct ha_stream_in {
/*****************************************************************************
 *  Static functions
 *****************************************************************************/
static void hash_map_utils_dump_string_keys_string_values(
    std::unordered_map<std::string, std::string>& map) {
  for (const auto& ptr : map) {
    LOG_INFO("key: '%s' value: '%s'\n", ptr.first.c_str(), ptr.second.c_str());
  }
}

static size_t out_get_buffer_size(const struct audio_stream* stream);

+0 −6
Original line number Diff line number Diff line
@@ -32,9 +32,3 @@
// A new hash map or NULL is returned and is owned by the caller.
std::unordered_map<std::string, std::string>
hash_map_utils_new_from_string_params(const char* params);

// Dumps the contents of the hash_map to the log for debugging purposes.
// If |map| is not NULL, all entries of |map| will be dumped, otherwise nothing
// will be dumped. Note that this function does not take the ownership of |map|.
void hash_map_utils_dump_string_keys_string_values(
    std::unordered_map<std::string, std::string>& map);
+0 −7
Original line number Diff line number Diff line
@@ -74,10 +74,3 @@ hash_map_utils_new_from_string_params(const char* params) {
  osi_free(str);
  return map;
}

void hash_map_utils_dump_string_keys_string_values(
    std::unordered_map<std::string, std::string>& map) {
  for (const auto& ptr : map) {
    LOG_INFO("key: '%s' value: '%s'\n", ptr.first.c_str(), ptr.second.c_str());
  }
}