From b3e9c534e2b0dc2c9acd2fe9b942e1fc5227339b Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Mon, 8 Feb 2016 17:36:03 -0500 Subject: os: unifdef STREAMSCONN Removed from xtrans in 2012, and never wired up in the modular build anyway. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith --- os/access.c | 17 ++++++++--------- os/connection.c | 4 ++-- os/utils.c | 4 ++-- os/xdmauth.c | 2 +- os/xdmcp.c | 44 -------------------------------------------- 5 files changed, 13 insertions(+), 58 deletions(-) (limited to 'os') diff --git a/os/access.c b/os/access.c index 10a48c37d..8b2177f56 100644 --- a/os/access.c +++ b/os/access.c @@ -106,7 +106,7 @@ SOFTWARE. #include #endif -#if defined(TCPCONN) || defined(STREAMSCONN) +#if defined(TCPCONN) #include #endif /* TCPCONN || STREAMSCONN */ @@ -426,7 +426,7 @@ ifioctl(int fd, int cmd, char *arg) void DefineSelf(int fd) { -#if !defined(TCPCONN) && !defined(STREAMSCONN) && !defined(UNIXCONN) +#if !defined(TCPCONN) && !defined(UNIXCONN) return; #else register int n; @@ -934,11 +934,10 @@ ResetHosts(const char *display) char *ptr; int i, hostlen; -#if (defined(TCPCONN) || defined(STREAMSCONN) ) && \ - (!defined(IPv6) || !defined(AF_INET6)) +#if defined(TCPCONN) && (!defined(IPv6) || !defined(AF_INET6)) union { struct sockaddr sa; -#if defined(TCPCONN) || defined(STREAMSCONN) +#if defined(TCPCONN) struct sockaddr_in in; #endif /* TCPCONN || STREAMSCONN */ } saddr; @@ -984,7 +983,7 @@ ResetHosts(const char *display) NewHost(family, "", 0, FALSE); LocalHostRequested = TRUE; /* Fix for XFree86 bug #156 */ } -#if defined(TCPCONN) || defined(STREAMSCONN) +#if defined(TCPCONN) else if (!strncmp("inet:", lhostname, 5)) { family = FamilyInternet; hostname = ohostname + 5; @@ -1023,7 +1022,7 @@ ResetHosts(const char *display) } else #endif /* SECURE_RPC */ -#if defined(TCPCONN) || defined(STREAMSCONN) +#if defined(TCPCONN) { #if defined(IPv6) && defined(AF_INET6) if ((family == FamilyInternet) || (family == FamilyInternet6) || @@ -1441,7 +1440,7 @@ CheckAddr(int family, const void *pAddr, unsigned length) int len; switch (family) { -#if defined(TCPCONN) || defined(STREAMSCONN) +#if defined(TCPCONN) case FamilyInternet: if (length == sizeof(struct in_addr)) len = length; @@ -1524,7 +1523,7 @@ ConvertAddr(register struct sockaddr *saddr, int *len, void **addr) case AF_UNIX: #endif return FamilyLocal; -#if defined(TCPCONN) || defined(STREAMSCONN) +#if defined(TCPCONN) case AF_INET: #ifdef WIN32 if (16777343 == *(long *) &((struct sockaddr_in *) saddr)->sin_addr) diff --git a/os/connection.c b/os/connection.c index 2a4fc8db8..4c1ba4b6d 100644 --- a/os/connection.c +++ b/os/connection.c @@ -82,7 +82,7 @@ SOFTWARE. #ifndef WIN32 #include -#if defined(TCPCONN) || defined(STREAMSCONN) +#if defined(TCPCONN) #include #include #ifdef apollo @@ -554,7 +554,7 @@ AuthAudit(ClientPtr client, Bool letin, #endif strlcpy(addr, "local host", sizeof(addr)); break; -#if defined(TCPCONN) || defined(STREAMSCONN) +#if defined(TCPCONN) case AF_INET: snprintf(addr, sizeof(addr), "IP %s", inet_ntoa(((struct sockaddr_in *) saddr)->sin_addr)); diff --git a/os/utils.c b/os/utils.c index ef7a2cc21..e48d9f856 100644 --- a/os/utils.c +++ b/os/utils.c @@ -108,7 +108,7 @@ __stdcall unsigned long GetTickCount(void); #include /* for malloc() */ -#if defined(TCPCONN) || defined(STREAMSCONN) +#if defined(TCPCONN) #ifndef WIN32 #include #endif @@ -1069,7 +1069,7 @@ int set_font_authorizations(char **authorizations, int *authlen, void *client) { #define AUTHORIZATION_NAME "hp-hostname-1" -#if defined(TCPCONN) || defined(STREAMSCONN) +#if defined(TCPCONN) static char *result = NULL; static char *p = NULL; diff --git a/os/xdmauth.c b/os/xdmauth.c index 482bc67db..cb2e39e12 100644 --- a/os/xdmauth.c +++ b/os/xdmauth.c @@ -277,7 +277,7 @@ XdmAuthorizationValidate(unsigned char *plain, int length, if (_XSERVTransGetPeerAddr(((OsCommPtr) xclient->osPrivate)->trans_conn, &family, &addr_len, &addr) == 0 && _XSERVTransConvertAddress(&family, &addr_len, &addr) == 0) { -#if defined(TCPCONN) || defined(STREAMSCONN) +#if defined(TCPCONN) if (family == FamilyInternet && memcmp((char *) addr, client->client, 4) != 0) { free(client); diff --git a/os/xdmcp.c b/os/xdmcp.c index dbf43ef3b..2cb8d76ec 100644 --- a/os/xdmcp.c +++ b/os/xdmcp.c @@ -46,12 +46,6 @@ #include "opaque.h" #include "site.h" -#ifdef STREAMSCONN -#include -#include -#include -#endif - #define XSERV_t #define TRANS_SERVER #define TRANS_REOPEN @@ -912,43 +906,6 @@ XdmcpAddAuthorization(ARRAY8Ptr name, ARRAY8Ptr data) static void get_xdmcp_sock(void) { -#ifdef STREAMSCONN - struct netconfig *nconf; - - if ((xdmcpSocket = t_open("/dev/udp", O_RDWR, 0)) < 0) { - XdmcpWarning("t_open() of /dev/udp failed"); - return; - } - - if (t_bind(xdmcpSocket, NULL, NULL) < 0) { - XdmcpWarning("UDP socket creation failed"); - t_error("t_bind(xdmcpSocket) failed"); - t_close(xdmcpSocket); - return; - } - - /* - * This part of the code looks contrived. It will actually fit in nicely - * when the CLTS part of Xtrans is implemented. - */ - - if ((nconf = getnetconfigent("udp")) == NULL) { - XdmcpWarning("UDP socket creation failed: getnetconfigent()"); - t_unbind(xdmcpSocket); - t_close(xdmcpSocket); - return; - } - - if (netdir_options(nconf, ND_SET_BROADCAST, xdmcpSocket, NULL)) { - XdmcpWarning("UDP set broadcast option failed: netdir_options()"); - freenetconfigent(nconf); - t_unbind(xdmcpSocket); - t_close(xdmcpSocket); - return; - } - - freenetconfigent(nconf); -#else int soopts = 1; #if defined(IPv6) && defined(AF_INET6) @@ -969,7 +926,6 @@ get_xdmcp_sock(void) xdm_from); } } -#endif /* STREAMSCONN */ } static void -- cgit v1.2.3