Skip to content
Snippets Groups Projects
Commit 648afd3a authored by Roman Khlopkov's avatar Roman Khlopkov 🔜
Browse files

[*] SO_REUSE tempopary disabled

parent 737ab3c9
No related branches found
No related tags found
No related merge requests found
Pipeline #51219 passed with stage
in 25 minutes and 7 seconds
......@@ -253,6 +253,9 @@ static inline void *s_vm_extend(const char *a_rtn_name, int a_rtn_line, void *a_
#define DAP_DUP_SIZE_RET_VAL_IF_FAIL(p, s, r, ...) ({ \
void *_p = DAP_DUP_SIZE(p, s); if (!_p) { log_it(L_CRITICAL, "%s", c_error_memory_alloc); DAP_DEL_MULTY(__VA_ARGS__); return r; } _p; \
})
#define DAP_DUP_RET_VAL_IF_FAIL(p, r, ...) ({ \
void *_p = DAP_DUP(p); if (!_p) { log_it(L_CRITICAL, "%s", c_error_memory_alloc); DAP_DEL_MULTY(__VA_ARGS__); return r; } _p; \
})
#define DAP_REALLOC_RET_VAL_IF_FAIL(p, s, r, ...) ({ \
void *_p = DAP_REALLOC(p, s); if (!_p) { log_it(L_CRITICAL, "%s", c_error_memory_alloc); DAP_DEL_MULTY(__VA_ARGS__); return r; } _p; \
})
......@@ -263,6 +266,7 @@ static inline void *s_vm_extend(const char *a_rtn_name, int a_rtn_line, void *a_
#define DAP_NEW_Z_RET_IF_FAIL(t, ...) DAP_NEW_Z_RET_VAL_IF_FAIL(t, , __VA_ARGS__)
#define DAP_NEW_Z_SIZE_RET_IF_FAIL(t, s, ...) DAP_NEW_Z_SIZE_RET_VAL_IF_FAIL(t, s, , __VA_ARGS__)
#define DAP_NEW_Z_COUNT_RET_IF_FAIL(t, c, ...) DAP_NEW_Z_COUNT_RET_VAL_IF_FAIL(t, c, , __VA_ARGS__)
#define DAP_DUP_RET_IF_FAIL(p, ...) DAP_DUP_RET_VAL_IF_FAIL(p, , __VA_ARGS__)
#define DAP_DUP_SIZE_RET_IF_FAIL(p, s, ...) DAP_DUP_SIZE_RET_VAL_IF_FAIL(p, s, , __VA_ARGS__)
#define DAP_REALLOC_RET_IF_FAIL(p, s, ...) DAP_REALLOC_RET_VAL_IF_FAIL(p, s, , __VA_ARGS__)
#define DAP_REALLOC_COUNT_RET_IF_FAIL(p, c, ...) DAP_REALLOC_COUNT_RET_VAL_IF_FAIL(p, c, , __VA_ARGS__)
......
......@@ -194,12 +194,10 @@ int dap_server_listen_addr_add( dap_server_t *a_server, const char *a_addr, uint
return 4;
}
#ifdef SO_REUSEPORT
#if 0 // #ifdef SO_REUSEPORT
l_option = 1;
if ( setsockopt(l_socket, SOL_SOCKET, SO_REUSEPORT, (const char*)&l_option, sizeof(int)) < 0 ) {
close_socket_due_to_fail("setsockopt(SO_REUSEPORT)");
return 5;
}
if ( setsockopt(l_socket, SOL_SOCKET, SO_REUSEPORT, (const char*)&l_option, sizeof(int)) < 0 )
debug_if(a_server->ext_log, L_INFO, "setsockopt(SO_REUSEPORT) is not supported");
#endif
if ( bind(l_socket, (struct sockaddr*)&l_saddr, l_len) < 0 ) {
......
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