• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/corennnnn


Commit MetaInfo

Revisãoc6f0a25d917522dd5a39b7972fc2244b7b885eb2 (tree)
Hora2009-05-14 04:52:53
AutorSan Mehat <san@goog...>
CommiterThe Android Open Source Project

Mensagem de Log

am df6c1b9: libsysutils: General clean up + disable build in simulator b

Merge commit 'df6c1b91e3813886070f35929583c30cfaead918'

* commit 'df6c1b91e3813886070f35929583c30cfaead918':

libsysutils: General clean up + disable build in simulator builds

Mudança Sumário

Diff

--- a/libsysutils/Android.mk
+++ b/libsysutils/Android.mk
@@ -1,3 +1,10 @@
1+BUILD_LIBSYSUTILS := false
2+ifneq ($(TARGET_SIMULATOR),true)
3+ BUILD_LIBSYSUTILS := true
4+endif
5+
6+ifeq ($(BUILD_LIBSYSUTILS),true)
7+
18 LOCAL_PATH:= $(call my-dir)
29
310 include $(CLEAR_VARS)
@@ -23,3 +30,5 @@ ifeq ($(TARGET_SIMULATOR),true)
2330 endif
2431
2532 include $(BUILD_SHARED_LIBRARY)
33+
34+endif
--- a/libsysutils/src/FrameworkListener.cpp
+++ b/libsysutils/src/FrameworkListener.cpp
@@ -59,7 +59,6 @@ void FrameworkListener::registerCmd(FrameworkCommand *cmd) {
5959 }
6060
6161 void FrameworkListener::dispatchCommand(SocketClient *cli, char *cmd) {
62- LOGD("Dispatching '%s'", cmd);
6362 char *cm, *last;
6463
6564 if (!(cm = strtok_r(cmd, ":", &last))) {
--- a/libsysutils/src/SocketClient.cpp
+++ b/libsysutils/src/SocketClient.cpp
@@ -28,8 +28,6 @@ int SocketClient::sendMsg(int code, char *msg, bool addErrno) {
2828 }
2929
3030 int SocketClient::sendMsg(char *msg) {
31- LOGD("SocketClient::sendMsg(%s)", msg);
32-
3331 if (mSocket < 0) {
3432 errno = EHOSTUNREACH;
3533 return -1;
--- a/libsysutils/src/SocketListener.cpp
+++ b/libsysutils/src/SocketListener.cpp
@@ -61,10 +61,8 @@ int SocketListener::startListener() {
6161 if (mListen && listen(mSock, 4) < 0) {
6262 LOGE("Unable to listen on socket (%s)", strerror(errno));
6363 return -1;
64- } else if (!mListen) {
64+ } else if (!mListen)
6565 mClients->push_back(new SocketClient(mSock));
66- LOGD("Created phantom client");
67- }
6866
6967 if (pipe(mCtrlPipe))
7068 return -1;
@@ -106,12 +104,7 @@ void SocketListener::runListener() {
106104 while(1) {
107105 SocketClientCollection::iterator it;
108106 fd_set read_fds;
109- struct timeval to;
110107 int rc = 0;
111-
112- to.tv_sec = 60 * 60;
113- to.tv_usec = 0;
114-
115108 int max = 0;
116109
117110 FD_ZERO(&read_fds);
@@ -133,14 +126,12 @@ void SocketListener::runListener() {
133126 }
134127 pthread_mutex_unlock(&mClientsLock);
135128
136- if ((rc = select(max + 1, &read_fds, NULL, NULL, &to)) < 0) {
129+ if ((rc = select(max + 1, &read_fds, NULL, NULL, NULL)) < 0) {
137130 LOGE("select failed (%s)", strerror(errno));
138131 sleep(1);
139132 continue;
140- } else if (!rc) {
141- LOGD("select timeout");
133+ } else if (!rc)
142134 continue;
143- }
144135
145136 if (FD_ISSET(mCtrlPipe[0], &read_fds))
146137 break;