bluetooth/btstack/l2cap/l2sapstates.cpp
changeset 51 20ac952a623c
parent 48 22de2e391156
--- a/bluetooth/btstack/l2cap/l2sapstates.cpp	Thu Sep 23 17:06:47 2010 +0300
+++ b/bluetooth/btstack/l2cap/l2sapstates.cpp	Wed Oct 13 16:20:29 2010 +0300
@@ -946,18 +946,15 @@
 
 	if(dataConfig)
 		{
+		TPckgBuf<TInt> aclBufSize;	
+		TInt getAclBufSizeErr = aSAP.GetOption(KSolBtACL, ELMOutboundACLSize, aclBufSize);
+
 		aSAP.DataQueue().ResumeSDUQueue(dataConfig,
 									 	aConfig.OutgoingFlushTimeout().Negotiated().FlushTimeoutDuration(),
 		                   				fec.OutgoingMaximumPDUSize(),
                        				    aConfig.OutgoingMTU().Negotiated().MTU(),
-                       				    aConfig.IncomingMTU().Negotiated().MTU());
-
-		// Adjust the optimal PDU size based on the new configuration values
-		TPckgBuf<TInt> buf;	
-		TInt err = aSAP.GetOption(KSolBtACL, ELMOutboundACLSize, buf);
-
-		TInt optimalPduSize = HL2CapPDU::GetPDUOrFragmentSize(aConfig.OutgoingMTU().Negotiated().MTU(), fec.OutgoingMaximumPDUSize(), (err == KErrNone) ? buf() : 0, aSAP.DataQueue().IsBasicDataVersion());
-		aSAP.DataQueue().SetOptimalPDUSize(optimalPduSize);
+                       				    aConfig.IncomingMTU().Negotiated().MTU(),
+                       				    (getAclBufSizeErr == KErrNone) ? aclBufSize() : 0);
 
 		// If this reconfiguration was initiated via an IOCTL complete it.
 		aSAP.TryToCompleteConfigurationIoctl(KErrNone);
@@ -1427,7 +1424,10 @@
     {
     LOG_FUNC
     // Already in the error state so no need to transition.
-    // Consume the event.
+    // Consume the event in UREL but panic in UDEB - even though we had a MobileCrash
+    // report which indicates it's possible I can't find a valid scenario which would
+    // lead to this, so play safe in UREL but try and catch the bug in UDEB.
+	DebugPanicInState(EL2CAPUnexpectedSAPSignalHandlerEvent);
     }   
 
 // State Transition Actions.