瀏覽代碼

Refuse to start Xvnc if we failed to initialise a screen

Starting Xvnc without having any VNC functionality is pretty much
pointless. So terminate when that happens, making the situation easier
to detect for startup scripts.
tags/v1.5.90
Pierre Ossman 8 年之前
父節點
當前提交
e3ee57a95b
共有 3 個文件被更改,包括 11 次插入0 次删除
  1. 5
    0
      unix/xserver/hw/vnc/vncExtInit.cc
  2. 1
    0
      unix/xserver/hw/vnc/vncExtInit.h
  3. 5
    0
      unix/xserver/hw/vnc/xvnc.c

+ 5
- 0
unix/xserver/hw/vnc/vncExtInit.cc 查看文件

@@ -205,6 +205,11 @@ void vncExtensionInit(void)
vncRegisterBlockHandlers();
}

int vncExtensionIsActive(int scrIdx)
{
return (desktop[scrIdx] != NULL);
}

void vncCallReadBlockHandlers(fd_set * fds, struct timeval ** timeout)
{
for (int scr = 0; scr < vncGetScreenCount(); scr++)

+ 1
- 0
unix/xserver/hw/vnc/vncExtInit.h 查看文件

@@ -50,6 +50,7 @@ extern int vncFbstride[];
extern int vncInetdSock;

void vncExtensionInit(void);
int vncExtensionIsActive(int scrIdx);

void vncCallReadBlockHandlers(fd_set * fds, struct timeval ** timeout);
void vncCallReadWakeupHandlers(fd_set * fds, int nfds);

+ 5
- 0
unix/xserver/hw/vnc/xvnc.c 查看文件

@@ -1744,6 +1744,11 @@ void ProcessInputEvents(void)

void InitInput(int argc, char *argv[])
{
int i;
for (i = 0;i < screenInfo.numScreens;i++) {
if (!vncExtensionIsActive(i))
FatalError("failed to activate VNC extension for one or more screens");
}
mieqInit ();
}


Loading…
取消
儲存