adb: clean up debug tracing a little.
Always use LOG() for debug tracing.
Remove useless D_lock. I believe it is useless to lock just before and after fprintf.
I verified the log output both on host and on device. The output looks fine to me.
Change-Id: I96ccfe408ff56864361551afe9ad464d197ae104
diff --git a/adb/adb_auth.cpp b/adb/adb_auth.cpp
index 8a6b156..2364f7b 100644
--- a/adb/adb_auth.cpp
+++ b/adb/adb_auth.cpp
@@ -32,13 +32,13 @@
void send_auth_request(atransport *t)
{
- D("Calling send_auth_request\n");
+ D("Calling send_auth_request");
apacket *p;
int ret;
ret = adb_auth_generate_token(t->token, sizeof(t->token));
if (ret != sizeof(t->token)) {
- D("Error generating token ret=%d\n", ret);
+ D("Error generating token ret=%d", ret);
return;
}
@@ -52,13 +52,13 @@
void send_auth_response(uint8_t *token, size_t token_size, atransport *t)
{
- D("Calling send_auth_response\n");
+ D("Calling send_auth_response");
apacket *p = get_apacket();
int ret;
ret = adb_auth_sign(t->key, token, token_size, p->data);
if (!ret) {
- D("Error signing the token\n");
+ D("Error signing the token");
put_apacket(p);
return;
}
@@ -71,13 +71,13 @@
void send_auth_publickey(atransport *t)
{
- D("Calling send_auth_publickey\n");
+ D("Calling send_auth_publickey");
apacket *p = get_apacket();
int ret;
ret = adb_auth_get_userkey(p->data, MAX_PAYLOAD_V1);
if (!ret) {
- D("Failed to get user public key\n");
+ D("Failed to get user public key");
put_apacket(p);
return;
}