RtlpExecuteHandlerForException(): Permit nesting for FSCTL_DISMOUNT_VOLUME.
authorshort <>
Fri, 4 Jul 2003 05:36:30 +0000 (05:36 +0000)
committershort <>
Fri, 4 Jul 2003 05:36:30 +0000 (05:36 +0000)
src/libcaptive/rtl/except.c

index 571b711..13f78f1 100644 (file)
@@ -37,13 +37,13 @@ EXCEPTION_DISPOSITION r;
        g_return_val_if_fail(DispatcherContext!=NULL,ExceptionNestedException);
        g_return_val_if_fail(ExceptionHandler!=NULL,ExceptionNestedException);
 
-       if (nested)
-               g_assert_not_reached();
+       /* Nest-counting is provided here just for debugging reasons. */
+       /* Nesting must be permitted for proper FSCTL_DISMOUNT_VOLUME execution. */
 
        nested++;
        r=(*ExceptionHandler)(ExceptionRecord,RegistrationFrame,Context,DispatcherContext);
        nested--;
-       g_assert(!nested);
+       g_assert(nested>=0);
 
        g_assert(r==ExceptionContinueExecution || r==ExceptionContinueSearch);
        return r;
@@ -62,6 +62,7 @@ EXCEPTION_DISPOSITION r;
        g_return_val_if_fail(DispatcherContext!=NULL,ExceptionNestedException);
        g_return_val_if_fail(ExceptionHandler!=NULL,ExceptionNestedException);
 
+       /* Nest-counting is provided here just for debugging reasons. */
        if (nested)
                g_assert_not_reached();