Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-13 23:57 UTC

Thread

RE: [milter-greylist] Sync operation failing with 'Unexpected rep ly "200" from peer ...'

RE: [milter-greylist] Sync operation failing with 'Unexpected rep ly "200" from peer ...'

2004-06-17 by attila.bruncsak@itu.int

Hello,

>> 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."
>
>To sum up, we need to fflush after each time data is readen from the
>file descriptor, that's it?

If there are two consecutive reads without write operation between them the
fflush() is not needed
by the documentation. To be on the safe side it is better always call the
fflush() after the
read and after the write.

In the code I found two fgets operation for the client side MX handling and
one fgets for the
server side. I put fflush() after each one (except the case of error
handling branch
but there the stream will be closed anyhow). I verified that after each
fprintf there is an fflush().
My baseline for the patch is sync.c from the V1.4 distribution. Probably it
is the same for the 
Solaris 8 problem. I may have overlooked some I/O operation so it is better
if you verify as well.

Bests,
Attila

Re: [milter-greylist] Sync operation failing with 'Unexpected rep ly "200" from peer ...'

2004-06-17 by manu@netbsd.org

<attila.bruncsak@...> wrote:

> My baseline for the patch is sync.c from the V1.4 distribution. Probably it
> is the same for the 
> Solaris 8 problem. I may have overlooked some I/O operation so it is better
> if you verify as well.

The fix is in 1.5.1, so everyone can test if it's okay.

-- 
Emmanuel Dreyfus
Il y a 10 sortes de personnes dans le monde: ceux qui comprennent 
le binaire et ceux qui ne le comprennent pas.
manu@...

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.