imagehandlingutilities/thumbnailmanager/thumbnailclient/src/thumbnailrequestqueue.cpp
branchRCL_3
changeset 13 ffb2d5dd62e9
parent 1 235a7fc86938
child 19 f759b6186ab5
equal deleted inserted replaced
11:85a88bc05e45 13:ffb2d5dd62e9
   186     for ( TInt i = iRequests.Count(); --i >= 0; )
   186     for ( TInt i = iRequests.Count(); --i >= 0; )
   187         {
   187         {
   188         CThumbnailRequestActive* request = iRequests[i];
   188         CThumbnailRequestActive* request = iRequests[i];
   189         if ( request->RequestId() == aRequestId )
   189         if ( request->RequestId() == aRequestId )
   190             {
   190             {
   191             // Cancel and remove from queue
       
   192             if (iRequests[i]->IsActive()) 
   191             if (iRequests[i]->IsActive()) 
   193                 {
   192                 {
   194                 iRequests[i]->Cancel();
   193                 // this doesn't yet actually cancel/complete the AO
   195                 
   194                 iRequests[i]->AsyncCancel();
   196                 iActiveRequests--;
       
   197                 if(iActiveRequests <= -1)
       
   198                     {
       
   199                     iActiveRequests = 0;
       
   200                     }
       
   201                 
       
   202                 delete request;
       
   203                 iRequests.Remove( i );
       
   204                 
   195                 
   205                 TN_DEBUG2( "CThumbnailRequestQueue::CancelRequest() - canceled request ID: %d", aRequestId);
   196                 TN_DEBUG2( "CThumbnailRequestQueue::CancelRequest() - canceled request ID: %d", aRequestId);
   206                 }
   197                 }
   207             else
   198             else
   208                 {
   199                 {