Don't publish empty barcodes

This commit is contained in:
Andrew Brooks 2018-01-25 21:05:52 -06:00
parent fcaca85066
commit 1cac8c8da5

View File

@ -48,6 +48,11 @@ main(int argc, char **argv)
while (true)
{
barcode = await_next_barcode(input_fd);
if (barcode[0] == '\x00')
{
/* Newline is pressed twice. Ignore any 'empty' barcodes. */
continue;
}
if (zsock_send(zsock, "s", barcode) < 0)
{
fprintf(stderr, "Sending barcode failed!\n");