diff --git a/block_device.go b/block_device.go index f20b65d..2099da8 100644 --- a/block_device.go +++ b/block_device.go @@ -22,17 +22,11 @@ func (r remoteImageBackend) ReadAt(p []byte, off int64) (n int, err error) { return 0, errors.New("image not mounted") } source := currentVirtualMediaState.Source - mountedImageSize := currentVirtualMediaState.Size virtualMediaStateMutex.RUnlock() _, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() - readLen := int64(len(p)) - if off+readLen > mountedImageSize { - readLen = mountedImageSize - off - } - switch source { case HTTP: return httpRangeReader.ReadAt(p, off) diff --git a/ui/src/hooks/stores.ts b/ui/src/hooks/stores.ts index 819ccc2..a6dc95b 100644 --- a/ui/src/hooks/stores.ts +++ b/ui/src/hooks/stores.ts @@ -375,7 +375,7 @@ export const useSettingsStore = create( ); export interface RemoteVirtualMediaState { - source: "WebRTC" | "HTTP" | "Storage" | null; + source: "HTTP" | "Storage" | null; mode: "CDROM" | "Disk" | null; filename: string | null; url: string | null; diff --git a/usb_mass_storage.go b/usb_mass_storage.go index 0db4c52..0f1f4b9 100644 --- a/usb_mass_storage.go +++ b/usb_mass_storage.go @@ -161,7 +161,6 @@ func rpcCheckMountUrl(url string) (*VirtualMediaUrlInfo, error) { type VirtualMediaSource string const ( - WebRTC VirtualMediaSource = "WebRTC" HTTP VirtualMediaSource = "HTTP" Storage VirtualMediaSource = "Storage" )