diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-24 18:38:11 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-03-24 18:38:11 +0300 |
commit | 5dbf570b7df0e7c9770432884f95c14b193b5b30 (patch) | |
tree | 547448e51751b47179c46b19b9d26f2991642b30 /src/lmtp_proto.c | |
parent | 616e4a7d03fba715185f55d1298cc09377313591 (diff) | |
download | rspamd-5dbf570b7df0e7c9770432884f95c14b193b5b30.tar.gz rspamd-5dbf570b7df0e7c9770432884f95c14b193b5b30.zip |
* Fix many compile time warnings and polish code
Diffstat (limited to 'src/lmtp_proto.c')
-rw-r--r-- | src/lmtp_proto.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lmtp_proto.c b/src/lmtp_proto.c index ab20e41a8..e6e09a825 100644 --- a/src/lmtp_proto.c +++ b/src/lmtp_proto.c @@ -25,6 +25,7 @@ #include "config.h" #include "main.h" #include "cfg_file.h" +#include "util.h" #include "lmtp.h" #include "lmtp_proto.h" @@ -117,7 +118,7 @@ read_lmtp_input_line (struct rspamd_lmtp_proto *lmtp, f_str_t *line) i += lhlo_command.len; c = line->begin + i; /* Skip spaces */ - while (isspace (*c) && i < line->len) { + while (g_ascii_isspace (*c) && i < line->len) { i ++; c ++; } @@ -184,7 +185,7 @@ read_lmtp_input_line (struct rspamd_lmtp_proto *lmtp, f_str_t *line) i += data_command.len; c = line->begin + i; /* Skip spaces */ - while (isspace (*c++)) { + while (g_ascii_isspace (*c++)) { i ++; } rcpt = memory_pool_alloc (lmtp->task->task_pool, line->len - i + 1); @@ -229,6 +230,8 @@ read_lmtp_input_line (struct rspamd_lmtp_proto *lmtp, f_str_t *line) return 0; break; } + + return 0; } struct mta_callback_data { @@ -236,7 +239,6 @@ struct mta_callback_data { rspamd_io_dispatcher_t *dispatcher; enum { LMTP_WANT_GREETING, - LMTP_WANT_HELO, LMTP_WANT_MAIL, LMTP_WANT_RCPT, LMTP_WANT_DATA, @@ -264,7 +266,6 @@ parse_mta_str (f_str_t *in, struct mta_callback_data *cd) switch (cd->state) { case LMTP_WANT_GREETING: - case LMTP_WANT_HELO: case LMTP_WANT_MAIL: case LMTP_WANT_RCPT: case LMTP_WANT_DATA: @@ -437,12 +438,13 @@ lmtp_deliver_mta (struct worker_task *task) cd->dispatcher = rspamd_create_dispatcher (sock, BUFFER_LINE, mta_read_socket, NULL, mta_err_socket, NULL, (void *)cd); + return 0; } static char* format_lda_args (struct worker_task *task) { - char *arg, *res, *c, *r; + char *res, *c, *r; size_t len; GList *rcpt; gboolean got_args = FALSE; @@ -637,7 +639,6 @@ int write_lmtp_reply (struct rspamd_lmtp_proto *lmtp) { int r; - char outbuf[OUTBUFSIZ]; msg_debug ("write_lmtp_reply: writing reply to client"); if (lmtp->task->error_code != 0) { |