/*
- * Copyright (C) 2005-2007 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2009 Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
{
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);
+ // PARA_DEBUG_LOG("dumped %s to fd %d, ret = %d\n", msg, fd, ret);
if (ret == len)
continue;
}
free(sc);
dump_stat_client_list();
}
- PARA_DEBUG_LOG("%d client(s)\n", num_clients);
+// if (num_clients)
+// PARA_DEBUG_LOG("%d client(s)\n", num_clients);
}
/**