httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/mappers mod_rewrite.c
Date Mon, 28 Jul 2003 23:41:21 GMT
nd          2003/07/28 16:41:20

  Modified:    modules/mappers mod_rewrite.c
  Log:
  - style & readability
  - procattr_cmd_type_set was called twice. shoot one.
  
  Revision  Changes    Path
  1.197     +11 -15    httpd-2.0/modules/mappers/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_rewrite.c,v
  retrieving revision 1.196
  retrieving revision 1.197
  diff -u -r1.196 -r1.197
  --- mod_rewrite.c	28 Jul 2003 23:06:54 -0000	1.196
  +++ mod_rewrite.c	28 Jul 2003 23:41:18 -0000	1.197
  @@ -1083,8 +1083,7 @@
   static void rewrite_child_errfn(apr_pool_t *p, apr_status_t err,
                                   const char *desc)
   {
  -    ap_log_error(APLOG_MARK, APLOG_ERR, err, NULL,
  -                 "%s", desc);
  +    ap_log_error(APLOG_MARK, APLOG_ERR, err, NULL, "%s", desc);
   }
   
   static apr_status_t rewritemap_program_child(apr_pool_t *p,
  @@ -1096,19 +1095,16 @@
       apr_procattr_t *procattr;
       apr_proc_t *procnew;
   
  -    if (((rc = apr_procattr_create(&procattr, p)) != APR_SUCCESS) ||
  -        ((rc = apr_procattr_io_set(procattr, APR_FULL_BLOCK, APR_FULL_BLOCK,
  -                                   APR_NO_PIPE)) != APR_SUCCESS) ||
  -        ((rc = apr_procattr_dir_set(procattr,
  -                                   ap_make_dirstr_parent(p, argv[0])))
  -         != APR_SUCCESS) ||
  -        ((rc = apr_procattr_cmdtype_set(procattr, APR_PROGRAM)) != APR_SUCCESS) ||
  -        ((rc = apr_procattr_child_errfn_set(procattr, rewrite_child_errfn)) != APR_SUCCESS)
||
  -        ((rc = apr_procattr_error_check_set(procattr, 1)) != APR_SUCCESS) ||
  -        ((rc = apr_procattr_cmdtype_set(procattr, APR_PROGRAM)) != APR_SUCCESS)) {
  -        /* Something bad happened, give up and go away. */
  -    }
  -    else {
  +    if (   APR_SUCCESS == (rc=apr_procattr_create(&procattr, p))
  +        && APR_SUCCESS == (rc=apr_procattr_io_set(procattr, APR_FULL_BLOCK,
  +                                                  APR_FULL_BLOCK, APR_NO_PIPE))
  +        && APR_SUCCESS == (rc=apr_procattr_dir_set(procattr,
  +                                             ap_make_dirstr_parent(p, argv[0])))
  +        && APR_SUCCESS == (rc=apr_procattr_cmdtype_set(procattr, APR_PROGRAM))
  +        && APR_SUCCESS == (rc=apr_procattr_child_errfn_set(procattr,
  +                                                           rewrite_child_errfn))
  +        && APR_SUCCESS == (rc=apr_procattr_error_check_set(procattr, 1))) {
  +
           procnew = apr_pcalloc(p, sizeof(*procnew));
           rc = apr_proc_create(procnew, argv[0], (const char **)argv, NULL,
                                procattr, p);
  
  
  

Mime
View raw message