system/corennnnn
Revisão | c6f0a25d917522dd5a39b7972fc2244b7b885eb2 (tree) |
---|---|
Hora | 2009-05-14 04:52:53 |
Autor | San Mehat <san@goog...> |
Commiter | The Android Open Source Project |
am df6c1b9: libsysutils: General clean up + disable build in simulator b
Merge commit 'df6c1b91e3813886070f35929583c30cfaead918'
* commit 'df6c1b91e3813886070f35929583c30cfaead918':
@@ -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 | + | |
1 | 8 | LOCAL_PATH:= $(call my-dir) |
2 | 9 | |
3 | 10 | include $(CLEAR_VARS) |
@@ -23,3 +30,5 @@ ifeq ($(TARGET_SIMULATOR),true) | ||
23 | 30 | endif |
24 | 31 | |
25 | 32 | include $(BUILD_SHARED_LIBRARY) |
33 | + | |
34 | +endif |
@@ -59,7 +59,6 @@ void FrameworkListener::registerCmd(FrameworkCommand *cmd) { | ||
59 | 59 | } |
60 | 60 | |
61 | 61 | void FrameworkListener::dispatchCommand(SocketClient *cli, char *cmd) { |
62 | - LOGD("Dispatching '%s'", cmd); | |
63 | 62 | char *cm, *last; |
64 | 63 | |
65 | 64 | if (!(cm = strtok_r(cmd, ":", &last))) { |
@@ -28,8 +28,6 @@ int SocketClient::sendMsg(int code, char *msg, bool addErrno) { | ||
28 | 28 | } |
29 | 29 | |
30 | 30 | int SocketClient::sendMsg(char *msg) { |
31 | - LOGD("SocketClient::sendMsg(%s)", msg); | |
32 | - | |
33 | 31 | if (mSocket < 0) { |
34 | 32 | errno = EHOSTUNREACH; |
35 | 33 | return -1; |
@@ -61,10 +61,8 @@ int SocketListener::startListener() { | ||
61 | 61 | if (mListen && listen(mSock, 4) < 0) { |
62 | 62 | LOGE("Unable to listen on socket (%s)", strerror(errno)); |
63 | 63 | return -1; |
64 | - } else if (!mListen) { | |
64 | + } else if (!mListen) | |
65 | 65 | mClients->push_back(new SocketClient(mSock)); |
66 | - LOGD("Created phantom client"); | |
67 | - } | |
68 | 66 | |
69 | 67 | if (pipe(mCtrlPipe)) |
70 | 68 | return -1; |
@@ -106,12 +104,7 @@ void SocketListener::runListener() { | ||
106 | 104 | while(1) { |
107 | 105 | SocketClientCollection::iterator it; |
108 | 106 | fd_set read_fds; |
109 | - struct timeval to; | |
110 | 107 | int rc = 0; |
111 | - | |
112 | - to.tv_sec = 60 * 60; | |
113 | - to.tv_usec = 0; | |
114 | - | |
115 | 108 | int max = 0; |
116 | 109 | |
117 | 110 | FD_ZERO(&read_fds); |
@@ -133,14 +126,12 @@ void SocketListener::runListener() { | ||
133 | 126 | } |
134 | 127 | pthread_mutex_unlock(&mClientsLock); |
135 | 128 | |
136 | - if ((rc = select(max + 1, &read_fds, NULL, NULL, &to)) < 0) { | |
129 | + if ((rc = select(max + 1, &read_fds, NULL, NULL, NULL)) < 0) { | |
137 | 130 | LOGE("select failed (%s)", strerror(errno)); |
138 | 131 | sleep(1); |
139 | 132 | continue; |
140 | - } else if (!rc) { | |
141 | - LOGD("select timeout"); | |
133 | + } else if (!rc) | |
142 | 134 | continue; |
143 | - } | |
144 | 135 | |
145 | 136 | if (FD_ISSET(mCtrlPipe[0], &read_fds)) |
146 | 137 | break; |