Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/156016
Bug: 5449033
Change-Id: I85b946663d5a0e7606140282bf758c27b8c6f68f
diff --git a/CommandListener.cpp b/CommandListener.cpp
index 99e1269..1f99333 100644
--- a/CommandListener.cpp
+++ b/CommandListener.cpp
@@ -310,7 +310,7 @@
cli->sendMsg(ResponseCode::CommandSyntaxError, "Missing argument", false);
return 0;
}
- LOGD("Setting iface cfg");
+ ALOGD("Setting iface cfg");
struct in_addr addr;
unsigned flags = 0;
@@ -338,7 +338,7 @@
for (int i = 5; i < argc; i++) {
char *flag = argv[i];
if (!strcmp(flag, "up")) {
- LOGD("Trying to bring up %s", argv[2]);
+ ALOGD("Trying to bring up %s", argv[2]);
if (ifc_up(argv[2])) {
LOGE("Error upping interface");
cli->sendMsg(ResponseCode::OperationFailed, "Failed to up interface", true);
@@ -346,7 +346,7 @@
return 0;
}
} else if (!strcmp(flag, "down")) {
- LOGD("Trying to bring down %s", argv[2]);
+ ALOGD("Trying to bring down %s", argv[2]);
if (ifc_down(argv[2])) {
LOGE("Error downing interface");
cli->sendMsg(ResponseCode::OperationFailed, "Failed to down interface", true);
@@ -375,7 +375,7 @@
return 0;
} else if (!strcmp(argv[1], "clearaddrs")) {
// arglist: iface
- LOGD("Clearing all IP addresses on %s", argv[2]);
+ ALOGD("Clearing all IP addresses on %s", argv[2]);
ifc_clear_addresses(argv[2]);
diff --git a/DnsProxyListener.cpp b/DnsProxyListener.cpp
index bcb961e..9db7896 100644
--- a/DnsProxyListener.cpp
+++ b/DnsProxyListener.cpp
@@ -68,7 +68,7 @@
void DnsProxyListener::GetAddrInfoHandler::run() {
if (DBG) {
- LOGD("GetAddrInfoHandler, now for %s / %s", mHost, mService);
+ ALOGD("GetAddrInfoHandler, now for %s / %s", mHost, mService);
}
struct addrinfo* result = NULL;
@@ -103,7 +103,7 @@
int argc, char **argv) {
if (DBG) {
for (int i = 0; i < argc; i++) {
- LOGD("argv[%i]=%s", i, argv[i]);
+ ALOGD("argv[%i]=%s", i, argv[i]);
}
}
if (argc != 7) {
@@ -141,7 +141,7 @@
}
if (DBG) {
- LOGD("GetAddrInfoHandler for %s / %s",
+ ALOGD("GetAddrInfoHandler for %s / %s",
name ? name : "[nullhost]",
service ? service : "[nullservice]");
}
@@ -165,7 +165,7 @@
int argc, char **argv) {
if (DBG) {
for (int i = 0; i < argc; i++) {
- LOGD("argv[%i]=%s", i, argv[i]);
+ ALOGD("argv[%i]=%s", i, argv[i]);
}
}
if (argc != 4) {
@@ -215,7 +215,7 @@
void DnsProxyListener::GetHostByAddrHandler::run() {
if (DBG) {
- LOGD("DnsProxyListener::GetHostByAddrHandler::run\n");
+ ALOGD("DnsProxyListener::GetHostByAddrHandler::run\n");
}
struct hostent* hp;
@@ -224,7 +224,7 @@
hp = gethostbyaddr((char*)mAddress, mAddressLen, mAddressFamily);
if (DBG) {
- LOGD("GetHostByAddrHandler::run gethostbyaddr errno: %s hp->h_name = %s, name_len = %d\n",
+ ALOGD("GetHostByAddrHandler::run gethostbyaddr errno: %s hp->h_name = %s, name_len = %d\n",
hp ? "success" : strerror(errno),
(hp && hp->h_name) ? hp->h_name: "null",
(hp && hp->h_name) ? strlen(hp->h_name)+ 1 : 0);
diff --git a/PanController.cpp b/PanController.cpp
index 253c943..c58aebb 100644
--- a/PanController.cpp
+++ b/PanController.cpp
@@ -93,11 +93,11 @@
return 0;
}
- LOGD("Stopping PAN services");
+ ALOGD("Stopping PAN services");
kill(mPid, SIGTERM);
waitpid(mPid, NULL, 0);
mPid = 0;
- LOGD("PAN services stopped");
+ ALOGD("PAN services stopped");
return 0;
}
diff --git a/PppController.cpp b/PppController.cpp
index 4caf382..b50b2b7 100644
--- a/PppController.cpp
+++ b/PppController.cpp
@@ -111,11 +111,11 @@
return 0;
}
- LOGD("Stopping PPPD services on port %s", tty);
+ ALOGD("Stopping PPPD services on port %s", tty);
kill(mPid, SIGTERM);
waitpid(mPid, NULL, 0);
mPid = 0;
- LOGD("PPPD services on port %s stopped", tty);
+ ALOGD("PPPD services on port %s stopped", tty);
return 0;
}
diff --git a/ResolverController.cpp b/ResolverController.cpp
index b079f81..3e3cc0d 100644
--- a/ResolverController.cpp
+++ b/ResolverController.cpp
@@ -26,7 +26,7 @@
int ResolverController::setDefaultInterface(const char* iface) {
if (DBG) {
- LOGD("setDefaultInterface iface = %s\n", iface);
+ ALOGD("setDefaultInterface iface = %s\n", iface);
}
_resolv_set_default_iface(iface);
@@ -36,7 +36,7 @@
int ResolverController::setInterfaceDnsServers(const char* iface, char** servers, int numservers) {
if (DBG) {
- LOGD("setInterfaceDnsServers iface = %s\n", iface);
+ ALOGD("setInterfaceDnsServers iface = %s\n", iface);
}
_resolv_set_nameservers_for_iface(iface, servers, numservers);
@@ -46,7 +46,7 @@
int ResolverController::setInterfaceAddress(const char* iface, struct in_addr* addr) {
if (DBG) {
- LOGD("setInterfaceAddress iface = %s\n", iface);
+ ALOGD("setInterfaceAddress iface = %s\n", iface);
}
_resolv_set_addr_of_iface(iface, addr);
@@ -56,7 +56,7 @@
int ResolverController::flushDefaultDnsCache() {
if (DBG) {
- LOGD("flushDefaultDnsCache\n");
+ ALOGD("flushDefaultDnsCache\n");
}
_resolv_flush_cache_for_default_iface();
@@ -66,7 +66,7 @@
int ResolverController::flushInterfaceDnsCache(const char* iface) {
if (DBG) {
- LOGD("flushInterfaceDnsCache iface = %s\n", iface);
+ ALOGD("flushInterfaceDnsCache iface = %s\n", iface);
}
_resolv_flush_cache_for_iface(iface);
diff --git a/SoftapController.cpp b/SoftapController.cpp
index cd61462..dd75a3a 100644
--- a/SoftapController.cpp
+++ b/SoftapController.cpp
@@ -123,7 +123,7 @@
return -1;
}
if (!iface || (iface[0] == '\0')) {
- LOGD("Softap driver start - wrong interface");
+ ALOGD("Softap driver start - wrong interface");
iface = mIface;
}
@@ -139,7 +139,7 @@
ifc_close();
#endif
usleep(AP_DRIVER_START_DELAY);
- LOGD("Softap driver start: %d", ret);
+ ALOGD("Softap driver start: %d", ret);
return ret;
}
@@ -151,7 +151,7 @@
return -1;
}
if (!iface || (iface[0] == '\0')) {
- LOGD("Softap driver stop - wrong interface");
+ ALOGD("Softap driver stop - wrong interface");
iface = mIface;
}
*mBuf = 0;
@@ -164,7 +164,7 @@
}
#endif
ret = setCommand(iface, "STOP");
- LOGD("Softap driver stop: %d", ret);
+ ALOGD("Softap driver stop: %d", ret);
return ret;
}
@@ -205,7 +205,7 @@
}
else {
mPid = pid;
- LOGD("Softap startap - Ok");
+ ALOGD("Softap startap - Ok");
usleep(AP_BSS_START_DELAY);
}
}
@@ -222,7 +222,7 @@
}
#ifdef HAVE_HOSTAPD
- LOGD("Stopping Softap service");
+ ALOGD("Stopping Softap service");
kill(mPid, SIGTERM);
waitpid(mPid, NULL, 0);
#endif
@@ -233,7 +233,7 @@
*mBuf = 0;
ret = setCommand(mIface, "AP_BSS_STOP");
mPid = 0;
- LOGD("Softap service stopped: %d", ret);
+ ALOGD("Softap service stopped: %d", ret);
usleep(AP_BSS_STOP_DELAY);
return ret;
}
@@ -386,7 +386,7 @@
LOGE("Softap set - failed: %d", ret);
}
else {
- LOGD("Softap set - Ok");
+ ALOGD("Softap set - Ok");
usleep(AP_SET_CFG_DELAY);
}
#endif
@@ -448,7 +448,7 @@
LOGE("Softap fwReload - failed: %d", ret);
}
else {
- LOGD("Softap fwReload - Ok");
+ ALOGD("Softap fwReload - Ok");
}
return ret;
}
@@ -467,7 +467,7 @@
LOGE("Softap clients - failed: %d", ret);
} else {
asprintf(retbuf, "Softap clients:%s", mBuf);
- LOGD("Softap clients:%s", mBuf);
+ ALOGD("Softap clients:%s", mBuf);
}
return ret;
}
diff --git a/TetherController.cpp b/TetherController.cpp
index 2059cce..e065e81 100644
--- a/TetherController.cpp
+++ b/TetherController.cpp
@@ -53,7 +53,7 @@
int TetherController::setIpFwdEnabled(bool enable) {
- LOGD("Setting IP forward enable = %d", enable);
+ ALOGD("Setting IP forward enable = %d", enable);
// In BP tools mode, do not disable IP forwarding
char bootmode[PROPERTY_VALUE_MAX] = {0};
@@ -103,7 +103,7 @@
return -1;
}
- LOGD("Starting tethering services");
+ ALOGD("Starting tethering services");
pid_t pid;
int pipefd[2];
@@ -159,7 +159,7 @@
close(pipefd[0]);
mDaemonPid = pid;
mDaemonFd = pipefd[1];
- LOGD("Tethering services running");
+ ALOGD("Tethering services running");
}
return 0;
@@ -172,14 +172,14 @@
return 0;
}
- LOGD("Stopping tethering services");
+ ALOGD("Stopping tethering services");
kill(mDaemonPid, SIGTERM);
waitpid(mDaemonPid, NULL, 0);
mDaemonPid = 0;
close(mDaemonFd);
mDaemonFd = -1;
- LOGD("Tethering services stopped");
+ ALOGD("Tethering services stopped");
return 0;
}
@@ -198,7 +198,7 @@
mDnsForwarders->clear();
for (i = 0; i < numServers; i++) {
- LOGD("setDnsForwarders(%d = '%s')", i, servers[i]);
+ ALOGD("setDnsForwarders(%d = '%s')", i, servers[i]);
struct in_addr a;
@@ -210,7 +210,7 @@
cmdLen += strlen(servers[i]);
if (cmdLen + 2 >= MAX_CMD_SIZE) {
- LOGD("Too many DNS servers listed");
+ ALOGD("Too many DNS servers listed");
break;
}
@@ -220,7 +220,7 @@
}
if (mDaemonFd != -1) {
- LOGD("Sending update msg to dnsmasq [%s]", daemonCmd);
+ ALOGD("Sending update msg to dnsmasq [%s]", daemonCmd);
if (write(mDaemonFd, daemonCmd, strlen(daemonCmd) +1) < 0) {
LOGE("Failed to send update command to dnsmasq (%s)", strerror(errno));
mDnsForwarders->clear();
diff --git a/main.cpp b/main.cpp
index 36712a4..c27ade6 100644
--- a/main.cpp
+++ b/main.cpp
@@ -134,5 +134,5 @@
static void sigchld_handler(int sig) {
pid_t pid = wait(NULL);
- LOGD("Child process %d exited", pid);
+ ALOGD("Child process %d exited", pid);
}