From: Andre Noll Date: Tue, 11 Dec 2007 20:17:01 +0000 (+0100) Subject: Merge commit 'remotes/fml/master' X-Git-Tag: v0.3.0~59 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=dbc0f1fba57b6de0f6bb4d7ac40167a1047ea3cd;hp=6ab1256d9cf3e6e518e5967ad07e32bb2268f718 Merge commit 'remotes/fml/master' --- diff --git a/stat.c b/stat.c index 89a1f49b..0457a0f3 100644 --- a/stat.c +++ b/stat.c @@ -103,20 +103,15 @@ void stat_client_write(const char *msg, int itemnum) { struct stat_client *sc, *tmp; size_t len = strlen(msg); - struct timeval tv = {0 , 0}; if (!initialized || !len) return; list_for_each_entry_safe(sc, tmp, &client_list, node) { int fd = sc->fd, ret; - fd_set wfds; if (!((1 << itemnum) & sc->item_mask)) continue; - FD_ZERO(&wfds); - FD_SET(fd, &wfds); - ret = para_select(fd + 1, NULL, &wfds, &tv); - if (ret > 0) { + if (write_ok(fd) > 0) { ret = write(fd, msg, len); PARA_DEBUG_LOG("dumped %s to fd %d, ret = %d\n", msg, fd, ret); if (ret == len)