vpnengine/ikev1lib/src/ikev1isakmpstream.cpp
changeset 2 ef893827b4d1
parent 0 33413c0669b9
equal deleted inserted replaced
1:c9c2ad51f972 2:ef893827b4d1
   114         proposal.SetNumTrans(prop->iNumTransforms);
   114         proposal.SetNumTrans(prop->iNumTransforms);
   115         pos=(TUint16)iBuf.Length(); //save the position to insert later
   115         pos=(TUint16)iBuf.Length(); //save the position to insert later
   116                                                                     //including the SPI
   116                                                                     //including the SPI
   117         iBuf.SetLength(pos + sizeof(proposal)); //leave room to insert later the proposal
   117         iBuf.SetLength(pos + sizeof(proposal)); //leave room to insert later the proposal
   118         TAttrib *attr=prop->iAttrList;
   118         TAttrib *attr=prop->iAttrList;
   119         for (TInt i=0; i < proposal.GetNumTrans(); i++) //Adds all the transforms
   119         for (TInt i=0; (i < proposal.GetNumTrans()) && (attr != NULL); i++) //Adds all the transforms
   120         {
   120         {
   121             if ( !attr->iNext )
   121             if ( !attr->iNext )
   122                next_payload = ISAKMP_PAYLOAD_NONE; // Last trasnform    
   122                next_payload = ISAKMP_PAYLOAD_NONE; // Last trasnform    
   123             IsakmpTransform((TUint8 *)attr, next_payload);
   123             IsakmpTransform((TUint8 *)attr, next_payload);
   124             attr=attr->iNext;
   124             attr=attr->iNext;