commit cde10b419ae1eb418be317dc534c3f2e4c014c06
parent 835f117d10238cb1f12d4fda9ca822e8fd4f3a61
Author: sin <sin@2f30.org>
Date: Fri, 15 Nov 2013 14:35:51 +0000
Restore tty setup before printing error
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/rs.c b/rs.c
@@ -61,6 +61,7 @@ loop(void)
ftdi_write_data(&ftdictx, buf, n);
n = ftdi_read_data(&ftdictx, buf, sizeof(buf));
if (n < 0) {
+ ttyrestore();
fprintf(stderr, "ftdi_read_data: read error: %s\n",
ftdi_get_error_string(&ftdictx));
break;