equal
deleted
inserted
replaced
1621 } |
1621 } |
1622 } |
1622 } |
1623 |
1623 |
1624 |
1624 |
1625 |
1625 |
1626 TInt CFileCache::AllocateRequest(CFsClientMessageRequest*& aNewRequest, TBool aWrite, CSessionFs* aSession) |
1626 TInt CFileCache::AllocateRequest(CFsClientMessageRequest*& aNewRequest, TBool aWrite, CSessionFs* aSession,TUid aUid) |
1627 { |
1627 { |
1628 |
1628 |
1629 RLocalMessage msgNew; |
1629 RLocalMessage msgNew; |
1630 const TOperation& oP = OperationArray[aWrite?EFsFileWriteDirty:EFsFileRead]; |
1630 const TOperation& oP = OperationArray[aWrite?EFsFileWriteDirty:EFsFileRead]; |
1631 TInt r = RequestAllocator::GetMessageRequest(oP, msgNew, aNewRequest); |
1631 TInt r = RequestAllocator::GetMessageRequest(oP, msgNew, aNewRequest); |
1632 if (r != KErrNone) |
1632 if (r != KErrNone) |
1633 return r; |
1633 return r; |
1634 |
1634 |
1635 aNewRequest->Set(msgNew, oP, aSession); |
1635 aNewRequest->Set(msgNew, oP, aSession, aUid); |
1636 aNewRequest->SetDrive(iDrive); |
1636 aNewRequest->SetDrive(iDrive); |
1637 |
1637 |
1638 // read-aheads and write-dirty requests should not be posted to plugins |
1638 // read-aheads and write-dirty requests should not be posted to plugins |
1639 // If there are data-modifying plugins, then these should sit above the file cache |
1639 // If there are data-modifying plugins, then these should sit above the file cache |
1640 aNewRequest->iCurrentPlugin = NULL; |
1640 aNewRequest->iCurrentPlugin = NULL; |
1674 |
1674 |
1675 iLock.Signal(); |
1675 iLock.Signal(); |
1676 |
1676 |
1677 if (newRequest) |
1677 if (newRequest) |
1678 { |
1678 { |
1679 //To be used in notification framework. |
|
1680 //newRequest->iUID = aOldRequest->Message().Identity(); |
|
1681 newRequest->Dispatch(); |
1679 newRequest->Dispatch(); |
1682 } |
1680 } |
1683 |
1681 |
1684 return r; |
1682 return r; |
1685 } |
1683 } |
1760 |
1758 |
1761 // NB aOldRequest->Session may be NULL - e.g for FileShareCloseOp |
1759 // NB aOldRequest->Session may be NULL - e.g for FileShareCloseOp |
1762 CSessionFs* session = aOldRequest && aOldRequest->Session() ? aOldRequest->Session() : iDirtyDataOwner; |
1760 CSessionFs* session = aOldRequest && aOldRequest->Session() ? aOldRequest->Session() : iDirtyDataOwner; |
1763 |
1761 |
1764 __ASSERT_ALWAYS(session, Fault(EFlushingWithSessionNull)); |
1762 __ASSERT_ALWAYS(session, Fault(EFlushingWithSessionNull)); |
1765 |
1763 |
1766 TInt r = AllocateRequest(aNewRequest, ETrue, session); |
1764 TInt r = AllocateRequest(aNewRequest, ETrue, session, (aOldRequest) ? aOldRequest->Uid() : TUid::Null()); |
1767 if (r != KErrNone) |
1765 if (r != KErrNone) |
1768 return r; |
1766 return r; |
1769 |
1767 |
1770 r = aNewRequest->PushOperation(0, 0, (TUint8*) NULL, 0); |
1768 r = aNewRequest->PushOperation(0, 0, (TUint8*) NULL, 0); |
1771 |
1769 |