bluetooth/gavdp/source/gavdpImp.cpp
branchRCL_3
changeset 56 015fa7494bd2
parent 41 786b94c6f0a4
--- a/bluetooth/gavdp/source/gavdpImp.cpp	Wed Sep 15 13:27:26 2010 +0300
+++ b/bluetooth/gavdp/source/gavdpImp.cpp	Wed Oct 13 15:48:34 2010 +0300
@@ -1,4 +1,4 @@
-// Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
+// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
 // All rights reserved.
 // This component and the accompanying materials are made available
 // under the terms of "Eclipse Public License v1.0"
@@ -445,37 +445,12 @@
 	
 void CGavdp::Error(TInt aError)
 	{
-	//here we do whatever we need to tidy ourselves
+	// helper tells user - here we do whatever we need to tidy ourselves
 	delete iRequesterHelper;
 	iRequesterHelper = NULL;
-	
-	if (iState == EListening)
-		{
-		//if we're in the listening state and we get a KErrDisconnected error, this is
-		//because a connection completed and was disconnected straight away before we got
-		//the chance to pickup the connection indicator. We need to re-listen and throw
-		//away this error. Let's replace the error with the result of the re-listen.
-		if (aError == KErrDisconnected)
-			{
-			aError = Listen();
-			}
-		
-		//when listening, it doesn't make sense to pass this error to the user
-		if (aError == KErrCouldNotConnect)
-			{
-			aError = KErrNone;
-			}
-		}
-	
-	//the error might have been replaced due to the condition mentioned above so
-	//this needs to be checked.
-	if (aError != KErrNone)
-		{
-		iServiceUser.GAVDP_Error(aError, KNullDesC8);
-		
-		//update the state because an error did occur
-		iState = EIdle;
-		}
+	iState = EIdle;
+	// and tell the user
+	iServiceUser.GAVDP_Error(aError, KNullDesC8);
 	}
 
 void CGavdp::FatalError()
@@ -501,12 +476,10 @@
 		// eg Abort, Config
 		User::Leave(KErrInUse);
 		}
-	
-	//create a passive connector helper
-	iRequesterHelper = CGavdpConnector::NewL(*this, iServiceUser, aRemoteAddress, ETrue);
+	iRequesterHelper = CGavdpConnector::NewL(*this, iServiceUser, aRemoteAddress);
 	iRequesterHelper->Begin();
 	}
-
+	
 /*
 Forms the binding between passively created transport sessions and sockets
 */