[PATCH xserver] os: unifdef STREAMSCONN

Adam Jackson ajax at redhat.com
Mon Feb 8 22:36:03 UTC 2016


Removed from xtrans in 2012, and never wired up in the modular build
anyway.

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 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(-)

diff --git a/os/access.c b/os/access.c
index 10a48c3..8b2177f 100644
--- a/os/access.c
+++ b/os/access.c
@@ -106,7 +106,7 @@ SOFTWARE.
 #include <pwd.h>
 #endif
 
-#if defined(TCPCONN) || defined(STREAMSCONN)
+#if defined(TCPCONN)
 #include <netinet/in.h>
 #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 2a4fc8d..4c1ba4b 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -82,7 +82,7 @@ SOFTWARE.
 #ifndef WIN32
 #include <sys/socket.h>
 
-#if defined(TCPCONN) || defined(STREAMSCONN)
+#if defined(TCPCONN)
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #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 ef7a2cc..e48d9f8 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -108,7 +108,7 @@ __stdcall unsigned long GetTickCount(void);
 
 #include <stdlib.h>             /* for malloc() */
 
-#if defined(TCPCONN) || defined(STREAMSCONN)
+#if defined(TCPCONN)
 #ifndef WIN32
 #include <netdb.h>
 #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 482bc67..cb2e39e 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 dbf43ef..2cb8d76 100644
--- a/os/xdmcp.c
+++ b/os/xdmcp.c
@@ -46,12 +46,6 @@
 #include "opaque.h"
 #include "site.h"
 
-#ifdef STREAMSCONN
-#include <tiuser.h>
-#include <netconfig.h>
-#include <netdir.h>
-#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
-- 
2.5.0



More information about the xorg-devel mailing list