diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-19 13:06:49 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-19 13:06:49 +0000 |
commit | 2287a9092a9300cc56a05a9e83771e0bf05dc064 (patch) | |
tree | 7408f8d9e2b5e9d01806e1347f1bb0f38918ab7a /src/lua | |
parent | 970a8f6bf3b0f0b601567483c29f91af72d99008 (diff) | |
download | rspamd-2287a9092a9300cc56a05a9e83771e0bf05dc064.tar.gz rspamd-2287a9092a9300cc56a05a9e83771e0bf05dc064.zip |
Use flags for urls
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/lua_url.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lua/lua_url.c b/src/lua/lua_url.c index 3e74ceadc..8a9c90216 100644 --- a/src/lua/lua_url.c +++ b/src/lua/lua_url.c @@ -261,7 +261,7 @@ lua_url_is_phished (lua_State *L) struct rspamd_lua_url *url = lua_check_url (L, 1); if (url != NULL) { - lua_pushboolean (L, url->url->is_phished); + lua_pushboolean (L, url->url->flags & RSPAMD_URL_FLAG_PHISHED); } else { lua_pushnil (L); @@ -281,7 +281,8 @@ lua_url_get_phished (lua_State *L) struct rspamd_lua_url *purl, *url = lua_check_url (L, 1); if (url) { - if (url->url->is_phished && url->url->phished_url != NULL) { + if ((url->url->flags & RSPAMD_URL_FLAG_PHISHED) + && url->url->phished_url != NULL) { purl = lua_newuserdata (L, sizeof (struct rspamd_lua_url)); rspamd_lua_setclass (L, "rspamd{url}", -1); purl->url = url->url->phished_url; @@ -476,7 +477,7 @@ lua_url_all (lua_State *L) pos = text; end = text + length; lua_newtable (L); - + while (pos <= end) { url = rspamd_url_get_next (pool, text, &pos, NULL); |