summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java
index 9bae8009..953a6651 100644
--- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java
+++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java
@@ -32,6 +32,7 @@ import org.openslx.util.Json;
import org.openslx.util.Util;
import org.openslx.util.vm.UnsupportedVirtualizerFormatException;
import org.openslx.util.vm.VmMetaData;
+import org.openslx.util.vm.VmMetaData.UsbSpeed;
import com.google.gson.JsonParseException;
@@ -557,7 +558,7 @@ public class DbLecture {
String lectureName;
String osKeyword;
boolean usbAccess;
- VmMetaData<?, ?, ?, ?> meta = null;
+ VmMetaData<?, ?, ?, ?, ?> meta = null;
try (MysqlConnection connection = Database.getConnection()) {
// Get required data about lecture and used image
MysqlStatement stmt = connection.prepareStatement("SELECT"
@@ -608,7 +609,9 @@ public class DbLecture {
}
meta.addHddTemplate("%VM_DISK_PATH%", "%VM_DISK_MODE%", "%VM_DISK_REDOLOGDIR%");
meta.addEthernet(VmMetaData.EtherType.NAT); // TODO: Use config
- meta.enableUsb(usbAccess);
+ if (!usbAccess) {
+ meta.setMaxUsbSpeed(UsbSpeed.NONE);
+ }
meta.disableSuspend();
return retval;
}
@@ -706,7 +709,7 @@ public class DbLecture {
}
public static class LaunchData {
- public VmMetaData<?, ?, ?, ?> vmx;
+ public VmMetaData<?, ?, ?, ?, ?> vmx;
public List<NetShare> netShares;
public String legacyRunScript;
public List<RunScript> runScript;