#include "logger.h"
#include "utils.h"
#include "route.h"
+#include "xalloc.h"
int device_fd = -1;
static int listen_fd = -1;
static char *device_info;
extern char *identname;
-extern bool running;
+extern volatile bool running;
static uint64_t device_total_in = 0;
static uint64_t device_total_out = 0;
switch(state) {
case 0: {
struct sockaddr sa;
- int salen = sizeof sa;
+ socklen_t salen = sizeof sa;
request_fd = accept(listen_fd, &sa, &salen);
if(request_fd < 0) {
return true;
}
+
+ default:
+ logger(LOG_ERR, "Invalid value for state variable in " __FILE__);
+ abort();
}
}
static char *device_info;
extern char *identname;
-extern bool running;
+extern volatile bool running;
static uint64_t device_total_in = 0;
static uint64_t device_total_out = 0;