git://scientific.zcu.cz
/
jra1mw.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f70dc7f
)
Remove incorrect looping in edg_wll_socket_write().
author
Jan Pospíšil
<honik@ntc.zcu.cz>
Mon, 9 May 2005 12:57:25 +0000
(12:57 +0000)
committer
Jan Pospíšil
<honik@ntc.zcu.cz>
Mon, 9 May 2005 12:57:25 +0000
(12:57 +0000)
org.glite.lb.common/src/log_msg.c
patch
|
blob
|
blame
|
history
diff --git
a/org.glite.lb.common/src/log_msg.c
b/org.glite.lb.common/src/log_msg.c
index
d495cbf
..
d6adc91
100644
(file)
--- a/
org.glite.lb.common/src/log_msg.c
+++ b/
org.glite.lb.common/src/log_msg.c
@@
-41,11
+41,14
@@
edg_wll_socket_write(
gettimeofday(&before, NULL);
}
len = write(sock, buf, bufsize);
-
while ( len <= 0
) {
+
if ( len <= 0 && errno == EAGAIN
) {
FD_ZERO(&fds);
FD_SET(sock,&fds);
- if ( select(sock+1, &fds,NULL,NULL, timeout? &to: NULL) < 0 ) return -1;
- len = write(sock, buf, bufsize);
+ if ( select(sock+1, NULL, &fds, NULL, timeout? &to: NULL) < 0 ) {
+ len = -1;
+ } else {
+ len = write(sock, buf, bufsize);
+ }
}
if ( timeout ) {
gettimeofday(&after, NULL);