X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fsptps_test.c;h=b982f3878321f218786856cb744d195f62d1f7f4;hb=ed545c8ca7b674b5e851567f2b6630ed3e4bfac0;hp=33bad0a521d36e7624e565e1d4b92e201da612be;hpb=06436cecee71ec6ab585587d10f3979c20c0d2a4;p=meshlink diff --git a/src/sptps_test.c b/src/sptps_test.c index 33bad0a5..b982f387 100644 --- a/src/sptps_test.c +++ b/src/sptps_test.c @@ -20,6 +20,8 @@ #include "system.h" #ifdef HAVE_LINUX +#include +#include #include #endif @@ -32,7 +34,9 @@ // Symbols necessary to link with logger.o bool send_request(void *c, const char *msg, ...) { return false; } -struct list_t *connection_list = NULL; +void *mesh; +void *global_log_cb; +int global_log_level; bool send_meta(void *c, const char *msg , int len) { return false; } char *logfilename = NULL; struct timeval now; @@ -43,7 +47,7 @@ static bool writeonly; static int in = 0; static int out = 1; -static bool send_data(void *handle, uint8_t type, const char *data, size_t len) { +static bool send_data(void *handle, uint8_t type, const void *data, size_t len) { char hex[len * 2 + 1]; bin2hex(data, hex, len); if(verbose) @@ -54,7 +58,7 @@ static bool send_data(void *handle, uint8_t type, const char *data, size_t len) return true; } -static bool receive_record(void *handle, uint8_t type, const char *data, uint16_t len) { +static bool receive_record(void *handle, uint8_t type, const void *data, uint16_t len) { if(verbose) fprintf(stderr, "Received type %d record of %hu bytes:\n", type, len); if(!writeonly)