/** the list of connected clients **/
static struct list_head clients;
static int listen_fd = -1;
/** the list of connected clients **/
static struct list_head clients;
static int listen_fd = -1;
list_for_each_entry_safe(dc, tmp, &clients, node) {
if (!dc->header_sent && current_chunk) {
list_for_each_entry_safe(dc, tmp, &clients, node) {
if (!dc->header_sent && current_chunk) {
header_buf = vss_get_header(&header_len);
if (header_buf && header_len > 0) {
if (queue_chunk_or_shutdown(dc, -1U, 0) < 0)
header_buf = vss_get_header(&header_len);
if (header_buf && header_len > 0) {
if (queue_chunk_or_shutdown(dc, -1U, 0) < 0)
// PARA_DEBUG_LOG("writing %d bytes to fd %d\n", len, dc->fd);
ret = dccp_write(dc->fd, buf, len);
if (ret < 0) {
// PARA_DEBUG_LOG("writing %d bytes to fd %d\n", len, dc->fd);
ret = dccp_write(dc->fd, buf, len);
if (ret < 0) {
s->client_cmds[SENDER_ALLOW] = NULL;
s->client_cmds[SENDER_ADD] = NULL;
s->client_cmds[SENDER_DELETE] = NULL;
s->client_cmds[SENDER_ALLOW] = NULL;
s->client_cmds[SENDER_ADD] = NULL;
s->client_cmds[SENDER_DELETE] = NULL;