diff --git a/common/src/control_packet.cpp b/common/src/control_packet.cpp index e67aa95..eb1109d 100644 --- a/common/src/control_packet.cpp +++ b/common/src/control_packet.cpp @@ -69,11 +69,14 @@ int control_packet_parse(struct control_packet *handler, const char *data, size_ goto error_out; } handler->session_id = mpack_node_u64(temp); - if (handler->session_id == 0) - { - LOG_ERROR("%s: unexpected control packet: (invalid session_id value) %lu", LOG_TAG_CTRLPKT, handler->session_id); - goto error_out; - } + /* + * reset all session id is zero + * if (handler->session_id == 0) + * { + * LOG_ERROR("%s: unexpected control packet: (invalid session_id value) %lu", LOG_TAG_CTRLPKT, handler->session_id); + * goto error_out; + * } + */ // state temp = mpack_node_map_cstr(root, "state"); diff --git a/platform/src/packet_io.cpp b/platform/src/packet_io.cpp index a1effe0..3fb22a4 100644 --- a/platform/src/packet_io.cpp +++ b/platform/src/packet_io.cpp @@ -2,6 +2,7 @@ #include #include #include +#define __FAVOR_BSD 1 #include #include @@ -1013,11 +1014,11 @@ static void handle_session_active(struct metadata *meta, struct control_packet * static void handle_session_resetall(struct metadata *meta, struct control_packet *ctrl_pkt, struct thread_ctx *thread_ctx) { - struct thread_metrics *thread_metrics = &thread_ctx->thread_metrics; + struct global_metrics *global_metrics = thread_ctx->ref_global_metrics; struct sce_ctx *sce_ctx = thread_ctx->ref_sce_ctx; LOG_ERROR("%s: session %lu resetall: notification clears all session tables !!!", LOG_TAG_PKTIO, meta->session_id); - ATOMIC_ZERO(&(thread_metrics->sf_session.num)); + ATOMIC_ZERO(&(global_metrics->sf_session.num)); for (int i = 0; i < sce_ctx->nr_worker_threads; i++) { struct thread_ctx *temp_ctx = &sce_ctx->work_threads[i];