git.ucc.asn.au
/
tpg
/
opendispense2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Initial move to common config code directory
[tpg/opendispense2.git]
/
src
/
server
/
main.c
diff --git
a/src/server/main.c
b/src/server/main.c
index
247533e
..
c8be473
100644
(file)
--- a/
src/server/main.c
+++ b/
src/server/main.c
@@
-9,6
+9,7
@@
*/
#include <stdlib.h>
#include <stdio.h>
*/
#include <stdlib.h>
#include <stdio.h>
+#include <stdbool.h>
#include <string.h>
#include <signal.h>
#include "common.h"
#include <string.h>
#include <signal.h>
#include "common.h"
@@
-20,6
+21,7
@@
#include <syslog.h>
#include <pthread.h>
#include "../cokebank.h"
#include <syslog.h>
#include <pthread.h>
#include "../cokebank.h"
+#include "../common/config.h"
// === IMPORTS ===
extern void Init_Handlers(void);
// === IMPORTS ===
extern void Init_Handlers(void);
@@
-30,6
+32,7
@@
extern int giServer_Port;
extern const char *gsItemListFile;
extern const char *gsCoke_ModbusAddress;
extern const char *gsDoor_SerialPort;
extern const char *gsItemListFile;
extern const char *gsCoke_ModbusAddress;
extern const char *gsDoor_SerialPort;
+extern bool gbSyslogEnabled;
// === PROTOTYPES ===
void *Periodic_Thread(void *Unused);
// === PROTOTYPES ===
void *Periodic_Thread(void *Unused);
@@
-128,6
+131,7
@@
int main(int argc, char *argv[])
gsItemListFile = Config_GetValue("items_file", 0);
gbNoCostMode = (Config_GetValue_Bool("test_mode", 0) == 1);
gsItemListFile = Config_GetValue("items_file", 0);
gbNoCostMode = (Config_GetValue_Bool("test_mode", 0) == 1);
+ gbSyslogEnabled = (Config_GetValue_Bool("disable_syslog", 0) == 0);
signal(SIGINT, sigint_handler);
signal(SIGTERM, sigint_handler);
signal(SIGINT, sigint_handler);
signal(SIGTERM, sigint_handler);
UCC
git Repository :: git.ucc.asn.au