--- tftpd/src/srv.c 2014/02/24 22:28:54 1.8 +++ tftpd/src/srv.c 2017/01/22 21:00:33 1.8.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: srv.c,v 1.8 2014/02/24 22:28:54 misho Exp $ +* $Id: srv.c,v 1.8.2.1 2017/01/22 21:00:33 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004 - 2014 +Copyright 2004 - 2017 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -82,7 +82,7 @@ txPkt(sched_task_t *task) if (wlen == -1) ESYSERR(0); else if (wlen != TASK_DATLEN(task)) { - EERROR(EIO, "Sended %d bytes != packet %d bytes", + EERROR(EIO, "Sended %d bytes != packet %zu bytes", wlen, TASK_DATLEN(task)); schedEvent(TASK_ROOT(task), execProg, "error", 0, NULL, TFTP_OPC_ERROR); schedCancelby(TASK_ROOT(task), taskTIMER, CRITERIA_CALL, @@ -220,7 +220,7 @@ getOpts(rpack_t * __restrict pkt, int rlen) } while (rlen > 0); EVERBOSE(4, "blksize=%u tsize=%llu timeout=%d rollover=%u", - cli.siz, cli.tsiz, (int) cli.tout.tv_sec, cli.roll - 1); + cli.siz, (unsigned long long) cli.tsiz, (int) cli.tout.tv_sec, cli.roll - 1); return 0; } @@ -249,7 +249,7 @@ txOack(sched_task_t *task) } if (cli.tsiz) { memset(szStr, 0, sizeof szStr); - snprintf(szStr, sizeof szStr, "%llu", cli.tsiz); + snprintf(szStr, sizeof szStr, "%llu", (unsigned long long) cli.tsiz); rpack_rdata(pkt, TFTP_OPT_TSIZE, strlen(TFTP_OPT_TSIZE) + 1); rpack_rdata(pkt, szStr, strlen(szStr) + 1); } @@ -267,7 +267,7 @@ txOack(sched_task_t *task) } EVERBOSE(4, "blksize=%u tsize=%llu timeout=%d rollover=%u", - cli.siz, cli.tsiz, (int) cli.tout.tv_sec, cli.roll - 1); + cli.siz, (unsigned long long) cli.tsiz, (int) cli.tout.tv_sec, cli.roll - 1); schedCallOnce(TASK_ROOT(task), txPkt, NULL, TASK_FD(task), TASK_DATA(task), RPACK_OFF(pkt)); taskExit(task, NULL);