🐞 fix(TSG-15308): 修复packet io thread启动时,intercept_policy_enforcer为空导致core
This commit is contained in:
@@ -93,15 +93,19 @@ static void *worker_thread_cycle(void *arg)
|
||||
void * logger = thread_ctx->logger;
|
||||
|
||||
int pkg_len = 0;
|
||||
char thread_name[32];
|
||||
char thread_name[16];
|
||||
int n_pkt_recv_from_nf = 0;
|
||||
int n_pkt_recv_from_tap = 0;
|
||||
int n_pkt_recv_from_tap_c = 0;
|
||||
int n_pkt_recv_from_tap_s = 0;
|
||||
|
||||
snprintf(thread_name, sizeof(thread_name), "packet-io:worker-%d", thread_ctx->thread_index);
|
||||
snprintf(thread_name, sizeof(thread_name), "pkt:worker-%d", thread_ctx->thread_index);
|
||||
prctl(PR_SET_NAME, (unsigned long long)thread_name, NULL, NULL, NULL);
|
||||
|
||||
while (!worker_thread_ready) {
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
if (packet_io_thread_init(handle, thread_ctx, logger) != 0)
|
||||
{
|
||||
goto error_out;
|
||||
|
||||
Reference in New Issue
Block a user