X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=src%2Fsptps_test.c;h=550e0db2343a511760706f2402919f2b8790c482;hb=bd8eb9b38758f16f8f0207dcd5b743bfacb535cb;hp=63a48459019395fd1049657600a40620a587677a;hpb=21f0bddfa4dca5fb21c9dc4970ac64fa8fe706e4;p=meshlink diff --git a/src/sptps_test.c b/src/sptps_test.c index 63a48459..550e0db2 100644 --- a/src/sptps_test.c +++ b/src/sptps_test.c @@ -34,6 +34,7 @@ // Symbols necessary to link with logger.o bool send_request(void *c, const char *msg, ...) { return false; } +void *mesh; bool send_meta(void *c, const char *msg , int len) { return false; } char *logfilename = NULL; struct timeval now; @@ -44,7 +45,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) @@ -55,7 +56,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)