Mercurial > masqmail
comparison src/smtp_in.c @ 15:f671821d8222
code beautifying; 0 -> \0 if appropriate
author | meillo@marmaro.de |
---|---|
date | Thu, 06 Nov 2008 09:18:38 +0100 |
parents | 26e34ae9a3e3 |
children | e5090ac234cf |
comparison
equal
deleted
inserted
replaced
14:a8f3424347dc | 15:f671821d8222 |
---|---|
29 */ | 29 */ |
30 | 30 |
31 #ifdef ENABLE_SMTP_SERVER | 31 #ifdef ENABLE_SMTP_SERVER |
32 | 32 |
33 smtp_cmd smtp_cmds[] = { | 33 smtp_cmd smtp_cmds[] = { |
34 {SMTP_HELO, "HELO",} | 34 {SMTP_HELO, "HELO",}, |
35 , | 35 {SMTP_EHLO, "EHLO",}, |
36 {SMTP_EHLO, "EHLO",} | 36 {SMTP_MAIL_FROM, "MAIL FROM:",}, |
37 , | 37 {SMTP_RCPT_TO, "RCPT TO:",}, |
38 {SMTP_MAIL_FROM, "MAIL FROM:",} | 38 {SMTP_DATA, "DATA",}, |
39 , | 39 {SMTP_QUIT, "QUIT",}, |
40 {SMTP_RCPT_TO, "RCPT TO:",} | 40 {SMTP_RSET, "RSET",}, |
41 , | 41 {SMTP_NOOP, "NOOP",}, |
42 {SMTP_DATA, "DATA",} | 42 {SMTP_HELP, "HELP"}, |
43 , | |
44 {SMTP_QUIT, "QUIT",} | |
45 , | |
46 {SMTP_RSET, "RSET",} | |
47 , | |
48 {SMTP_NOOP, "NOOP",} | |
49 , | |
50 {SMTP_HELP, "HELP"} | |
51 , | |
52 }; | 43 }; |
53 | 44 |
54 static smtp_cmd_id | 45 static smtp_cmd_id |
55 get_id(const gchar * line) | 46 get_id(const gchar * line) |
56 { | 47 { |
63 } | 54 } |
64 | 55 |
65 /* this is a quick hack: we expect the address to be syntactically correct | 56 /* this is a quick hack: we expect the address to be syntactically correct |
66 and containing the mailbox only: | 57 and containing the mailbox only: |
67 */ | 58 */ |
68 | |
69 static gboolean | 59 static gboolean |
70 get_address(gchar * line, gchar * addr) | 60 get_address(gchar * line, gchar * addr) |
71 { | 61 { |
72 gchar *p = line, *q = addr; | 62 gchar *p = line, *q = addr; |
73 | 63 |