httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r552937 - /httpd/httpd/trunk/server/mpm/experimental/event/event.c
Date Tue, 03 Jul 2007 18:13:28 GMT
Author: jim
Date: Tue Jul  3 11:13:27 2007
New Revision: 552937

URL: http://svn.apache.org/viewvc?view=rev&rev=552937
Log:
Rename relatively useless struct element for something more
defining. Also, if we were unable to ap_queue_push(), then
push2worker should report failure.

Modified:
    httpd/httpd/trunk/server/mpm/experimental/event/event.c

Modified: httpd/httpd/trunk/server/mpm/experimental/event/event.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/experimental/event/event.c?view=diff&rev=552937&r1=552936&r2=552937
==============================================================================
--- httpd/httpd/trunk/server/mpm/experimental/event/event.c (original)
+++ httpd/httpd/trunk/server/mpm/experimental/event/event.c Tue Jul  3 11:13:27 2007
@@ -196,7 +196,7 @@
 typedef struct
 {
     poll_type_e type;
-    int status;        /*XXX what is this for?  0 and 1 don't make it clear */
+    int bypass_push;
     void *baton;
 } listener_poll_type;
 
@@ -584,7 +584,7 @@
         cs->pfd.reqevents = APR_POLLIN;
         cs->pfd.desc.s = sock;
         pt->type = PT_CSD;
-        pt->status = 1;
+        pt->bypass_push = 1;
         pt->baton = cs;
         cs->pfd.client_data = pt;
         APR_RING_ELEM_INIT(cs, timeout_list);
@@ -665,7 +665,7 @@
             apr_thread_mutex_lock(timeout_mutex);
             APR_RING_INSERT_TAIL(&timeout_head, cs, conn_state_t, timeout_list);
             apr_thread_mutex_unlock(timeout_mutex);
-            pt->status = 0;
+            pt->bypass_push = 0;
             cs->pfd.reqevents = APR_POLLOUT | APR_POLLHUP | APR_POLLERR;
             rc = apr_pollset_add(event_pollset, &cs->pfd);
             return 1;
@@ -707,7 +707,7 @@
         APR_RING_INSERT_TAIL(&keepalive_timeout_head, cs, conn_state_t, timeout_list);
         apr_thread_mutex_unlock(timeout_mutex);
 
-        pt->status = 0;
+        pt->bypass_push = 0;
         /* Add work to pollset. */
         cs->pfd.reqevents = APR_POLLIN;
         rc = apr_pollset_add(event_pollset, &cs->pfd);
@@ -817,11 +817,11 @@
     conn_state_t *cs = (conn_state_t *) pt->baton;
     apr_status_t rc;
 
-    if (pt->status == 1) {
-        return 0;
+    if (pt->bypass_push) {
+        return APR_SUCCESS;
     }
 
-    pt->status = 1;
+    pt->bypass_push = 1;
 
     rc = apr_pollset_remove(pollset, pfd);
 
@@ -848,7 +848,7 @@
         ap_push_pool(worker_queue_info, cs->p);
     }
 
-    return APR_SUCCESS;
+    return rc;
 }
 
 /* get_worker:



Mime
View raw message