bluetooth/btstack/rfcomm/rfcommsap.cpp
changeset 21 5e5528a288fe
parent 16 0089b2f7ebd8
equal deleted inserted replaced
19:4b81101308c6 21:5e5528a288fe
   343 		case KRFCOMMMaximumMTU:
   343 		case KRFCOMMMaximumMTU:
   344 			{
   344 			{
   345 			if (iMux)
   345 			if (iMux)
   346 				{
   346 				{
   347 				// Allow for possible credit in header, 1 byte
   347 				// Allow for possible credit in header, 1 byte
   348 				TPckgBuf<TUint> intpckg(iMTU - 1);
   348 				TPckgBuf<TUint> intpckg(iOptimalMTUForSending - 1);
   349 				aOption=intpckg;
   349 				aOption=intpckg;
   350  				return KErrNone;
   350  				return KErrNone;
   351 		 		}
   351 		 		}
   352 			else
   352 			else
   353 				{
   353 				{
   476 	iState->Error(*this, aErrorCode, aType);
   476 	iState->Error(*this, aErrorCode, aType);
   477 	}
   477 	}
   478 
   478 
   479 TUint16 CRfcommSAP::NegotiatedMTU() const
   479 TUint16 CRfcommSAP::NegotiatedMTU() const
   480 	{
   480 	{
   481 	return iMTU;
   481 	return iNegotiatedMTU;
   482 	}
   482 	}
       
   483 
       
   484 TUint16 CRfcommSAP::OptimalMTUForSending() const
       
   485 	{
       
   486 	return iOptimalMTUForSending;
       
   487 	}
       
   488 
   483 
   489 
   484 TUint16 CRfcommSAP::UsableMTU(TUint8 aCredit) const
   490 TUint16 CRfcommSAP::UsableMTU(TUint8 aCredit) const
   485 	{
   491 	{
   486 	return iMux->FlowStrategy()->UsableMTU(*this, aCredit);
   492 	return iMux->FlowStrategy()->UsableMTU(*this, aCredit);
   487 	}
   493 	}