X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=send.h;h=94d14cf8d01bd8ac8c30c4e92720b2982abd0fe3;hp=8b4317e3850d79b611d147d71ba0101a6e72fadf;hb=3913d265cd6c3b8e43bac4f1f0deb1e96bc95a15;hpb=7e58bd75a29d2d4e1d184191c2500b6aa7a7ad8a diff --git a/send.h b/send.h index 8b4317e3..94d14cf8 100644 --- a/send.h +++ b/send.h @@ -84,27 +84,3 @@ struct sender { int (*client_cmds[NUM_SENDER_CMDS])(struct sender_command_data*); }; -/** - * check a file descriptor for writability - * - * \param fd the file descriptor - * - * \return positive if fd is ready for writing, zero if it isn't, negative if - * an error occurred. - */ - -static inline int write_ok(int fd) -{ - struct timeval tv = {0, 0}; - fd_set wfds; - int ret; -again: - FD_ZERO(&wfds); - FD_SET(fd, &wfds); - tv.tv_sec = 0; - tv.tv_usec = 0; - ret = select(fd + 1, NULL, &wfds, NULL, &tv); - if (ret < 0 && errno == EINTR) - goto again; - return ret; -}