httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject svn commit: r349906 - /httpd/httpd/trunk/modules/ssl/ssl_engine_io.c
Date Wed, 30 Nov 2005 08:01:39 GMT
Author: martin
Date: Wed Nov 30 00:01:35 2005
New Revision: 349906

URL: http://svn.apache.org/viewcvs?rev=349906&view=rev
Log:
Fix SSL Protocol hexdumps for EBCDIC systems

Modified:
    httpd/httpd/trunk/modules/ssl/ssl_engine_io.c

Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_io.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/ssl/ssl_engine_io.c?rev=349906&r1=349905&r2=349906&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_io.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_io.c Wed Nov 30 00:01:35 2005
@@ -1722,6 +1722,16 @@
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, srvr,
             "+-------------------------------------------------------------------------+");
     for(i = 0 ; i< rows; i++) {
+#if APR_CHARSET_EBCDIC
+        char ebcdic_text[DUMP_WIDTH];
+        j = DUMP_WIDTH;
+        if ((i * DUMP_WIDTH + j) > len)
+            j = len % DUMP_WIDTH;
+        if (j == 0)
+            j = DUMP_WIDTH;
+        memcpy(ebcdic_text,(char *)(s) + i * DUMP_WIDTH, j);
+        ap_xlate_proto_from_ascii(ebcdic_text, j);
+#endif /* APR_CHARSET_EBCDIC */
         apr_snprintf(tmp, sizeof(tmp), "| %04x: ", i * DUMP_WIDTH);
         apr_cpystrn(buf, tmp, sizeof(buf));
         for (j = 0; j < DUMP_WIDTH; j++) {
@@ -1739,7 +1749,11 @@
                 apr_cpystrn(buf+strlen(buf), " ", sizeof(buf)-strlen(buf));
             else {
                 ch = ((unsigned char)*((char *)(s) + i * DUMP_WIDTH + j)) & 0xff;
+#if APR_CHARSET_EBCDIC
+                apr_snprintf(tmp, sizeof(tmp), "%c", (ch >= 0x20 && ch <= 0x7F)
? ebcdic_text[j] : '.');
+#else /* APR_CHARSET_EBCDIC */
                 apr_snprintf(tmp, sizeof(tmp), "%c", ((ch >= ' ') && (ch <=
'~')) ? ch : '.');
+#endif /* APR_CHARSET_EBCDIC */
                 apr_cpystrn(buf+strlen(buf), tmp, sizeof(buf)-strlen(buf));
             }
         }



Mime
View raw message