projects
/
blktrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
358504b
)
Fixed EAGAIN handling in blktrace.c
author
Alan D. Brunelle
<alan.brunelle@hp.com>
Tue, 17 Feb 2009 13:48:40 +0000
(08:48 -0500)
committer
Alan D. Brunelle
<alan.brunelle@hp.com>
Tue, 17 Feb 2009 13:48:40 +0000
(08:48 -0500)
EAGAIN was causing header failures in network mode. Added in a usleep
and retried the recv().
Signed-off-by: Alan D. Brunelle <alan.brunelle@hp.com>
blktrace.c
patch
|
blob
|
blame
|
history
diff --git
a/blktrace.c
b/blktrace.c
index 6469586a46e1f91495c06bfc71d47ea38d7e4aed..26b3afdd671c5ca02697a36a36ae3bf167e675b7 100644
(file)
--- a/
blktrace.c
+++ b/
blktrace.c
@@
-799,8
+799,11
@@
static int __net_recv_data(int fd, void *buf, unsigned int len)
if (ret == 0)
break;
else if (ret < 0) {
- if (errno != EAGAIN)
- perror("server: net_recv_data: recv failed");
+ if (errno == EAGAIN) {
+ usleep(50);
+ continue;
+ }
+ perror("server: net_recv_data: recv failed");
break;
} else {
buf += ret;