X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=send_common.c;h=d9616248b5dcf1a814ef7e3c457891bdd64c2ffb;hp=388fde03bdd4399d40ef3d9ad127f81a8ea75cb3;hb=957daedc7a0f238a9d3b34ff4a3c84d5ed3851ec;hpb=badcf6125a8e0b2845348aca46d288f141e4f509 diff --git a/send_common.c b/send_common.c index 388fde03..d9616248 100644 --- a/send_common.c +++ b/send_common.c @@ -42,7 +42,7 @@ */ static int open_sender(unsigned l4type, int port) { - int fd, ret = para_listen(AF_UNSPEC, l4type, port); + int fd, ret = para_listen_simple(l4type, port); if (ret < 0) return ret; @@ -162,8 +162,8 @@ void send_chunk(struct sender_client *sc, struct sender_status *ss, if (ret < 0) goto out; } - sc->header_sent = 1; } + sc->header_sent = 1; ret = send_queued_chunks(sc->fd, sc->cq, max_bytes_per_write); if (ret < 0) { shutdown_client(sc, ss); @@ -231,14 +231,14 @@ char *get_sender_info(struct sender_status *ss, const char *name) ret = make_message( "%s sender:\n" "\tstatus: %s\n" - "\tport: %d\n" + "\tport: %s\n" "\tnumber of connected clients: %d\n" "\tmaximal number of clients: %d%s\n" "\tconnected clients: %s\n" "\taccess %s list: %s\n", name, (ss->listen_fd >= 0)? "on" : "off", - ss->port, + stringify_port(ss->port, strcmp(name, "http") ? "dccp" : "tcp"), ss->num_clients, ss->max_clients, ss->max_clients > 0? "" : " (unlimited)",