httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/modules/aaa mod_access.c
Date Thu, 12 Apr 2001 13:35:39 GMT
wrowe       01/04/12 06:35:39

  Modified:    modules/aaa mod_access.c
  Log:
    More APR_STATUS_IS_ canonicalization
  
  Revision  Changes    Path
  1.32      +5 -6      httpd-2.0/modules/aaa/mod_access.c
  
  Index: mod_access.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/aaa/mod_access.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- mod_access.c	2001/03/15 22:09:27	1.31
  +++ mod_access.c	2001/04/12 13:35:39	1.32
  @@ -175,18 +175,17 @@
       else if ((s = strchr(where, '/'))) {
           *s++ = '\0';
           rv = apr_ipsubnet_create(&a->x.ip, where, s, cmd->pool);
  -        switch(rv) {
  -        case APR_SUCCESS:
  -            break;
  -        case APR_EINVAL: /* looked nothing like an IP address */
  +        if(APR_STATUS_IS_EINVAL(rv)) {
  +            /* looked nothing like an IP address */
               return "An IP address was expected";
  -        default:
  +        }
  +        else if (rv != APR_SUCCESS) {
               apr_strerror(rv, msgbuf, sizeof msgbuf);
               return apr_pstrdup(cmd->pool, msgbuf);
           }
           a->type = T_IP;
       }
  -    else if ((rv = apr_ipsubnet_create(&a->x.ip, where, NULL, cmd->pool)) !=
APR_EINVAL) {
  +    else if (!APR_STATUS_IS_EINVAL(rv = apr_ipsubnet_create(&a->x.ip, where, NULL,
cmd->pool))) {
           if (rv != APR_SUCCESS) {
               apr_strerror(rv, msgbuf, sizeof msgbuf);
               return apr_pstrdup(cmd->pool, msgbuf);
  
  
  

Mime
View raw message