simple_io.c revision a0944d0cea0301ca402cfc896485d03da0d6209c
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "httpd.h"
#include "http_log.h"
#include "ap_listen.h"
#include "simple_types.h"
#include "simple_io.h"
#include "simple_event.h"
#include "http_connection.h"
#include "util_filter.h"
#include "http_main.h"
#include "scoreboard.h"
#include "http_vhost.h"
{
/* Code disabled because it does nothing yet but causes a compiler warning */
#if 0
/* pqXXXXX: handle timeouts. */
#endif
"io timeout hit (?)");
}
{
conn_rec *c;
/* Since we have an input filter which 'cloggs' the input stream,
* like mod_ssl, lets just do the normal read from input filters,
* like the Worker MPM does.
*/
}
}
c = scon->c;
while (!c->aborted) {
if (rv) {
"simple_io_process: apr_pollcb_remove failure");
/*AP_DEBUG_ASSERT(rv == APR_SUCCESS);*/
}
}
if (!c->aborted) {
/* state will be updated upon return
* fall thru to either wait for readability/timeout or
* do lingering close
*/
}
else {
}
}
}
NULL);
if (rv != APR_SUCCESS) {
"network write failure in core output filter");
}
else if (c->data_in_output_filters) {
/* Still in WRITE_COMPLETION_STATE:
* Set a write timeout for this connection, and let the
* event thread poll for writeability.
*/
scon,
scon->c->base_server !=
if (rv != APR_SUCCESS) {
"apr_pollcb_add: failed in write completion");
}
return APR_SUCCESS;
}
}
else if (c->data_in_input_filters) {
}
else {
}
}
return APR_SUCCESS;
}
scon,
scon->c->base_server !=
if (rv) {
"process_socket: apr_pollcb_add failure in read request line");
}
return APR_SUCCESS;
}
}
return APR_SUCCESS;
}
{
if (rv) {
"simple_io_invoke: simple_io_process failed (?)");
}
return NULL;
}
{
long conn_id = 0;
/* pqXXXXX: remove this. */
/* XXX: handle failure */
"simple_io_setup_conn: connection aborted");
}
if (rv) {
"simple_io_setup_conn: simple_io_process failed (?)");
}
return NULL;
}
{
if (rv) {
/* pqXXXXXX: unixd.c has _tons_ of custom handling on return values
* from accept, but it seems really crazy, it either worked, or didn't,
* but taking this approach of swallowing the error it is possible we have a
* fatal error on our listening socket, but we don't notice.
*
* Need to discuss this on dev@
*/
"simple_io_accept: apr_socket_accept failed");
return APR_SUCCESS;
}
else {
scon,
}
return APR_SUCCESS;
}
{
/* pqXXXXX: In theory, if we have non-blocking operations on the connection
* we can do them here, before pushing to another thread, thats just
* not implemented right now.
*/
}