os: drop ResetWellKnownSockets() and XdmcpReset()

Since internal server reset is gone, those aren't needed anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-11-12 16:57:07 +01:00
committed by Enrico Weigelt
parent 6a1bdcedd3
commit 0b3aaa0369
5 changed files with 2 additions and 66 deletions

View File

@@ -1013,13 +1013,7 @@ your server, main() calls the routine
void CreateWellKnownSockets()
</programlisting></blockquote>
This routine is called only once, and not called when the server
is reset. To recreate any sockets during server resets, the following
routine is called from the main loop:
<blockquote><programlisting>
void ResetWellKnownSockets()
</programlisting></blockquote>
This routine is called only once.
Sample implementations of both of these routines are found in
Xserver/os/connection.c.
</para>

View File

@@ -53,7 +53,6 @@ void FlushIfCriticalOutputPending(void);
void ResetOsBuffers(void);
void NotifyParentProcess(void);
void CreateWellKnownSockets(void);
void ResetWellKnownSockets(void);
void CloseWellKnownConnections(void);
// exported for nvidia driver

View File

@@ -46,7 +46,7 @@ SOFTWARE.
/*****************************************************************
* Stuff to create connections --- OS dependent
*
* EstablishNewConnections, CreateWellKnownSockets, ResetWellKnownSockets,
* EstablishNewConnections, CreateWellKnownSockets
* CloseDownConnection,
* OnlyListToOneClient,
* ListenToAllClients,
@@ -310,54 +310,6 @@ CreateWellKnownSockets(void)
#endif
}
void
ResetWellKnownSockets(void)
{
int i;
ResetOsBuffers();
for (i = 0; i < ListenTransCount; i++) {
int status = _XSERVTransResetListener(ListenTransConns[i]);
if (status != TRANS_RESET_NOOP) {
if (status == TRANS_RESET_FAILURE) {
/*
* ListenTransConns[i] freed by xtrans.
* Remove it from out list.
*/
RemoveNotifyFd(ListenTransFds[i]);
ListenTransFds[i] = ListenTransFds[ListenTransCount - 1];
ListenTransConns[i] = ListenTransConns[ListenTransCount - 1];
ListenTransCount -= 1;
i -= 1;
}
else if (status == TRANS_RESET_NEW_FD) {
/*
* A new file descriptor was allocated (the old one was closed)
*/
int newfd = _XSERVTransGetConnectionNumber(ListenTransConns[i]);
ListenTransFds[i] = newfd;
}
}
}
for (i = 0; i < ListenTransCount; i++)
SetNotifyFd(ListenTransFds[i], EstablishNewConnections, X_NOTIFY_READ,
NULL);
ResetAuthorization();
ResetHosts(display);
/*
* restart XDMCP
*/
#ifdef XDMCP
XdmcpReset();
#endif
}
void
CloseWellKnownConnections(void)
{

View File

@@ -604,14 +604,6 @@ XdmcpInit(void)
}
}
void
XdmcpReset(void)
{
state = XDM_INIT_STATE;
if (state != XDM_OFF)
xdmcp_reset();
}
/*
* Called whenever a new connection is created; notices the
* first connection and saves it to terminate the session

View File

@@ -17,7 +17,6 @@ void XdmcpRegisterConnection(int type, const char *address, int addrlen);
void XdmcpRegisterAuthorizations(void);
void XdmcpRegisterAuthorization(const char *name);
void XdmcpInit(void);
void XdmcpReset(void);
void XdmcpOpenDisplay(int sock);
void XdmcpCloseDisplay(int sock);
void XdmcpRegisterAuthentication(const char *name,