122 return; |
122 return; |
123 } |
123 } |
124 else |
124 else |
125 { |
125 { |
126 _LOG_L1C1(_L8("CReceiver: Data Packet Received")); |
126 _LOG_L1C1(_L8("CReceiver: Data Packet Received")); |
127 |
127 |
128 // Trap the leave to prevent the flow from being stopped if |
128 // Trap the leave to prevent the flow from being stopped if |
129 // the MBuf pool is temporarily exhausted. |
129 // the MBuf pool is temporarily exhausted. |
130 TRAPD(err,iRMBufPacket.CreateL(iData)); |
130 TRAPD(err,iRMBufPacket.CreateL(iData)); |
131 |
131 |
132 // Immediately execute new read request, regardless of whether MBufs are |
132 // Immediately execute new read request, regardless of whether MBufs are |
133 // exhausted or not. |
133 // exhausted or not. |
134 (iObserver.Bca())->Read(iStatus, iData); |
134 (iObserver.Bca())->Read(iStatus, iData); |
|
135 |
|
136 SetActive(); |
135 |
137 |
136 SetActive(); |
|
137 |
|
138 if (err == KErrNone) |
138 if (err == KErrNone) |
139 { |
139 { |
140 iRMBufPacket.Pack(); |
140 iRMBufPacket.Pack(); |
141 |
141 |
142 #ifdef RAWIP_HEADER_APPENDED_TO_PACKETS |
142 #ifdef RAWIP_HEADER_APPENDED_TO_PACKETS |
143 TUint16 protocolCode = iObserver.RemoveHeader(iRMBufPacket); |
143 TUint16 protocolCode = iObserver.RemoveHeader(iRMBufPacket); |
144 #else |
144 #else |
145 TUint16 protocolCode = 0; |
145 TUint16 protocolCode = 0; |
146 #endif // RAWIP_HEADER_APPENDED_TO_PACKETS |
146 #endif // RAWIP_HEADER_APPENDED_TO_PACKETS |
147 |
147 |
148 // Process the packet |
148 // Process the packet |
149 iObserver.GetObserver().Process(iRMBufPacket, protocolCode); |
149 iObserver.GetObserver().Process(iRMBufPacket, protocolCode); |
150 iRMBufPacket.Free(); |
150 iRMBufPacket.Free(); |
151 } |
151 } |
152 else |
152 else |
153 { |
153 { |
154 // If MBuff Allocation failed then dont process the packet, rely on layers above for recovery |
154 // If MBuff Allocation failed then dont process the packet, rely on layers above for recovery |
155 _LOG_L2C2(_L8("CReceiver::RunL MBuff Allocation Failure [err=%d]"), err); |
155 _LOG_L2C2(_L8("CReceiver::RunL MBuff Allocation Failure [err=%d]"), err); |
156 } |
156 } |
157 } |
157 } |
158 } |
158 } |
159 |
159 |
160 TInt CReceiver::RunError(TInt aError) |
160 TInt CReceiver::RunError(TInt aError) |
161 { |
161 { |