From: John Hodge Date: Sun, 20 Feb 2011 08:25:26 +0000 (+0800) Subject: Merge branch 'master' of serenade.mutabah.net:opendispense2 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=39d4f8129c6413d3e41916041d239ea6d3041228;hp=-c;p=tpg%2Fopendispense2.git Merge branch 'master' of serenade.mutabah.net:opendispense2 Conflicts: src/server/handler_coke.c --- 39d4f8129c6413d3e41916041d239ea6d3041228 diff --combined src/server/handler_coke.c index 17de89c,4eb3710..da9fa18 --- a/src/server/handler_coke.c +++ b/src/server/handler_coke.c @@@ -130,15 -130,9 +130,15 @@@ void Coke_int_UpdateSlotStatuses(void pthread_mutex_lock(&gCoke_Mutex); WaitForColon(); + #if TRACE_COKE + printf("Coke_int_UpdateSlotStatuses: send d7\n"); + #endif Writef("d7\r\n"); // Update slot statuses if( WaitForColon() ) goto ret; - Writef("s\n"); + #if TRACE_COKE + printf("Coke_int_UpdateSlotStatuses: send s\n"); + #endif + Writef("s\r\n"); ReadLine(sizeof tmp, tmp); // Read back what we just said for( i = 0; i <= 6; i ++ ) @@@ -150,9 -144,6 +150,9 @@@ #endif goto ret; // I give up :( } + #if TRACE_COKE + printf("Coke_int_UpdateSlotStatuses: tmp = '%s'\n", tmp); + #endif Coke_int_GetSlotStatus(tmp, i); } @@@ -210,7 -201,7 +210,7 @@@ int Coke_DoDispense(int UNUSED(User), i if( ret == 3 ) { #if TRACE_COKE - printf("Coke_DoDispense: timed out\n", Item); + printf("Coke_DoDispense: timed out\n"); #endif pthread_mutex_unlock(&gCoke_Mutex); return -1;