]> source.dussan.org Git - rspamd.git/commitdiff
Fix some upstream issues.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 2 Nov 2014 18:55:24 +0000 (18:55 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 2 Nov 2014 18:55:24 +0000 (18:55 +0000)
src/libutil/upstream.c

index 67dcc83e4c5f59ae6ddad28984b08b745f75de6d..b18e2585fbcdacb3ec0254b785e0fcbf4adf79da 100644 (file)
@@ -368,9 +368,9 @@ rspamd_upstreams_parse_line (struct upstream_list *ups,
                                ret = TRUE;
                        }
                }
-               p += len + 1;
+               p += len;
                /* Skip separators */
-               p += strspn (p, separators) + 1;
+               p += strspn (p, separators);
        }
 
        return ret;
@@ -451,7 +451,7 @@ static struct upstream*
 rspamd_upstream_get_round_robin (struct upstream_list *ups, gboolean use_cur)
 {
        guint max_weight = 0;
-       struct upstream *up, *selected;
+       struct upstream *up, *selected = NULL;
        guint i;
 
        /* Select upstream with the maximum cur_weight */