httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject cvs commit: httpd-apreq-2/glue/perl/xsbuilder/Apache/Request Apache__Request.h
Date Fri, 27 Jun 2003 17:56:20 GMT
joes        2003/06/27 10:56:20

  Modified:    glue/perl/xsbuilder/Apache/Request Apache__Request.h
  Log:
  Make upload->link's return value more perlish (and consistent w/ apreq-1)
  
  Revision  Changes    Path
  1.11      +12 -10    httpd-apreq-2/glue/perl/xsbuilder/Apache/Request/Apache__Request.h
  
  Index: Apache__Request.h
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/glue/perl/xsbuilder/Apache/Request/Apache__Request.h,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Apache__Request.h	27 Jun 2003 11:49:03 -0000	1.10
  +++ Apache__Request.h	27 Jun 2003 17:56:20 -0000	1.11
  @@ -88,7 +88,6 @@
       dXSARGS;
       MAGIC *mg;
       void *env;
  -    apr_status_t s;
       const char *name, *fname;
       apr_bucket_brigade *bb;
       apr_file_t *f;
  @@ -106,20 +105,23 @@
       f = apreq_brigade_spoolfile(bb);
       if (f == NULL) {
           apr_off_t len;
  +        apr_status_t s;
           s = apr_file_open(&f, name, APR_CREATE | APR_EXCL | APR_WRITE |
                             APR_READ | APR_BINARY | APR_BUFFERED, 
                             APR_OS_DEFAULT,
                             apreq_env_pool(env));
  -        if (s != APR_SUCCESS)
  -            XSRETURN_IV(s);
  -        s = apreq_brigade_fwrite(f, &len, bb);
  -        XSRETURN_IV(s);
  +        if (s != APR_SUCCESS || 
  +            apreq_brigade_fwrite(f, &len, bb) != APR_SUCCESS)
  +            XSRETURN_UNDEF;
  +    
  +        XSRETURN_YES;
       }
  -    s = apr_file_name_get(&fname, f);
  -    if (s != APR_SUCCESS)
  -        XSRETURN_IV(s);
  +    if (apr_file_name_get(&fname, f) != APR_SUCCESS)
  +        XSRETURN_UNDEF;
   
  -    s = PerlLIO_link(fname, name);
  -    XSRETURN_IV(s ? APR_EGENERAL : APR_SUCCESS);
  +    if (PerlLIO_link(fname, name) >= 0)
  +        XSRETURN_YES;
  +
  +    XSRETURN_UNDEF;
   }
   
  
  
  

Mime
View raw message