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);
}