diff -r e0d6e9bd3ca7 -r bf7ee68962da javaextensions/bluetooth/bluetoothplugins/btl2cappushplugin/src.s60/btl2capserverconnection.cpp --- a/javaextensions/bluetooth/bluetoothplugins/btl2cappushplugin/src.s60/btl2capserverconnection.cpp Tue Jul 06 14:10:26 2010 +0300 +++ b/javaextensions/bluetooth/bluetoothplugins/btl2cappushplugin/src.s60/btl2capserverconnection.cpp Wed Aug 18 09:43:15 2010 +0300 @@ -489,7 +489,21 @@ if (KErrNone == err) { mAcceptedSocket->RemoteName(btRemoteAddr); - if (mAsyncAccept && (!mAvoidFilter) && (false == isConnectionAllowed(btRemoteAddr))) + TBuf<20> addr; + TInt64 longBtAddr = 0; + TBTDevAddr btDeviceAddress = btRemoteAddr.BTAddr(); + LOG4(EJavaBluetooth,EInfo,"TBTDevAddr Address is %x %x %x %x ", + btDeviceAddress[0],btDeviceAddress[1], + btDeviceAddress[2],btDeviceAddress[3]); + LOG2(EJavaBluetooth,EInfo,"%x %x",btDeviceAddress[4], + btDeviceAddress[5]); + btDeviceAddress.GetReadable(addr); + LOG1(EJavaBluetooth,EInfo,"BT: Readable address is %S",&addr); + TLex16 toParse(addr); + toParse.Val(longBtAddr, EHex); + LOG1(EJavaBluetooth, EInfo, + "L2CAPServerConnection::HandleAcceptCompleteL: Address: %llx", longBtAddr); + if ((longBtAddr == 0) ||(mAsyncAccept && (!mAvoidFilter) && (false == isConnectionAllowed(btRemoteAddr)))) { mAcceptedSocket->CancelAll(); mAcceptedSocket->Shutdown(RSocket::EImmediate); @@ -500,14 +514,7 @@ AcceptL(); return; } - TBuf<20> addr; - TInt64 longBtAddr = 0; - TBTDevAddr btDeviceAddress = btRemoteAddr.BTAddr(); - btDeviceAddress.GetReadable(addr); - TLex16 toParse(addr); - toParse.Val(longBtAddr, EHex); - LOG1(EJavaBluetooth, EInfo, - "L2CAPServerConnection::HandleAcceptCompleteL: Address: %ld", longBtAddr); + mBtClientConn = new BluetoothClientConnection(mAcceptedSocket, mServer); mAcceptedSocket->GetOpt(KL2CAPInboundMTU, KSolBtL2CAP, negotiatedReceiveMtu); mAcceptedSocket->GetOpt(KL2CAPNegotiatedOutboundMTU, KSolBtL2CAP, negotiatedTransmitMtu);