diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-02-16 14:42:11 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-02-16 14:42:11 +0000 |
commit | ba63e160b52fa55478968c97053b9651f7d571c8 (patch) | |
tree | 39fe6b713298b59acdda5eefb5e8daf119f2f71b /src/lua/lua_url.c | |
parent | 1f3935d436bd9ec73268302ec5b723c4700e7261 (diff) | |
download | rspamd-ba63e160b52fa55478968c97053b9651f7d571c8.tar.gz rspamd-ba63e160b52fa55478968c97053b9651f7d571c8.zip |
[Minor] Fix getting of emails
Diffstat (limited to 'src/lua/lua_url.c')
-rw-r--r-- | src/lua/lua_url.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/lua/lua_url.c b/src/lua/lua_url.c index 69a12e028..0a301e96d 100644 --- a/src/lua/lua_url.c +++ b/src/lua/lua_url.c @@ -720,28 +720,7 @@ lua_url_to_table (lua_State *L) lua_pushstring (L, "protocol"); - - switch (u->protocol) { - case PROTOCOL_FILE: - lua_pushstring (L, "file"); - break; - case PROTOCOL_FTP: - lua_pushstring (L, "ftp"); - break; - case PROTOCOL_HTTP: - lua_pushstring (L, "http"); - break; - case PROTOCOL_HTTPS: - lua_pushstring (L, "https"); - break; - case PROTOCOL_MAILTO: - lua_pushstring (L, "mailto"); - break; - case PROTOCOL_UNKNOWN: - default: - lua_pushstring (L, "unknown"); - break; - } + lua_pushstring (L, rspamd_url_protocol_name (u->protocol)); lua_settable (L, -3); } else { |