From 13b39ae7300037783eeefb5514e1dd7e99be0ca2 Mon Sep 17 00:00:00 2001 From: "Justin C. Miller" Date: Thu, 30 Dec 2021 18:21:09 -0800 Subject: [PATCH] [testapp] Update testapp for new data,len arg order The testapp call to endpoint_recieve was never updated for the great data,len convergence due to the .def files. Fixed and working again. --- src/kernel/syscalls/endpoint.cpp | 2 +- src/user/testapp/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kernel/syscalls/endpoint.cpp b/src/kernel/syscalls/endpoint.cpp index 1821829..0dd0787 100644 --- a/src/kernel/syscalls/endpoint.cpp +++ b/src/kernel/syscalls/endpoint.cpp @@ -29,7 +29,7 @@ endpoint_send(j6_handle_t handle, uint64_t tag, const void * data, size_t data_l j6_status_t endpoint_receive(j6_handle_t handle, uint64_t * tag, void * data, size_t * data_len) { - if (!tag || !data_len || !data) + if (!tag || !data_len || (*data_len && !data)) return j6_err_invalid_arg; endpoint *e = get_handle(handle); diff --git a/src/user/testapp/main.cpp b/src/user/testapp/main.cpp index 4aa523f..4cfd24b 100644 --- a/src/user/testapp/main.cpp +++ b/src/user/testapp/main.cpp @@ -134,7 +134,7 @@ main(int argc, const char **argv) size_t len = 0; while (true) { - result = j6_endpoint_receive(endp, &tag, &len, nullptr); + result = j6_endpoint_receive(endp, &tag, nullptr, &len); if (result != j6_status_ok) return result;