From 42440099f201f4d438c1dd2918c77bc8e95814bd Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 24 Jul 2014 03:25:02 +0530 Subject: server: Remove unused handlers We're sure that we won't need them now, and it's making the code harder to follow --- src/main.c | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) diff --git a/src/main.c b/src/main.c index fb62d53..63c3a13 100644 --- a/src/main.c +++ b/src/main.c @@ -676,51 +676,6 @@ request_started_cb (SoupServer *server, G_CALLBACK (got_request_headers), ctx_table); } -static void -request_read_cb (SoupServer *server, - SoupMessage *msg, - SoupClientContext *client, - GHashTable *ctx_table) -{ - if (msg->method == SOUP_METHOD_PUT || - msg->method == SOUP_METHOD_POST) - goto PUT; - else if (msg->method == SOUP_METHOD_GET) - goto GET; - else - return; - -PUT: - { - /* Everything is handled in the "finished" signal. Nothing to do. */ - } - -GET: - { - /* Nothing to do */ - } - - g_debug ("%s request read successfully", msg->method); -} - -static void -request_finished_cb (SoupServer *server, - SoupMessage *msg, - SoupClientContext *client, - GHashTable *ctx_table) -{ - g_debug ("%s request ended", msg->method); -} - -static void -request_aborted_cb (SoupServer *server, - SoupMessage *msg, - SoupClientContext *client, - GHashTable *ctx_table) -{ - /* Nothing to do. Everything is handled in "finished" signals. */ -} - gboolean exit_on_signal_cb (SoupServer *server) { @@ -761,12 +716,6 @@ main (int argc, ctx_table, NULL); g_signal_connect (server, "request-started", G_CALLBACK (request_started_cb), ctx_table); - g_signal_connect (server, "request-read", - G_CALLBACK (request_read_cb), ctx_table); - g_signal_connect (server, "request-finished", - G_CALLBACK (request_finished_cb), ctx_table); - g_signal_connect (server, "request-aborted", - G_CALLBACK (request_aborted_cb), ctx_table); g_unix_signal_add (SIGINT, (GSourceFunc)exit_on_signal_cb, server); soup_server_run (server); -- cgit v0.11.2-2-gd1dd