httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1325871 - /httpd/mod_mbox/branches/convert-charsets/module-2.0/mod_mbox_cte.c
Date Fri, 13 Apr 2012 17:55:21 GMT
Author: sf
Date: Fri Apr 13 17:55:21 2012
New Revision: 1325871

URL: http://svn.apache.org/viewvc?rev=1325871&view=rev
Log:
more logging, remove assertion that should not be fatal

Modified:
    httpd/mod_mbox/branches/convert-charsets/module-2.0/mod_mbox_cte.c

Modified: httpd/mod_mbox/branches/convert-charsets/module-2.0/mod_mbox_cte.c
URL: http://svn.apache.org/viewvc/httpd/mod_mbox/branches/convert-charsets/module-2.0/mod_mbox_cte.c?rev=1325871&r1=1325870&r2=1325871&view=diff
==============================================================================
--- httpd/mod_mbox/branches/convert-charsets/module-2.0/mod_mbox_cte.c (original)
+++ httpd/mod_mbox/branches/convert-charsets/module-2.0/mod_mbox_cte.c Fri Apr 13 17:55:21
2012
@@ -251,14 +251,19 @@ apr_status_t mbox_cte_convert_to_utf8(ap
                                       struct ap_varbuf *vb)
 {
     apr_xlate_t *convset;
-    apr_status_t rv = apr_xlate_open(&convset, "UTF-8", charset, p);
+    apr_status_t rv;
     apr_size_t outbytes_left, inbytes_left = len;
     char *dst;
+    if (len <= 0)
+        return APR_SUCCESS;
+    rv = apr_xlate_open(&convset, "UTF-8", charset, p);
     if (rv != APR_SUCCESS) {
-        ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf, "could not open convset %s",
charset);
+        ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
+                     "could not open convset '%s'", charset);
         return rv;
     }
-    ap_assert(len > 0);
+    ap_log_error(APLOG_MARK, APLOG_TRACE6, rv, ap_server_conf,
+                 "using convset %s", charset);
 
     while (inbytes_left > 0) {
         ap_varbuf_grow(vb, vb->strlen + inbytes_left + 8);



Mime
View raw message