handsfree-audio: Add debug logging

Print debug messages when Handsfree Audio Agent registers or unregisters
itself.
This commit is contained in:
João Paulo Rechi Vita 2013-04-16 19:32:21 -03:00 committed by Denis Kenzior
parent 82909259c4
commit a2d0f434fa
1 changed files with 9 additions and 1 deletions

View File

@ -674,10 +674,16 @@ static DBusMessage *am_agent_register(DBusConnection *conn,
return __ofono_error_invalid_args(msg);
}
DBG("Agent %s registered with the CODECs:%s%s", sender,
has_cvsd ? " CVSD" : "", has_msbc ? " mSBC" : "");
if (has_msbc && defer_setup == 1)
has_wideband = TRUE;
else
else {
has_wideband = FALSE;
DBG("Wideband speech disabled: %s", has_msbc ?
"no SCO defer setup support" : "no mSBC support");
}
if (has_cvsd == FALSE) {
ofono_error("CVSD codec is mandatory");
@ -718,6 +724,8 @@ static DBusMessage *am_agent_unregister(DBusConnection *conn,
agent_free(agent);
agent = NULL;
DBG("Agent %s unregistered", sender);
return dbus_message_new_method_return(msg);
}