httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: httpd-2.0/support ab.c
Date Wed, 03 Sep 2003 19:27:12 GMT
trawick     2003/09/03 12:27:12

  Modified:    .        CHANGES
               include  util_time.h
               modules/arch/netware mod_netware.c
               modules/arch/win32 mod_isapi.c mod_win32.c
               modules/cache mod_file_cache.c
               modules/dav/fs lock.c repos.c
               modules/experimental mod_mem_cache.c
               modules/filters mod_include.c
               modules/generators mod_autoindex.c mod_cgi.c mod_cgid.c
               modules/mappers mod_negotiation.c mod_rewrite.c
                        mod_userdir.c
               modules/metadata mod_ident.c
               modules/proxy proxy_connect.c proxy_ftp.c proxy_http.c
                        proxy_util.c
               modules/ssl ssl_engine_init.c ssl_scache_dbm.c
               os/beos  beosd.c
               os/unix  unixd.c
               server   config.c connection.c core.c listen.c main.c
                        mpm_common.c request.c util.c util_script.c
               server/mpm/beos beos.c
               server/mpm/experimental/perchild perchild.c
               server/mpm/mpmt_os2 mpmt_os2.c mpmt_os2_child.c
               server/mpm/netware mpm_netware.c
               server/mpm/winnt mpm_winnt.c nt_eventlog.c
               server/mpm/worker pod.c
               support  ab.c
  Log:
  switch to APR 1.0 API (which is still in flux)
  
  because of the changes to the argument lists of apr_mmap_dup and apr_socket_create,
  2.1-dev won't build with apr and apr-util's 0.9 branch anymore
  
  Revision  Changes    Path
  1.1266    +2 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1265
  retrieving revision 1.1266
  diff -u -r1.1265 -r1.1266
  --- CHANGES	31 Aug 2003 16:14:38 -0000	1.1265
  +++ CHANGES	3 Sep 2003 19:26:59 -0000	1.1266
  @@ -2,6 +2,8 @@
   
     [Remove entries to the current 2.0 section below, when backported]
   
  +  *) Switch to APR 1.0 API.
  +
     *) Modify ap_get_client_block() to note if it has seen EOS.
        [Justin Erenkrantz]
   
  
  
  
  1.10      +1 -1      httpd-2.0/include/util_time.h
  
  Index: util_time.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/util_time.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- util_time.h	3 Feb 2003 17:52:54 -0000	1.9
  +++ util_time.h	3 Sep 2003 19:27:01 -0000	1.10
  @@ -79,7 +79,7 @@
    * @param tm the exploded time
    * @param t the time to explode: MUST be within the last
    *          AP_TIME_RECENT_THRESHOLD seconds
  - * @note This is a faster alternative to apr_explode_localtime that uses
  + * @note This is a faster alternative to apr_time_exp_lt that uses
    *       a cache of pre-exploded time structures.  It is useful for things
    *       that need to explode the current time multiple times per second,
    *       like loggers.
  
  
  
  1.10      +1 -1      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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- mod_netware.c	12 Feb 2003 22:52:32 -0000	1.9
  +++ mod_netware.c	3 Sep 2003 19:27:01 -0000	1.10
  @@ -170,7 +170,7 @@
       *ptr = '\0';
   
       /* Figure out what the extension is so that we can matche it. */
  -    ext = strrchr(apr_filename_of_pathname(cmd_only), '.');
  +    ext = strrchr(apr_filepath_name_get(cmd_only), '.');
   
       /* If there isn't an extension then give it an empty string */
       if (!ext) {
  
  
  
  1.92      +1 -1      httpd-2.0/modules/arch/win32/mod_isapi.c
  
  Index: mod_isapi.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/arch/win32/mod_isapi.c,v
  retrieving revision 1.91
  retrieving revision 1.92
  diff -u -r1.91 -r1.92
  --- mod_isapi.c	25 Feb 2003 16:52:55 -0000	1.91
  +++ mod_isapi.c	3 Sep 2003 19:27:01 -0000	1.92
  @@ -1646,7 +1646,7 @@
   {
       apr_status_t rv;
   
  -    apr_pool_sub_make(&loaded.pool, pconf, NULL);
  +    apr_pool_create_ex(&loaded.pool, pconf, NULL, NULL);
       if (!loaded.pool) {
   	ap_log_error(APLOG_MARK, APLOG_ERR, APR_EGENERAL, NULL,
   	             "ISAPI: could not create the isapi cache pool");
  
  
  
  1.24      +1 -1      httpd-2.0/modules/arch/win32/mod_win32.c
  
  Index: mod_win32.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/arch/win32/mod_win32.c,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- mod_win32.c	23 Feb 2003 22:37:35 -0000	1.23
  +++ mod_win32.c	3 Sep 2003 19:27:01 -0000	1.24
  @@ -447,7 +447,7 @@
        * win32 parsing here, therefore the final extension is the only one
        * we will consider.
        */
  -    ext = strrchr(apr_filename_of_pathname(*cmd), '.');
  +    ext = strrchr(apr_filepath_name_get(*cmd), '.');
       
       /* If the file has an extension and it is not .com and not .exe and
        * we've been instructed to search the registry, then do so.
  
  
  
  1.78      +1 -1      httpd-2.0/modules/cache/mod_file_cache.c
  
  Index: mod_file_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/cache/mod_file_cache.c,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- mod_file_cache.c	3 Feb 2003 17:52:57 -0000	1.77
  +++ mod_file_cache.c	3 Sep 2003 19:27:01 -0000	1.78
  @@ -315,7 +315,7 @@
       apr_mmap_t *mm;
       apr_bucket_brigade *bb = apr_brigade_create(r->pool, c->bucket_alloc);
   
  -    apr_mmap_dup(&mm, file->mm, r->pool, 0);
  +    apr_mmap_dup(&mm, file->mm, r->pool);
       b = apr_bucket_mmap_create(mm, 0, (apr_size_t)file->finfo.size,
                                  c->bucket_alloc);
       APR_BRIGADE_INSERT_TAIL(bb, b);
  
  
  
  1.27      +1 -1      httpd-2.0/modules/dav/fs/lock.c
  
  Index: lock.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/dav/fs/lock.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- lock.c	3 Feb 2003 17:52:57 -0000	1.26
  +++ lock.c	3 Sep 2003 19:27:02 -0000	1.27
  @@ -671,7 +671,7 @@
                       apr_status_t rv;
   
   		    /* if we don't see the file, then it's a locknull */
  -                    rv = apr_lstat(&finfo, fname, APR_FINFO_MIN, p);
  +                    rv = apr_stat(&finfo, fname, APR_FINFO_MIN | APR_FINFO_LINK, p);
   		    if (rv != APR_SUCCESS && rv != APR_INCOMPLETE) {
   			if ((err = dav_fs_remove_locknull_member(p, fname, &buf)) != NULL) {
                               /* ### push a higher-level description? */
  
  
  
  1.74      +2 -2      httpd-2.0/modules/dav/fs/repos.c
  
  Index: repos.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/dav/fs/repos.c,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- repos.c	3 Feb 2003 17:52:57 -0000	1.73
  +++ repos.c	3 Sep 2003 19:27:02 -0000	1.74
  @@ -1490,8 +1490,8 @@
   
   
           /* ### Optimize me, dirent can give us what we need! */
  -        status = apr_lstat(&fsctx->info1.finfo, fsctx->path1.buf, 
  -                           APR_FINFO_NORM, pool);
  +        status = apr_stat(&fsctx->info1.finfo, fsctx->path1.buf, 
  +                          APR_FINFO_NORM | APR_FINFO_LINK, pool);
           if (status != APR_SUCCESS && status != APR_INCOMPLETE) {
               /* woah! where'd it go? */
               /* ### should have a better error here */
  
  
  
  1.93      +1 -1      httpd-2.0/modules/experimental/mod_mem_cache.c
  
  Index: mod_mem_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_mem_cache.c,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- mod_mem_cache.c	3 Feb 2003 17:53:00 -0000	1.92
  +++ mod_mem_cache.c	3 Sep 2003 19:27:04 -0000	1.93
  @@ -949,7 +949,7 @@
               if (rv != APR_SUCCESS) {
                   return rv;
               }
  -            apr_file_unset_inherit(tmpfile);
  +            apr_file_inherit_unset(tmpfile);
               apr_os_file_get(&(mobj->fd), tmpfile);
   
               /* Open for business */
  
  
  
  1.285     +1 -1      httpd-2.0/modules/filters/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
  retrieving revision 1.284
  retrieving revision 1.285
  diff -u -r1.284 -r1.285
  --- mod_include.c	28 Aug 2003 23:59:58 -0000	1.284
  +++ mod_include.c	3 Sep 2003 19:27:04 -0000	1.285
  @@ -678,7 +678,7 @@
           val = ap_ht_time(r->pool, r->finfo.mtime, conf->default_time_fmt, 0);
       }
       else if (!strcasecmp(var, "USER_NAME")) {
  -        if (apr_get_username(&val, r->finfo.user, r->pool) != APR_SUCCESS) {
  +        if (apr_uid_name_get(&val, r->finfo.user, r->pool) != APR_SUCCESS) {
               val = "<unknown>";
           }
       }
  
  
  
  1.121     +3 -3      httpd-2.0/modules/generators/mod_autoindex.c
  
  Index: mod_autoindex.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_autoindex.c,v
  retrieving revision 1.120
  retrieving revision 1.121
  diff -u -r1.120 -r1.121
  --- mod_autoindex.c	15 Jul 2003 13:22:03 -0000	1.120
  +++ mod_autoindex.c	3 Sep 2003 19:27:05 -0000	1.121
  @@ -812,7 +812,7 @@
    */
   
   #ifdef CASE_BLIND_FILESYSTEM
  -#define MATCH_FLAGS FNM_CASE_BLIND
  +#define MATCH_FLAGS APR_FNM_CASE_BLIND
   #else
   #define MATCH_FLAGS 0
   #endif
  @@ -1298,7 +1298,7 @@
   
   #ifndef CASE_BLIND_FILESYSTEM
       if (pattern && (apr_fnmatch(pattern, dirent->name,
  -                                FNM_NOESCAPE | FNM_PERIOD)
  +                                APR_FNM_NOESCAPE | APR_FNM_PERIOD)
                           != APR_SUCCESS))
           return (NULL);
   #else  /* !CASE_BLIND_FILESYSTEM */
  @@ -1308,7 +1308,7 @@
            * reliably - so we have to granularise at the OS level.
            */
       if (pattern && (apr_fnmatch(pattern, dirent->name,
  -                                FNM_NOESCAPE | FNM_PERIOD | FNM_CASE_BLIND)
  +                                APR_FNM_NOESCAPE | APR_FNM_PERIOD | APR_FNM_CASE_BLIND)
                           != APR_SUCCESS))
           return (NULL);
   #endif /* !CASE_BLIND_FILESYSTEM */
  
  
  
  1.155     +2 -2      httpd-2.0/modules/generators/mod_cgi.c
  
  Index: mod_cgi.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_cgi.c,v
  retrieving revision 1.154
  retrieving revision 1.155
  diff -u -r1.154 -r1.155
  --- mod_cgi.c	22 Aug 2003 23:14:30 -0000	1.154
  +++ mod_cgi.c	3 Sep 2003 19:27:05 -0000	1.155
  @@ -482,7 +482,7 @@
               /* Bad things happened. Everyone should have cleaned up. */
               ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, rc, r,
                             "couldn't create child process: %d: %s", rc,
  -                          apr_filename_of_pathname(r->filename));
  +                          apr_filepath_name_get(r->filename));
           }
           else {
               apr_pool_note_subprocess(p, procnew, APR_KILL_AFTER_TIMEOUT);
  @@ -607,7 +607,7 @@
           return DECLINED;
       }
   
  -    argv0 = apr_filename_of_pathname(r->filename);
  +    argv0 = apr_filepath_name_get(r->filename);
       nph = !(strncmp(argv0, "nph-", 4));
       conf = ap_get_module_config(r->server->module_config, &cgi_module);
   
  
  
  
  1.156     +1 -1      httpd-2.0/modules/generators/mod_cgid.c
  
  Index: mod_cgid.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_cgid.c,v
  retrieving revision 1.155
  retrieving revision 1.156
  diff -u -r1.155 -r1.156
  --- mod_cgid.c	22 Aug 2003 23:14:30 -0000	1.155
  +++ mod_cgid.c	3 Sep 2003 19:27:05 -0000	1.156
  @@ -775,7 +775,7 @@
                    */
                   ap_log_error(APLOG_MARK, APLOG_ERR, rc, r->server,
                                "couldn't create child process: %d: %s", rc, 
  -                             apr_filename_of_pathname(r->filename));
  +                             apr_filepath_name_get(r->filename));
               }
               else {
                   apr_hash_set(script_hash, &cgid_req.conn_id, sizeof(cgid_req.conn_id), 
  
  
  
  1.116     +1 -1      httpd-2.0/modules/mappers/mod_negotiation.c
  
  Index: mod_negotiation.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_negotiation.c,v
  retrieving revision 1.115
  retrieving revision 1.116
  diff -u -r1.115 -r1.116
  --- mod_negotiation.c	4 May 2003 23:40:20 -0000	1.115
  +++ mod_negotiation.c	3 Sep 2003 19:27:05 -0000	1.116
  @@ -1066,7 +1066,7 @@
                        break;
                   }
                   mime_info.bytes = len;
  -                mime_info.file_name = apr_filename_of_pathname(rr->filename);
  +                mime_info.file_name = apr_filepath_name_get(rr->filename);
               }
           }
           else {
  
  
  
  1.234     +1 -1      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.233
  retrieving revision 1.234
  diff -u -r1.233 -r1.234
  --- mod_rewrite.c	20 Aug 2003 01:11:11 -0000	1.233
  +++ mod_rewrite.c	3 Sep 2003 19:27:06 -0000	1.234
  @@ -3376,7 +3376,7 @@
   
       case CONDPAT_FILE_LINK:
   #if !defined(OS2)
  -        if (   apr_lstat(&sb, input, APR_FINFO_MIN, r->pool) == APR_SUCCESS
  +        if (   apr_stat(&sb, input, APR_FINFO_MIN | APR_FINFO_LINK, r->pool) == APR_SUCCESS
               && sb.filetype == APR_LNK) {
               rc = 1;
           }
  
  
  
  1.54      +2 -2      httpd-2.0/modules/mappers/mod_userdir.c
  
  Index: mod_userdir.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/mappers/mod_userdir.c,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- mod_userdir.c	3 Feb 2003 17:53:06 -0000	1.53
  +++ mod_userdir.c	3 Sep 2003 19:27:06 -0000	1.54
  @@ -325,7 +325,7 @@
   #if APR_HAS_USER
               char *homedir;
   
  -            if (apr_get_home_directory(&homedir, w, r->pool) == APR_SUCCESS) {
  +            if (apr_uid_homepath_get(&homedir, w, r->pool) == APR_SUCCESS) {
                   filename = apr_pstrcat(r->pool, homedir, "/", userdir, NULL);
               }
   #else
  @@ -376,7 +376,7 @@
           return NULL;
       }
   
  -    if (apr_get_userid(&ugid->uid, &ugid->gid, username, r->pool) != APR_SUCCESS) {
  +    if (apr_uid_get(&ugid->uid, &ugid->gid, username, r->pool) != APR_SUCCESS) {
           return NULL;
       }
   
  
  
  
  1.2       +5 -5      httpd-2.0/modules/metadata/mod_ident.c
  
  Index: mod_ident.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_ident.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mod_ident.c	18 Jan 2003 03:37:54 -0000	1.1
  +++ mod_ident.c	3 Sep 2003 19:27:07 -0000	1.2
  @@ -158,7 +158,7 @@
   
       if ((rv = apr_socket_create(newsock,
                                   localsa->family, /* has to match */
  -                                SOCK_STREAM, conn->pool)) != APR_SUCCESS) {
  +                                SOCK_STREAM, 0, conn->pool)) != APR_SUCCESS) {
           ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
                        "rfc1413: error creating query socket");
           return rv;
  @@ -180,7 +180,7 @@
    * addresses from the query socket.
    */
   
  -    if ((rv = apr_bind(*newsock, localsa)) != APR_SUCCESS) {
  +    if ((rv = apr_socket_bind(*newsock, localsa)) != APR_SUCCESS) {
           ap_log_error(APLOG_MARK, APLOG_CRIT, rv, srv,
                        "rfc1413: Error binding query socket to local port");
           apr_socket_close(*newsock);
  @@ -191,7 +191,7 @@
    * errors from connect usually imply the remote machine doesn't support
    * the service; don't log such an error
    */
  -    if ((rv = apr_connect(*newsock, destsa)) != APR_SUCCESS) {
  +    if ((rv = apr_socket_connect(*newsock, destsa)) != APR_SUCCESS) {
           apr_socket_close(*newsock);
           return rv;
       }
  @@ -223,7 +223,7 @@
       while (i < buflen) {
           apr_size_t j = strlen(buffer + i);
           apr_status_t status;
  -        status  = apr_send(sock, buffer+i, &j);
  +        status  = apr_socket_send(sock, buffer+i, &j);
           if (status != APR_SUCCESS) {
               ap_log_error(APLOG_MARK, APLOG_CRIT, status, srv,
                            "write: rfc1413: error sending request");
  @@ -249,7 +249,7 @@
       while((cp = strchr(buffer, '\012')) == NULL && i < sizeof(buffer) - 1) {
           apr_size_t j = sizeof(buffer) - 1 - i;
           apr_status_t status;
  -        status = apr_recv(sock, buffer+i, &j);
  +        status = apr_socket_recv(sock, buffer+i, &j);
           if (status != APR_SUCCESS) {
               ap_log_error(APLOG_MARK, APLOG_CRIT, status, srv,
                            "read: rfc1413: error reading response");
  
  
  
  1.62      +8 -8      httpd-2.0/modules/proxy/proxy_connect.c
  
  Index: proxy_connect.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_connect.c,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- proxy_connect.c	3 Feb 2003 17:53:10 -0000	1.61
  +++ proxy_connect.c	3 Sep 2003 19:27:07 -0000	1.62
  @@ -267,10 +267,10 @@
   		     "proxy: CONNECT: sending the CONNECT request to the remote proxy");
           nbytes = apr_snprintf(buffer, sizeof(buffer),
   			      "CONNECT %s HTTP/1.0" CRLF, r->uri);
  -        apr_send(sock, buffer, &nbytes);
  +        apr_socket_send(sock, buffer, &nbytes);
           nbytes = apr_snprintf(buffer, sizeof(buffer),
   			      "Proxy-agent: %s" CRLF CRLF, ap_get_server_version());
  -        apr_send(sock, buffer, &nbytes);
  +        apr_socket_send(sock, buffer, &nbytes);
       }
       else {
           ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
  @@ -278,11 +278,11 @@
           nbytes = apr_snprintf(buffer, sizeof(buffer),
   			      "HTTP/1.0 200 Connection Established" CRLF);
           ap_xlate_proto_to_ascii(buffer, nbytes);
  -        apr_send(client_socket, buffer, &nbytes);
  +        apr_socket_send(client_socket, buffer, &nbytes);
           nbytes = apr_snprintf(buffer, sizeof(buffer),
   			      "Proxy-agent: %s" CRLF CRLF, ap_get_server_version());
           ap_xlate_proto_to_ascii(buffer, nbytes);
  -        apr_send(client_socket, buffer, &nbytes);
  +        apr_socket_send(client_socket, buffer, &nbytes);
   #if 0
           /* This is safer code, but it doesn't work yet.  I'm leaving it 
            * here so that I can fix it later.
  @@ -336,7 +336,7 @@
   /*		ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
                                "proxy: CONNECT: sock was set");*/
                   nbytes = sizeof(buffer);
  -                if (apr_recv(sock, buffer, &nbytes) == APR_SUCCESS) {
  +                if (apr_socket_recv(sock, buffer, &nbytes) == APR_SUCCESS) {
                       o = 0;
                       i = nbytes;
                       while(i > 0)
  @@ -348,7 +348,7 @@
        * if ((nbytes = ap_rwrite(buffer + o, nbytes, r)) < 0)
        * rbb
        */
  -                        if (apr_send(client_socket, buffer + o, &nbytes) != APR_SUCCESS)
  +                        if (apr_socket_send(client_socket, buffer + o, &nbytes) != APR_SUCCESS)
   			    break;
                           o += nbytes;
                           i -= nbytes;
  @@ -366,13 +366,13 @@
   /*		ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
                                "proxy: CONNECT: client was set");*/
                   nbytes = sizeof(buffer);
  -                if (apr_recv(client_socket, buffer, &nbytes) == APR_SUCCESS) {
  +                if (apr_socket_recv(client_socket, buffer, &nbytes) == APR_SUCCESS) {
                       o = 0;
                       i = nbytes;
                       while(i > 0)
                       {
   			nbytes = i;
  -			if (apr_send(sock, buffer + o, &nbytes) != APR_SUCCESS)
  +			if (apr_socket_send(sock, buffer + o, &nbytes) != APR_SUCCESS)
   			    break;
                           o += nbytes;
                           i -= nbytes;
  
  
  
  1.133     +10 -10    httpd-2.0/modules/proxy/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_ftp.c,v
  retrieving revision 1.132
  retrieving revision 1.133
  diff -u -r1.132 -r1.133
  --- proxy_ftp.c	9 Jul 2003 12:19:01 -0000	1.132
  +++ proxy_ftp.c	3 Sep 2003 19:27:07 -0000	1.133
  @@ -954,7 +954,7 @@
           int failed = 1;
           while (connect_addr) {
   
  -	    if ((rv = apr_socket_create(&sock, connect_addr->family, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
  +	    if ((rv = apr_socket_create(&sock, connect_addr->family, SOCK_STREAM, 0, r->pool)) != APR_SUCCESS) {
   		ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
   			      "proxy: FTP: error creating socket");
                   connect_addr = connect_addr->next;
  @@ -993,7 +993,7 @@
                            connect_addr->family, connect_addr, connectname);
   
               /* make the connection out of the socket */
  -            rv = apr_connect(sock, connect_addr);
  +            rv = apr_socket_connect(sock, connect_addr);
   
               /* if an error occurred, loop round and try again */
               if (rv != APR_SUCCESS) {
  @@ -1272,7 +1272,7 @@
                          "proxy: FTP: EPSV contacting remote host on port %d",
                                data_port);
   
  -                if ((rv = apr_socket_create(&data_sock, connect_addr->family, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
  +                if ((rv = apr_socket_create(&data_sock, connect_addr->family, SOCK_STREAM, 0, r->pool)) != APR_SUCCESS) {
                       ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
                                     "proxy: FTP: error creating EPSV socket");
                       return HTTP_INTERNAL_SERVER_ERROR;
  @@ -1291,7 +1291,7 @@
                   apr_socket_addr_get(&data_addr, APR_REMOTE, sock);
                   apr_sockaddr_ip_get(&data_ip, data_addr);
                   apr_sockaddr_info_get(&epsv_addr, data_ip, connect_addr->family, data_port, 0, p);
  -                rv = apr_connect(data_sock, epsv_addr);
  +                rv = apr_socket_connect(data_sock, epsv_addr);
                   if (rv != APR_SUCCESS) {
                       ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
                                    "proxy: FTP: EPSV attempt to connect to %pI failed - Firewall/NAT?", epsv_addr);
  @@ -1359,7 +1359,7 @@
                             "proxy: FTP: PASV contacting host %d.%d.%d.%d:%d",
                                h3, h2, h1, h0, pasvport);
   
  -                if ((rv = apr_socket_create(&data_sock, connect_addr->family, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
  +                if ((rv = apr_socket_create(&data_sock, connect_addr->family, SOCK_STREAM, 0, r->pool)) != APR_SUCCESS) {
                       ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
                                     "proxy: error creating PASV socket");
                       return HTTP_INTERNAL_SERVER_ERROR;
  @@ -1376,7 +1376,7 @@
   
                   /* make the connection */
                   apr_sockaddr_info_get(&pasv_addr, apr_psprintf(p, "%d.%d.%d.%d", h3, h2, h1, h0), connect_addr->family, pasvport, 0, p);
  -                rv = apr_connect(data_sock, pasv_addr);
  +                rv = apr_socket_connect(data_sock, pasv_addr);
                   if (rv != APR_SUCCESS) {
                       ap_log_error(APLOG_MARK, APLOG_ERR, rv, r->server,
                                    "proxy: FTP: PASV attempt to connect to %pI failed - Firewall/NAT?", pasv_addr);
  @@ -1402,7 +1402,7 @@
           apr_port_t local_port;
           unsigned int h0, h1, h2, h3, p0, p1;
   
  -        if ((rv = apr_socket_create(&local_sock, connect_addr->family, SOCK_STREAM, r->pool)) != APR_SUCCESS) {
  +        if ((rv = apr_socket_create(&local_sock, connect_addr->family, SOCK_STREAM, 0, r->pool)) != APR_SUCCESS) {
               ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
                             "proxy: FTP: error creating local socket");
               return HTTP_INTERNAL_SERVER_ERROR;
  @@ -1422,14 +1422,14 @@
   
           apr_sockaddr_info_get(&local_addr, local_ip, APR_UNSPEC, local_port, 0, r->pool);
   
  -        if ((rv = apr_bind(local_sock, local_addr)) != APR_SUCCESS) {
  +        if ((rv = apr_socket_bind(local_sock, local_addr)) != APR_SUCCESS) {
               ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
               "proxy: FTP: error binding to ftp data socket %pI", local_addr);
               return HTTP_INTERNAL_SERVER_ERROR;
           }
   
           /* only need a short queue */
  -        if ((rv = apr_listen(local_sock, 2)) != APR_SUCCESS) {
  +        if ((rv = apr_socket_listen(local_sock, 2)) != APR_SUCCESS) {
               ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
                             "proxy: FTP: error listening to ftp data socket %pI", local_addr);
               return HTTP_INTERNAL_SERVER_ERROR;
  @@ -1766,7 +1766,7 @@
       /* wait for connection */
       if (use_port) {
           for (;;) {
  -            rv = apr_accept(&data_sock, local_sock, r->pool);
  +            rv = apr_socket_accept(&data_sock, local_sock, r->pool);
               if (rv == APR_EINTR) {
                   continue;
               }
  
  
  
  1.171     +1 -1      httpd-2.0/modules/proxy/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_http.c,v
  retrieving revision 1.170
  retrieving revision 1.171
  diff -u -r1.170 -r1.171
  --- proxy_http.c	16 Apr 2003 06:30:15 -0000	1.170
  +++ proxy_http.c	3 Sep 2003 19:27:07 -0000	1.171
  @@ -330,7 +330,7 @@
           apr_socket_timeout_get(p_conn->sock, &current_timeout);
           /* set no timeout */
           apr_socket_timeout_set(p_conn->sock, 0);
  -        socket_status = apr_recv(p_conn->sock, test_buffer, &buffer_len);
  +        socket_status = apr_socket_recv(p_conn->sock, test_buffer, &buffer_len);
           /* put back old timeout */
           apr_socket_timeout_set(p_conn->sock, current_timeout);
           if ( APR_STATUS_IS_EOF(socket_status) ) {
  
  
  
  1.102     +2 -2      httpd-2.0/modules/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_util.c,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- proxy_util.c	15 Apr 2003 16:01:02 -0000	1.101
  +++ proxy_util.c	3 Sep 2003 19:27:07 -0000	1.102
  @@ -1167,7 +1167,7 @@
       
       while (backend_addr && !connected) {
           if ((rv = apr_socket_create(newsock, backend_addr->family,
  -                                    SOCK_STREAM, p)) != APR_SUCCESS) {
  +                                    SOCK_STREAM, 0, p)) != APR_SUCCESS) {
               loglevel = backend_addr->next ? APLOG_DEBUG : APLOG_ERR;
               ap_log_error(APLOG_MARK, loglevel, rv, s,
                            "proxy: %s: error creating fam %d socket for target %s",
  @@ -1205,7 +1205,7 @@
                        proxy_function, backend_addr->family, backend_name);
   
           /* make the connection out of the socket */
  -        rv = apr_connect(*newsock, backend_addr);
  +        rv = apr_socket_connect(*newsock, backend_addr);
   
           /* if an error occurred, loop round and try again */
           if (rv != APR_SUCCESS) {
  
  
  
  1.118     +2 -2      httpd-2.0/modules/ssl/ssl_engine_init.c
  
  Index: ssl_engine_init.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_engine_init.c,v
  retrieving revision 1.117
  retrieving revision 1.118
  diff -u -r1.117 -r1.118
  --- ssl_engine_init.c	5 Aug 2003 22:49:42 -0000	1.117
  +++ ssl_engine_init.c	3 Sep 2003 19:27:08 -0000	1.118
  @@ -852,11 +852,11 @@
       }
   
       if (SSL_X509_getCN(ptemp, cert, &cn)) {
  -        int fnm_flags = FNM_PERIOD|FNM_CASE_BLIND;
  +        int fnm_flags = APR_FNM_PERIOD|APR_FNM_CASE_BLIND;
   
           if (apr_fnmatch_test(cn) &&
               (apr_fnmatch(cn, s->server_hostname,
  -                         fnm_flags) == FNM_NOMATCH))
  +                         fnm_flags) == APR_FNM_NOMATCH))
           {
               ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s,
                            "%s server certificate wildcard CommonName (CN) `%s' "
  
  
  
  1.19      +2 -2      httpd-2.0/modules/ssl/ssl_scache_dbm.c
  
  Index: ssl_scache_dbm.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/ssl/ssl_scache_dbm.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ssl_scache_dbm.c	3 Feb 2003 17:53:13 -0000	1.18
  +++ ssl_scache_dbm.c	3 Sep 2003 19:27:08 -0000	1.19
  @@ -118,7 +118,7 @@
       SSLModConfigRec *mc = myModConfig(s);
       apr_pool_t *p;
   
  -    apr_pool_sub_make(&p, mc->pPool, NULL);
  +    apr_pool_create_ex(&p, mc->pPool, NULL, NULL);
       if (p != NULL) {
           /* the correct way */
           unlink(apr_pstrcat(p, mc->szSessionCacheDataFile, SSL_DBM_FILE_SUFFIX_DIR, NULL));
  @@ -350,7 +350,7 @@
       ssl_mutex_on(s);
       for (;;) {
           /* allocate the key array in a memory sub pool */
  -        apr_pool_sub_make(&p, mc->pPool, NULL);
  +        apr_pool_create_ex(&p, mc->pPool, NULL, NULL);
           if (p == NULL)
               break;
           if ((keylist = apr_palloc(p, sizeof(dbmkey)*KEYMAX)) == NULL) {
  
  
  
  1.23      +3 -3      httpd-2.0/os/beos/beosd.c
  
  Index: beosd.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/os/beos/beosd.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- beosd.c	3 Feb 2003 17:53:15 -0000	1.22
  +++ beosd.c	3 Sep 2003 19:27:08 -0000	1.23
  @@ -119,7 +119,7 @@
       apr_status_t status;
       int sockdes;
   
  -    status = apr_accept(&csd, lr->sd, ptrans);
  +    status = apr_socket_accept(&csd, lr->sd, ptrans);
       if (status == APR_SUCCESS) { 
           *accepted = csd;
           apr_os_sock_get(&sockdes, csd);
  @@ -195,13 +195,13 @@
                * occur in mobile IP.
                */
               ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf,
  -                         "apr_accept: giving up.");
  +                         "apr_socket_accept: giving up.");
               return APR_EGENERAL;
   #endif /*ENETDOWN*/
   
           default:
               ap_log_error(APLOG_MARK, APLOG_ERR, status, ap_server_conf,
  -                         "apr_accept: (client socket)");
  +                         "apr_socket_accept: (client socket)");
               return APR_EGENERAL;
       }
       return status;
  
  
  
  1.59      +3 -3      httpd-2.0/os/unix/unixd.c
  
  Index: unixd.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/os/unix/unixd.c,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- unixd.c	7 Jun 2003 19:50:01 -0000	1.58
  +++ unixd.c	3 Sep 2003 19:27:08 -0000	1.59
  @@ -504,7 +504,7 @@
       int sockdes;
   
       *accepted = NULL;
  -    status = apr_accept(&csd, lr->sd, ptrans);
  +    status = apr_socket_accept(&csd, lr->sd, ptrans);
       if (status == APR_SUCCESS) { 
           *accepted = csd;
           apr_os_sock_get(&sockdes, csd);
  @@ -608,7 +608,7 @@
                * occur in mobile IP.
                */
               ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf,
  -                         "apr_accept: giving up.");
  +                         "apr_socket_accept: giving up.");
               return APR_EGENERAL;
   #endif /*ENETDOWN*/
   
  @@ -625,7 +625,7 @@
   #else
           default:
               ap_log_error(APLOG_MARK, APLOG_ERR, status, ap_server_conf,
  -                         "apr_accept: (client socket)");
  +                         "apr_socket_accept: (client socket)");
               return APR_EGENERAL;
   #endif
       }
  
  
  
  1.166     +2 -2      httpd-2.0/server/config.c
  
  Index: config.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/config.c,v
  retrieving revision 1.165
  retrieving revision 1.166
  diff -u -r1.165 -r1.166
  --- config.c	7 Aug 2003 16:38:19 -0000	1.165
  +++ config.c	3 Sep 2003 19:27:08 -0000	1.166
  @@ -1549,7 +1549,7 @@
           && !(strcmp(fname, ap_server_root_relative(p, SERVER_CONFIG_FILE)))) {
           apr_finfo_t finfo;
   
  -        if (apr_lstat(&finfo, fname, APR_FINFO_TYPE, p) != APR_SUCCESS)
  +        if (apr_stat(&finfo, fname, APR_FINFO_LINK | APR_FINFO_TYPE, p) != APR_SUCCESS)
               return;
       }
   
  @@ -1608,7 +1608,7 @@
               if (strcmp(dirent.name, ".")
                   && strcmp(dirent.name, "..")
                   && (apr_fnmatch(pattern, dirent.name,
  -                                FNM_PERIOD) == APR_SUCCESS)) {
  +                                APR_FNM_PERIOD) == APR_SUCCESS)) {
                   fnew = (fnames *) apr_array_push(candidates);
                   fnew->fname = ap_make_full_path(p, path, dirent.name);
               }
  
  
  
  1.110     +2 -2      httpd-2.0/server/connection.c
  
  Index: connection.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/connection.c,v
  retrieving revision 1.109
  retrieving revision 1.110
  diff -u -r1.109 -r1.110
  --- connection.c	1 Mar 2003 00:43:03 -0000	1.109
  +++ connection.c	3 Sep 2003 19:27:08 -0000	1.110
  @@ -167,7 +167,7 @@
       /* Shut down the socket for write, which will send a FIN
        * to the peer.
        */
  -    if (apr_shutdown(csd, APR_SHUTDOWN_WRITE) != APR_SUCCESS
  +    if (apr_socket_shutdown(csd, APR_SHUTDOWN_WRITE) != APR_SUCCESS
           || c->aborted) {
           apr_socket_close(csd);
           return;
  @@ -183,7 +183,7 @@
       apr_socket_opt_set(csd, APR_INCOMPLETE_READ, 1);
       while (1) {
           nbytes = sizeof(dummybuf);
  -        rc = apr_recv(csd, dummybuf, &nbytes);
  +        rc = apr_socket_recv(csd, dummybuf, &nbytes);
           if (rc != APR_SUCCESS || nbytes == 0)
               break;
   
  
  
  
  1.243     +5 -5      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.242
  retrieving revision 1.243
  diff -u -r1.242 -r1.243
  --- core.c	22 Aug 2003 20:57:32 -0000	1.242
  +++ core.c	3 Sep 2003 19:27:09 -0000	1.243
  @@ -2845,7 +2845,7 @@
   
       /* XXX handle checking for non-blocking socket */
       while (bytes_written != len) {
  -        rv = apr_sendv(s, vec + i, nvec - i, &n);
  +        rv = apr_socket_sendv(s, vec + i, nvec - i, &n);
           bytes_written += n;
           if (rv != APR_SUCCESS)
               return rv;
  @@ -2853,7 +2853,7 @@
           *nbytes += n;
   
           /* If the write did not complete, adjust the iovecs and issue
  -         * apr_sendv again
  +         * apr_socket_sendv again
            */
           if (bytes_written < len) {
               /* Skip over the vectors that have already been written */
  @@ -2908,8 +2908,8 @@
       do {
           apr_size_t tmplen = file_bytes_left;
   
  -        rv = apr_sendfile(c->client_socket, fd, hdtr, &file_offset, &tmplen,
  -                          flags);
  +        rv = apr_socket_sendfile(c->client_socket, fd, hdtr, &file_offset, &tmplen,
  +                                 flags);
           *bytes_sent += tmplen;
           total_bytes_left -= tmplen;
           if (!total_bytes_left || rv != APR_SUCCESS) {
  @@ -3019,7 +3019,7 @@
           rv = apr_file_read(fd, buffer, &sendlen);
           while (rv == APR_SUCCESS && sendlen) {
               bytes_sent = sendlen;
  -            rv = apr_send(c->client_socket, &buffer[o], &bytes_sent);
  +            rv = apr_socket_send(c->client_socket, &buffer[o], &bytes_sent);
               if (rv == APR_SUCCESS) {
                   sendlen -= bytes_sent; /* sendlen != bytes_sent ==> partial write */
                   o += bytes_sent;       /* o is where we are in the buffer */
  
  
  
  1.92      +3 -3      httpd-2.0/server/listen.c
  
  Index: listen.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/listen.c,v
  retrieving revision 1.91
  retrieving revision 1.92
  diff -u -r1.91 -r1.92
  --- listen.c	25 Aug 2003 16:00:49 -0000	1.91
  +++ listen.c	3 Sep 2003 19:27:09 -0000	1.92
  @@ -159,7 +159,7 @@
       ap_sock_disable_nagle(s);
   #endif
   
  -    if ((stat = apr_bind(s, server->bind_addr)) != APR_SUCCESS) {
  +    if ((stat = apr_socket_bind(s, server->bind_addr)) != APR_SUCCESS) {
           ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_CRIT, stat, p,
                         "make_sock: could not bind to address %pI",
                         server->bind_addr);
  @@ -167,7 +167,7 @@
           return stat;
       }
   
  -    if ((stat = apr_listen(s, ap_listenbacklog)) != APR_SUCCESS) {
  +    if ((stat = apr_socket_listen(s, ap_listenbacklog)) != APR_SUCCESS) {
           ap_log_perror(APLOG_MARK, APLOG_STARTUP|APLOG_ERR, stat, p,
                         "make_sock: unable to listen for connections "
                         "on address %pI",
  @@ -295,7 +295,7 @@
           sa = sa->next;
   
           status = apr_socket_create(&new->sd, new->bind_addr->family,
  -                                    SOCK_STREAM, process->pool);
  +                                    SOCK_STREAM, 0, process->pool);
   
   #if APR_HAVE_IPV6
           /* What could happen is that we got an IPv6 address, but this system
  
  
  
  1.145     +1 -1      httpd-2.0/server/main.c
  
  Index: main.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/main.c,v
  retrieving revision 1.144
  retrieving revision 1.145
  diff -u -r1.144 -r1.145
  --- main.c	22 Feb 2003 14:32:39 -0000	1.144
  +++ main.c	3 Sep 2003 19:27:09 -0000	1.145
  @@ -281,7 +281,7 @@
       apr_pool_tag(process->pconf, "pconf");
       process->argc = argc;
       process->argv = argv;
  -    process->short_name = apr_filename_of_pathname(argv[0]);
  +    process->short_name = apr_filepath_name_get(argv[0]);
       return process;
   }
   
  
  
  
  1.108     +4 -4      httpd-2.0/server/mpm_common.c
  
  Index: mpm_common.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm_common.c,v
  retrieving revision 1.107
  retrieving revision 1.108
  diff -u -r1.107 -r1.108
  --- mpm_common.c	15 Apr 2003 22:34:47 -0000	1.107
  +++ mpm_common.c	3 Sep 2003 19:27:09 -0000	1.108
  @@ -414,8 +414,8 @@
                             APR_UNSPEC, ap_listeners->bind_addr->port, 0, p);
   
       /* close these before exec. */
  -    apr_file_unset_inherit((*pod)->pod_in);
  -    apr_file_unset_inherit((*pod)->pod_out);
  +    apr_file_inherit_unset((*pod)->pod_in);
  +    apr_file_inherit_unset((*pod)->pod_out);
   
       return APR_SUCCESS;
   }
  @@ -488,7 +488,7 @@
           return rv;
       }
   
  -    rv = apr_socket_create(&sock, pod->sa->family, SOCK_STREAM, p);
  +    rv = apr_socket_create(&sock, pod->sa->family, SOCK_STREAM, 0, p);
       if (rv != APR_SUCCESS) {
           ap_log_error(APLOG_MARK, APLOG_WARNING, rv, ap_server_conf,
                        "get socket to connect to listener");
  @@ -509,7 +509,7 @@
           return rv;
       }
   
  -    rv = apr_connect(sock, pod->sa);
  +    rv = apr_socket_connect(sock, pod->sa);
       if (rv != APR_SUCCESS) {
           int log_level = APLOG_WARNING;
   
  
  
  
  1.128     +25 -20    httpd-2.0/server/request.c
  
  Index: request.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/request.c,v
  retrieving revision 1.127
  retrieving revision 1.128
  diff -u -r1.127 -r1.128
  --- request.c	29 May 2003 23:04:32 -0000	1.127
  +++ request.c	3 Sep 2003 19:27:09 -0000	1.128
  @@ -418,7 +418,8 @@
        * owner of the symlink, then get the info of the target.
        */
       if (!(lfi->valid & APR_FINFO_OWNER)) {
  -        if ((res = apr_lstat(&fi, d, lfi->valid | APR_FINFO_OWNER, p))
  +        if ((res = apr_stat(&fi, d, 
  +                            lfi->valid | APR_FINFO_LINK | APR_FINFO_OWNER, p))
               != APR_SUCCESS) {
               return HTTP_FORBIDDEN;
           }
  @@ -429,7 +430,7 @@
           return HTTP_FORBIDDEN;
       }
   
  -    if (apr_compare_users(fi.user, lfi->user) != APR_SUCCESS) {
  +    if (apr_uid_compare(fi.user, lfi->user) != APR_SUCCESS) {
           return HTTP_FORBIDDEN;
       }
   
  @@ -806,7 +807,7 @@
                       && ((entry_core->d_components < seg)
                        || (entry_core->d_is_fnmatch
                            ? (apr_fnmatch(entry_core->d, r->filename,
  -                                        FNM_PATHNAME) != APR_SUCCESS)
  +                                        APR_FNM_PATHNAME) != APR_SUCCESS)
                            : (strcmp(r->filename, entry_core->d) != 0)))) {
                       continue;
                   }
  @@ -976,14 +977,16 @@
                   continue;
               }
   
  -            /* We choose apr_lstat here, rather that apr_stat, so that we
  -             * capture this path object rather than its target.  We will
  -             * replace the info with our target's info below.  We especially
  -             * want the name of this 'link' object, not the name of its
  -             * target, if we are fixing the filename case/resolving aliases.
  +            /* We choose apr_stat with flag APR_FINFO_LINK here, rather that 
  +             * plain apr_stat, so that we capture this path object rather than
  +             * its target.  We will replace the info with our target's info 
  +             * below.  We especially want the name of this 'link' object, not 
  +             * the name of its target, if we are fixing the filename 
  +             * case/resolving aliases.
                */
  -            rv = apr_lstat(&thisinfo, r->filename,
  -                           APR_FINFO_MIN | APR_FINFO_NAME, r->pool);
  +            rv = apr_stat(&thisinfo, r->filename,
  +                          APR_FINFO_MIN | APR_FINFO_NAME | APR_FINFO_LINK, 
  +                          r->pool);
   
               if (APR_STATUS_IS_ENOENT(rv)) {
                   /* Nothing?  That could be nice.  But our directory
  @@ -1273,7 +1276,7 @@
               if (entry_core->r
                   ? ap_regexec(entry_core->r, r->uri, 0, NULL, 0)
                   : (entry_core->d_is_fnmatch
  -                   ? apr_fnmatch(entry_core->d, cache->cached, FNM_PATHNAME)
  +                   ? apr_fnmatch(entry_core->d, cache->cached, APR_FNM_PATHNAME)
                      : (strncmp(entry_core->d, cache->cached, len)
                         || (entry_core->d[len - 1] != '/'
                             && cache->cached[len] != '/'
  @@ -1422,7 +1425,7 @@
               if (entry_core->r
                   ? ap_regexec(entry_core->r, cache->cached , 0, NULL, 0)
                   : (entry_core->d_is_fnmatch
  -                   ? apr_fnmatch(entry_core->d, cache->cached, FNM_PATHNAME)
  +                   ? apr_fnmatch(entry_core->d, cache->cached, APR_FNM_PATHNAME)
                      : strcmp(entry_core->d, cache->cached))) {
                   continue;
               }
  @@ -1715,10 +1718,10 @@
       if ((dirent->valid & APR_FINFO_MIN) != APR_FINFO_MIN) {
           /*
            * apr_dir_read isn't very complete on this platform, so
  -         * we need another apr_lstat (or simply apr_stat if we allow
  -         * all symlinks here.)  If this is an APR_LNK that resolves
  -         * to an APR_DIR, then we will rerun everything anyways...
  -         * this should be safe.
  +         * we need another apr_stat (with or without APR_FINFO_LINK
  +         * depending on whether we allow all symlinks here.)  If this 
  +         * is an APR_LNK that resolves to an APR_DIR, then we will rerun 
  +         * everything anyways... this should be safe.
            */
           apr_status_t rv;
           if (ap_allow_options(rnew) & OPT_SYM_LINKS) {
  @@ -1729,8 +1732,9 @@
               }
           }
           else {
  -            if (((rv = apr_lstat(&rnew->finfo, rnew->filename,
  -                                 APR_FINFO_MIN, rnew->pool)) != APR_SUCCESS)
  +            if (((rv = apr_stat(&rnew->finfo, rnew->filename,
  +                                APR_FINFO_LINK | APR_FINFO_MIN, 
  +                                rnew->pool)) != APR_SUCCESS)
                   && (rv != APR_INCOMPLETE)) {
                   rnew->finfo.filetype = 0;
               }
  @@ -1834,8 +1838,9 @@
               }
           }
           else {
  -            if (((rv = apr_lstat(&rnew->finfo, rnew->filename,
  -                                 APR_FINFO_MIN, rnew->pool)) != APR_SUCCESS)
  +            if (((rv = apr_stat(&rnew->finfo, rnew->filename,
  +                                APR_FINFO_LINK | APR_FINFO_MIN, 
  +                                rnew->pool)) != APR_SUCCESS)
                   && (rv != APR_INCOMPLETE)) {
                   rnew->finfo.filetype = 0;
               }
  
  
  
  1.142     +2 -2      httpd-2.0/server/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/util.c,v
  retrieving revision 1.141
  retrieving revision 1.142
  diff -u -r1.141 -r1.142
  --- util.c	28 Jul 2003 20:10:42 -0000	1.141
  +++ util.c	3 Sep 2003 19:27:09 -0000	1.142
  @@ -928,7 +928,7 @@
   
       if (finfo.filetype != APR_REG &&
   #if defined(WIN32) || defined(OS2) || defined(NETWARE)
  -        strcasecmp(apr_filename_of_pathname(name), "nul") != 0) {
  +        strcasecmp(apr_filepath_name_get(name), "nul") != 0) {
   #else
           strcmp(name, "/dev/null") != 0) {
   #endif /* WIN32 || OS2 */
  @@ -1852,7 +1852,7 @@
   {
       apr_finfo_t finfo;
   
  -    if (apr_lstat(&finfo, path, APR_FINFO_TYPE, p) != APR_SUCCESS)
  +    if (apr_stat(&finfo, path, APR_FINFO_LINK | APR_FINFO_TYPE, p) != APR_SUCCESS)
           return 0;                /* in error condition, just return no */
   
       return (finfo.filetype == APR_DIR);
  
  
  
  1.83      +2 -2      httpd-2.0/server/util_script.c
  
  Index: util_script.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/util_script.c,v
  retrieving revision 1.82
  retrieving revision 1.83
  diff -u -r1.82 -r1.83
  --- util_script.c	14 Jul 2003 17:24:38 -0000	1.82
  +++ util_script.c	3 Sep 2003 19:27:09 -0000	1.83
  @@ -469,7 +469,7 @@
   	if ((*getsfunc) (w, MAX_STRING_LEN - 1, getsfunc_data) == 0) {
   	    ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, 0, r,
   			  "Premature end of script headers: %s", 
  -                          apr_filename_of_pathname(r->filename));
  +                          apr_filepath_name_get(r->filename));
   	    return HTTP_INTERNAL_SERVER_ERROR;
   	}
   
  @@ -562,7 +562,7 @@
   
   	    ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, 0, r,
   			  "%s: %s", malformed, 
  -                          apr_filename_of_pathname(r->filename));
  +                          apr_filepath_name_get(r->filename));
   	    return HTTP_INTERNAL_SERVER_ERROR;
   	}
   
  
  
  
  1.103     +7 -7      httpd-2.0/server/mpm/beos/beos.c
  
  Index: beos.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/beos/beos.c,v
  retrieving revision 1.102
  retrieving revision 1.103
  diff -u -r1.102 -r1.103
  --- beos.c	28 Aug 2003 05:54:44 -0000	1.102
  +++ beos.c	3 Sep 2003 19:27:10 -0000	1.103
  @@ -267,7 +267,7 @@
       int i = 0;
       for (i = 0 ; i < ap_max_child_assigned; i++){
           len = 4;
  -        if (apr_sendto(udp_sock, udp_sa, 0, "die!", &len) != APR_SUCCESS)
  +        if (apr_socket_sendto(udp_sock, udp_sa, 0, "die!", &len) != APR_SUCCESS)
               break;
       }   
   }
  @@ -443,7 +443,7 @@
                       char *tmpbuf = apr_palloc(ptrans, sizeof(char) * 5);
                       apr_sockaddr_info_get(&rec_sa, "127.0.0.1", APR_UNSPEC, 7772, 0, ptrans);
                       
  -                    if ((ret = apr_recvfrom(rec_sa, listening_sockets[0], 0, tmpbuf, &len))
  +                    if ((ret = apr_socket_recvfrom(rec_sa, listening_sockets[0], 0, tmpbuf, &len))
                           != APR_SUCCESS){
                           ap_log_error(APLOG_MARK, APLOG_ERR, ret, NULL, 
                               "error getting data from UDP!!");
  @@ -483,12 +483,12 @@
       got_fd:
   
           if (!this_worker_should_exit) {
  -            rv = apr_accept(&csd, sd, ptrans);
  +            rv = apr_socket_accept(&csd, sd, ptrans);
   
               apr_thread_mutex_unlock(accept_mutex);
               if (rv != APR_SUCCESS) {
                   ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
  -                  "apr_accept");
  +                  "apr_socket_accept");
               } else {
                   process_socket(ptrans, csd, child_slot, bucket_alloc);
                   requests_this_child--;
  @@ -795,13 +795,13 @@
               "couldn't create control socket information, shutting down");
           return 1;
       }
  -    if (apr_socket_create(&udp_sock, udp_sa->family, SOCK_DGRAM,
  -                      _pconf) != APR_SUCCESS){
  +    if (apr_socket_create(&udp_sock, udp_sa->family, SOCK_DGRAM, 0,
  +                          _pconf) != APR_SUCCESS){
           ap_log_error(APLOG_MARK, APLOG_ALERT, errno, s,
               "couldn't create control socket, shutting down");
           return 1;
       }
  -    if (apr_bind(udp_sock, udp_sa) != APR_SUCCESS){
  +    if (apr_socket_bind(udp_sock, udp_sa) != APR_SUCCESS){
           ap_log_error(APLOG_MARK, APLOG_ALERT, errno, s,
               "couldn't bind UDP socket!");
           return 1;
  
  
  
  1.140     +1 -1      httpd-2.0/server/mpm/experimental/perchild/perchild.c
  
  Index: perchild.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/experimental/perchild/perchild.c,v
  retrieving revision 1.139
  retrieving revision 1.140
  diff -u -r1.139 -r1.140
  --- perchild.c	27 Aug 2003 22:33:11 -0000	1.139
  +++ perchild.c	3 Sep 2003 19:27:11 -0000	1.140
  @@ -605,7 +605,7 @@
           char pipe_read_char;
           apr_size_t n = 1;
   
  -        ret = apr_recv(lr->sd, &pipe_read_char, &n);
  +        ret = apr_socket_recv(lr->sd, &pipe_read_char, &n);
           if (APR_STATUS_IS_EAGAIN(ret)) {
               /* It lost the lottery. It must continue to suffer
                * through a life of servitude. */
  
  
  
  1.26      +1 -1      httpd-2.0/server/mpm/mpmt_os2/mpmt_os2.c
  
  Index: mpmt_os2.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/mpmt_os2/mpmt_os2.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- mpmt_os2.c	27 Aug 2003 22:33:11 -0000	1.25
  +++ mpmt_os2.c	3 Sep 2003 19:27:11 -0000	1.26
  @@ -182,7 +182,7 @@
               apr_sockaddr_info_get(&lr->bind_addr, "0.0.0.0", APR_UNSPEC,
                                     DEFAULT_HTTP_PORT, 0, s->process->pool);
               apr_socket_create(&lr->sd, lr->bind_addr->family,
  -                              SOCK_STREAM, s->process->pool);
  +                              SOCK_STREAM, 0, s->process->pool);
           }
   
           for (lr = ap_listeners; lr; lr = lr->next) {
  
  
  
  1.26      +3 -3      httpd-2.0/server/mpm/mpmt_os2/mpmt_os2_child.c
  
  Index: mpmt_os2_child.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/mpmt_os2/mpmt_os2_child.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- mpmt_os2_child.c	28 Aug 2003 05:54:44 -0000	1.25
  +++ mpmt_os2_child.c	3 Sep 2003 19:27:11 -0000	1.26
  @@ -239,7 +239,7 @@
           worker_args->pconn = pconn;
   
           if (num_listeners == 1) {
  -            rv = apr_accept(&worker_args->conn_sd, ap_listeners->sd, pconn);
  +            rv = apr_socket_accept(&worker_args->conn_sd, ap_listeners->sd, pconn);
           } else {
               rc = DosRequestMutexSem(ap_mpm_accept_mutex, SEM_INDEFINITE_WAIT);
   
  @@ -287,14 +287,14 @@
                   }
   
                   sd = lr->sd;
  -                rv = apr_accept(&worker_args->conn_sd, sd, pconn);
  +                rv = apr_socket_accept(&worker_args->conn_sd, sd, pconn);
               }
           }
   
           if (rv != APR_SUCCESS) {
               if (!APR_STATUS_IS_EINTR(rv)) {
                   ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
  -                             "apr_accept");
  +                             "apr_socket_accept");
                   clean_child_exit(APEXIT_CHILDFATAL);
               }
           } else {
  
  
  
  1.73      +3 -3      httpd-2.0/server/mpm/netware/mpm_netware.c
  
  Index: mpm_netware.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/netware/mpm_netware.c,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- mpm_netware.c	28 Aug 2003 05:54:44 -0000	1.72
  +++ mpm_netware.c	3 Sep 2003 19:27:11 -0000	1.73
  @@ -461,7 +461,7 @@
               wouldblock_retry = MAX_WB_RETRIES;
   
               while (wouldblock_retry) {
  -                if ((stat = apr_accept(&csd, sd, ptrans)) == APR_SUCCESS) {
  +                if ((stat = apr_socket_accept(&csd, sd, ptrans)) == APR_SUCCESS) {
                       break;
                   }
                   else {
  @@ -523,13 +523,13 @@
                           * occur in mobile IP.
                           */
                           ap_log_error(APLOG_MARK, APLOG_EMERG, stat, ap_server_conf,
  -                            "apr_accept: giving up.");
  +                            "apr_socket_accept: giving up.");
                           clean_child_exit(APEXIT_CHILDFATAL, my_worker_num, ptrans, 
                                            bucket_alloc);
                   }
                   else {
                           ap_log_error(APLOG_MARK, APLOG_ERR, stat, ap_server_conf,
  -                            "apr_accept: (client socket)");
  +                            "apr_socket_accept: (client socket)");
                           clean_child_exit(1, my_worker_num, ptrans, bucket_alloc);
                   }
               }
  
  
  
  1.301     +3 -3      httpd-2.0/server/mpm/winnt/mpm_winnt.c
  
  Index: mpm_winnt.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/mpm_winnt.c,v
  retrieving revision 1.300
  retrieving revision 1.301
  diff -u -r1.300 -r1.301
  --- mpm_winnt.c	27 Aug 2003 22:33:12 -0000	1.300
  +++ mpm_winnt.c	3 Sep 2003 19:27:11 -0000	1.301
  @@ -672,7 +672,7 @@
       char *cmd;
       char *cwd;
   
  -    apr_pool_sub_make(&ptemp, p, NULL);
  +    apr_pool_create_ex(&ptemp, p, NULL, NULL);
   
       /* Build the command line. Should look something like this:
        * C:/apache/bin/apache.exe -f ap_server_confname 
  @@ -1190,10 +1190,10 @@
       /* WARNING: There is an implict assumption here that the
        * executable resides in ServerRoot or ServerRoot\bin
        */
  -    def_server_root = (char *) apr_filename_of_pathname(binpath);
  +    def_server_root = (char *) apr_filepath_name_get(binpath);
       if (def_server_root > binpath) {
           *(def_server_root - 1) = '\0';
  -        def_server_root = (char *) apr_filename_of_pathname(binpath);
  +        def_server_root = (char *) apr_filepath_name_get(binpath);
           if (!strcasecmp(def_server_root, "bin"))
               *(def_server_root - 1) = '\0';
       }
  
  
  
  1.6       +1 -1      httpd-2.0/server/mpm/winnt/nt_eventlog.c
  
  Index: nt_eventlog.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/nt_eventlog.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- nt_eventlog.c	3 Feb 2003 17:53:25 -0000	1.5
  +++ nt_eventlog.c	3 Sep 2003 19:27:11 -0000	1.6
  @@ -81,7 +81,7 @@
       apr_status_t rv;
       apr_pool_t *p;
       
  -    apr_pool_sub_make(&p, NULL, NULL);
  +    apr_pool_create_ex(&p, NULL, NULL, NULL);
   
       errarg[0] = "The Apache service named";
       errarg[1] = display_name;
  
  
  
  1.10      +2 -2      httpd-2.0/server/mpm/worker/pod.c
  
  Index: pod.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/worker/pod.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- pod.c	10 Jul 2003 20:11:15 -0000	1.9
  +++ pod.c	3 Sep 2003 19:27:12 -0000	1.10
  @@ -77,8 +77,8 @@
       (*pod)->p = p;
       
       /* close these before exec. */
  -    apr_file_unset_inherit((*pod)->pod_in);
  -    apr_file_unset_inherit((*pod)->pod_out);
  +    apr_file_inherit_unset((*pod)->pod_in);
  +    apr_file_inherit_unset((*pod)->pod_out);
   
       return APR_SUCCESS;
   }
  
  
  
  1.131     +13 -13    httpd-2.0/support/ab.c
  
  Index: ab.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/support/ab.c,v
  retrieving revision 1.130
  retrieving revision 1.131
  diff -u -r1.130 -r1.131
  --- ab.c	1 Aug 2003 10:41:46 -0000	1.130
  +++ ab.c	3 Sep 2003 19:27:12 -0000	1.131
  @@ -103,9 +103,9 @@
      ** Version 2.0.36-dev
      **    Improvements to concurrent processing:
      **      - Enabled non-blocking connect()s.
  -   **      - Prevent blocking calls to apr_recv() (thereby allowing AB to
  +   **      - Prevent blocking calls to apr_socket_recv() (thereby allowing AB to
      **        manage its entire set of socket descriptors).
  -   **      - Any error returned from apr_recv() that is not EAGAIN or EOF
  +   **      - Any error returned from apr_socket_recv() that is not EAGAIN or EOF
      **        is now treated as fatal.
      **      Contributed by Aaron Bannert, April 24, 2002
      **
  @@ -775,7 +775,7 @@
           }
           else
   #endif
  -	e = apr_send(c->aprsock, request + c->rwrote, &l);
  +	e = apr_socket_send(c->aprsock, request + c->rwrote, &l);
   
   	/*
   	 * Bail early on the most common case
  @@ -1257,7 +1257,7 @@
       apr_pool_create(&c->ctx, cntxt);
   
       if ((rv = apr_socket_create(&c->aprsock, destsa->family,
  -				SOCK_STREAM, c->ctx)) != APR_SUCCESS) {
  +				SOCK_STREAM, 0, c->ctx)) != APR_SUCCESS) {
   	apr_err("socket", rv);
       }
       if ((rv = apr_socket_opt_set(c->aprsock, APR_SO_NONBLOCK, 1))
  @@ -1265,7 +1265,7 @@
           apr_err("socket nonblock", rv);
       }
       c->start = apr_time_now();
  -    if ((rv = apr_connect(c->aprsock, destsa)) != APR_SUCCESS) {
  +    if ((rv = apr_socket_connect(c->aprsock, destsa)) != APR_SUCCESS) {
   	if (APR_STATUS_IS_EINPROGRESS(rv)) {
               apr_pollfd_t new_pollfd;
   	    c->state = STATE_CONNECTING;
  @@ -1287,7 +1287,7 @@
   	    if (bad++ > 10) {
   		fprintf(stderr,
   			"\nTest aborted after 10 failures\n\n");
  -		apr_err("apr_connect()", rv);
  +		apr_err("apr_socket_connect()", rv);
   	    }
   	    c->state = STATE_UNCONNECTED;
   	    start_connect(c);
  @@ -1387,7 +1387,7 @@
       }
       else {
   #endif
  -    status = apr_recv(c->aprsock, buffer, &r);
  +    status = apr_socket_recv(c->aprsock, buffer, &r);
       if (APR_STATUS_IS_EAGAIN(status))
   	return;
       else if (r == 0 && APR_STATUS_IS_EOF(status)) {
  @@ -1395,12 +1395,12 @@
   	close_connection(c);
   	return;
       }
  -    /* catch legitimate fatal apr_recv errors */
  +    /* catch legitimate fatal apr_socket_recv errors */
       else if (status != APR_SUCCESS) {
           err_except++; /* XXX: is this the right error counter? */
           /* XXX: Should errors here be fatal, or should we allow a
            * certain number of them before completely failing? -aaron */
  -        apr_err("apr_recv", status);
  +        apr_err("apr_socket_recv", status);
       }
   #ifdef USE_SSL
       }
  @@ -1758,7 +1758,7 @@
   	    if (rv & APR_POLLOUT) {
                   if (c->state == STATE_CONNECTING) {
                       apr_pollfd_t remove_pollfd;
  -                    rv = apr_connect(c->aprsock, destsa);
  +                    rv = apr_socket_connect(c->aprsock, destsa);
                       remove_pollfd.desc_type = APR_POLL_SOCKET;
                       remove_pollfd.desc.s = c->aprsock;
                       apr_pollset_remove(readbits, &remove_pollfd);
  @@ -1768,7 +1768,7 @@
                           if (bad++ > 10) {
                               fprintf(stderr,
                                       "\nTest aborted after 10 failures\n\n");
  -                            apr_err("apr_connect()", rv);
  +                            apr_err("apr_socket_connect()", rv);
                           }
                           c->state = STATE_UNCONNECTED;
                           start_connect(c);
  
  
  

Mime
View raw message