commit | b9634d05cf4fedb2ee49b0a41aeb129d35337ce9 | [log] [tgz] |
---|---|---|
author | Brad Fitzpatrick <bradfitz@android.com> | Tue Nov 02 10:55:52 2010 -0700 |
committer | Brad Fitzpatrick <bradfitz@android.com> | Thu Jan 06 11:16:15 2011 -0800 |
tree | 147eed5ac6e002c638519b47152dbfb009033c89 | |
parent | a2a1f3149fb32d95bc81ddfd713d5bba9d6cbc61 [diff] |
Permit 0 length writes. Change-Id: I087d0074c8d9e13ce814187475966da94f693fc0
diff --git a/libsysutils/src/SocketClient.cpp b/libsysutils/src/SocketClient.cpp index ff2315b..c9c7417 100644 --- a/libsysutils/src/SocketClient.cpp +++ b/libsysutils/src/SocketClient.cpp
@@ -62,6 +62,10 @@ const char *p = (const char*) data; int brtw = len; + if (len == 0) { + return 0; + } + pthread_mutex_lock(&mWriteMutex); while (brtw > 0) { if ((rc = write(mSocket, p, brtw)) < 0) {