aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-09-20 22:25:00 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-09-20 22:25:00 +0100
commite8b03a8f21b170a26a0d3451265fd326d8c85501 (patch)
tree7aafed1287f77c8ca320f19e3147473b8668c07d
parent784c86611d3194a10ccc24cf11fe7da606387ad5 (diff)
downloadrspamd-e8b03a8f21b170a26a0d3451265fd326d8c85501.tar.gz
rspamd-e8b03a8f21b170a26a0d3451265fd326d8c85501.zip
Push base32 encoded fuzzy.
-rw-r--r--src/lua/lua_task.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c
index 3d1495674..127e6af4a 100644
--- a/src/lua/lua_task.c
+++ b/src/lua/lua_task.c
@@ -1898,14 +1898,18 @@ static gint
lua_textpart_get_fuzzy (lua_State * L)
{
struct mime_text_part *part = lua_check_textpart (L);
+ gchar *out;
if (part == NULL || part->is_empty) {
lua_pushnil (L);
return 1;
}
- lua_pushlstring (L, part->fuzzy->hash_pipe,
- sizeof (part->fuzzy->hash_pipe));
+ out = rspamd_encode_base32 (part->fuzzy->hash_pipe,
+ strlen (part->fuzzy->hash_pipe));
+ lua_pushstring (L, out);
+ g_free (out);
+
return 1;
}