diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-04-30 15:44:29 -0700 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-04-30 15:44:29 -0700 |
commit | f092c8362833d87d43e35cfdcdb164b17ab7e629 (patch) | |
tree | 77ebfe1836111393a8d1499c507687ded0f497ef | |
parent | 1d5515412fa359e98e9a92350004abffda183909 (diff) | |
download | rspamd-f092c8362833d87d43e35cfdcdb164b17ab7e629.tar.gz rspamd-f092c8362833d87d43e35cfdcdb164b17ab7e629.zip |
Handle 'weight' and 'flag' for fuzzy commands.
-rw-r--r-- | src/client/rspamc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/client/rspamc.c b/src/client/rspamc.c index 6093161db..419b3c6fb 100644 --- a/src/client/rspamc.c +++ b/src/client/rspamc.c @@ -327,6 +327,8 @@ print_commands_list (void) static void add_options (GHashTable *opts) { + GString *numbuf; + if (ip != NULL) { g_hash_table_insert (opts, "Ip", ip); } @@ -354,6 +356,16 @@ add_options (GHashTable *opts) if (pass_all) { g_hash_table_insert (opts, "Pass", "all"); } + if (weight != 0) { + numbuf = g_string_sized_new (8); + rspamd_printf_gstring (numbuf, "%d", weight); + g_hash_table_insert (opts, "Weight", numbuf->str); + } + if (flag != 0) { + numbuf = g_string_sized_new (8); + rspamd_printf_gstring (numbuf, "%d", flag); + g_hash_table_insert (opts, "Flag", numbuf->str); + } } static void |