Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9634d05 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick
Browse files

Permit 0 length writes.

Change-Id: I087d0074c8d9e13ce814187475966da94f693fc0
parent a2a1f314
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -62,6 +62,10 @@ int SocketClient::sendData(const void* data, int len) {
    const char *p = (const char*) data;
    const char *p = (const char*) data;
    int brtw = len;
    int brtw = len;


    if (len == 0) {
        return 0;
    }

    pthread_mutex_lock(&mWriteMutex);
    pthread_mutex_lock(&mWriteMutex);
    while (brtw > 0) {
    while (brtw > 0) {
        if ((rc = write(mSocket, p, brtw)) < 0) {
        if ((rc = write(mSocket, p, brtw)) < 0) {