[Dovecot] 1.0-test70

Jens Laas jens.laas at data.slu.se
Fri May 27 09:15:18 EEST 2005


(05.05.25 kl.14:39) Timo Sirainen skrev följande till Jens Laas:

> On Wed, 2005-05-25 at 11:03 +0200, Jens Laas wrote:
>> (05.05.24 kl.20:39) Timo Sirainen skrev följande till Jens Laas:
>>
>>> On 24.5.2005, at 14:42, Jens Laas wrote:
>>>
>>>> No luck :(
>>>>
>>>> Debug patch please :)
>>>
>>> Here's one, writes to /tmp/dovecot* files
>>
>> Debug output attached.
>
> OK, I was on the right track, but didn't think that calling
> client_input() in client_output() could break it.

Still no luck.

Btw Im getting a bit confused about which patches to apply.
I tried:
  test70 + this patch (below)
  test70 + previous patch + this patch.

I can send more debug output, but id like to use the right combo of 
patches for it.

Thanks
Jens


>
> This should fix it:
>
> Index: src/lib/ostream-file.c
> ===================================================================
> RCS file: /var/lib/cvs/dovecot/src/lib/ostream-file.c,v
> retrieving revision 1.48
> diff -u -r1.48 ostream-file.c
> --- src/lib/ostream-file.c	26 Apr 2005 11:08:16 -0000	1.48
> +++ src/lib/ostream-file.c	25 May 2005 11:37:50 -0000
> @@ -349,6 +349,12 @@
> 	struct file_ostream *fstream = context;
> 	int ret;
>
> +	/* Set flush_pending = FALSE first before calling the flush callback,
> +	   and change it to TRUE only if callback returns 0. That way the
> +	   callback can call o_stream_set_flush_pending() again and we don't
> +	   forget it even if flush callback returns 1. */
> +	fstream->flush_pending = FALSE;
> +
> 	o_stream_ref(&fstream->ostream.ostream);
> 	if (fstream->ostream.callback != NULL)
> 		ret = fstream->ostream.callback(fstream->ostream.context);
> @@ -360,7 +366,8 @@
> 		io_remove(fstream->io);
> 		fstream->io = NULL;
> 	}
> -	fstream->flush_pending = ret <= 0;
> +	if (ret == 0)
> +		fstream->flush_pending = TRUE;
>
> 	o_stream_unref(&fstream->ostream.ostream);
> }
>
>

-----------------------------------------------------------------------
     'This mail automatically becomes portable when carried.'
-----------------------------------------------------------------------
     Jens Låås                              Email: jens.laas at data.slu.se
     Department of Computer Services, SLU   Phone: +46 18 67 35 15
     Vindbrovägen 1
     P.O. Box 7079
     S-750 07 Uppsala
     SWEDEN
-----------------------------------------------------------------------



More information about the dovecot mailing list