mirror of https://github.com/jetkvm/kvm.git
Removed RemoteVirtualMediaState.WebRTC
Also removed dead go code (to make that lint happy!)
This commit is contained in:
parent
34dff0a3aa
commit
16692bc94d
|
@ -22,17 +22,11 @@ func (r remoteImageBackend) ReadAt(p []byte, off int64) (n int, err error) {
|
||||||
return 0, errors.New("image not mounted")
|
return 0, errors.New("image not mounted")
|
||||||
}
|
}
|
||||||
source := currentVirtualMediaState.Source
|
source := currentVirtualMediaState.Source
|
||||||
mountedImageSize := currentVirtualMediaState.Size
|
|
||||||
virtualMediaStateMutex.RUnlock()
|
virtualMediaStateMutex.RUnlock()
|
||||||
|
|
||||||
_, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
_, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
readLen := int64(len(p))
|
|
||||||
if off+readLen > mountedImageSize {
|
|
||||||
readLen = mountedImageSize - off
|
|
||||||
}
|
|
||||||
|
|
||||||
switch source {
|
switch source {
|
||||||
case HTTP:
|
case HTTP:
|
||||||
return httpRangeReader.ReadAt(p, off)
|
return httpRangeReader.ReadAt(p, off)
|
||||||
|
|
|
@ -375,7 +375,7 @@ export const useSettingsStore = create(
|
||||||
);
|
);
|
||||||
|
|
||||||
export interface RemoteVirtualMediaState {
|
export interface RemoteVirtualMediaState {
|
||||||
source: "WebRTC" | "HTTP" | "Storage" | null;
|
source: "HTTP" | "Storage" | null;
|
||||||
mode: "CDROM" | "Disk" | null;
|
mode: "CDROM" | "Disk" | null;
|
||||||
filename: string | null;
|
filename: string | null;
|
||||||
url: string | null;
|
url: string | null;
|
||||||
|
|
|
@ -161,7 +161,6 @@ func rpcCheckMountUrl(url string) (*VirtualMediaUrlInfo, error) {
|
||||||
type VirtualMediaSource string
|
type VirtualMediaSource string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
WebRTC VirtualMediaSource = "WebRTC"
|
|
||||||
HTTP VirtualMediaSource = "HTTP"
|
HTTP VirtualMediaSource = "HTTP"
|
||||||
Storage VirtualMediaSource = "Storage"
|
Storage VirtualMediaSource = "Storage"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue