OSDN Git Service

change logx to alogx
authorMatthew Xie <mattx@google.com>
Thu, 21 Jun 2012 20:40:02 +0000 (13:40 -0700)
committerMatthew Xie <mattx@google.com>
Sat, 14 Jul 2012 09:17:41 +0000 (02:17 -0700)
Change-Id: Ib535b04a6b18d5d35012795b07a705c6483f343d

CommandListener.cpp
TetherController.cpp

index 110dba6..e530209 100644 (file)
@@ -612,10 +612,10 @@ int CommandListener::TetherCmd::runCommand(SocketClient *cli,
     if (!strcmp(argv[1], "stop")) {
         rc = sTetherCtrl->stopTethering();
     } else if(!strcmp(argv[1], "start-reverse")) {
-        LOGD("CommandListener::TetherCmd::run, call startReverseTethering, iface:%s", argv[2]);
+        ALOGD("CommandListener::TetherCmd::run, call startReverseTethering, iface:%s", argv[2]);
         sTetherCtrl->startReverseTethering(argv[2]);
     } else if (!strcmp(argv[1], "stop-reverse")) {
-        LOGD("CommandListener::TetherCmd::run, call stopReverseTethering");
+        ALOGD("CommandListener::TetherCmd::run, call stopReverseTethering");
         rc = sTetherCtrl->stopReverseTethering();
     } else if (!strcmp(argv[1], "status")) {
         char *tmp = NULL;
index 7a470c7..ceac0b9 100644 (file)
@@ -189,12 +189,12 @@ int TetherController::stopTethering() {
 }
 int TetherController::startReverseTethering(const char* iface) {
     if (mDhcpcdPid != 0) {
-        LOGE("Reverse tethering already started");
+        ALOGE("Reverse tethering already started");
         errno = EBUSY;
         return -1;
     }
 
-    LOGD("TetherController::startReverseTethering, Starting reverse tethering");
+    ALOGD("TetherController::startReverseTethering, Starting reverse tethering");
 
     /*
      * TODO: Create a monitoring thread to handle and restart
@@ -207,7 +207,7 @@ int TetherController::startReverseTethering(const char* iface) {
 
     pid_t pid;
     if ((pid = fork()) < 0) {
-        LOGE("fork failed (%s)", strerror(errno));
+        ALOGE("fork failed (%s)", strerror(errno));
         return -1;
     }
 
@@ -225,29 +225,29 @@ int TetherController::startReverseTethering(const char* iface) {
         args[argc++] = (char*)iface;
         args[argc] = NULL;
         if (execv(args[0], args)) {
-            LOGE("startReverseTethering, execv failed (%s)", strerror(errno));
+            ALOGE("startReverseTethering, execv failed (%s)", strerror(errno));
         }
-        LOGE("startReverseTethering, Should never get here!");
+        ALOGE("startReverseTethering, Should never get here!");
         return 0;
     } else {
         mDhcpcdPid = pid;
-        LOGD("Reverse Tethering running, pid:%d", pid);
+        ALOGD("Reverse Tethering running, pid:%d", pid);
     }
     return 0;
 }
 int TetherController::stopReverseTethering() {
 
     if (mDhcpcdPid == 0) {
-        LOGE("Tethering already stopped");
+        ALOGE("Tethering already stopped");
         return 0;
     }
 
-    LOGD("Stopping tethering services");
+    ALOGD("Stopping tethering services");
 
     kill(mDhcpcdPid, SIGTERM);
     waitpid(mDhcpcdPid, NULL, 0);
     mDhcpcdPid = 0;
-    LOGD("Tethering services stopped");
+    ALOGD("Tethering services stopped");
     return 0;
 }
 bool TetherController::isTetheringStarted() {