projects
/
paraslash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make mp3_seek_next_header() more readable.
[paraslash.git]
/
stat.c
diff --git
a/stat.c
b/stat.c
index 89a1f49b9f823120c36e8c3f29922d45497a9225..e640e4c6994ca830e769c34dc6072a17ac254606 100644
(file)
--- a/
stat.c
+++ b/
stat.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2005-200
7
Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-200
8
Andre Noll <maan@systemlinux.org>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
@@
-103,22
+103,17
@@
void stat_client_write(const char *msg, int itemnum)
{
struct stat_client *sc, *tmp;
size_t len = strlen(msg);
{
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;
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;
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);
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;
}
if (ret == len)
continue;
}
@@
-130,7
+125,8
@@
void stat_client_write(const char *msg, int itemnum)
free(sc);
dump_stat_client_list();
}
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);
}
/**
}
/**