mmserv/tms/tmsimpl/src/tmsipcallbodyimpl.cpp
branchRCL_3
changeset 7 3d8c721bf319
parent 0 71ca22bcf22a
child 12 2eb3b066cc7d
equal deleted inserted replaced
6:e35735ece90c 7:3d8c721bf319
   123         case TMS_STREAM_DOWNLINK:
   123         case TMS_STREAM_DOWNLINK:
   124             ret = TMSStreamImpl::Create(TMS_CALL_IP, type, iSession, strm);
   124             ret = TMSStreamImpl::Create(TMS_CALL_IP, type, iSession, strm);
   125             if (ret == TMS_RESULT_SUCCESS)
   125             if (ret == TMS_RESULT_SUCCESS)
   126                 {
   126                 {
   127                 ret = AddStreamToList(strm);
   127                 ret = AddStreamToList(strm);
   128                 }           
   128                 }
   129             //TODO:Need longer term fix to not destory everything
   129             //TODO:Need longer term fix to not destory everything
   130             //if more the one stream is trying to be created.
   130             //if more the one stream is trying to be created.
   131             else if (ret == TMS_RESULT_ALREADY_EXIST)
   131             else if (ret == TMS_RESULT_ALREADY_EXIST)
   132                 {
   132                 {
   133                 break;
   133                 break;
   192         }
   192         }
   193 
   193 
   194     if (itStrm)
   194     if (itStrm)
   195         {
   195         {
   196         iStreamsVector.erase(itStrm); // Remove from array
   196         iStreamsVector.erase(itStrm); // Remove from array
   197         // Don't delete itStrm as it is now pointing to the next item on the list
   197         // Don't delete itStrm as the iterator advanced to the next 
   198         delete strm; // Free memory
   198         // item on the list
   199         strm = NULL;
   199         ret = TMSStreamImpl::Delete(strm);
   200         ret = TMS_RESULT_SUCCESS;
       
   201         }
   200         }
   202     TRACE_PRN_FN_EXT;
   201     TRACE_PRN_FN_EXT;
   203     return ret;
   202     return ret;
   204     }
   203     }
   205 
   204