Browse Source

Proper cleanup on termination of Xvnc/libvnc.so

tags/v1.8.90
Pierre Ossman 6 years ago
parent
commit
621580d7a8

+ 1
- 0
unix/xserver/hw/vnc/vncExt.c View File

@@ -585,6 +585,7 @@ static int SProcVncExtDispatch(ClientPtr client)

static void vncResetProc(ExtensionEntry* extEntry)
{
vncExtensionClose();
}

static void vncClientStateChange(CallbackListPtr * l, void * d, void * p)

+ 12
- 0
unix/xserver/hw/vnc/vncExtInit.cc View File

@@ -262,6 +262,18 @@ void vncExtensionInit(void)
vncRegisterBlockHandlers();
}

void vncExtensionClose(void)
{
try {
for (int scr = 0; scr < vncGetScreenCount(); scr++) {
delete desktop[scr];
desktop[scr] = NULL;
}
} catch (rdr::Exception& e) {
vncFatalError("vncExtInit: %s",e.str());
}
}

void vncHandleSocketEvent(int fd, int scrIdx, int read, int write)
{
desktop[scrIdx]->handleSocketEvent(fd, read, write);

+ 1
- 0
unix/xserver/hw/vnc/vncExtInit.h View File

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

void vncExtensionInit(void);
void vncExtensionClose(void);

void vncHandleSocketEvent(int fd, int scrIdx, int read, int write);
void vncCallBlockHandlers(int* timeout);

Loading…
Cancel
Save