mod_dialup.c revision 6f4e65d3b827973e4d93bf315cd350e9558babdb
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd/* Licensed to the Apache Software Foundation (ASF) under one or more
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * contributor license agreements. See the NOTICE file distributed with
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * this work for additional information regarding copyright ownership.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * The ASF licenses this file to You under the Apache License, Version 2.0
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * (the "License"); you may not use this file except in compliance with
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * the License. You may obtain a copy of the License at
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * Unless required by applicable law or agreed to in writing, software
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * distributed under the License is distributed on an "AS IS" BASIS,
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * See the License for the specific language governing permissions and
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd * limitations under the License.
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndtypedef struct dialup_dcfg_t {
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndtypedef struct dialup_baton_t {
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd while (!APR_BRIGADE_EMPTY(db->bb) && bytes_sent < db->bytes_per_second) {
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd status = apr_brigade_partition(db->bb, db->bytes_per_second, &e);
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd /* XXXXXX: Log me. */
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd APR_RING_SPLICE_HEAD(&db->tmpbb->list, f, b, apr_bucket, link);
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd e = apr_bucket_flush_create(db->r->connection->bucket_alloc);
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd status = ap_pass_brigade(db->r->output_filters, db->tmpbb);
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd "dialup: pulse: ap_pass_brigade failed:");
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34ndstatic void
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd ap_mpm_register_timed_callback(apr_time_from_sec(1), dialup_callback, baton);
97a3ecc40b65d5f8e865bbe0b1c9325d8c016e34nd /* See core.c, default handler for all of the cases we just decline. */
&core_module);
#if APR_HAS_SENDFILE
? 0 : APR_SENDFILE_ENABLED)
, 0, r->pool);
if (rv) {
return DECLINED;
ap_set_etag(r);
return DECLINED;
#if APR_HAS_MMAP
apr_bucket_file_enable_mmap(e, 0);
db->r = r;
return status;
return SUSPENDED;
#ifndef APR_HOOK_ALMOST_LAST
typedef struct modem_speed_t {
const char *name;
#ifndef BITRATE_TO_BYTES
{NULL, 0}
void *dconf,
const char *input)
return NULL;
return cfg;
{NULL}
NULL,
NULL,
NULL,