]> source.dussan.org Git - rspamd.git/commitdiff
* Allways set some protocol version even if command is not valid
authorcebka@lenovo-laptop <cebka@lenovo-laptop>
Mon, 15 Feb 2010 14:19:23 +0000 (17:19 +0300)
committercebka@lenovo-laptop <cebka@lenovo-laptop>
Mon, 15 Feb 2010 14:19:23 +0000 (17:19 +0300)
src/protocol.c

index feb57736800a0f77fead6ec2a2a11d0ad5f6b180..134820cabd3b7a810286dcb86581f2f01a1dbf0a 100644 (file)
@@ -125,6 +125,8 @@ parse_command (struct worker_task *task, f_str_t * line)
                return -1;
        }
 
+       task->proto_ver = RSPAMC_PROTO_1_1;
+
        switch (token[0]) {
        case 'c':
        case 'C':
@@ -211,7 +213,6 @@ parse_command (struct worker_task *task, f_str_t * line)
        }
        else if (strncasecmp (line->begin, SPAMC_GREETING, sizeof (SPAMC_GREETING) - 1) == 0) {
                task->proto = SPAMC_PROTO;
-               task->proto_ver = RSPAMC_PROTO_1_1;
        }
        else {
                return -1;