projects
/
paraslash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
aacdec: no need to read the offset table.
[paraslash.git]
/
send.h
diff --git
a/send.h
b/send.h
index 75c13731bb1af9223a0a32fdc8c85792f04f3d50..3aebb1600ebfdee0450c0100ae8c99921c7c0cd0 100644
(file)
--- a/
send.h
+++ b/
send.h
@@
-85,9
+85,16
@@
struct sender {
int (*client_cmds[NUM_SENDER_CMDS])(struct sender_command_data*);
};
int (*client_cmds[NUM_SENDER_CMDS])(struct sender_command_data*);
};
+/**
+ * check a file descriptor for writability
+ *
+ * \param fd the file desctiptor
+ *
+ * \return positive if fd is ready for writing, zero if it isn't, negative if
+ * an error occured.
+ */
-
-static inline int _write_ok(int fd)
+static inline int write_ok(int fd)
{
struct timeval tv = {0, 0};
fd_set wfds;
{
struct timeval tv = {0, 0};
fd_set wfds;
@@
-98,8
+105,5
@@
again:
ret = select(fd + 1, NULL, &wfds, NULL, &tv);
if (ret < 0 && errno == EINTR)
goto again;
ret = select(fd + 1, NULL, &wfds, NULL, &tv);
if (ret < 0 && errno == EINTR)
goto again;
- if (ret < 0)
- ret = 0;
return ret;
}
return ret;
}
-