X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=send.h;h=8b4317e3850d79b611d147d71ba0101a6e72fadf;hp=bf1ca111f7f88cf300f0c18f9c1c93930549ea99;hb=941a6eda36695c14848df25a48281aa9f20841a0;hpb=8b2c02c8d6255583982e767374d39375b3380c4d diff --git a/send.h b/send.h index bf1ca111..8b4317e3 100644 --- a/send.h +++ b/send.h @@ -17,7 +17,7 @@ struct sender { * the init function of this sender * * It must fill in all function pointers of \a s as well as the \a client_cmds - * array, see below. It should also do all neccessary preparations to init + * array, see below. It should also do all necessary preparations to init * this sending facility, for example it could open a tcp port. */ void (*init)(struct sender *s); @@ -54,7 +54,7 @@ struct sender { * file descriptors to the \a rfds or the \a wfds set. * * If a file descriptor was added, \a max_fileno must be increased by - * this function, if neccessary. + * this function, if necessary. * * \sa select(2) */ @@ -78,7 +78,7 @@ struct sender { * array of function pointers for the sender subcommands * * Each sender may implement any subset of the sender commands by filling in - * the aprropriate function pointer in the array. A \p NULL pointer means this + * the appropriate function pointer in the array. A \p NULL pointer means this * command is not implemented by this sender. */ int (*client_cmds[NUM_SENDER_CMDS])(struct sender_command_data*); @@ -87,10 +87,10 @@ struct sender { /** * check a file descriptor for writability * - * \param fd the file desctiptor + * \param fd the file descriptor * * \return positive if fd is ready for writing, zero if it isn't, negative if - * an error occured. + * an error occurred. */ static inline int write_ok(int fd) @@ -101,6 +101,8 @@ static inline int write_ok(int fd) 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;