5 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Re: Some tweaks t...
FromSent OnAttachments
Brian CandlerDec 4, 2000 8:37 am.Other, .Other
Sam VarshavchikDec 4, 2000 2:48 pm 
Brian CandlerDec 5, 2000 5:01 am 
Brian CandlerDec 19, 2000 10:25 am.Other
Brian CandlerJan 2, 2001 3:07 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] Re: Some tweaks to deliverquotaActions...
From:Brian Candler (B.Ca@pobox.com)
Date:Jan 2, 2001 3:07:43 pm
List:net.sourceforge.lists.courier-users

On Mon, Dec 25, 2000 at 11:55:16AM -0500, Sam Varshavchik wrote:

The following is no good -- it's going to end up leaking file descriptors :-)

Hmm. I can't see how it's any different to your code. You do

n=maildir_checkquota(...)

and in turn, maildir_checkquota just does

return (docheckquota(..., &dummy))

I decided to unroll the function call to make it a bit clearer. But that change is just something I did because it seemed sensible at the time, and I had just left it there before sending the diff.

Brian.

diff -uNr maildir/maildirquota.c maildir/maildirquota.c --- maildir/maildirquota.c Tue Sep 5 04:52:22 2000 +++ maildir/maildirquota.c Thu Dec 14 13:39:45 2000 @@ -228,9 +228,10 @@ strcat(strcpy(checkfolder, dir), "/maildirfolder"); if (stat(checkfolder, &stat_buf) == 0) /* Go to parent */ { + int dummy; strcat(strcpy(checkfolder, dir), "/.."); - n=maildir_checkquota(checkfolder, maildirsize_fdptr, - quota_type, xtra_size, xtra_cnt); + n=docheckquota(checkfolder, maildirsize_fdptr, + quota_type, xtra_size, xtra_cnt, &dummy); free(checkfolder); return (n); }