diff options
author | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2000-08-04 12:51:23 +0000 |
---|---|---|
committer | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2000-08-04 12:51:23 +0000 |
commit | 60236214372ff1c1c58f14bcf1d3c9f1ace68dcc (patch) | |
tree | 131949d1a55414c046878724a74183173b901281 | |
parent | 040364877ab992422ea39c7d2835959f5f89e8e6 (diff) | |
download | libapr-60236214372ff1c1c58f14bcf1d3c9f1ace68dcc.tar.gz |
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.)
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@60475 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | include/apr_network_io.h | 8 | ||||
-rw-r--r-- | test/testsf.c | 22 |
2 files changed, 15 insertions, 15 deletions
diff --git a/include/apr_network_io.h b/include/apr_network_io.h index ad0b3087d..c41922746 100644 --- a/include/apr_network_io.h +++ b/include/apr_network_io.h @@ -128,10 +128,10 @@ typedef struct apr_hdtr_t apr_hdtr_t; 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 @@ apr_status_t apr_sendv(apr_socket_t *sock, const struct iovec *vec, * 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 /** diff --git a/test/testsf.c b/test/testsf.c index b0f26e7f5..8d2f8a5d3 100644 --- a/test/testsf.c +++ b/test/testsf.c @@ -283,25 +283,25 @@ static int client(client_socket_mode_t socket_mode) 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 @@ static int client(client_socket_mode_t socket_mode) 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 @@ static int client(client_socket_mode_t socket_mode) 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 @@ static int client(client_socket_mode_t socket_mode) 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 @@ static int client(client_socket_mode_t socket_mode) 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 @@ static int server(void) exit(1); } - printf("server: ap_sendfile() worked as expected!\n"); + printf("server: apr_sendfile() worked as expected!\n"); return 0; } |