Loading libsysutils/Android.mk +9 −0 Original line number Diff line number Diff line BUILD_LIBSYSUTILS := false ifneq ($(TARGET_SIMULATOR),true) BUILD_LIBSYSUTILS := true endif ifeq ($(BUILD_LIBSYSUTILS),true) LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) Loading @@ -23,3 +30,5 @@ ifeq ($(TARGET_SIMULATOR),true) endif include $(BUILD_SHARED_LIBRARY) endif libsysutils/src/FrameworkListener.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ void FrameworkListener::registerCmd(FrameworkCommand *cmd) { } void FrameworkListener::dispatchCommand(SocketClient *cli, char *cmd) { LOGD("Dispatching '%s'", cmd); char *cm, *last; if (!(cm = strtok_r(cmd, ":", &last))) { Loading libsysutils/src/SocketClient.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -28,8 +28,6 @@ int SocketClient::sendMsg(int code, char *msg, bool addErrno) { } int SocketClient::sendMsg(char *msg) { LOGD("SocketClient::sendMsg(%s)", msg); if (mSocket < 0) { errno = EHOSTUNREACH; return -1; Loading libsysutils/src/SocketListener.cpp +3 −12 Original line number Diff line number Diff line Loading @@ -61,10 +61,8 @@ int SocketListener::startListener() { if (mListen && listen(mSock, 4) < 0) { LOGE("Unable to listen on socket (%s)", strerror(errno)); return -1; } else if (!mListen) { } else if (!mListen) mClients->push_back(new SocketClient(mSock)); LOGD("Created phantom client"); } if (pipe(mCtrlPipe)) return -1; Loading Loading @@ -106,12 +104,7 @@ void SocketListener::runListener() { while(1) { SocketClientCollection::iterator it; fd_set read_fds; struct timeval to; int rc = 0; to.tv_sec = 60 * 60; to.tv_usec = 0; int max = 0; FD_ZERO(&read_fds); Loading @@ -133,14 +126,12 @@ void SocketListener::runListener() { } pthread_mutex_unlock(&mClientsLock); if ((rc = select(max + 1, &read_fds, NULL, NULL, &to)) < 0) { if ((rc = select(max + 1, &read_fds, NULL, NULL, NULL)) < 0) { LOGE("select failed (%s)", strerror(errno)); sleep(1); continue; } else if (!rc) { LOGD("select timeout"); } else if (!rc) continue; } if (FD_ISSET(mCtrlPipe[0], &read_fds)) break; Loading Loading
libsysutils/Android.mk +9 −0 Original line number Diff line number Diff line BUILD_LIBSYSUTILS := false ifneq ($(TARGET_SIMULATOR),true) BUILD_LIBSYSUTILS := true endif ifeq ($(BUILD_LIBSYSUTILS),true) LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) Loading @@ -23,3 +30,5 @@ ifeq ($(TARGET_SIMULATOR),true) endif include $(BUILD_SHARED_LIBRARY) endif
libsysutils/src/FrameworkListener.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,6 @@ void FrameworkListener::registerCmd(FrameworkCommand *cmd) { } void FrameworkListener::dispatchCommand(SocketClient *cli, char *cmd) { LOGD("Dispatching '%s'", cmd); char *cm, *last; if (!(cm = strtok_r(cmd, ":", &last))) { Loading
libsysutils/src/SocketClient.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -28,8 +28,6 @@ int SocketClient::sendMsg(int code, char *msg, bool addErrno) { } int SocketClient::sendMsg(char *msg) { LOGD("SocketClient::sendMsg(%s)", msg); if (mSocket < 0) { errno = EHOSTUNREACH; return -1; Loading
libsysutils/src/SocketListener.cpp +3 −12 Original line number Diff line number Diff line Loading @@ -61,10 +61,8 @@ int SocketListener::startListener() { if (mListen && listen(mSock, 4) < 0) { LOGE("Unable to listen on socket (%s)", strerror(errno)); return -1; } else if (!mListen) { } else if (!mListen) mClients->push_back(new SocketClient(mSock)); LOGD("Created phantom client"); } if (pipe(mCtrlPipe)) return -1; Loading Loading @@ -106,12 +104,7 @@ void SocketListener::runListener() { while(1) { SocketClientCollection::iterator it; fd_set read_fds; struct timeval to; int rc = 0; to.tv_sec = 60 * 60; to.tv_usec = 0; int max = 0; FD_ZERO(&read_fds); Loading @@ -133,14 +126,12 @@ void SocketListener::runListener() { } pthread_mutex_unlock(&mClientsLock); if ((rc = select(max + 1, &read_fds, NULL, NULL, &to)) < 0) { if ((rc = select(max + 1, &read_fds, NULL, NULL, NULL)) < 0) { LOGE("select failed (%s)", strerror(errno)); sleep(1); continue; } else if (!rc) { LOGD("select timeout"); } else if (!rc) continue; } if (FD_ISSET(mCtrlPipe[0], &read_fds)) break; Loading