Skip to content

Commit 3198de0

Browse files
committed
[PR #1437] os: drop ResetWellKnownSockets() and XdmcpReset()
PR: #1437
1 parent 75fe008 commit 3198de0

File tree

5 files changed

+1
-66
lines changed

5 files changed

+1
-66
lines changed

doc/Xserver-spec.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,13 +1013,6 @@ your server, main() calls the routine
10131013

10141014
void CreateWellKnownSockets()
10151015
</programlisting></blockquote>
1016-
This routine is called only once, and not called when the server
1017-
is reset. To recreate any sockets during server resets, the following
1018-
routine is called from the main loop:
1019-
<blockquote><programlisting>
1020-
1021-
void ResetWellKnownSockets()
1022-
</programlisting></blockquote>
10231016
Sample implementations of both of these routines are found in
10241017
Xserver/os/connection.c.
10251018
</para>

os/client_priv.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ void FlushIfCriticalOutputPending(void);
5353
void ResetOsBuffers(void);
5454
void NotifyParentProcess(void);
5555
void CreateWellKnownSockets(void);
56-
void ResetWellKnownSockets(void);
5756
void CloseWellKnownConnections(void);
5857

5958
// exported for nvidia driver

os/connection.c

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ SOFTWARE.
4646
/*****************************************************************
4747
* Stuff to create connections --- OS dependent
4848
*
49-
* EstablishNewConnections, CreateWellKnownSockets, ResetWellKnownSockets,
49+
* EstablishNewConnections, CreateWellKnownSockets
5050
* CloseDownConnection,
5151
* OnlyListToOneClient,
5252
* ListenToAllClients,
@@ -309,54 +309,6 @@ CreateWellKnownSockets(void)
309309
#endif
310310
}
311311

312-
void
313-
ResetWellKnownSockets(void)
314-
{
315-
int i;
316-
317-
ResetOsBuffers();
318-
319-
for (i = 0; i < ListenTransCount; i++) {
320-
int status = _XSERVTransResetListener(ListenTransConns[i]);
321-
322-
if (status != TRANS_RESET_NOOP) {
323-
if (status == TRANS_RESET_FAILURE) {
324-
/*
325-
* ListenTransConns[i] freed by xtrans.
326-
* Remove it from out list.
327-
*/
328-
329-
RemoveNotifyFd(ListenTransFds[i]);
330-
ListenTransFds[i] = ListenTransFds[ListenTransCount - 1];
331-
ListenTransConns[i] = ListenTransConns[ListenTransCount - 1];
332-
ListenTransCount -= 1;
333-
i -= 1;
334-
}
335-
else if (status == TRANS_RESET_NEW_FD) {
336-
/*
337-
* A new file descriptor was allocated (the old one was closed)
338-
*/
339-
340-
int newfd = _XSERVTransGetConnectionNumber(ListenTransConns[i]);
341-
342-
ListenTransFds[i] = newfd;
343-
}
344-
}
345-
}
346-
for (i = 0; i < ListenTransCount; i++)
347-
SetNotifyFd(ListenTransFds[i], EstablishNewConnections, X_NOTIFY_READ,
348-
NULL);
349-
350-
ResetAuthorization();
351-
ResetHosts(display);
352-
/*
353-
* restart XDMCP
354-
*/
355-
#ifdef XDMCP
356-
XdmcpReset();
357-
#endif
358-
}
359-
360312
void
361313
CloseWellKnownConnections(void)
362314
{

os/xdmcp.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -604,14 +604,6 @@ XdmcpInit(void)
604604
}
605605
}
606606

607-
void
608-
XdmcpReset(void)
609-
{
610-
state = XDM_INIT_STATE;
611-
if (state != XDM_OFF)
612-
xdmcp_reset();
613-
}
614-
615607
/*
616608
* Called whenever a new connection is created; notices the
617609
* first connection and saves it to terminate the session

os/xdmcp.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ void XdmcpRegisterConnection(int type, const char *address, int addrlen);
1717
void XdmcpRegisterAuthorizations(void);
1818
void XdmcpRegisterAuthorization(const char *name);
1919
void XdmcpInit(void);
20-
void XdmcpReset(void);
2120
void XdmcpOpenDisplay(int sock);
2221
void XdmcpCloseDisplay(int sock);
2322
void XdmcpRegisterAuthentication(const char *name,

0 commit comments

Comments
 (0)