From a1922dafee706200fef62e63718c206d2c3d9ba3 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Wed, 28 Dec 2011 07:37:08 +0800 Subject: [PATCH] Added basic error reporting to coke code --- src/server/handler_coke.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/server/handler_coke.c b/src/server/handler_coke.c index 157f16d..68eea01 100644 --- a/src/server/handler_coke.c +++ b/src/server/handler_coke.c @@ -94,6 +94,7 @@ int Coke_CanDispense(int UNUSED(User), int Item) if( modbus_read_bits(gCoke_Modbus, ciCoke_StatusBitBase + Item, 1, &status) ) { // TODO: Check for a connection issue + perror("Coke_CanDispense - modbus_read_bits"); } return status == 0; @@ -128,6 +129,7 @@ int Coke_DoDispense(int UNUSED(User), int Item) if( modbus_write_bit(gCoke_Modbus, ciCoke_DropBitBase + Item, 1) ) { // TODO: Handle connection issues + perror("Coke_DoDispense - modbus_write_bit"); } return 0; -- 2.20.1