842ae4bd224140319ae7feec1872b93dfd491143fielding/* Licensed to the Apache Software Foundation (ASF) under one or more
842ae4bd224140319ae7feec1872b93dfd491143fielding * contributor license agreements. See the NOTICE file distributed with
842ae4bd224140319ae7feec1872b93dfd491143fielding * this work for additional information regarding copyright ownership.
842ae4bd224140319ae7feec1872b93dfd491143fielding * The ASF licenses this file to You under the Apache License, Version 2.0
842ae4bd224140319ae7feec1872b93dfd491143fielding * (the "License"); you may not use this file except in compliance with
842ae4bd224140319ae7feec1872b93dfd491143fielding * the License. You may obtain a copy of the License at
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben *
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * http://www.apache.org/licenses/LICENSE-2.0
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben *
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * Unless required by applicable law or agreed to in writing, software
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * distributed under the License is distributed on an "AS IS" BASIS,
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * See the License for the specific language governing permissions and
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd * limitations under the License.
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben */
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben#include "httpd.h"
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben#include "http_config.h"
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben#include "http_log.h"
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben#include "mod_optional_fn_export.h"
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben/* The alert will note a strange mirror-image style resemblance to
3cfde3d634a9d57f1fc86f2228165f7a01d80f78ben * mod_optional_hook_import.c. Yes, I _did_ mean import. Think about it.
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben */
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464abenstatic int TestOptionalFn(const char *szStr)
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben{
185aa71728867671e105178b4c66fbc22b65ae26sf ap_log_error(APLOG_MARK,APLOG_ERR,OK,NULL, APLOGNO(01871)
43c3e6a4b559b76b750c245ee95e2782c15b4296jim "Optional function test said: %s",szStr);
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben return OK;
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben}
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464abenstatic void ExportRegisterHooks(apr_pool_t *p)
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben{
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben APR_REGISTER_OPTIONAL_FN(TestOptionalFn);
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben}
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben
36ef8f77bffe75d1aa327882be1b5bdbe2ff567asfAP_DECLARE_MODULE(optional_fn_export) =
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben{
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben STANDARD20_MODULE_STUFF,
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben NULL,
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben NULL,
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben NULL,
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben NULL,
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben NULL,
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben ExportRegisterHooks
4783bc116b4dc37deadcc0b68ce3d3eeb6a7464aben};