]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stream-int: rename si_applet_done() to si_applet_wake_cb()
authorWilly Tarreau <w@1wt.eu>
Fri, 25 Sep 2015 09:45:06 +0000 (11:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 25 Sep 2015 19:16:02 +0000 (21:16 +0200)
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.

include/proto/stream_interface.h
src/applet.c
src/hlua.c
src/stream_interface.c

index cf45c5e26a7325bbe54c76048c9f3c3746fd6931..6380f761471b0f41349e411688898af5bc5661bd 100644 (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);
index 42d894d37b2e45f4018b8a6afc3eec4c836c5e47..bc8972e6753f79680cc73039667393950378e177 100644 (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 */
index 97adb5188d34efdcc24ff4a53802b97c41a3470e..ceeeace6e841d2addccbf30f9cf1608af9035a07 100644 (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;
 
index 111071a98635076afaa0e057ea37673377b13dfe..18ff6b5e3974688200f3d4fa5b19f164d080ecb4 100644 (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);