server/door - cleared door serial buffer on open, just in case
authorJohn Hodge <[email protected]>
Fri, 22 Feb 2013 01:56:00 +0000 (09:56 +0800)
committerJohn Hodge <[email protected]>
Fri, 22 Feb 2013 01:56:00 +0000 (09:56 +0800)
src/server/handler_door.c

index 190769a..de28e6f 100644 (file)
@@ -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);
        

UCC git Repository :: git.ucc.asn.au