wineconsole verbosity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

wineconsole was awfully quiet about just about anything.
Made initialization more verbose in case of errors.

-- 
Andreas Mohr                        Stauferstr. 6, D-71272 Renningen, Germany
Index: programs/wineconsole/wineconsole.c
===================================================================
RCS file: /home/wine/wine/programs/wineconsole/wineconsole.c,v
retrieving revision 1.13
diff -u -r1.13 wineconsole.c
--- programs/wineconsole/wineconsole.c	31 May 2002 23:40:59 -0000	1.13
+++ programs/wineconsole/wineconsole.c	9 Jun 2002 11:27:01 -0000
@@ -420,7 +420,7 @@
 /******************************************************************
  *		WINECON_Spawn
  *
- * Spawn the child processus when invoked with wineconsole foo bar
+ * Spawn the child process when invoked with wineconsole foo bar
  */
 static BOOL WINECON_Spawn(struct inner_data* data, LPCSTR lpCmdLine)
 {
@@ -495,19 +495,42 @@
     /* case of wineconsole <evt>, signal process that created us that we're up and running */
     if (WINECON_HasEvent(lpCmdLine, &evt))
     {
-        if (!(data = WINECON_Init(hInst, 0))) return 0;
+        if (!(data = WINECON_Init(hInst, 0)))
+	{
+	    WINE_ERR("failed to init1 wineconsole.\n");
+	    return 0;
+	}
 	ret = SetEvent((HANDLE)evt);
+	if (!ret)
+	{
+	    WINE_ERR("SetEvent failed.\n");
+	    goto cleanup;
+	}
     }
     else
     {
-        if (!(data = WINECON_Init(hInst, (void*)GetCurrentProcessId()))) return 0;
+        if (!(data = WINECON_Init(hInst, (void*)GetCurrentProcessId())))
+	{
+	    WINE_ERR("failed to init2 wineconsole.\n");
+	    return 0;
+	}
 	ret = WINECON_Spawn(data, lpCmdLine);
+        if (!ret)
+	{
+	    WINE_MESSAGE("wineconsole: spawning client program failed. Invalid/missing command line arguments ?\n");
+	    goto cleanup;
+	}
     }
 
-    if (ret && WCUSER_InitBackend(data))
+    if (WCUSER_InitBackend(data))
     {
+	WINE_TRACE("calling MainLoop.\n");
 	ret = data->fnMainLoop(data);
     }
+    else
+	WINE_ERR("WCUSER_InitBackend failed.\n");
+
+cleanup:
     WINECON_Delete(data);
 
     return ret;

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux