diff --git a/client/mcast.c b/client/mcast.c index cf5f37b..e9c9ab7 100644 --- a/client/mcast.c +++ b/client/mcast.c @@ -90,9 +90,9 @@ static int tcp_exchange(int fd, fence_auth_type_t auth, void *key, size_t key_len, int timeout) { - char ret; fd_set rfds; struct timeval tv; + char ret = 1; /* Ok, we're connected */ dbg_printf(3, "Issuing TCP challenge\n"); @@ -122,8 +122,10 @@ tcp_exchange(int fd, fence_auth_type_t auth, void *key, return -1; /* Read return code */ - read(fd, &ret, 1); + if (read(fd, &ret, 1) < 0) + ret = 1; close(fd); + if (ret == 0) printf("Remote: Operation was successful\n"); else diff --git a/config/config.l b/config/config.l index dac305d..c436aeb 100644 --- a/config/config.l +++ b/config/config.l @@ -7,6 +7,9 @@ #include "y.tab.h" #include "simpleconfig.h" +/* Some distributions can't use the output from flex without help */ +#define ECHO if(fwrite( yytext, yyleng, 1, yyout )) + struct value *val_list = NULL; struct node *node_list = NULL; struct parser_context *context_stack = NULL;