Mercurial > masqmail-0.2
comparison src/accept.c @ 110:c678d0342451
changed name ACC_NODOT_TERM to ACC_DOT_IGNORE for better understanding
this is only a cosmetic change
author | meillo@marmaro.de |
---|---|
date | Tue, 29 Jun 2010 11:40:37 +0200 |
parents | db52c64acaa2 |
children | 43798acdfbc9 |
comparison
equal
deleted
inserted
replaced
109:db52c64acaa2 | 110:c678d0342451 |
---|---|
81 while (TRUE) { | 81 while (TRUE) { |
82 int len = read_sockline1(in, &line, &line_size, 5 * 60, READSOCKL_CVT_CRLF); | 82 int len = read_sockline1(in, &line, &line_size, 5 * 60, READSOCKL_CVT_CRLF); |
83 | 83 |
84 line1 = line; | 84 line1 = line; |
85 | 85 |
86 if ((line[0] == '.') && (!(flags & ACC_NODOT_TERM))) { | 86 if ((line[0] == '.') && (!(flags & ACC_DOT_IGNORE))) { |
87 if (line[1] == '\n') { | 87 if (line[1] == '\n') { |
88 g_free(line); | 88 g_free(line); |
89 break; | 89 break; |
90 } | 90 } |
91 line1++; | 91 line1++; |
92 } | 92 } |
93 | 93 |
94 if (len <= 0) { | 94 if (len <= 0) { |
95 if ((len == -1) && ((flags & ACC_NODOT_TERM) || (flags & ACC_NODOT_RELAX))) { | 95 if ((len == -1) && ((flags & ACC_DOT_IGNORE) || (flags & ACC_NODOT_RELAX))) { |
96 /* we got an EOF, and the last line was not terminated by a CR */ | 96 /* we got an EOF, and the last line was not terminated by a CR */ |
97 gint len1 = strlen(line1); | 97 gint len1 = strlen(line1); |
98 if (len1 > 0) { /* == 0 is 'normal' (EOF after a CR) */ | 98 if (len1 > 0) { /* == 0 is 'normal' (EOF after a CR) */ |
99 if (line1[len1 - 1] != '\n') { /* some mail clients allow unterminated lines */ | 99 if (line1[len1 - 1] != '\n') { /* some mail clients allow unterminated lines */ |
100 line1[len1] = '\n'; | 100 line1[len1] = '\n'; |