summaryrefslogtreecommitdiffstats
path: root/src/libmime/mime_encoding.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-05-15 21:22:37 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-05-15 21:22:37 +0100
commit2125dc455412385a2fd3d2fa9fdd7c0e08454b74 (patch)
tree116031dc9986a1bb016729efc55faeb1c79f874a /src/libmime/mime_encoding.c
parenta59e81ca90c986725107c8c013ccf33a91b07d45 (diff)
downloadrspamd-2125dc455412385a2fd3d2fa9fdd7c0e08454b74.tar.gz
rspamd-2125dc455412385a2fd3d2fa9fdd7c0e08454b74.zip
[Minor] Remove legacy iconv stuff
Diffstat (limited to 'src/libmime/mime_encoding.c')
-rw-r--r--src/libmime/mime_encoding.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libmime/mime_encoding.c b/src/libmime/mime_encoding.c
index 3f79465e4..edbee1a30 100644
--- a/src/libmime/mime_encoding.c
+++ b/src/libmime/mime_encoding.c
@@ -82,9 +82,9 @@ struct rspamd_charset_converter {
};
static GQuark
-rspamd_iconv_error_quark (void)
+rspamd_charset_conv_error_quark (void)
{
- return g_quark_from_static_string ("iconv error");
+ return g_quark_from_static_string ("charset conversion error");
}
static void
@@ -354,7 +354,7 @@ rspamd_mime_text_to_utf8 (rspamd_mempool_t *pool,
utf8_converter = rspamd_get_utf8_converter ();
if (conv == NULL) {
- g_set_error (err, rspamd_iconv_error_quark (), EINVAL,
+ g_set_error (err, rspamd_charset_conv_error_quark(), EINVAL,
"cannot open converter for %s: %s",
in_enc, u_errorName (uc_err));
@@ -366,7 +366,7 @@ rspamd_mime_text_to_utf8 (rspamd_mempool_t *pool,
r = rspamd_converter_to_uchars (conv, tmp_buf, len + 1, input, len, &uc_err);
if (!U_SUCCESS (uc_err)) {
- g_set_error (err, rspamd_iconv_error_quark (), EINVAL,
+ g_set_error (err, rspamd_charset_conv_error_quark(), EINVAL,
"cannot convert data to unicode from %s: %s",
in_enc, u_errorName (uc_err));
g_free (tmp_buf);
@@ -381,7 +381,7 @@ rspamd_mime_text_to_utf8 (rspamd_mempool_t *pool,
r = ucnv_fromUChars (utf8_converter, d, dlen, tmp_buf, r, &uc_err);
if (!U_SUCCESS (uc_err)) {
- g_set_error (err, rspamd_iconv_error_quark (), EINVAL,
+ g_set_error (err, rspamd_charset_conv_error_quark(), EINVAL,
"cannot convert data from unicode from %s: %s",
in_enc, u_errorName (uc_err));
g_free (tmp_buf);
@@ -419,7 +419,7 @@ rspamd_mime_text_part_utf8_convert (struct rspamd_task *task,
utf8_converter = rspamd_get_utf8_converter ();
if (conv == NULL) {
- g_set_error (err, rspamd_iconv_error_quark (), EINVAL,
+ g_set_error (err, rspamd_charset_conv_error_quark(), EINVAL,
"cannot open converter for %s: %s",
charset, u_errorName (uc_err));
@@ -436,7 +436,7 @@ rspamd_mime_text_part_utf8_convert (struct rspamd_task *task,
&uc_err);
if (!U_SUCCESS (uc_err)) {
- g_set_error (err, rspamd_iconv_error_quark (), EINVAL,
+ g_set_error (err, rspamd_charset_conv_error_quark(), EINVAL,
"cannot convert data to unicode from %s: %s",
charset, u_errorName (uc_err));
g_free (tmp_buf);
@@ -452,7 +452,7 @@ rspamd_mime_text_part_utf8_convert (struct rspamd_task *task,
tmp_buf, uc_len, &uc_err);
if (!U_SUCCESS (uc_err)) {
- g_set_error (err, rspamd_iconv_error_quark (), EINVAL,
+ g_set_error (err, rspamd_charset_conv_error_quark(), EINVAL,
"cannot convert data from unicode from %s: %s",
charset, u_errorName (uc_err));
g_free (tmp_buf);