Skip to content
Snippets Groups Projects
Commit e945a509 authored by Dmitriy A. Gerasimov's avatar Dmitriy A. Gerasimov
Browse files

[+] Added check if esocket was deleted on previous loop iteration

parent ddb06ac4
No related branches found
No related tags found
No related merge requests found
Pipeline #6946 passed with stage
in 13 seconds
......@@ -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-102")
set(CELLFRAME_SDK_NATIVE_VERSION "2.6-103")
add_definitions ("-DCELLFRAME_SDK_VERSION=\"${CELLFRAME_SDK_NATIVE_VERSION}\"")
set(DAPSDK_MODULES "")
......
......@@ -179,6 +179,10 @@ void *dap_worker_thread(void *arg)
l_flag_nval = false;
#elif defined ( DAP_EVENTS_CAPS_POLL)
short l_cur_events =l_worker->poll[n].revents;
if (l_worker->poll[n].fd == -1) // If it was deleted on previous iterations
continue;
if (!l_cur_events) // No events for this socket
continue;
l_flag_hup = l_cur_events& POLLHUP;
......@@ -645,6 +649,7 @@ void *dap_worker_thread(void *arg)
log_it(L_NOTICE,"Worker :%u finished", l_worker->id);
return NULL;
}
}
#ifdef DAP_EVENTS_CAPS_POLL
/***********************************************************/
......
......@@ -43,6 +43,7 @@ typedef struct dap_worker
// Signal to exit
bool signal_exit;
// worker control queues
dap_events_socket_t * queue_es_new; // Queue socket for new socket
dap_events_socket_t ** queue_es_new_input; // Queue socket for new socket
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment