[milter-greylist] Sync operation failing with 'Unexpected reply " 200" from peer ...'
2004-06-16 by attila.bruncsak@itu.int
Hello, I was wondering why the MX sync was not working at all for me. I got always the error message in the syslog which is in the subject of this mail. Now I found the reason of this bug^H^H^Hfeature. If a stream is open for update operation between read and write operation flush operation has to be executed. "man fdopen" on Tru64 UNIX says among others: "Also, an input operation cannot be directly followed by an output operation without an intervening flush or file positioning opera- tion, unless the input operation encounters the end of the file." So I attach now the patch which fixes that problem. I do not know is anybody else encountered this? The change from strtok to strtok_r is an artefact of my debugging but I consider it worthwhile to keep. It is generally safer to use a re-entrant version of the function in a thread than the non-re-entrant. Actually it is not a problem now but it might become later if the code evolves further. Bests, Attila