httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@locus.apache.org
Subject cvs commit: apache-2.0/src/modules/standard mod_so.c
Date Tue, 16 May 2000 02:57:01 GMT
gstein      00/05/15 19:57:01

  Modified:    src/modules/standard mod_so.c
  Log:
  oops. somebody snuck different names for my_error, and I goofed a sizeof().
  fixed some indents.
  rename some 'stat' variables to 'status'
  use ap_strerror() in load_file()
  
  Revision  Changes    Path
  1.18      +28 -24    apache-2.0/src/modules/standard/mod_so.c
  
  Index: mod_so.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_so.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- mod_so.c	2000/05/16 02:49:42	1.17
  +++ mod_so.c	2000/05/16 02:57:00	1.18
  @@ -173,7 +173,7 @@
   
   static ap_status_t unload_module(void *data)
   {
  -    ap_status_t stat;
  +    ap_status_t status;
       moduleinfo *modi = (moduleinfo*)data;
   
       /* only unload if module information is still existing */
  @@ -184,10 +184,10 @@
       ap_remove_loaded_module(modi->modp);
   
       /* unload the module space itself */
  -    if ((stat = ap_dso_unload(modi->modp->dynamic_load_handle)) != APR_SUCCESS) {
  +    if ((status = ap_dso_unload(modi->modp->dynamic_load_handle)) != APR_SUCCESS)
{
           ap_log_error(APLOG_MARK, APLOG_WARNING|APLOG_NOERRNO, 0, NULL,
  -            "dso unload failure");
  -        return stat;
  +		     "dso unload failure");
  +        return status;
       }
   
       /* destroy the module information */
  @@ -205,10 +205,10 @@
   
   static ap_status_t unload_file(void *handle)
   {
  -    ap_status_t stat;
  +    ap_status_t status;
       
  -    if ((stat = ap_dso_unload((ap_dso_handle_t *)handle)) != APR_SUCCESS)
  -        return stat;
  +    if ((status = ap_dso_unload((ap_dso_handle_t *)handle)) != APR_SUCCESS)
  +        return status;
       return APR_SUCCESS;
   }
   
  @@ -256,14 +256,14 @@
        */
       if ((status = ap_dso_load(&modhandle, szModuleFile, cmd->pool )) != APR_SUCCESS)
{
           char my_error[256];
  -        ap_strerror(status, my_error, sizeof(my_error));
  -        return ap_pstrcat (cmd->pool, "Cannot load ", szModuleFile,
  -                           " into server: ", 
  -                           my_error ? my_error : "(reason unknown)",
  -                           NULL);
  +
  +        return ap_pstrcat(cmd->pool, "Cannot load ", szModuleFile,
  +			  " into server: ",
  +			  ap_strerror(status, my_error, sizeof(my_error)),
  +			  NULL);
       }
       ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, NULL,
  -		"loaded module %s", modname);
  +		 "loaded module %s", modname);
   
       /*
        * Retrieve the pointer to the module structure through the module name:
  @@ -271,10 +271,12 @@
        * symbol name.
        */
       if ((status = ap_dso_sym(&modsym, modhandle, modname)) != APR_SUCCESS) {
  -        char my_err[256];
  -	return ap_pstrcat(cmd->pool, "Can't locate API module structure `", modname,
  -		       "' in file ", szModuleFile, ": ", 
  -                       ap_strerror(status, my_err, sizeof(my_error)), NULL);
  +        char my_error[256];
  +
  +	return ap_pstrcat(cmd->pool, "Can't locate API module structure `",
  +			  modname, "' in file ", szModuleFile, ": ", 
  +			  ap_strerror(status, my_error, sizeof(my_error)),
  +			  NULL);
       }
       modp = (module*) modsym;
       modp->dynamic_load_handle = (ap_dso_handle_t *)modhandle;
  @@ -317,21 +319,23 @@
   
   static const char *load_file(cmd_parms *cmd, void *dummy, char *filename)
   {
  -    ap_status_t stat;
  +    ap_status_t status;
       ap_dso_handle_t *handle;
       const char *file;
   
       file = ap_server_root_relative(cmd->pool, filename);
       
  -    if ((stat = ap_dso_load(&handle, file, cmd->pool)) != APR_SUCCESS) {
  -	return ap_pstrcat (cmd->pool, "Cannot load ", filename, 
  -			" into server:", 
  -			"(reason unknown)",
  -			NULL);
  +    if ((status = ap_dso_load(&handle, file, cmd->pool)) != APR_SUCCESS) {
  +        char my_error[256];
  +
  +	return ap_pstrcat(cmd->pool, "Cannot load ", filename, 
  +			  " into server: ", 
  +			  ap_strerror(status, my_error, sizeof(my_error)),
  +			  NULL);
       }
       
       ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, NULL,
  -		"loaded file %s", filename);
  +		 "loaded file %s", filename);
   
       ap_register_cleanup(cmd->pool, (void *)handle, unload_file, ap_null_cleanup);
   
  
  
  

Mime
View raw message