Author: mladen.turk(a)jboss.com
Date: 2007-08-29 03:50:03 -0400 (Wed, 29 Aug 2007)
New Revision: 956
Modified:
trunk/sight/native/share/dir.c
Log:
Fix garbage collected objects for opened directories. The original APR pool callback will
close the directory
Modified: trunk/sight/native/share/dir.c
===================================================================
--- trunk/sight/native/share/dir.c 2007-08-23 15:49:57 UTC (rev 955)
+++ trunk/sight/native/share/dir.c 2007-08-29 07:50:03 UTC (rev 956)
@@ -34,7 +34,12 @@
static void dir_cleanup(int mode, sight_object_t *no)
{
- if (no && no->native) {
+ /*
+ * In case this is a pool callback do not
+ * close the directory. It will be closed
+ * by the original apr pool callback
+ */
+ if (mode != POOL_CALLBACK && no && no->native) {
apr_dir_close((apr_dir_t *)no->native);
no->native = NULL;
}
Show replies by date