OSDN Git Service

Rild: Ril should try to write again to the socket EAGAIN error
authorBanavathu, Srinivas Naik <snb@codeaurora.org>
Tue, 5 Jul 2011 14:34:25 +0000 (20:04 +0530)
committerGerrit Code Review <noreply-gerritcodereview@google.com>
Wed, 23 Jan 2013 17:12:53 +0000 (17:12 +0000)
In case of  EAGAIN error, the RIL should write to socket again after some
time.

Change-Id: Ia4c8d17b7c16040a49a4c607a1d1350ebbe7847c
CRs-Fixed: 285312

libril/ril.cpp

index 1548e62..0f37cc1 100644 (file)
@@ -1315,7 +1315,7 @@ blockingWrite(int fd, const void *buffer, size_t len) {
         do {
             written = write (fd, toWrite + writeOffset,
                                 len - writeOffset);
-        } while (written < 0 && errno == EINTR);
+        } while (written < 0 && ((errno == EINTR) || (errno == EAGAIN)));
 
         if (written >= 0) {
             writeOffset += written;