userlibandfileserver/fileserver/shostmassstorage/server/controller/cusbhostmsdevicethread.cpp
branchGCC_SURGE
changeset 221 39b39e1a406e
parent 201 43365a9b78a3
child 268 345b1ca54e88
--- a/userlibandfileserver/fileserver/shostmassstorage/server/controller/cusbhostmsdevicethread.cpp	Wed Jul 21 14:46:58 2010 +0100
+++ b/userlibandfileserver/fileserver/shostmassstorage/server/controller/cusbhostmsdevicethread.cpp	Thu Jul 22 16:46:39 2010 +0100
@@ -308,6 +308,9 @@
             }
 		return;
 	case EUsbHostMsUnRegisterInterface:
+		// Check whether all luns have got uninitialised. 
+		for(TInt i = 0, j = iUsbHostMsDevice->GetMaxLun(); i <= j; i++)
+			TRAP_IGNORE(iUsbHostMsDevice->RemoveLunL(i));
 		TRAP(ret, UnRegisterInterfaceL(aMessage));
 		break;
 	case EUsbHostMsRegisterLun: