userlibandfileserver/fileserver/shostmassstorage/server/protocol/cscsiprotocol.cpp
changeset 31 56f325a607ea
parent 0 a41df078684a
child 33 0173bcd7697c
--- a/userlibandfileserver/fileserver/shostmassstorage/server/protocol/cscsiprotocol.cpp	Mon Dec 21 16:14:42 2009 +0000
+++ b/userlibandfileserver/fileserver/shostmassstorage/server/protocol/cscsiprotocol.cpp	Wed Dec 23 11:43:31 2009 +0000
@@ -70,6 +70,11 @@
 	__MSFNLOG
     iFsm = CMassStorageFsm::NewL(*this);
 	iState = EDisconnected;
+
+    const TInt blockLength = 0x200;
+
+    iHeadbuf.CreateL(blockLength);
+    iTailbuf.CreateL(blockLength);
     }
 
 
@@ -85,6 +90,8 @@
     {
 	__MSFNLOG
     delete iFsm;
+    iHeadbuf.Close();
+    iTailbuf.Close();
     delete iSbcInterface;
     }
 
@@ -351,6 +358,7 @@
 
     // SCSI Block device
     iSbcInterface = new (ELeave) TSbcClientInterface(iSpcInterface.Transport());
+    iSbcInterface->InitBuffers(&iHeadbuf, &iTailbuf);
 
     return KErrNone;
     }
@@ -653,7 +661,8 @@
     // SCSI Block device
     ASSERT(iSbcInterface == NULL);
     iSbcInterface = new (ELeave) TSbcClientInterface(iSpcInterface.Transport());
-    iSbcInterface->SetCapacity(aBlockLen, aLastLba);
+    iSbcInterface->InitBuffers(&iHeadbuf, &iTailbuf);
+    iSbcInterface->SetCapacityL(aBlockLen, aLastLba);
     }