]> granicus.if.org Git - apache/commitdiff
Pre GA removal of components that will not be included:
authorRainer Jung <rjung@apache.org>
Sat, 12 Nov 2011 06:39:51 +0000 (06:39 +0000)
committerRainer Jung <rjung@apache.org>
Sat, 12 Nov 2011 06:39:51 +0000 (06:39 +0000)
Part 2: Remove the conditional mod_serf integration
from the event mpm.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1201211 13f79535-47bb-0310-9956-ffa450edef68

include/ap_mpm.h
server/mpm/event/config3.m4
server/mpm/event/event.c

index b061c0a23b87f682eff7b80e953bd0ed60596b55..923236cf3e047339d68d7102e252980aab832a96 100644 (file)
@@ -144,7 +144,6 @@ AP_DECLARE(apr_status_t) ap_os_create_privileged_process(
 #define AP_MPMQ_MPM_STATE            13  /* starting, running, stopping  */
 #define AP_MPMQ_IS_ASYNC             14  /* MPM can process async connections  */
 #define AP_MPMQ_GENERATION           15  /* MPM generation */
-#define AP_MPMQ_HAS_SERF             16  /* MPM can drive serf internally  */
 
 /**
  * Query a property of the current MPM.
index 5c96fe3c30df811f9249b464dc5214f4ca295435..e7ec6320ca8c0132712cbb686dab547a23f5215b 100644 (file)
@@ -1,9 +1,5 @@
 dnl ## XXX - Need a more thorough check of the proper flags to use
 
-APACHE_CHECK_SERF
-if test "$ac_cv_serf" = yes ; then
-    APR_ADDTO(MOD_MPM_EVENT_LDADD,[\$(SERF_LIBS)])
-fi
 APACHE_SUBST(MOD_MPM_EVENT_LDADD)
 
 APACHE_MPM_MODULE(event, $enable_mpm_event, event.lo fdqueue.lo pod.lo,[
index 75af4f4995d6e029be7e60f977c1dd79150bb7a7..3aeb4f62a862d748bcaad6ebfbf60bd8980df1cc 100644 (file)
 #include <limits.h>             /* for INT_MAX */
 
 
-#if HAVE_SERF
-#include "mod_serf.h"
-#include "serf.h"
-#endif
-
 /* Limit on the total --- clients will be locked out if more servers than
  * this are needed.  It is intended solely to keep the server from crashing
  * when things get out of hand.
@@ -237,15 +232,6 @@ static apr_pollfd_t *listener_pollfd;
  */
 static apr_pollset_t *event_pollset;
 
-#if HAVE_SERF
-typedef struct {
-    apr_pollset_t *pollset;
-    apr_pool_t *pool;
-} s_baton_t;
-
-static serf_context_t *g_serf;
-#endif
-
 /* The structure used to pass unique initialization info to each thread */
 typedef struct
 {
@@ -269,9 +255,6 @@ typedef enum
 {
     PT_CSD,
     PT_ACCEPT
-#if HAVE_SERF
-    , PT_SERF
-#endif
 } poll_type_e;
 
 typedef struct
@@ -467,9 +450,6 @@ static int event_query(int query_code, int *result, apr_status_t *rv)
     case AP_MPMQ_IS_ASYNC:
         *result = 1;
         break;
-    case AP_MPMQ_HAS_SERF:
-        *result = 1;
-        break;
     case AP_MPMQ_HARD_LIMIT_DAEMONS:
         *result = server_limit;
         break;
@@ -1041,36 +1021,8 @@ static void dummy_signal_handler(int sig)
 }
 
 
-#if HAVE_SERF
-static apr_status_t s_socket_add(void *user_baton,
-                                 apr_pollfd_t *pfd,
-                                 void *serf_baton)
-{
-    s_baton_t *s = (s_baton_t*)user_baton;
-    /* XXXXX: recycle listener_poll_types */
-    listener_poll_type *pt = ap_malloc(sizeof(*pt));
-    pt->type = PT_SERF;
-    pt->baton = serf_baton;
-    pfd->client_data = pt;
-    return apr_pollset_add(s->pollset, pfd);
-}
-
-static apr_status_t s_socket_remove(void *user_baton,
-                                    apr_pollfd_t *pfd,
-                                    void *serf_baton)
-{
-    s_baton_t *s = (s_baton_t*)user_baton;
-    listener_poll_type *pt = pfd->client_data;
-    free(pt);
-    return apr_pollset_remove(s->pollset, pfd);
-}
-#endif
-
 static apr_status_t init_pollset(apr_pool_t *p)
 {
-#if HAVE_SERF
-    s_baton_t *baton = NULL;
-#endif
     ap_listen_rec *lr;
     listener_poll_type *pt;
     int i = 0;
@@ -1101,21 +1053,6 @@ static apr_status_t init_pollset(apr_pool_t *p)
         lr->accept_func = ap_unixd_accept;
     }
 
-#if HAVE_SERF
-    baton = apr_pcalloc(p, sizeof(*baton));
-    baton->pollset = event_pollset;
-    /* TODO: subpools, threads, reuse, etc.  -- currently use malloc() inside :( */
-    baton->pool = p;
-
-    g_serf = serf_context_create_ex(baton,
-                                    s_socket_add,
-                                    s_socket_remove, p);
-
-    ap_register_provider(p, "mpm_serf",
-                         "instance", "0", g_serf);
-
-#endif
-
     return APR_SUCCESS;
 }
 
@@ -1423,12 +1360,6 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
         }
         apr_thread_mutex_unlock(g_timer_ring_mtx);
 
-#if HAVE_SERF
-        rc = serf_context_prerun(g_serf);
-        if (rc != APR_SUCCESS) {
-            /* TOOD: what should do here? ugh. */
-        }
-#endif
         rc = apr_pollset_poll(event_pollset, timeout_interval, &num, &out_pfd);
         if (rc != APR_SUCCESS) {
             if (APR_STATUS_IS_EINTR(rc)) {
@@ -1621,13 +1552,6 @@ static void * APR_THREAD_FUNC listener_thread(apr_thread_t * thd, void *dummy)
                     }
                 }
             }               /* if:else on pt->type */
-#if HAVE_SERF
-            else if (pt->type == PT_SERF) {
-                /* send socket to serf. */
-                /* XXXX: this doesn't require get_worker() */
-                serf_event_trigger(g_serf, pt->baton, out_pfd);
-            }
-#endif
             out_pfd++;
             num--;
         }                   /* while for processing poll */