]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Remove unused legacy functions
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 11 Oct 2021 10:38:20 +0000 (11:38 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 11 Oct 2021 10:38:20 +0000 (11:38 +0100)
src/libserver/cfg_file.h
src/libserver/cfg_utils.c

index 2aad328f70b3177a93e70ea334b28e41683e517b..e1bc9cfac93523734cdda33fe59520fef816007b 100644 (file)
@@ -583,25 +583,6 @@ enum rspamd_post_load_options {
 gboolean rspamd_config_post_load (struct rspamd_config *cfg,
                                                                  enum rspamd_post_load_options opts);
 
-/**
- * Calculate checksum for config file
- * @param cfg config file
- */
-gboolean rspamd_config_calculate_checksum (struct rspamd_config *cfg);
-
-
-/**
- * Replace all \" with a single " in given string
- * @param line input string
- */
-void rspamd_config_unescape_quotes (gchar *line);
-
-/*
- * Convert comma separated string to a list of strings
- */
-GList *rspamd_config_parse_comma_list (rspamd_mempool_t *pool,
-                                                                          const gchar *line);
-
 /*
  * Return a new classifier_config structure, setting default and non-conflicting attributes
  */
index 98b47efdc573100e2678bb1bbb6dbbeec5454ef0..7a9f9cd53dc1e88611a08894a371e9ae390e2338 100644 (file)
@@ -945,98 +945,6 @@ rspamd_config_post_load (struct rspamd_config *cfg,
        return ret;
 }
 
-#if 0
-void
-parse_err (const gchar *fmt, ...)
-{
-       va_list aq;
-       gchar logbuf[BUFSIZ], readbuf[32];
-       gint r;
-
-       va_start (aq, fmt);
-       rspamd_strlcpy (readbuf, yytext, sizeof (readbuf));
-
-       r = snprintf (logbuf,
-                       sizeof (logbuf),
-                       "config file parse error! line: %d, text: %s, reason: ",
-                       yylineno,
-                       readbuf);
-       r += vsnprintf (logbuf + r, sizeof (logbuf) - r, fmt, aq);
-
-       va_end (aq);
-       g_critical ("%s", logbuf);
-}
-
-void
-parse_warn (const gchar *fmt, ...)
-{
-       va_list aq;
-       gchar logbuf[BUFSIZ], readbuf[32];
-       gint r;
-
-       va_start (aq, fmt);
-       rspamd_strlcpy (readbuf, yytext, sizeof (readbuf));
-
-       r = snprintf (logbuf,
-                       sizeof (logbuf),
-                       "config file parse warning! line: %d, text: %s, reason: ",
-                       yylineno,
-                       readbuf);
-       r += vsnprintf (logbuf + r, sizeof (logbuf) - r, fmt, aq);
-
-       va_end (aq);
-       g_warning ("%s", logbuf);
-}
-#endif
-
-void
-rspamd_config_unescape_quotes (gchar *line)
-{
-       gchar *c = line, *t;
-
-       while (*c) {
-               if (*c == '\\' && *(c + 1) == '"') {
-                       t = c;
-                       while (*t) {
-                               *t = *(t + 1);
-                               t++;
-                       }
-               }
-               c++;
-       }
-}
-
-GList *
-rspamd_config_parse_comma_list (rspamd_mempool_t * pool, const gchar *line)
-{
-       GList *res = NULL;
-       const gchar *c, *p;
-       gchar *str;
-
-       c = line;
-       p = c;
-
-       while (*p) {
-               if (*p == ',' && *c != *p) {
-                       str = rspamd_mempool_alloc (pool, p - c + 1);
-                       rspamd_strlcpy (str, c, p - c + 1);
-                       res = g_list_prepend (res, str);
-                       /* Skip spaces */
-                       while (g_ascii_isspace (*(++p))) ;
-                       c = p;
-                       continue;
-               }
-               p++;
-       }
-       if (res != NULL) {
-               rspamd_mempool_add_destructor (pool,
-                       (rspamd_mempool_destruct_t) g_list_free,
-                       res);
-       }
-
-       return res;
-}
-
 struct rspamd_classifier_config *
 rspamd_config_new_classifier (struct rspamd_config *cfg,
        struct rspamd_classifier_config *c)