Flush the serial buffer before quit in BCSP initialization

This commit is contained in:
Marcel Holtmann 2003-03-17 09:06:19 +00:00
parent c7c04aac86
commit a8b6c0b9d1

View File

@ -323,6 +323,7 @@ static void bcsp_tshy_sig_alarm(int sig)
alarm(1); alarm(1);
return; return;
} }
tcflush(serial_fd, TCIOFLUSH);
fprintf(stderr, "BCSP initialization timed out\n"); fprintf(stderr, "BCSP initialization timed out\n");
exit(1); exit(1);
} }
@ -337,6 +338,7 @@ static void bcsp_tconf_sig_alarm(int sig)
alarm(1); alarm(1);
return; return;
} }
tcflush(serial_fd, TCIOFLUSH);
fprintf(stderr, "BCSP initialization timed out\n"); fprintf(stderr, "BCSP initialization timed out\n");
exit(1); exit(1);
} }