mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-24 12:44:19 +08:00
Flush the serial buffer before quit in BCSP initialization
This commit is contained in:
parent
c7c04aac86
commit
a8b6c0b9d1
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user