equal
deleted
inserted
replaced
1033 iSocket->Error(iErrorForNextWrite, MSocketNotify::EErrorSend); |
1033 iSocket->Error(iErrorForNextWrite, MSocketNotify::EErrorSend); |
1034 iErrorForNextWrite = KErrNone; |
1034 iErrorForNextWrite = KErrNone; |
1035 return 0; |
1035 return 0; |
1036 } |
1036 } |
1037 |
1037 |
1038 // From opposite angle, we dont need a new chain if it is a stream |
1038 // add a new chain for storing data |
1039 // we just append to the existing, unless there isn't an existing... |
1039 if(iDataArray->Count()==0 ||( iDataArray->Count()>0 && !iDataArray->At(iDataArray->Count()-1).IsEmpty())) |
1040 if(iDataArray->Count()==0 || IsTransportType(KSockDatagram)) |
|
1041 { |
1040 { |
1042 RMBufChain chain; |
1041 RMBufChain chain; |
1043 TRAPD(ret, iDataArray->AppendL(chain)); |
1042 TRAPD(ret, iDataArray->AppendL(chain)); |
1044 if(ret!=KErrNone) |
1043 if(ret!=KErrNone) |
1045 return ret; |
1044 return ret; |
1046 } |
1045 } |
1047 |
1046 |
1048 iDataArray->At(iDataArray->Count()-1).Append(aData); |
1047 iDataArray->At(iDataArray->Count()-1).Append(aData); |
1049 |
1048 |
1050 // Gotta save the length of the chain before calling |
1049 // Gotta save the length of the chain before calling |
1051 // NewData, as it could be changed after the call |
1050 // NewData, as it could be changed after the call |
1052 // (We need to be re-entrant). |
1051 // (We need to be re-entrant). |