Loading lib/communication.c +6 −6 Original line number Diff line number Diff line Loading @@ -47,8 +47,8 @@ #include "log.h" static int connect_to_daemon(const char* socket_path); static int send_message(int conn, const msgbuffer_t* buffer); static int recv_message(int conn, msgbuffer_t* buffer); static int send_message(int conn, const norns_msgbuffer_t* buffer); static int recv_message(int conn, norns_msgbuffer_t* buffer); static ssize_t recv_data(int conn, void* data, size_t size); static ssize_t send_data(int conn, const void* data, size_t size); static void print_hex(void* buffer, size_t bytes) __attribute__((unused)); Loading Loading @@ -208,8 +208,8 @@ send_request(norns_rpc_type_t type, norns_response_t* resp, ...) { int res; int conn = -1; msgbuffer_t req_buf = MSGBUFFER_INIT(); msgbuffer_t resp_buf = MSGBUFFER_INIT(); norns_msgbuffer_t req_buf = MSGBUFFER_INIT(); norns_msgbuffer_t resp_buf = MSGBUFFER_INIT(); libcontext_t* ctx = get_context(); Loading Loading @@ -384,7 +384,7 @@ connect_to_daemon(const char* socket_path) { } static int send_message(int conn, const msgbuffer_t* buffer) { send_message(int conn, const norns_msgbuffer_t* buffer) { if(buffer == NULL || buffer->b_data == NULL || buffer->b_size == 0) { return -1; Loading Loading @@ -412,7 +412,7 @@ send_message(int conn, const msgbuffer_t* buffer) { } static int recv_message(int conn, msgbuffer_t* buffer) { recv_message(int conn, norns_msgbuffer_t* buffer) { // first of all read the message prefix and decode it // so that we know how much data to receive Loading lib/requests.c +2 −2 Original line number Diff line number Diff line Loading @@ -705,7 +705,7 @@ free_task_msg(Norns__Rpc__Request__Task* msg) { } int pack_to_buffer(norns_rpc_type_t type, msgbuffer_t* buf, ...) { pack_to_buffer(norns_rpc_type_t type, norns_msgbuffer_t* buf, ...) { Norns__Rpc__Request* req_msg = NULL; void* req_buf = NULL; Loading Loading @@ -748,7 +748,7 @@ cleanup_on_error: } int unpack_from_buffer(msgbuffer_t* buf, norns_response_t* response) { unpack_from_buffer(norns_msgbuffer_t* buf, norns_response_t* response) { Norns__Rpc__Response* rpc_resp = NULL; void* resp_buf = buf->b_data; Loading lib/requests.h +3 −3 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ typedef enum { typedef struct { void* b_data; size_t b_size; } msgbuffer_t; } norns_msgbuffer_t; #define MSGBUFFER_INIT() \ { .b_data = 0, \ Loading @@ -85,8 +85,8 @@ typedef struct { }; } norns_response_t; int pack_to_buffer(norns_rpc_type_t type, msgbuffer_t* buf, ...); int unpack_from_buffer(msgbuffer_t* buf, norns_response_t* response); int pack_to_buffer(norns_rpc_type_t type, norns_msgbuffer_t* buf, ...); int unpack_from_buffer(norns_msgbuffer_t* buf, norns_response_t* response); #pragma GCC visibility pop Loading Loading
lib/communication.c +6 −6 Original line number Diff line number Diff line Loading @@ -47,8 +47,8 @@ #include "log.h" static int connect_to_daemon(const char* socket_path); static int send_message(int conn, const msgbuffer_t* buffer); static int recv_message(int conn, msgbuffer_t* buffer); static int send_message(int conn, const norns_msgbuffer_t* buffer); static int recv_message(int conn, norns_msgbuffer_t* buffer); static ssize_t recv_data(int conn, void* data, size_t size); static ssize_t send_data(int conn, const void* data, size_t size); static void print_hex(void* buffer, size_t bytes) __attribute__((unused)); Loading Loading @@ -208,8 +208,8 @@ send_request(norns_rpc_type_t type, norns_response_t* resp, ...) { int res; int conn = -1; msgbuffer_t req_buf = MSGBUFFER_INIT(); msgbuffer_t resp_buf = MSGBUFFER_INIT(); norns_msgbuffer_t req_buf = MSGBUFFER_INIT(); norns_msgbuffer_t resp_buf = MSGBUFFER_INIT(); libcontext_t* ctx = get_context(); Loading Loading @@ -384,7 +384,7 @@ connect_to_daemon(const char* socket_path) { } static int send_message(int conn, const msgbuffer_t* buffer) { send_message(int conn, const norns_msgbuffer_t* buffer) { if(buffer == NULL || buffer->b_data == NULL || buffer->b_size == 0) { return -1; Loading Loading @@ -412,7 +412,7 @@ send_message(int conn, const msgbuffer_t* buffer) { } static int recv_message(int conn, msgbuffer_t* buffer) { recv_message(int conn, norns_msgbuffer_t* buffer) { // first of all read the message prefix and decode it // so that we know how much data to receive Loading
lib/requests.c +2 −2 Original line number Diff line number Diff line Loading @@ -705,7 +705,7 @@ free_task_msg(Norns__Rpc__Request__Task* msg) { } int pack_to_buffer(norns_rpc_type_t type, msgbuffer_t* buf, ...) { pack_to_buffer(norns_rpc_type_t type, norns_msgbuffer_t* buf, ...) { Norns__Rpc__Request* req_msg = NULL; void* req_buf = NULL; Loading Loading @@ -748,7 +748,7 @@ cleanup_on_error: } int unpack_from_buffer(msgbuffer_t* buf, norns_response_t* response) { unpack_from_buffer(norns_msgbuffer_t* buf, norns_response_t* response) { Norns__Rpc__Response* rpc_resp = NULL; void* resp_buf = buf->b_data; Loading
lib/requests.h +3 −3 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ typedef enum { typedef struct { void* b_data; size_t b_size; } msgbuffer_t; } norns_msgbuffer_t; #define MSGBUFFER_INIT() \ { .b_data = 0, \ Loading @@ -85,8 +85,8 @@ typedef struct { }; } norns_response_t; int pack_to_buffer(norns_rpc_type_t type, msgbuffer_t* buf, ...); int unpack_from_buffer(msgbuffer_t* buf, norns_response_t* response); int pack_to_buffer(norns_rpc_type_t type, norns_msgbuffer_t* buf, ...); int unpack_from_buffer(norns_msgbuffer_t* buf, norns_response_t* response); #pragma GCC visibility pop Loading