aboutsummaryrefslogtreecommitdiff
path: root/tests/server/tftpd.c
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2007-01-15 21:03:53 +0000
committerDan Fandrich <dan@coneharvesters.com>2007-01-15 21:03:53 +0000
commitb0d13fa4cbd8a6ff0a1bd344f539fa15c33af3af (patch)
treea05a284e41789c44b8bf29e1cb0c159ceaff268e /tests/server/tftpd.c
parent0fb5a65a58130da7882f0a8d396e24b95c25064f (diff)
Leave the TFTPD test server running after a file upload.
Flush the protocol log data so it's immediately available to the test harness.
Diffstat (limited to 'tests/server/tftpd.c')
-rw-r--r--tests/server/tftpd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c
index 7120c152b..1b674a592 100644
--- a/tests/server/tftpd.c
+++ b/tests/server/tftpd.c
@@ -615,6 +615,7 @@ again:
/* store input protocol */
fprintf(test->server, "mode: %s\n", mode);
+ fflush(test->server);
for (pf = formats; pf->f_mode; pf++)
if (strcmp(pf->f_mode, mode) == 0)
@@ -799,10 +800,9 @@ static void sendtftp(struct testcase *test, struct formats *pf)
} while (size == SEGSIZE);
}
-static void justquit(int signum)
+static void justtimeout(int signum)
{
(void)signum;
- exit(0);
}
@@ -876,7 +876,7 @@ send_ack:
ap->th_block = htons((u_short)(block));
(void) swrite(peer, ackbuf, 4);
#if defined(HAVE_ALARM) && defined(SIGALRM)
- mysignal(SIGALRM, justquit); /* just quit on timeout */
+ mysignal(SIGALRM, justtimeout); /* just abort read on timeout */
alarm(rexmtval);
#endif
n = sread(peer, buf, sizeof(buf)); /* normally times out and quits */