- Timestamp:
- Feb 4, 2016 6:58:16 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/ApplianceImpl.cpp
r59577 r59590 1197 1197 DECLCALLBACK(int) Appliance::i_taskThreadImportOrExport(RTTHREAD /* aThread */, void *pvUser) 1198 1198 { 1199 TaskOVF * task = static_cast<TaskOVF*>(pvUser);1200 AssertReturn( task, VERR_GENERAL_FAILURE);1201 1202 Appliance *pAppliance = task->pAppliance;1199 TaskOVF *pTask = static_cast<TaskOVF*>(pvUser); 1200 AssertReturn(pTask, VERR_GENERAL_FAILURE); 1201 1202 Appliance *pAppliance = pTask->pAppliance; 1203 1203 1204 1204 LogFlowFuncEnter(); 1205 LogFlowFunc(("Appliance %p taskType=%d\n", pAppliance, task->taskType)); 1206 1207 HRESULT taskrc = S_OK; 1208 1209 switch (task->taskType) 1205 LogFlowFunc(("Appliance %p taskType=%d\n", pAppliance, pTask->taskType)); 1206 1207 switch (pTask->taskType) 1210 1208 { 1211 1209 case TaskOVF::Read: 1212 if ( task->locInfo.storageType == VFSType_File)1213 taskrc = pAppliance->i_readFS(task);1214 else if (task->locInfo.storageType == VFSType_S3)1215 taskrc = VERR_NOT_IMPLEMENTED;1216 break;1210 if (pTask->locInfo.storageType == VFSType_File) 1211 pTask->rc = pAppliance->i_readFS(pTask); 1212 else 1213 pTask->rc = E_NOTIMPL; 1214 break; 1217 1215 1218 1216 case TaskOVF::Import: 1219 if ( task->locInfo.storageType == VFSType_File)1220 taskrc = pAppliance->i_importFS(task);1221 else if (task->locInfo.storageType == VFSType_S3)1222 taskrc = VERR_NOT_IMPLEMENTED;1223 break;1217 if (pTask->locInfo.storageType == VFSType_File) 1218 pTask->rc = pAppliance->i_importFS(pTask); 1219 else 1220 pTask->rc = E_NOTIMPL; 1221 break; 1224 1222 1225 1223 case TaskOVF::Write: 1226 if (task->locInfo.storageType == VFSType_File) 1227 taskrc = pAppliance->i_writeFS(task); 1228 else if (task->locInfo.storageType == VFSType_S3) 1229 taskrc = VERR_NOT_IMPLEMENTED; 1230 break; 1231 } 1232 1233 task->rc = taskrc; 1234 1235 if (!task->pProgress.isNull()) 1236 task->pProgress->i_notifyComplete(taskrc); 1224 if (pTask->locInfo.storageType == VFSType_File) 1225 pTask->rc = pAppliance->i_writeFS(pTask); 1226 else 1227 pTask->rc = E_NOTIMPL; 1228 break; 1229 1230 default: 1231 AssertFailed(); 1232 pTask->rc = E_FAIL; 1233 break; 1234 } 1235 1236 if (!pTask->pProgress.isNull()) 1237 pTask->pProgress->i_notifyComplete(pTask->rc); 1237 1238 1238 1239 LogFlowFuncLeave();
Note:
See TracChangeset
for help on using the changeset viewer.