The handled_by member is unused. There was code using it 2 years ago, but it has since been removed.
-- Sonny Karlsson
>From 626dcc7c626d1a3c4100546aac767e11ea536ee4 Mon Sep 17 00:00:00 2001 From: Sonny Karlsson <[email protected]> Date: Tue, 22 Jan 2013 21:49:13 +0100 Subject: [PATCH] request: Remove handled_by member from session_request. Unused relic from old commit. Signed-off-by: Sonny Karlsson <[email protected]> --- src/include/mk_request.h | 3 --- src/mk_plugin.c | 17 +++++++---------- src/mk_request.c | 15 ++++++--------- 3 files changed, 13 insertions(+), 22 deletions(-) diff --git a/src/include/mk_request.h b/src/include/mk_request.h index c21d35c..a9e2995 100644 --- a/src/include/mk_request.h +++ b/src/include/mk_request.h @@ -237,9 +237,6 @@ struct session_request /* Response headers */ struct response_headers headers; - /* Plugin handlers */ - struct plugin *handled_by; - /* mk_list head node */ struct mk_list _head; }; diff --git a/src/mk_plugin.c b/src/mk_plugin.c index 04d005b..37ed98f 100644 --- a/src/mk_plugin.c +++ b/src/mk_plugin.c @@ -605,13 +605,12 @@ int mk_plugin_stage_run(unsigned int hook, if (hook & MK_PLUGIN_STAGE_30) { /* The request just arrived and is required to check who can * handle it */ - if (!sr->handled_by){ - stm = plg_stagemap->stage_30; - while (stm) { - /* Call stage */ - MK_TRACE("[%s] STAGE 30", stm->p->shortname); - ret = stm->p->stage.s30(stm->p, cs, sr); - switch (ret) { + stm = plg_stagemap->stage_30; + while (stm) { + /* Call stage */ + MK_TRACE("[%s] STAGE 30", stm->p->shortname); + ret = stm->p->stage.s30(stm->p, cs, sr); + switch (ret) { case MK_PLUGIN_RET_NOT_ME: break; case MK_PLUGIN_RET_END: @@ -622,10 +621,8 @@ int mk_plugin_stage_run(unsigned int hook, mk_err("Plugin '%s' returns invalid value %i", stm->p->shortname, ret); exit(EXIT_FAILURE); - } - - stm = stm->next; } + stm = stm->next; } } diff --git a/src/mk_request.c b/src/mk_request.c index c114834..03e640e 100644 --- a/src/mk_request.c +++ b/src/mk_request.c @@ -651,15 +651,12 @@ int mk_handler_write(int socket, struct client_session *cs) mk_list_foreach(sr_head, sr_list) { sr_node = mk_list_entry(sr_head, struct session_request, _head); - /* Request not processed also no plugin has take some action */ - /* Request with data to send by static file sender */ - if (!sr_node->handled_by) { - if (sr_node->bytes_to_send > 0) { - final_status = mk_http_send_file(cs, sr_node); - } - else if (sr_node->bytes_to_send < 0) { - final_status = mk_request_process(cs, sr_node); - } + if (sr_node->bytes_to_send > 0) { + /* Request with data to send by static file sender */ + final_status = mk_http_send_file(cs, sr_node); + } + else if (sr_node->bytes_to_send < 0) { + final_status = mk_request_process(cs, sr_node); } /* -- 1.7.10.4
_______________________________________________ Monkey mailing list [email protected] http://lists.monkey-project.com/listinfo/monkey
