From: Vsevolod Stakhov Date: Wed, 30 Apr 2014 22:44:29 +0000 (-0700) Subject: Handle 'weight' and 'flag' for fuzzy commands. X-Git-Tag: 0.7.0~245 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f092c8362833d87d43e35cfdcdb164b17ab7e629;p=thirdparty%2Frspamd.git Handle 'weight' and 'flag' for fuzzy commands. --- diff --git a/src/client/rspamc.c b/src/client/rspamc.c index 6093161dba..419b3c6fbd 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