bluetoothcommsprofiles/btpan/panagt/panagtremdev.cpp
branchRCL_3
changeset 21 14e240312f6f
parent 0 29b1cd4cb562
equal deleted inserted replaced
18:1f10b9300be6 21:14e240312f6f
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    91 @note This happens for outgoing connections only.
    91 @note This happens for outgoing connections only.
    92 */
    92 */
    93 	{
    93 	{
    94 	iRemSockAddr.SetBTAddr(aRemDevAddr);
    94 	iRemSockAddr.SetBTAddr(aRemDevAddr);
    95 	iRemSockAddr.SetPort(KBnepPsm);
    95 	iRemSockAddr.SetPort(KBnepPsm);
    96 	iSockServ.Connect();
    96 	User::LeaveIfError(iSockServ.Connect());
    97 	
    97 	
    98 #ifdef __FLOG_ACTIVE
    98 #ifdef __FLOG_ACTIVE
    99 	TBuf<KMaxBtAddrSize> tempDevAddrBuf;
    99 	TBuf<KMaxBtAddrSize> tempDevAddrBuf;
   100 	iRemSockAddr.BTAddr().GetReadable(tempDevAddrBuf, KNullDesC, KBtAddrSeparator, KNullDesC);
   100 	iRemSockAddr.BTAddr().GetReadable(tempDevAddrBuf, KNullDesC, KBtAddrSeparator, KNullDesC);
   101 	LOG2(_L("RemDev[%x]: connected to %S"), this, &tempDevAddrBuf);
   101 	LOG2(_L("RemDev[%x]: connected to %S"), this, &tempDevAddrBuf);
   136 	{
   136 	{
   137 	User::LeaveIfError(iSocket.Transfer(aConnectedSocket)); // take ownership of the socket, so that the initial state can perform actions on it
   137 	User::LeaveIfError(iSocket.Transfer(aConnectedSocket)); // take ownership of the socket, so that the initial state can perform actions on it
   138 
   138 
   139 	// make a note of the remote device address
   139 	// make a note of the remote device address
   140 	iSocket.RemoteName(iRemSockAddr);
   140 	iSocket.RemoteName(iRemSockAddr);
   141 	iSockServ.Connect();
   141 	User::LeaveIfError(iSockServ.Connect());
   142 
   142 
   143 #ifdef __FLOG_ACTIVE
   143 #ifdef __FLOG_ACTIVE
   144 	TBuf<KMaxBtAddrSize> tempDevAddrBuf;
   144 	TBuf<KMaxBtAddrSize> tempDevAddrBuf;
   145 	iRemSockAddr.BTAddr().GetReadable(tempDevAddrBuf, KNullDesC, KBtAddrSeparator, KNullDesC);
   145 	iRemSockAddr.BTAddr().GetReadable(tempDevAddrBuf, KNullDesC, KBtAddrSeparator, KNullDesC);
   146 	LOG2(_L("RemDev[%x]: connected to %S"), this, &tempDevAddrBuf);
   146 	LOG2(_L("RemDev[%x]: connected to %S"), this, &tempDevAddrBuf);