X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=udp_send.c;h=3f9059bb0b03f81c50ec2ef722e255effd41b1ce;hb=e8089cd5efad59a5eec689117acf563a38b8c6c7;hp=8677ec5eeea4c17fcd0a5b9f7918fc47ea961c35;hpb=91edaa02c232edf82b93a928058c044df80badc1;p=paraslash.git diff --git a/udp_send.c b/udp_send.c index 8677ec5e..3f9059bb 100644 --- a/udp_send.c +++ b/udp_send.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2009 Andre Noll + * Copyright (C) 2005-2010 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -7,10 +7,12 @@ /** \file udp_send.c Para_server's udp sender. */ +#include #include #include #include #include +#include #include "server.cmdline.h" #include "para.h" @@ -158,7 +160,7 @@ static int udp_init_session(struct udp_target *ut) if (ut->fd >= 0) /* nothing to do */ return 0; - ret = makesock(AF_UNSPEC, IPPROTO_UDP, 0, ut->host, ut->port); + ret = para_connect_simple(IPPROTO_UDP, ut->host, ut->port); if (ret < 0) return ret; ut->fd = ret; @@ -304,10 +306,10 @@ static char *udp_info(void) ret = make_message( "udp sender:\n" "\tstatus: %s\n" - "\tport: udp %d\n" + "\tport: %s\n" "\ttargets: %s\n", (sender_status == SENDER_ON)? "on" : "off", - conf.udp_default_port_arg, + stringify_port(conf.udp_default_port_arg, "udp"), tgts? tgts : "(none)" ); free(tgts);