equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
284 // --------------------------------------------------------------------------- |
284 // --------------------------------------------------------------------------- |
285 // |
285 // |
286 void CDunAtCmdPusher::SendReplyData( TBool aRecvBuffer ) |
286 void CDunAtCmdPusher::SendReplyData( TBool aRecvBuffer ) |
287 { |
287 { |
288 FTRACE(FPrint( _L("CDunAtCmdPusher::SendReplyData()") )); |
288 FTRACE(FPrint( _L("CDunAtCmdPusher::SendReplyData()") )); |
289 TDesC8* sendBuffer = &iRecvBuffer; |
289 TDesC8* sendBuffer = iOkBuffer; |
290 if ( !aRecvBuffer ) |
290 if ( aRecvBuffer ) |
291 { |
291 { |
292 sendBuffer = iOkBuffer; |
292 sendBuffer = &iRecvBuffer; |
|
293 // Check if last block of long push and remove "OK" if exists |
|
294 if ( iReplyType==EReplyTypeOther && iReplyBytesLeft==0 ) |
|
295 { |
|
296 CheckAndRemoveOkString(); |
|
297 } |
293 } |
298 } |
294 FTRACE(FPrint( _L("CDunAtCmdPusher::SendReplyData() send reply:") )); |
299 FTRACE(FPrint( _L("CDunAtCmdPusher::SendReplyData() send reply:") )); |
295 FTRACE(FPrintRaw(*sendBuffer) ); |
300 FTRACE(FPrintRaw(*sendBuffer) ); |
296 iDownstream->NotifyDataPushRequest( sendBuffer, this ); |
301 iDownstream->NotifyDataPushRequest( sendBuffer, this ); |
297 FTRACE(FPrint( _L("CDunAtCmdPusher::SendReplyData() complete") )); |
302 FTRACE(FPrint( _L("CDunAtCmdPusher::SendReplyData() complete") )); |
308 { |
313 { |
309 case EReplyTypeOther: |
314 case EReplyTypeOther: |
310 { |
315 { |
311 FTRACE(FPrint( _L("CDunAtCmdPusher::ManageReplyTypeChange() EReplyTypeOther") )); |
316 FTRACE(FPrint( _L("CDunAtCmdPusher::ManageReplyTypeChange() EReplyTypeOther") )); |
312 iNoErrorReceived = ETrue; |
317 iNoErrorReceived = ETrue; |
313 CheckAndRemoveOkString(); |
|
314 SendReplyData(); |
318 SendReplyData(); |
315 } |
319 } |
316 break; |
320 break; |
317 case EReplyTypeOk: |
321 case EReplyTypeOk: |
318 { |
322 { |