diff options
author | Jusung Son <jusung07.son@samsung.com> | 2020-04-16 15:50:49 +0900 |
---|---|---|
committer | Jusung Son <jusung07.son@samsung.com> | 2020-04-16 15:50:49 +0900 |
commit | 86d0bf39e8cc5d9b2353c826a07b2c09ecfd9b6c (patch) | |
tree | 1e9b5fc36782dcd656853bde90eb91fa48c951ee | |
parent | d88fa198d87310a34e4f0a3eaca518eeab33fb8d (diff) | |
download | message-port-86d0bf39e8cc5d9b2353c826a07b2c09ecfd9b6c.tar.gz message-port-86d0bf39e8cc5d9b2353c826a07b2c09ecfd9b6c.tar.bz2 message-port-86d0bf39e8cc5d9b2353c826a07b2c09ecfd9b6c.zip |
Remove unnecessary POLLOUT check.
Change-Id: I94265db4cf5008edca7bb772e7a151c300e9c73d
Signed-off-by: Jusung Son <jusung07.son@samsung.com>
-rw-r--r-- | src/message_port_common.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/message_port_common.c b/src/message_port_common.c index dd922e9..aa601d1 100644 --- a/src/message_port_common.c +++ b/src/message_port_common.c @@ -52,27 +52,13 @@ int write_socket(int fd, unsigned int *bytes_write, int *sequence) { -#define SEND_TIMEOUT 5 /* milliseconds */ - unsigned int left = nbytes; ssize_t nb; int retry_cnt = 0; - struct pollfd fds[1]; - int ret; *sequence += 1; *bytes_write = 0; - fds[0].fd = fd; - fds[0].events = POLLOUT; - fds[0].revents = 0; - - ret = poll(fds, 1, SEND_TIMEOUT); - if (ret == 0) { - LOGE("write_socket: : fd %d poll timeout", fd); - return MESSAGE_PORT_ERROR_RESOURCE_UNAVAILABLE; - } - while (left && (retry_cnt < MAX_RETRY_CNT)) { nb = write(fd, buffer, left); if (nb == -1) { |