Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 83368 invoked by uid 500); 4 Aug 2000 12:51:33 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk X-No-Archive: yes Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 83347 invoked by uid 500); 4 Aug 2000 12:51:30 -0000 Delivered-To: apmail-apache-2.0-cvs@apache.org Date: 4 Aug 2000 12:51:27 -0000 Message-ID: <20000804125127.83319.qmail@locus.apache.org> From: trawick@locus.apache.org To: apache-2.0-cvs@apache.org Subject: cvs commit: apache-2.0/src/lib/apr/test testsf.c trawick 00/08/04 05:51:25 Modified: src/lib/apr/include apr_network_io.h src/lib/apr/test testsf.c Log: Finish converting "ap_sendfile" to "apr_sendfile". (Now if I could just get my cron-driven build tester to place a phone call to anybody who committed anything in the two-hour window since the previous clean build... nah... I could lose my job for that.) Revision Changes Path 1.50 +4 -4 apache-2.0/src/lib/apr/include/apr_network_io.h Index: apr_network_io.h =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_network_io.h,v retrieving revision 1.49 retrieving revision 1.50 diff -u -r1.49 -r1.50 --- apr_network_io.h 2000/08/02 05:26:06 1.49 +++ apr_network_io.h 2000/08/04 12:51:19 1.50 @@ -128,10 +128,10 @@ typedef struct in_addr apr_in_addr; #if APR_HAS_SENDFILE -/* Define flags passed in on ap_sendfile() */ +/* Define flags passed in on apr_sendfile() */ #define APR_SENDFILE_DISCONNECT_SOCKET 1 -/* A structure to encapsulate headers and trailers for ap_sendfile */ +/* A structure to encapsulate headers and trailers for apr_sendfile */ struct apr_hdtr_t { struct iovec* headers; int numheaders; @@ -293,8 +293,8 @@ * this behavior, use apr_setsocketopt with the APR_SO_TIMEOUT option. * The number of bytes actually sent is stored in argument 5. */ -apr_status_t ap_sendfile(apr_socket_t *sock, apr_file_t *file, apr_hdtr_t *hdtr, - apr_off_t *offset, apr_size_t *len, apr_int32_t flags); +apr_status_t apr_sendfile(apr_socket_t *sock, apr_file_t *file, apr_hdtr_t *hdtr, + apr_off_t *offset, apr_size_t *len, apr_int32_t flags); #endif /** 1.6 +11 -11 apache-2.0/src/lib/apr/test/testsf.c Index: testsf.c =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/test/testsf.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- testsf.c 2000/08/02 05:26:37 1.5 +++ testsf.c 2000/08/04 12:51:23 1.6 @@ -283,25 +283,25 @@ if (socket_mode == BLK || socket_mode == TIMEOUT) { current_file_offset = 0; len = FILE_LENGTH; - rv = ap_sendfile(sock, f, &hdtr, ¤t_file_offset, &len, 0); + rv = apr_sendfile(sock, f, &hdtr, ¤t_file_offset, &len, 0); if (rv != APR_SUCCESS) { - fprintf(stderr, "ap_sendfile()->%d/%s\n", + fprintf(stderr, "apr_sendfile()->%d/%s\n", rv, apr_strerror(rv, buf, sizeof buf)); exit(1); } - printf("ap_sendfile() updated offset with %ld\n", + printf("apr_sendfile() updated offset with %ld\n", (long int)current_file_offset); - printf("ap_sendfile() updated len with %ld\n", + printf("apr_sendfile() updated len with %ld\n", (long int)len); printf("bytes really sent: %d\n", expected_len); if (len != expected_len) { - fprintf(stderr, "ap_sendfile() didn't report the correct " + fprintf(stderr, "apr_sendfile() didn't report the correct " "number of bytes sent!\n"); exit(1); } @@ -323,7 +323,7 @@ apr_size_t tmplen; tmplen = len; /* bytes remaining to send from the file */ - printf("Calling ap_sendfile()...\n"); + printf("Calling apr_sendfile()...\n"); printf("Headers:\n"); for (i = 0; i < hdtr.numheaders; i++) { printf("\t%d bytes\n", @@ -337,8 +337,8 @@ hdtr.trailers[i].iov_len); } - rv = ap_sendfile(sock, f, &hdtr, ¤t_file_offset, &tmplen, 0); - printf("ap_sendfile()->%d, sent %ld bytes\n", rv, (long)tmplen); + rv = apr_sendfile(sock, f, &hdtr, ¤t_file_offset, &tmplen, 0); + printf("apr_sendfile()->%d, sent %ld bytes\n", rv, (long)tmplen); if (rv) { if (apr_canonical_error(rv) == APR_EAGAIN) { nsocks = 1; @@ -430,7 +430,7 @@ exit(1); } - printf("After ap_sendfile(), the kernel file pointer is " + printf("After apr_sendfile(), the kernel file pointer is " "at offset %ld.\n", (long int)current_file_offset); @@ -457,7 +457,7 @@ exit(1); } - printf("client: ap_sendfile() worked as expected!\n"); + printf("client: apr_sendfile() worked as expected!\n"); rv = apr_remove_file(TESTFILE, p); if (rv != APR_SUCCESS) { @@ -696,7 +696,7 @@ exit(1); } - printf("server: ap_sendfile() worked as expected!\n"); + printf("server: apr_sendfile() worked as expected!\n"); return 0; }