Mercurial > dnsbl
comparison src/context.cpp @ 141:6256cab02248
cleanup smtp rate limit code
author | carl |
---|---|
date | Wed, 27 Sep 2006 08:11:38 -0700 |
parents | 4028de9b46dd |
children | ecb40aa3eaa5 |
comparison
equal
deleted
inserted
replaced
140:4028de9b46dd | 141:6256cab02248 |
---|---|
1189 //////////////////////////////////////////////// | 1189 //////////////////////////////////////////////// |
1190 // | 1190 // |
1191 bool parse_rate(TOKEN &tok, CONFIG &dc, CONTEXT &me); | 1191 bool parse_rate(TOKEN &tok, CONFIG &dc, CONTEXT &me); |
1192 bool parse_rate(TOKEN &tok, CONFIG &dc, CONTEXT &me) { | 1192 bool parse_rate(TOKEN &tok, CONFIG &dc, CONTEXT &me) { |
1193 char *def = tok.next(); | 1193 char *def = tok.next(); |
1194 if (def != token_lbrace) { | 1194 tok.push(def); |
1195 tok.push(def); | 1195 if (def != token_lbrace) me.set_default_rate(tok.nextint()); |
1196 me.set_default_rate(tok.nextint()); | |
1197 } | |
1198 if (!tsa(tok, token_lbrace)) return false; | 1196 if (!tsa(tok, token_lbrace)) return false; |
1199 while (true) { | 1197 while (true) { |
1200 char *have = tok.next(); | 1198 char *have = tok.next(); |
1201 if (!have) break; | 1199 if (!have) break; |
1202 if (have == token_rbrace) break; | 1200 if (have == token_rbrace) break; |