mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-30 10:06:43 +00:00
MINOR: stconn/applet: Add BUG_ON_HOT() to be sure SE_FL_EOS is never set alone
SE_FL_EOS flag must never be set on the SE descriptor without SE_FL_EOI or SE_FL_ERROR. When a mux or an applet report an end of stream, it must be able to state if it is the end of input too or if it is an error. Because all this part was recently refactored, especially the applet part, it is a bit sensitive. Thus a BUG_ON_HOT() is used and not a BUG_ON().
This commit is contained in:
parent
7faac7cf34
commit
8019f78326
@ -477,6 +477,8 @@ struct task *task_run_applet(struct task *t, void *context, unsigned int state)
|
||||
stream_dump_and_crash(&app->obj_type, read_freq_ctr(&app->call_rate));
|
||||
}
|
||||
|
||||
BUG_ON_HOT((sc_ep_get(sc) & (SE_FL_EOI|SE_FL_EOS|SE_FL_ERROR)) == SE_FL_EOS);
|
||||
|
||||
sc->app_ops->wake(sc);
|
||||
channel_release_buffer(sc_ic(sc), &app->buffer_wait);
|
||||
TRACE_LEAVE(APPLET_EV_PROCESS, app);
|
||||
|
@ -1502,6 +1502,8 @@ static int sc_conn_recv(struct stconn *sc)
|
||||
se_have_more_data(sc->sedesc);
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
BUG_ON_HOT((sc_ep_get(sc) & (SE_FL_EOI|SE_FL_EOS|SE_FL_ERROR)) == SE_FL_EOS);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user