X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=command.c;h=4aa262ce36f2f07c026e8453bfc2364f4684884f;hp=932c9f3a2c7ef51014c9630514513ee427f0280b;hb=748d1368bc96dd7e1af879df1ea41b4d52842f7e;hpb=ef1f130a1f9ac61a51da10ee56c5bd9ef1b52366 diff --git a/command.c b/command.c index 932c9f3a..4aa262ce 100644 --- a/command.c +++ b/command.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2011 Andre Noll + * Copyright (C) 1997-2012 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -11,7 +11,6 @@ #include #include #include -#include #include "para.h" #include "error.h" @@ -127,7 +126,7 @@ static char *get_status(struct misc_meta_data *nmmd, int parser_friendly) * The calls to WRITE_STATUS_ITEM() below never fail because * b->max_size is zero (unlimited), see para_printf(). However, clang * is not smart enough to prove this and complains nevertheless. - * Casting the return value to void silences solves this. + * Casting the return value to void silences clang. */ (void)WRITE_STATUS_ITEM(&b, SI_FILE_SIZE, "%zu\n", nmmd->size / 1024); (void)WRITE_STATUS_ITEM(&b, SI_MTIME, "%s\n", mtime); @@ -751,7 +750,7 @@ __noreturn void handle_connect(int fd, const char *peername) if (ret < 0) goto net_err; /* send Welcome message */ - ret = send_va_buffer(fd, "This is para_server, version " + ret = write_va_buffer(fd, "This is para_server, version " PACKAGE_VERSION ".\n" ); if (ret < 0) goto net_err; @@ -787,7 +786,7 @@ __noreturn void handle_connect(int fd, const char *peername) } PARA_DEBUG_LOG("sending %u byte challenge + rc4 keys (%zu bytes)\n", CHALLENGE_SIZE, numbytes); - ret = send_bin_buffer(fd, buf, numbytes); + ret = write_all(fd, buf, numbytes); if (ret < 0) goto net_err; /* recv challenge response */