httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: httpd-2.0/modules/arch/netware mod_netware.c
Date Sat, 20 Mar 2004 04:17:26 GMT
bnicholes    2004/03/19 20:17:26

  Modified:    modules/arch/netware mod_netware.c
  Log:
  The code was truncating the parameters for all NLM level commands.  Needed to make sure
that all of the parameters are being passed to the argv parser.
  
  Revision  Changes    Path
  1.16      +5 -8      httpd-2.0/modules/arch/netware/mod_netware.c
  
  Index: mod_netware.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/arch/netware/mod_netware.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- mod_netware.c	9 Feb 2004 20:29:17 -0000	1.15
  +++ mod_netware.c	20 Mar 2004 04:17:26 -0000	1.16
  @@ -98,6 +98,7 @@
   {
       char *ext = NULL;
       char *cmd_only, *ptr;
  +    const char *new_cmd;
       const char *detached = NULL;
       netware_dir_config *d;
       apr_file_t *fh;
  @@ -140,20 +141,16 @@
           ++ext;
   
       /* check if we have a registered command for the extension*/
  -    *cmd = apr_table_get(d->file_type_handlers, ext);
  -    if (*cmd == NULL) {
  +    new_cmd = apr_table_get(d->file_type_handlers, ext);
  +    if (new_cmd == NULL) {
           ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                     "Could not find a command associated with the %s extension", ext);
           return APR_EBADF;
       }
  -    if (!stricmp(*cmd, "OS")) {
  -        /* If it is an NLM then restore *cmd and just execute it */
  -        *cmd = cmd_only;
  -    }
  -    else {
  +    if (stricmp(new_cmd, "OS")) {
           /* If we have a registered command then add the file that was passed in as a
             parameter to the registered command. */
  -        *cmd = apr_pstrcat (p, *cmd, " ", cmd_only, NULL);
  +        *cmd = apr_pstrcat (p, new_cmd, " ", cmd_only, NULL);
   
           /* Run in its own address space if specified */
           detached = apr_table_get(d->file_handler_mode, ext);
  
  
  

Mime
View raw message