httpd-test-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aa...@apache.org
Subject cvs commit: httpd-test/flood flood_profile.c
Date Sat, 17 Nov 2001 01:23:56 GMT
aaron       01/11/16 17:23:56

  Modified:    flood    flood_profile.c
  Log:
  Wrap the ssl includes in #if blocks.
  
  Added some error output for when the config file tries to set a
  handler that doesn't exist, or an implementation that we don't have.
  
  Revision  Changes    Path
  1.18      +12 -4     httpd-test/flood/flood_profile.c
  
  Index: flood_profile.c
  ===================================================================
  RCS file: /home/cvs/httpd-test/flood/flood_profile.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- flood_profile.c	2001/10/03 01:24:01	1.17
  +++ flood_profile.c	2001/11/17 01:23:56	1.18
  @@ -64,7 +64,10 @@
   #include "flood_profile.h"
   #include "flood_config.h"
   #include "flood_net.h"
  +
  +#if FLOOD_HAS_OPENSSL
   #include "flood_net_ssl.h"
  +#endif /* FLOOD_HAS_OPENSSL */
   
   #include "flood_round_robin.h"
   #include "flood_simple_reports.h"
  @@ -198,7 +201,7 @@
       return APR_SUCCESS;
   }
   
  -const char * profile_event_handler_names[] = {
  +const char *profile_event_handler_names[] = {
       "profile_init",
       "report_init",
       "get_next_url",
  @@ -320,9 +323,7 @@
   {
       profile_event_handler_t *p;
   
  -    for (p = &profile_event_handlers[0];
  -         p;
  -         p++) {
  +    for (p = &profile_event_handlers[0]; p; p++) {
           /* these are case insensitive (both key and value) for the sake of simplicity */
           if (strncasecmp(impl_name, (*p).impl_name, FLOOD_STRLEN_MAX) == 0) {
               if (strncasecmp(handler_name, (*p).handler_name, FLOOD_STRLEN_MAX) == 0) {
  @@ -374,10 +375,17 @@
                   return APR_SUCCESS;
               } else {
                   /* invalid implementation for this handler */
  +                apr_file_printf(local_stderr, "Invalid handler (%s) "
  +                                "specified.\n",
  +                                handler_name ? handler_name : "NULL");
                   return APR_ENOTIMPL; /* XXX: There's probably a better return val than
this? */
               }
           }
       }
  +    apr_file_printf(local_stderr, "Invalid implementation (%s) for "
  +                    "this handler (%s)\n",
  +                    impl_name ? impl_name : "NULL",
  +                    handler_name ? handler_name : "NULL");
       return APR_ENOTIMPL; /* no implementation found */
   }
   
  
  
  

Mime
View raw message