X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=dccp_send.c;h=4eda3b94c9b9f44c2c062dc351b7b28705ee83d9;hp=fa2a163c5afdb1f9721b274f02bafc5402422800;hb=8b71176b792089c47acc788e1c1e068e9375fd18;hpb=1cefe6a503c74d609db4e99e689d46575a5e40fd diff --git a/dccp_send.c b/dccp_send.c index fa2a163c..4eda3b94 100644 --- a/dccp_send.c +++ b/dccp_send.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006-2012 Andre Noll + * Copyright (C) 2006-2014 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -11,15 +11,18 @@ * (C) 2005 Ian McDonald */ +#include +#include #include #include -#include +#include +#include +#include #include "para.h" #include "error.h" #include "string.h" #include "afh.h" -#include "afs.h" #include "server.h" #include "net.h" #include "list.h" @@ -104,7 +107,7 @@ static int dccp_init_fec(struct sender_client *sc) static void dccp_send_fec(struct sender_client *sc, char *buf, size_t len) { - int ret = write_nonblock(sc->fd, buf, len); + int ret = xwrite(sc->fd, buf, len); if (ret < 0) dccp_shutdown_client(sc); @@ -194,13 +197,13 @@ static const char *dccp_list_available_ccids(void) return list; } -static char *dccp_info(void) +static char *dccp_status(void) { - char *info = get_sender_info(dss, "dccp"); - char *ret = make_message("%s" "\tsupported ccids: %s\n", - info, dccp_list_available_ccids()); - free(info); - return ret; + char *status = generic_sender_status(dss, "dccp"); + char *result = make_message("%ssupported ccids: %s\n", status, + dccp_list_available_ccids()); + free(status); + return result; } /** @@ -215,7 +218,7 @@ void dccp_send_init(struct sender *s) { int ret, k, n; - s->info = dccp_info; + s->status = dccp_status; s->send = NULL; s->pre_select = dccp_pre_select; s->post_select = dccp_post_select;