Drop unknown packets
This commit is contained in:
parent
1739f7a1ab
commit
fc9ec0e213
2 changed files with 4 additions and 0 deletions
|
@ -193,6 +193,7 @@ int algo_rr_on_stream(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo,
|
|||
rr_pkt_manage_links(ctx, fdinfo, bp);
|
||||
} else {
|
||||
fprintf(stderr, " [algo/rr] Packet CMD unrecognized (%d)\n", bp->ip.ap.fmt.headers.cmd);
|
||||
mv_buffer_rtof(app_ctx, fdinfo);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -180,6 +180,9 @@ void algo_main_init(struct evt_core_ctx* evt, struct algo_params* ap) {
|
|||
ctx->is_rdy = 0;
|
||||
ctx->ap = *ap;
|
||||
for (int i = 0; i < sizeof(ctx->bps) / sizeof(ctx->bps[0]); i++) {
|
||||
ctx->bps[i].mode = BP_READING;
|
||||
ctx->bps[i].aread = 0;
|
||||
ctx->bps[i].ap_count = 0;
|
||||
g_queue_push_tail(ctx->free_buffer, &(ctx->bps[i]));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue