diff options
Diffstat (limited to 'src/uci.c')
| -rw-r--r-- | src/uci.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -4,11 +4,13 @@ #include <stdlib.h> #include <fcntl.h> #include <unistd.h> -#include <errno.h> +#include <assert.h> #include "uci/state.h" #include "uci/command.h" #include "uci/response.h" +#include "uci.h" +#include "ipc.h" void load_from_message(ucicmd* cmd, const char* message) { char token[MAX_TOKEN_SIZE]; @@ -32,7 +34,9 @@ void load_from_message(ucicmd* cmd, const char* message) { ucicmd_add(cmd, token); } -int main(int argc, char** argv) { +int uci(comms *com) { + printf("%d\n", com->uci_message_ready); + // https://stackoverflow.com/a/41559081 fcntl(STDIN_FILENO, F_SETFL, O_NONBLOCK); |
