--- tftpd/src/srv.c 2014/02/24 14:38:47 1.6.2.3 +++ tftpd/src/srv.c 2014/02/24 22:02:19 1.7.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: srv.c,v 1.6.2.3 2014/02/24 14:38:47 misho Exp $ +* $Id: srv.c,v 1.7.2.2 2014/02/24 22:02:19 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -171,6 +171,7 @@ txAck(sched_task_t *task) schedCancelby(TASK_ROOT(task), taskTIMER, CRITERIA_CALL, timeoutSession, NULL); schedEvent(TASK_ROOT(task), timeoutSession, NULL, 0, TASK_DATA(task), 0); EVERBOSE(2, "Finish WRQ request"); + schedResumeby(TASK_ROOT(task), CRITERIA_ID, 0); } taskExit(task, NULL); } @@ -285,6 +286,10 @@ RQ(sched_task_t *task) cli.siz = TFTP_LOAD_MAX; cli.opc = ntohs(rpack_uint16(pkt, NULL, 0)); + if (!RW && cli.opc == TFTP_OPC_WRQ) { + code = 2; + goto end; + } len = str_getString(RPACK_NEXT(pkt), rlen, &str); if (len == -1) goto end;