From cd8724a2a7c36e3a791687ae1498a6d504dd6788 Mon Sep 17 00:00:00 2001 From: Mark Tearle Date: Sun, 15 Mar 2015 19:04:45 +0800 Subject: [PATCH] gsCoke_ModbusPort should be giCoke_ModbusPort --- src/server/handler_coke.c | 4 ++-- src/server/main.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/handler_coke.c b/src/server/handler_coke.c index 34b9d2e..a52e373 100644 --- a/src/server/handler_coke.c +++ b/src/server/handler_coke.c @@ -49,7 +49,7 @@ tHandler gCoke_Handler = { Coke_DoDispense }; const char *gsCoke_ModbusAddress = "130.95.13.73"; - int gsCoke_ModbusPort = 502; + int giCoke_ModbusPort = 502; modbus_t *gCoke_Modbus; time_t gtCoke_LastDispenseTime; time_t gtCoke_LastReconnectTime; @@ -127,7 +127,7 @@ int Coke_int_ConnectToPLC(void) if( !gCoke_Modbus ) { - gCoke_Modbus = modbus_new_tcp(gsCoke_ModbusAddress, gsCoke_ModbusPort); + gCoke_Modbus = modbus_new_tcp(gsCoke_ModbusAddress, giCoke_ModbusPort); if( !gCoke_Modbus ) { perror("coke - modbus_new_tcp"); diff --git a/src/server/main.c b/src/server/main.c index 2cc3bc3..efa354e 100644 --- a/src/server/main.c +++ b/src/server/main.c @@ -31,7 +31,7 @@ extern int gbServer_RunInBackground; extern int giServer_Port; extern const char *gsItemListFile; extern const char *gsCoke_ModbusAddress; -extern int gsCoke_ModbusPort; +extern int giCoke_ModbusPort; extern const char *gsDoor_SerialPort; extern bool gbSyslogEnabled; @@ -134,7 +134,7 @@ int main(int argc, char *argv[]) gbSyslogEnabled = (Config_GetValue_Bool("disable_syslog", 0) == 0); gsCoke_ModbusAddress = Config_GetValue("coke_modbus_address", 0); - gsCoke_ModbusPort = Config_GetValue_Int("coke_modbus_port", 0); + giCoke_ModbusPort = Config_GetValue_Int("coke_modbus_port", 0); signal(SIGINT, sigint_handler); signal(SIGTERM, sigint_handler); -- 2.20.1