MINOR: stream-int: rename si_applet_done() to si_applet_wake_cb()

This function is a callback made only for calls from the applet handler.
Rename it to remove confusion. It's currently called from the Lua code
but that's not correct, we should call the notify and update functions
instead otherwise it will not enable the applet again.
This commit is contained in:
Willy Tarreau 2015-09-25 11:45:06 +02:00
parent 335520305c
commit aa977ba205
4 changed files with 5 additions and 5 deletions

View File

@ -47,7 +47,7 @@ extern struct data_cb si_conn_cb;
extern struct data_cb si_idle_conn_cb;
struct appctx *stream_int_register_handler(struct stream_interface *si, struct applet *app);
void si_applet_done(struct stream_interface *si);
void si_applet_wake_cb(struct stream_interface *si);
void stream_int_update(struct stream_interface *si);
void stream_int_update_conn(struct stream_interface *si);
void stream_int_update_applet(struct stream_interface *si);

View File

@ -61,7 +61,7 @@ void applet_run_active()
si_applet_stop_put(si);
curr->applet->fct(curr);
si_applet_done(si);
si_applet_wake_cb(si);
if (applet_run_queue.n == &curr->runq) {
/* curr was left in the list, move it back to the active list */

View File

@ -1735,7 +1735,7 @@ __LJMP static int hlua_socket_receive_yield(struct lua_State *L, int status, lua
bo_skip(oc, len + skip_at_end);
/* Don't wait anything. */
si_applet_done(&socket->s->si[0]);
si_applet_wake_cb(&socket->s->si[0]);
/* If the pattern reclaim to read all the data
* in the connection, got out.
@ -1912,7 +1912,7 @@ static int hlua_socket_write_yield(struct lua_State *L,int status, lua_KContext
}
/* update buffers. */
si_applet_done(&socket->s->si[0]);
si_applet_wake_cb(&socket->s->si[0]);
socket->s->req.rex = TICK_ETERNITY;
socket->s->res.wex = TICK_ETERNITY;

View File

@ -1341,7 +1341,7 @@ void stream_sock_read0(struct stream_interface *si)
* may disable the applet's based on the channels and stream interface's final
* states.
*/
void si_applet_done(struct stream_interface *si)
void si_applet_wake_cb(struct stream_interface *si)
{
/* update the stream-int, channels, and possibly wake the stream up */
stream_int_notify(si);