diff --git a/CMakeLists.txt b/CMakeLists.txt index aad8beb3ca51c8ace5bda7af016e49088510dc1e..25d3582476c913d866d2049a8fc2426db8aac418 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ project(cellframe-sdk C) cmake_minimum_required(VERSION 2.8) set(CMAKE_C_STANDARD 11) -set(CELLFRAME_SDK_NATIVE_VERSION "2.6-84") +set(CELLFRAME_SDK_NATIVE_VERSION "2.6-85") add_definitions ("-DCELLFRAME_SDK_VERSION=\"${CELLFRAME_SDK_NATIVE_VERSION}\"") set(DAPSDK_MODULES "") diff --git a/dap-sdk/net/core/dap_worker.c b/dap-sdk/net/core/dap_worker.c index 5d9b8d68f4f0e685d0e3324b38057b8a4afe761f..9156cb1105b89da9d46fd09cecd103f1667a26f5 100644 --- a/dap-sdk/net/core/dap_worker.c +++ b/dap-sdk/net/core/dap_worker.c @@ -242,8 +242,11 @@ void *dap_worker_thread(void *arg) l_cur->buf_out_size = 0; l_cur->buf_in_size = 0; l_cur->flags |= DAP_SOCK_SIGNAL_CLOSE; - l_cur->callbacks.error_callback(l_cur, l_sock_err); // Call callback to process error event - assert(0); + if (l_cur->callbacks.error_callback) + l_cur->callbacks.error_callback(l_cur, l_sock_err); // Call callback to process error event + if (l_cur->fd == 0 || l_cur->fd == -1) + assert_perror(errno); + // If its not null or -1 we should try first to remove it from poll. Assert only if it doesn't help } if(l_flag_error) {