summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2012-11-12 12:10:00 +0100
committerPaul Kocialkowski <contact@paulk.fr>2012-11-12 12:10:00 +0100
commitcc986f7d3b616994125e6424661000116c032d2d (patch)
tree47f3cfed27954291e3cd3d7c229a3523bf21ad0b
parent4392bc4d6d65f552420e9817c66e8837c0d54d40 (diff)
downloadhardware_ril_samsung-ril-cc986f7d3b616994125e6424661000116c032d2d.zip
hardware_ril_samsung-ril-cc986f7d3b616994125e6424661000116c032d2d.tar.gz
hardware_ril_samsung-ril-cc986f7d3b616994125e6424661000116c032d2d.tar.bz2
SRS: Set non-blocking flag without override
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r--srs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/srs.c b/srs.c
index 13f50a5..4859778 100644
--- a/srs.c
+++ b/srs.c
@@ -457,6 +457,7 @@ int srs_read_loop(struct ril_client *client)
struct sockaddr_un client_addr;
int client_addr_len;
pthread_attr_t attr;
+ int flags;
int fd;
int rc;
@@ -484,7 +485,9 @@ int srs_read_loop(struct ril_client *client)
break;
}
- fcntl(fd, F_SETFL, O_NONBLOCK);
+ flags = fcntl(fd, F_GETFL);
+ flags |= O_NONBLOCK;
+ fcntl(fd, F_SETFL, flags);
LOGD("Accepted new SRS client from fd %d", fd);