accessoryservices/accessoryserver/src/Client/AccessoryServer.cpp
changeset 74 9d35fd98f273
parent 0 4e1aa6a622a0
--- a/accessoryservices/accessoryserver/src/Client/AccessoryServer.cpp	Fri Sep 17 08:36:42 2010 +0300
+++ b/accessoryservices/accessoryserver/src/Client/AccessoryServer.cpp	Mon Oct 04 02:28:24 2010 +0300
@@ -76,11 +76,12 @@
 			}
 		// Wait until the completion of the server creation
 		User::WaitForRequest( status );
-		if( status != KErrNone )
-			{
-			server.Close();
-			return status.Int();
-			}
+			
+		// We can't use the 'exit reason' if the server paniced as this
+		// is the panic 'reason' and may be '0' which cannot be distinguished
+		// from KErrNone
+		ret = (server.ExitType() == EExitPanic)? KErrGeneral : status.Int();
+			
 		// Server created successfully
 		server.Close(); // we're no longer interested in the other process
 		}