Mercurial > dnsbl
comparison src/dccifd.cpp @ 227:3fee608becbc stable-6-0-21
Fixes to compile on old systems without memrchr or string::clear().
Fix bug in spamassassin interface trying to clear a string with string::empty().
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sat, 03 Jan 2009 15:16:47 -0800 |
parents | 82886d4dd71f |
children | df7dc6b2b153 |
comparison
equal
deleted
inserted
replaced
226:c3a4b03f371d | 227:3fee608becbc |
---|---|
105 void DccInterface::mlfi_header(SMFICTX *ctx, const char *headerf, const char *headerv) | 105 void DccInterface::mlfi_header(SMFICTX *ctx, const char *headerf, const char *headerv) |
106 { | 106 { |
107 if (dccifd_socket == NULL_SOCKET) Connect(); | 107 if (dccifd_socket == NULL_SOCKET) Connect(); |
108 if ((dccifd_socket != NULL_SOCKET) && (!dccifd_input.empty())) { | 108 if ((dccifd_socket != NULL_SOCKET) && (!dccifd_input.empty())) { |
109 output(dccifd_input); | 109 output(dccifd_input); |
110 dccifd_input.clear(); | 110 dccifd_input = ""; |
111 } | 111 } |
112 | 112 |
113 if (first_header) { | 113 if (first_header) { |
114 output("\n"); | 114 output("\n"); |
115 first_header = false; | 115 first_header = false; |
192 } | 192 } |
193 // skip this token | 193 // skip this token |
194 i = j+1; | 194 i = j+1; |
195 } | 195 } |
196 } | 196 } |
197 char buff[maxlen]; | 197 //char buff[maxlen]; |
198 snprintf(buff, sizeof(buff), "dccifd found grey %s bulk %d", ((grey) ? "yes" : "no"), bulk); | 198 //snprintf(buff, sizeof(buff), "dccifd found grey %s bulk %d", ((grey) ? "yes" : "no"), bulk); |
199 //my_syslog(priv, buff); | 199 //my_syslog(priv, buff); |
200 } | 200 } |
201 | 201 |
202 | 202 |
203 void DccInterface::my_disconnect() | 203 void DccInterface::my_disconnect() |