From: John Hodge Date: Fri, 22 Feb 2013 01:56:00 +0000 (+0800) Subject: server/door - cleared door serial buffer on open, just in case X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=9cd0958be3efdcaffecf4f643fc1046b841135a7;p=tpg%2Fopendispense2.git server/door - cleared door serial buffer on open, just in case --- diff --git a/src/server/handler_door.c b/src/server/handler_door.c index 190769a..de28e6f 100644 --- a/src/server/handler_door.c +++ b/src/server/handler_door.c @@ -121,6 +121,11 @@ int Door_DoDispense(int User, int Item) return -1; } #endif + // Read and discard anything in the buffer + { + char tmpbuf[32]; + read(door_serial_handle, tmpbuf, sizeof(tmpbuf)); + } close(door_serial_handle);