projects
/
platform
/
core
/
appfw
/
rpc-port.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48f3ae8
)
Fix overflowing for calling nanosleep()
88/181188/1
author
Junghoon Park
<jh9216.park@samsung.com>
Mon, 11 Jun 2018 02:36:26 +0000
(11:36 +0900)
committer
Junghoon Park
<jh9216.park@samsung.com>
Mon, 11 Jun 2018 02:36:26 +0000
(11:36 +0900)
Change-Id: Id12e1e8512410046f9d3fb905ca6b4c363f0622b
Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
src/port-internal.cc
patch
|
blob
|
history
diff --git
a/src/port-internal.cc
b/src/port-internal.cc
index
a88c9b0
..
23432aa
100644
(file)
--- a/
src/port-internal.cc
+++ b/
src/port-internal.cc
@@
-35,7
+35,7
@@
#define LOG_TAG "RPC_PORT"
-#define MAX_RETRY_CNT 1
5
+#define MAX_RETRY_CNT 1
8
#define SEND_TIMEOUT 500
namespace rpc_port {
@@
-74,6
+74,8
@@
int Port::Read(void* buf, unsigned int size) {
retry_cnt++;
nanosleep(&TRY_SLEEP_TIME, 0);
TRY_SLEEP_TIME.tv_nsec *= 2;
+ if (TRY_SLEEP_TIME.tv_nsec > 999999999)
+ TRY_SLEEP_TIME.tv_nsec = 999999999;
continue;
}
LOGE("read_socket: ...error fd %d: errno %d\n", fd_, errno);