#include <fcntl.h>
#include <stdarg.h>
#include <syslog.h>
+#include "../cokebank.h"
// === IMPORTS ===
-extern void Init_Cokebank(const char *Argument); // cokebank.c
extern void Init_Handlers(void);
extern void Load_Itemlist(void);
extern void Server_Start(void);
openlog("odispense2", 0, LOG_LOCAL4);
- Init_Cokebank(gsCokebankPath);
+ if( Bank_Initialise(gsCokebankPath) )
+ return -1;
Init_Handlers();
int ret;
ret = regexec(regex, string, nMatches, matches, 0);
+ if( ret == REG_NOMATCH ) {
+ return -1;
+ }
if( ret ) {
size_t len = regerror(ret, regex, NULL, 0);
char errorStr[len];