release mozctl_install_semaphore semaphore when the user doesn't want to download the mozilla control
Modified: trunk/reactos/lib/shdocvw/shdocvw_main.c

Modified: trunk/reactos/lib/shdocvw/shdocvw_main.c
--- trunk/reactos/lib/shdocvw/shdocvw_main.c	2006-01-15 01:12:00 UTC (rev 20880)
+++ trunk/reactos/lib/shdocvw/shdocvw_main.c	2006-01-15 01:24:59 UTC (rev 20881)
@@ -406,6 +406,7 @@
     WCHAR buf[0x100];
     static const WCHAR szTitle[] = { 'R','e','a','c','t','O','S',0 };
     HANDLE hsem;
+	BOOL ret = TRUE;
 
     SetLastError( ERROR_SUCCESS );
     hsem = CreateSemaphoreA( NULL, 0, 1, "mozctl_install_semaphore");
@@ -413,17 +414,18 @@
     {
         LoadStringW( shdocvw_hinstance, 1001, buf, sizeof buf/sizeof(WCHAR) );
         r = MessageBoxW(NULL, buf, szTitle, MB_YESNO | MB_ICONQUESTION);
-        if( r != IDYES )
-            return FALSE;
-
-        DialogBoxW(shdocvw_hinstance, MAKEINTRESOURCEW(100), 0, dlProc);
+        if( r == IDYES )
+			DialogBoxW(shdocvw_hinstance, MAKEINTRESOURCEW(100), 0, dlProc);
+		else
+			ret = FALSE;
     }
     else
         WaitForSingleObject( hsem, INFINITE );
+
     ReleaseSemaphore( hsem, 1, NULL );
     CloseHandle( hsem );
-    
-    return TRUE;
+
+    return ret;
 }
  
 static BOOL SHDOCVW_TryLoadMozillaControl(void)