summaryrefslogtreecommitdiffstats
path: root/server/rfc1413.c
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2000-10-26 12:48:28 +0200
committerJeff Trawick <trawick@apache.org>2000-10-26 12:48:28 +0200
commit6217bc8f88fe0a734478a70b872fa5bb062dd559 (patch)
tree3df3d2866a7d6406244389ce4a36dacd99a7bcb4 /server/rfc1413.c
parentGet rid of the xlate version of ap_md5_digest() (diff)
downloadapache2-6217bc8f88fe0a734478a70b872fa5bb062dd559.tar.xz
apache2-6217bc8f88fe0a734478a70b872fa5bb062dd559.zip
Introduce ap_xlate_proto_{to|from}_ascii() to clean up some of
the EBCDIC support. They are noops on ASCII machines, so this type of translation doesn't have to be surrounded by #ifdef CHARSET_EBCDIC. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86751 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/rfc1413.c')
-rw-r--r--server/rfc1413.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/server/rfc1413.c b/server/rfc1413.c
index 7a8cc102f6..500553334c 100644
--- a/server/rfc1413.c
+++ b/server/rfc1413.c
@@ -119,9 +119,6 @@ static int get_rfc1413(apr_socket_t *sock, const char *local_ip,
char *cp;
char buffer[RFC1413_MAXDATA + 1];
int buflen;
-#ifdef CHARSET_EBCDIC
- apr_size_t inbytes_left, outbytes_left;
-#endif
/*
* Bind the local and remote ends of the query socket to the same
@@ -156,11 +153,7 @@ static int get_rfc1413(apr_socket_t *sock, const char *local_ip,
/* send the data */
buflen = apr_snprintf(buffer, sizeof(buffer), "%u,%u\r\n", sav_rmt_port,
sav_our_port);
-#ifdef CHARSET_EBCDIC
- inbytes_left = outbytes_left = buflen;
- apr_xlate_conv_buffer(ap_hdrs_to_ascii, buffer, &inbytes_left,
- buffer, &outbytes_left);
-#endif
+ ap_xlate_proto_to_ascii(buffer, buflen);
/* send query to server. Handle short write. */
i = 0;
@@ -180,7 +173,7 @@ static int get_rfc1413(apr_socket_t *sock, const char *local_ip,
/*
* Read response from server. - the response should be newline
- * terminated according to rfc - make sure it doesn't stomp it's
+ * terminated according to rfc - make sure it doesn't stomp its
* way out of the buffer.
*/
@@ -209,11 +202,7 @@ static int get_rfc1413(apr_socket_t *sock, const char *local_ip,
}
/* RFC1413_USERLEN = 512 */
-#ifdef CHARSET_EBCDIC
- inbytes_left = outbytes_left = i;
- apr_xlate_conv_buffer(ap_hdrs_from_ascii, buffer, &inbytes_left,
- buffer, &outbytes_left);
-#endif
+ ap_xlate_proto_from_ascii(buffer, i);
if (sscanf(buffer, "%u , %u : USERID :%*[^:]:%512s", &rmt_port, &our_port,
user) != 3 || sav_rmt_port != rmt_port
|| sav_our_port != our_port)