commit | 16ae478af46100a435c2875afa020721a59a411a | [log] [tgz] |
---|---|---|
author | Brad Fitzpatrick <bradfitz@android.com> | Tue Nov 02 10:55:52 2010 -0700 |
committer | Brad Fitzpatrick <bradfitz@android.com> | Tue Nov 02 10:56:15 2010 -0700 |
tree | 1152fb4e6ff8a89e600ca251d625785e83f2b511 | |
parent | 2e0047bdc067006d1e38418b2a0e24612d8068ba [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) {