[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xtrans: Changes to 'debian-unstable'



 ChangeLog        |   89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 Xtrans.c         |   59 ++++++++++++++++++++++++++----------
 Xtrans.h         |   24 ++++++++------
 Xtransint.h      |   34 ++++++++++-----------
 Xtranslcl.c      |   74 ++++++++++++++++++++++++---------------------
 Xtranssock.c     |   35 +++++++++++----------
 configure.ac     |    2 -
 debian/changelog |    6 +++
 doc/xtrans.xml   |   88 +++++++++++++++++++++++++++---------------------------
 9 files changed, 273 insertions(+), 138 deletions(-)

New commits:
commit 4f50ff3f112eeb5024f5c9935040a8cc5ecd42c5
Author: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Date:   Tue Nov 4 14:23:11 2014 +0100

    New upstream release.

diff --git a/ChangeLog b/ChangeLog
index 99098f9..a82f3b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,92 @@
+commit 7cbad9fe2e61cd9d5caeaf361826a6f4bd320f03
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Sep 20 10:02:05 2014 -0700
+
+    xtrans 1.3.5
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit fb7f198c88e97d22c8c89e76e9cd06b2b2720a96
+Author: Keith Packard <keithp@keithp.com>
+Date:   Fri Sep 12 11:27:39 2014 -0700
+
+    Add TRANS(Listen) function to re-enable specific listen sockets
+    
+    This will allow a server to disable listeners by default and then
+    let later configuration re-enable them. In particular, this lets the X
+    server disable inet and unix listen sockets by default while still
+    providing a '-listen' command line option to re-enable them later on.
+    
+    Signed-off-by: Keith Packard <keithp@keithp.com>
+    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
+
+commit 17491de45c352c833442cccf17a9bd65909889db
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Aug 23 12:28:14 2014 -0700
+
+    Add const qualifiers to TRANS(OpenC{L,O}TS{Server,Client}) args
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 305d20f2ee888d1c890f902da978176b8ec58a8d
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Aug 23 12:10:48 2014 -0700
+
+    Add const qualifiers to TRANS(MakeAll*ServerListeners) port args
+    
+    Required also changing receive_listening_fds to specify port as const,
+    which we can do now that TRANS(ReopenCOTSServer) takes it as const.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit ba70d48951fb925fb3082d81afb08c330333aa51
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Aug 23 11:33:57 2014 -0700
+
+    Add const qualifiers to TRANS(Connect) args
+    
+    Also required constifying UnixHostReallyLocal, since SocketUNIXConnect
+    passes the host arg through to it.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 63b65a20706def951dd25e531949b7bc556419eb
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Aug 23 10:17:57 2014 -0700
+
+    Add const qualifiers to TRANS(CreateListener) port args
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit fd90a4e00321b22c96565cfa354b8b0efa376979
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Aug 23 10:07:22 2014 -0700
+
+    Add const qualifiers to TRANS(Reopen...) port args
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit a56ec9d720a7964bada837790e9c1f6ceef97861
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Aug 23 09:58:05 2014 -0700
+
+    Add const qualifiers to TRANS(Open...) address args
+    
+    Required also adding const to static TRANS(ParseAddress) function which
+    they pass the address arg to for parsing.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 30b3fd74a27c80993e81dfcb33e33520ae8684fb
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Aug 23 12:46:44 2014 -0700
+
+    Update docs to note that TransName is now const char *
+    
+    Missed when the code was updated in commit eb9a8904fbef61a57ff0.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
 commit a57a7f62242e1ea972b81414741729bf3dbae0a4
 Author: Hans de Goede <hdegoede@redhat.com>
 Date:   Mon Mar 31 12:37:43 2014 +0200
diff --git a/debian/changelog b/debian/changelog
index 8da2fd4..39ddc4a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xtrans (1.3.5-1) unstable; urgency=medium
+
+  * New upstream release.
+
+ -- Maarten Lankhorst <maarten.lankhorst@ubuntu.com>  Tue, 04 Nov 2014 14:22:28 +0100
+
 xtrans (1.3.4-1) unstable; urgency=medium
 
   * New upstream release.

commit 7cbad9fe2e61cd9d5caeaf361826a6f4bd320f03
Author: Keith Packard <keithp@keithp.com>
Date:   Sat Sep 20 10:02:05 2014 -0700

    xtrans 1.3.5
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/configure.ac b/configure.ac
index bb8a34c..b43f0f3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@
 
 # Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([xtrans], [1.3.4],
+AC_INIT([xtrans], [1.3.5],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xtrans])
 AC_CONFIG_SRCDIR([Makefile.am])
 

commit fb7f198c88e97d22c8c89e76e9cd06b2b2720a96
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Sep 12 11:27:39 2014 -0700

    Add TRANS(Listen) function to re-enable specific listen sockets
    
    This will allow a server to disable listeners by default and then
    let later configuration re-enable them. In particular, this lets the X
    server disable inet and unix listen sockets by default while still
    providing a '-listen' command line option to re-enable them later on.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

diff --git a/Xtrans.c b/Xtrans.c
index 2880803..bfba1ad 100644
--- a/Xtrans.c
+++ b/Xtrans.c
@@ -804,6 +804,31 @@ TRANS(NoListen) (const char * protocol)
 }
 
 int
+TRANS(Listen) (const char * protocol)
+{
+   Xtransport *trans;
+   int i = 0, ret = 0;
+
+   if ((trans = TRANS(SelectTransport)(protocol)) == NULL)
+   {
+	prmsg (1,"TransListen: unable to find transport: %s\n",
+	       protocol);
+
+	return -1;
+   }
+   if (trans->flags & TRANS_ALIAS) {
+       if (trans->nolisten)
+	   while (trans->nolisten[i]) {
+	       ret |= TRANS(Listen)(trans->nolisten[i]);
+	       i++;
+       }
+   }
+
+   trans->flags &= ~TRANS_NOLISTEN;
+   return ret;
+}
+
+int
 TRANS(IsListening) (const char * protocol)
 {
    Xtransport *trans;
diff --git a/Xtrans.h b/Xtrans.h
index 6decc6b..026fbd7 100644
--- a/Xtrans.h
+++ b/Xtrans.h
@@ -311,6 +311,10 @@ int TRANS(NoListen) (
     const char*         /* protocol*/
 );
 
+int TRANS(Listen) (
+    const char*         /* protocol*/
+);
+
 int TRANS(IsListening) (
     const char*         /* protocol*/
 );

commit 17491de45c352c833442cccf17a9bd65909889db
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Aug 23 12:28:14 2014 -0700

    Add const qualifiers to TRANS(OpenC{L,O}TS{Server,Client}) args
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/Xtransint.h b/Xtransint.h
index f674e5b..5ff824d 100644
--- a/Xtransint.h
+++ b/Xtransint.h
@@ -163,9 +163,9 @@ typedef struct _Xtransport {
 
     XtransConnInfo (*OpenCOTSClient)(
 	struct _Xtransport *,	/* transport */
-	char *,			/* protocol */
-	char *,			/* host */
-	char *			/* port */
+	const char *,		/* protocol */
+	const char *,		/* host */
+	const char *		/* port */
     );
 
 #endif /* TRANS_CLIENT */
@@ -174,9 +174,9 @@ typedef struct _Xtransport {
     const char **	nolisten;
     XtransConnInfo (*OpenCOTSServer)(
 	struct _Xtransport *,	/* transport */
-	char *,			/* protocol */
-	char *,			/* host */
-	char *			/* port */
+	const char *,		/* protocol */
+	const char *,		/* host */
+	const char *		/* port */
     );
 
 #endif /* TRANS_SERVER */
@@ -185,9 +185,9 @@ typedef struct _Xtransport {
 
     XtransConnInfo (*OpenCLTSClient)(
 	struct _Xtransport *,	/* transport */
-	char *,			/* protocol */
-	char *,			/* host */
-	char *			/* port */
+	const char *,		/* protocol */
+	const char *,		/* host */
+	const char *		/* port */
     );
 
 #endif /* TRANS_CLIENT */
@@ -196,9 +196,9 @@ typedef struct _Xtransport {
 
     XtransConnInfo (*OpenCLTSServer)(
 	struct _Xtransport *,	/* transport */
-	char *,			/* protocol */
-	char *,			/* host */
-	char *			/* port */
+	const char *,		/* protocol */
+	const char *,		/* host */
+	const char *		/* port */
     );
 
 #endif /* TRANS_SERVER */
diff --git a/Xtranslcl.c b/Xtranslcl.c
index 4f04927..3217506 100644
--- a/Xtranslcl.c
+++ b/Xtranslcl.c
@@ -123,7 +123,7 @@ static int TRANS(LocalClose)(XtransConnInfo ciptr);
 /* Type Not Supported */
 
 static int
-TRANS(OpenFail)(XtransConnInfo ciptr _X_UNUSED, char *port _X_UNUSED)
+TRANS(OpenFail)(XtransConnInfo ciptr _X_UNUSED, const char *port _X_UNUSED)
 
 {
     return -1;
@@ -159,7 +159,8 @@ TRANS(LocalSendFdInvalid)(XtransConnInfo ciptr, int fd, int do_close)
 
 
 static int
-TRANS(FillAddrInfo)(XtransConnInfo ciptr, char *sun_path, char *peer_sun_path)
+TRANS(FillAddrInfo)(XtransConnInfo ciptr,
+                    const char *sun_path, const char *peer_sun_path)
 
 {
     struct sockaddr_un	*sunaddr;
@@ -317,7 +318,7 @@ static void _dummy(int sig _X_UNUSED)
 #ifdef TRANS_CLIENT
 
 static int
-TRANS(PTSOpenClient)(XtransConnInfo ciptr, char *port)
+TRANS(PTSOpenClient)(XtransConnInfo ciptr, const char *port)
 
 {
 #ifdef PTSNODENAME
@@ -469,7 +470,7 @@ TRANS(PTSOpenClient)(XtransConnInfo ciptr, char *port)
 #ifdef TRANS_SERVER
 
 static int
-TRANS(PTSOpenServer)(XtransConnInfo ciptr, char *port)
+TRANS(PTSOpenServer)(XtransConnInfo ciptr, const char *port)
 
 {
 #ifdef PTSNODENAME
@@ -670,7 +671,7 @@ TRANS(PTSAccept)(XtransConnInfo ciptr, XtransConnInfo newciptr, int *status)
 #ifdef TRANS_CLIENT
 
 static int
-TRANS(NAMEDOpenClient)(XtransConnInfo ciptr, char *port)
+TRANS(NAMEDOpenClient)(XtransConnInfo ciptr, const char *port)
 
 {
 #ifdef NAMEDNODENAME
@@ -807,7 +808,7 @@ TRANS(NAMEDOpenPipe)(const char *server_path)
 #endif
 
 static int
-TRANS(NAMEDOpenServer)(XtransConnInfo ciptr, char *port)
+TRANS(NAMEDOpenServer)(XtransConnInfo ciptr, const char *port)
 {
 #ifdef NAMEDNODENAME
     int			fd;
@@ -1013,7 +1014,7 @@ named_spipe(int fd, char *path)
 #ifdef TRANS_CLIENT
 
 static int
-TRANS(SCOOpenClient)(XtransConnInfo ciptr, char *port)
+TRANS(SCOOpenClient)(XtransConnInfo ciptr, const char *port)
 {
 #ifdef SCORNODENAME
     int			fd, server, fl, ret;
@@ -1101,7 +1102,7 @@ TRANS(SCOOpenClient)(XtransConnInfo ciptr, char *port)
 #ifdef TRANS_SERVER
 
 static int
-TRANS(SCOOpenServer)(XtransConnInfo ciptr, char *port)
+TRANS(SCOOpenServer)(XtransConnInfo ciptr, const char *port)
 {
 #ifdef SCORNODENAME
     char		serverR_path[64];
@@ -1408,7 +1409,7 @@ typedef struct _LOCALtrans2dev {
 #ifdef TRANS_CLIENT
 
     int	(*devcotsopenclient)(
-	XtransConnInfo, char * /*port*/
+	XtransConnInfo, const char * /*port*/
 );
 
 #endif /* TRANS_CLIENT */
@@ -1416,7 +1417,7 @@ typedef struct _LOCALtrans2dev {
 #ifdef TRANS_SERVER
 
     int	(*devcotsopenserver)(
-	XtransConnInfo, char * /*port*/
+	XtransConnInfo, const char * /*port*/
 );
 
 #endif /* TRANS_SERVER */
@@ -1424,7 +1425,7 @@ typedef struct _LOCALtrans2dev {
 #ifdef TRANS_CLIENT
 
     int	(*devcltsopenclient)(
-	XtransConnInfo, char * /*port*/
+	XtransConnInfo, const char * /*port*/
 );
 
 #endif /* TRANS_CLIENT */
@@ -1432,7 +1433,7 @@ typedef struct _LOCALtrans2dev {
 #ifdef TRANS_SERVER
 
     int	(*devcltsopenserver)(
-	XtransConnInfo, char * /*port*/
+	XtransConnInfo, const char * /*port*/
 );
 
 #endif /* TRANS_SERVER */
@@ -1758,7 +1759,7 @@ TRANS(LocalGetNextTransport)(void)
  */
 
 static int
-HostReallyLocal (char *host)
+HostReallyLocal (const char *host)
 
 {
     /*
@@ -1788,7 +1789,8 @@ HostReallyLocal (char *host)
 
 
 static XtransConnInfo
-TRANS(LocalOpenClient)(int type, char *protocol, char *host, char *port)
+TRANS(LocalOpenClient)(int type, const char *protocol,
+                       const char *host, const char *port)
 
 {
     LOCALtrans2dev *transptr;
@@ -1883,7 +1885,8 @@ TRANS(LocalOpenClient)(int type, char *protocol, char *host, char *port)
 #ifdef TRANS_SERVER
 
 static XtransConnInfo
-TRANS(LocalOpenServer)(int type, char *protocol, char *host _X_UNUSED, char *port)
+TRANS(LocalOpenServer)(int type, const char *protocol,
+                       const char *host _X_UNUSED, const char *port)
 
 {
     int	i;
@@ -1998,8 +2001,8 @@ TRANS(LocalReopenServer)(int type, int index, int fd, const char *port)
 #ifdef TRANS_CLIENT
 
 static XtransConnInfo
-TRANS(LocalOpenCOTSClient)(Xtransport *thistrans _X_UNUSED, char *protocol,
-			   char *host, char *port)
+TRANS(LocalOpenCOTSClient)(Xtransport *thistrans _X_UNUSED, const char *protocol,
+			   const char *host, const char *port)
 
 {
     prmsg(2,"LocalOpenCOTSClient(%s,%s,%s)\n",protocol,host,port);
@@ -2013,8 +2016,8 @@ TRANS(LocalOpenCOTSClient)(Xtransport *thistrans _X_UNUSED, char *protocol,
 #ifdef TRANS_SERVER
 
 static XtransConnInfo
-TRANS(LocalOpenCOTSServer)(Xtransport *thistrans, char *protocol,
-			   char *host, char *port)
+TRANS(LocalOpenCOTSServer)(Xtransport *thistrans, const char *protocol,
+			   const char *host, const char *port)
 
 {
     char *typetocheck = NULL;
@@ -2057,8 +2060,8 @@ TRANS(LocalOpenCOTSServer)(Xtransport *thistrans, char *protocol,
 #ifdef TRANS_CLIENT
 
 static XtransConnInfo
-TRANS(LocalOpenCLTSClient)(Xtransport *thistrans _X_UNUSED, char *protocol,
-			   char *host, char *port)
+TRANS(LocalOpenCLTSClient)(Xtransport *thistrans _X_UNUSED, const char *protocol,
+			   const char *host, const char *port)
 
 {
     prmsg(2,"LocalOpenCLTSClient(%s,%s,%s)\n",protocol,host,port);
@@ -2072,8 +2075,8 @@ TRANS(LocalOpenCLTSClient)(Xtransport *thistrans _X_UNUSED, char *protocol,
 #ifdef TRANS_SERVER
 
 static XtransConnInfo
-TRANS(LocalOpenCLTSServer)(Xtransport *thistrans _X_UNUSED, char *protocol,
-			   char *host, char *port)
+TRANS(LocalOpenCLTSServer)(Xtransport *thistrans _X_UNUSED, const char *protocol,
+			   const char *host, const char *port)
 
 {
     prmsg(2,"LocalOpenCLTSServer(%s,%s,%s)\n",protocol,host,port);
diff --git a/Xtranssock.c b/Xtranssock.c
index 65ffa6f..d830e7c 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -596,8 +596,8 @@ TRANS(SocketOpenCOTSClientBase) (const char *transname, const char *protocol,
 }
 
 static XtransConnInfo
-TRANS(SocketOpenCOTSClient) (Xtransport *thistrans, char *protocol,
-			     char *host, char *port)
+TRANS(SocketOpenCOTSClient) (Xtransport *thistrans, const char *protocol,
+			     const char *host, const char *port)
 {
     return TRANS(SocketOpenCOTSClientBase)(
 			thistrans->TransName, protocol, host, port, -1);
@@ -610,8 +610,8 @@ TRANS(SocketOpenCOTSClient) (Xtransport *thistrans, char *protocol,
 #ifdef TRANS_SERVER
 
 static XtransConnInfo
-TRANS(SocketOpenCOTSServer) (Xtransport *thistrans, char *protocol,
-			     char *host, char *port)
+TRANS(SocketOpenCOTSServer) (Xtransport *thistrans, const char *protocol,
+			     const char *host, const char *port)
 
 {
     XtransConnInfo	ciptr;
@@ -677,8 +677,8 @@ TRANS(SocketOpenCOTSServer) (Xtransport *thistrans, char *protocol,
 #ifdef TRANS_CLIENT
 
 static XtransConnInfo
-TRANS(SocketOpenCLTSClient) (Xtransport *thistrans, char *protocol,
-			     char *host, char *port)
+TRANS(SocketOpenCLTSClient) (Xtransport *thistrans, const char *protocol,
+			     const char *host, const char *port)
 
 {
     XtransConnInfo	ciptr;
@@ -716,8 +716,8 @@ TRANS(SocketOpenCLTSClient) (Xtransport *thistrans, char *protocol,
 #ifdef TRANS_SERVER
 
 static XtransConnInfo
-TRANS(SocketOpenCLTSServer) (Xtransport *thistrans, char *protocol,
-			     char *host, char *port)
+TRANS(SocketOpenCLTSServer) (Xtransport *thistrans, const char *protocol,
+			     const char *host, const char *port)
 
 {
     XtransConnInfo	ciptr;
diff --git a/doc/xtrans.xml b/doc/xtrans.xml
index 10e5489..e3bc1c9 100644
--- a/doc/xtrans.xml
+++ b/doc/xtrans.xml
@@ -191,31 +191,31 @@ typedef struct _Xtransport {
     int  flags;
 
     XtransConnInfo (*OpenCOTSClient)(
-    struct _Xtransport *,     /* transport */
-    char     *,     /* protocol */
-    char     *,     /* host */
-    char     *      /* port */
+     struct _Xtransport *,    /* transport */
+     const char *,            /* protocol */
+     const char *,            /* host */
+     const char *             /* port */
     );
 
     XtransConnInfo (*OpenCOTSServer)(
-    struct _Xtransport *,     /* transport */
-    char *,     /* protocol */
-    char *,     /* host */
-    char *      /* port */
+     struct _Xtransport *,    /* transport */
+     const char *,            /* protocol */
+     const char *,            /* host */
+     const char *             /* port */
     );
 
     XtransConnInfo (*OpenCLTSClient)(
-    struct _Xtransport *,     /* transport */
-    char *,               /* protocol */
-    char *,               /* host */
-    char *               /* port */
+     struct _Xtransport *,    /* transport */
+     const char *,            /* protocol */
+     const char *,            /* host */
+     const char *             /* port */
     );
 
     XtransConnInfo (*OpenCLTSServer)(
-     struct _Xtransport *,   /* transport */
-     char *,     /* protocol */
-     char *,     /* host */
-     char *     /* port */
+     struct _Xtransport *,    /* transport */
+     const char *,            /* protocol */
+     const char *,            /* host */
+     const char *             /* port */
     );
 
     int     (*SetOption)(
@@ -826,9 +826,9 @@ the <code>#ifdef SUNSYSV</code> should be handled inside these functions.
       <funcprototype>
         <funcdef>XtransConnInfo *<function>OpenCOTSClient</function></funcdef>
         <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
-        <paramdef>char *<parameter>protocol</parameter></paramdef>
-        <paramdef>char *<parameter>host</parameter></paramdef>
-        <paramdef>char *<parameter>port</parameter></paramdef>
+        <paramdef>const char *<parameter>protocol</parameter></paramdef>
+        <paramdef>const char *<parameter>host</parameter></paramdef>
+        <paramdef>const char *<parameter>port</parameter></paramdef>
       </funcprototype>
     </funcsynopsis>
     <para>
@@ -850,9 +850,9 @@ this function.
       <funcprototype>
         <funcdef>XtransConnInfo *<function>OpenCOTSServer</function></funcdef>
         <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
-        <paramdef>char *<parameter>protocol</parameter></paramdef>
-        <paramdef>char *<parameter>host</parameter></paramdef>
-        <paramdef>char *<parameter>port</parameter></paramdef>
+        <paramdef>const char *<parameter>protocol</parameter></paramdef>
+        <paramdef>const char *<parameter>host</parameter></paramdef>
+        <paramdef>const char *<parameter>port</parameter></paramdef>
       </funcprototype>
     </funcsynopsis>
     <para>
@@ -872,9 +872,9 @@ will open the transport.
       <funcprototype>
         <funcdef>XtransConnInfo *<function>OpenCLTSClient</function></funcdef>
         <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
-        <paramdef>char *<parameter>protocol</parameter></paramdef>
-        <paramdef>char *<parameter>host</parameter></paramdef>
-        <paramdef>char *<parameter>port</parameter></paramdef>
+        <paramdef>const char *<parameter>protocol</parameter></paramdef>
+        <paramdef>const char *<parameter>host</parameter></paramdef>
+        <paramdef>const char *<parameter>port</parameter></paramdef>
       </funcprototype>
     </funcsynopsis>
     <para>
@@ -896,9 +896,9 @@ in by this function.
       <funcprototype>
         <funcdef>XtransConnInfo *<function>OpenCLTSServer</function></funcdef>
         <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
-        <paramdef>char *<parameter>protocol</parameter></paramdef>
-        <paramdef>char *<parameter>host</parameter></paramdef>
-        <paramdef>char *<parameter>port</parameter></paramdef>
+        <paramdef>const char *<parameter>protocol</parameter></paramdef>
+        <paramdef>const char *<parameter>host</parameter></paramdef>
+        <paramdef>const char *<parameter>port</parameter></paramdef>
       </funcprototype>
     </funcsynopsis>
     <para>

commit 305d20f2ee888d1c890f902da978176b8ec58a8d
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Aug 23 12:10:48 2014 -0700

    Add const qualifiers to TRANS(MakeAll*ServerListeners) port args
    
    Required also changing receive_listening_fds to specify port as const,
    which we can do now that TRANS(ReopenCOTSServer) takes it as const.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/Xtrans.c b/Xtrans.c
index 81c8d2d..2880803 100644
--- a/Xtrans.c
+++ b/Xtrans.c
@@ -1074,7 +1074,8 @@ complete_network_count (void)
 
 
 static int
-receive_listening_fds(char* port, XtransConnInfo* temp_ciptrs, int* count_ret)
+receive_listening_fds(const char* port, XtransConnInfo* temp_ciptrs,
+                      int* count_ret)
 
 {
 #ifdef HAVE_SYSTEMD_DAEMON
@@ -1151,8 +1152,8 @@ extern int xquartz_launchd_fd;
 #endif
 
 int
-TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret,
-				   XtransConnInfo **ciptrs_ret)
+TRANS(MakeAllCOTSServerListeners) (const char *port, int *partial,
+                                   int *count_ret, XtransConnInfo **ciptrs_ret)
 
 {
     char		buffer[256]; /* ??? What size ?? */
@@ -1282,8 +1283,8 @@ TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret,
 }
 
 int
-TRANS(MakeAllCLTSServerListeners) (char *port, int *partial, int *count_ret,
-				   XtransConnInfo **ciptrs_ret)
+TRANS(MakeAllCLTSServerListeners) (const char *port, int *partial,
+                                   int *count_ret, XtransConnInfo **ciptrs_ret)
 
 {
     char		buffer[256]; /* ??? What size ?? */
diff --git a/Xtrans.h b/Xtrans.h
index a1fb923..6decc6b 100644
--- a/Xtrans.h
+++ b/Xtrans.h
@@ -405,14 +405,14 @@ int TRANS(GetConnectionNumber)(
 #ifdef TRANS_SERVER
 
 int TRANS(MakeAllCOTSServerListeners)(
-    char *,		/* port */
+    const char *,	/* port */
     int *,		/* partial */
     int *,		/* count_ret */
     XtransConnInfo **	/* ciptrs_ret */
 );
 
 int TRANS(MakeAllCLTSServerListeners)(
-    char *,		/* port */
+    const char *,	/* port */
     int *,		/* partial */
     int *,		/* count_ret */
     XtransConnInfo **	/* ciptrs_ret */
diff --git a/doc/xtrans.xml b/doc/xtrans.xml
index 5c99629..10e5489 100644
--- a/doc/xtrans.xml
+++ b/doc/xtrans.xml
@@ -712,7 +712,7 @@ Returns the file descriptor associated with this transport.
     <funcsynopsis id='TRANSMakeAllCOTSServerListeners'>
       <funcprototype>
         <funcdef>int <function>TRANS(MakeAllCOTSServerListeners)</function></funcdef>
-        <paramdef>char *<parameter>port</parameter></paramdef>
+        <paramdef>const char *<parameter>port</parameter></paramdef>
         <paramdef>int *<parameter>partial_ret</parameter></paramdef>
         <paramdef>int *<parameter>count_ret</parameter></paramdef>
         <paramdef>XtransConnInfo **<parameter>connections_ret</parameter></paramdef>
@@ -731,7 +731,7 @@ is the list of transports.
     <funcsynopsis id='TRANSMakeAllCLTSServerListeners'>
       <funcprototype>
         <funcdef>int <function>TRANS(MakeAllCLTSServerListeners)</function></funcdef>
-        <paramdef>char *<parameter>port</parameter></paramdef>
+        <paramdef>const char *<parameter>port</parameter></paramdef>
         <paramdef>int *<parameter>partial_ret</parameter></paramdef>
         <paramdef>int *<parameter>count_ret</parameter></paramdef>
         <paramdef>XtransConnInfo **<parameter>connections_ret</parameter></paramdef>

commit ba70d48951fb925fb3082d81afb08c330333aa51
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Aug 23 11:33:57 2014 -0700

    Add const qualifiers to TRANS(Connect) args
    
    Also required constifying UnixHostReallyLocal, since SocketUNIXConnect
    passes the host arg through to it.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/Xtrans.c b/Xtrans.c
index 86ccdd0..81c8d2d 100644
--- a/Xtrans.c
+++ b/Xtrans.c
@@ -852,7 +852,7 @@ TRANS(Accept) (XtransConnInfo ciptr, int *status)
 #ifdef TRANS_CLIENT
 
 int
-TRANS(Connect) (XtransConnInfo ciptr, char *address)
+TRANS(Connect) (XtransConnInfo ciptr, const char *address)
 
 {
     char	*protocol;
diff --git a/Xtrans.h b/Xtrans.h
index 7706621..a1fb923 100644
--- a/Xtrans.h
+++ b/Xtrans.h
@@ -330,7 +330,7 @@ XtransConnInfo TRANS(Accept)(
 
 int TRANS(Connect)(
     XtransConnInfo,	/* ciptr */
-    char *		/* address */
+    const char *	/* address */
 );
 
 #endif /* TRANS_CLIENT */
diff --git a/Xtransint.h b/Xtransint.h
index 285cf5b..f674e5b 100644
--- a/Xtransint.h
+++ b/Xtransint.h
@@ -252,8 +252,8 @@ typedef struct _Xtransport {
 
     int	(*Connect)(
 	XtransConnInfo,		/* connection */
-	char *,			/* host */
-	char *			/* port */
+	const char *,		/* host */
+	const char *		/* port */
     );
 
 #endif /* TRANS_CLIENT */
diff --git a/Xtranslcl.c b/Xtranslcl.c
index dec8124..4f04927 100644
--- a/Xtranslcl.c
+++ b/Xtranslcl.c
@@ -2217,7 +2217,8 @@ TRANS(LocalAccept)(XtransConnInfo ciptr, int *status)
 #ifdef TRANS_CLIENT
 
 static int
-TRANS(LocalConnect)(XtransConnInfo ciptr, char *host _X_UNUSED, char *port)
+TRANS(LocalConnect)(XtransConnInfo ciptr,
+                    const char *host _X_UNUSED, const char *port)
 
 {
     prmsg(2,"LocalConnect(%p->%d,%s)\n", ciptr, ciptr->fd, port);
diff --git a/Xtranssock.c b/Xtranssock.c
index 87efd1b..65ffa6f 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -1432,7 +1432,8 @@ static struct addrlist  *addrlist = NULL;
 
 
 static int
-TRANS(SocketINETConnect) (XtransConnInfo ciptr, char *host, char *port)
+TRANS(SocketINETConnect) (XtransConnInfo ciptr,
+                          const char *host, const char *port)
 
 {
     struct sockaddr *	socketaddr = NULL;
@@ -1814,7 +1815,7 @@ TRANS(SocketINETConnect) (XtransConnInfo ciptr, char *host, char *port)
  */
 
 static int
-UnixHostReallyLocal (char *host)
+UnixHostReallyLocal (const char *host)
 
 {
     char hostnamebuf[256];
@@ -1945,7 +1946,8 @@ UnixHostReallyLocal (char *host)
 }
 
 static int
-TRANS(SocketUNIXConnect) (XtransConnInfo ciptr, char *host, char *port)
+TRANS(SocketUNIXConnect) (XtransConnInfo ciptr,
+                          const char *host, const char *port)
 
 {
     struct sockaddr_un	sockname;
diff --git a/doc/xtrans.xml b/doc/xtrans.xml
index 2e16e79..5c99629 100644
--- a/doc/xtrans.xml
+++ b/doc/xtrans.xml
@@ -240,8 +240,8 @@ typedef struct _Xtransport {
 
     int     (*Connect)(
      XtransConnInfo,          /* connection */
-     char *,               /* host */
-     char *               /* port */
+     const char *,            /* host */
+     const char *             /* port */
     );
 
     int     (*BytesReadable)(
@@ -542,7 +542,7 @@ new opaque transport connection object upon success,
       <funcprototype>
         <funcdef>int <function>TRANS(Connect)</function></funcdef>
         <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
-        <paramdef>char *<parameter>address</parameter></paramdef>
+        <paramdef>const char *<parameter>address</parameter></paramdef>
       </funcprototype>
     </funcsynopsis>
     <para>
@@ -987,8 +987,8 @@ structure describing the new endpoint is returned from this function
       <funcprototype>
         <funcdef>int <function>Connect</function></funcdef>
         <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
-        <paramdef>char *<parameter>host</parameter></paramdef>
-        <paramdef>char *<parameter>port</parameter></paramdef>
+        <paramdef>const char *<parameter>host</parameter></paramdef>
+        <paramdef>const char *<parameter>port</parameter></paramdef>
       </funcprototype>
     </funcsynopsis>
     <para>

commit 63b65a20706def951dd25e531949b7bc556419eb
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Aug 23 10:17:57 2014 -0700

    Add const qualifiers to TRANS(CreateListener) port args
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/Xtrans.c b/Xtrans.c
index 79b3b31..86ccdd0 100644
--- a/Xtrans.c
+++ b/Xtrans.c
@@ -743,7 +743,7 @@ TRANS(SetOption) (XtransConnInfo ciptr, int option, int arg)
 #ifdef TRANS_SERVER
 
 int
-TRANS(CreateListener) (XtransConnInfo ciptr, char *port, unsigned int flags)
+TRANS(CreateListener) (XtransConnInfo ciptr, const char *port, unsigned int flags)
 
 {
     return ciptr->transptr->CreateListener (ciptr, port, flags);
diff --git a/Xtrans.h b/Xtrans.h
index b93e587..7706621 100644
--- a/Xtrans.h
+++ b/Xtrans.h
@@ -299,7 +299,7 @@ int TRANS(SetOption)(
 
 int TRANS(CreateListener)(
     XtransConnInfo,	/* ciptr */
-    char *,		/* port */
+    const char *,	/* port */
     unsigned int	/* flags */
 );
 
diff --git a/Xtransint.h b/Xtransint.h
index 5f7718e..285cf5b 100644
--- a/Xtransint.h
+++ b/Xtransint.h
@@ -233,7 +233,7 @@ typedef struct _Xtransport {
 
     int	(*CreateListener)(
 	XtransConnInfo,		/* connection */
-	char *,			/* port */
+	const char *,		/* port */
 	unsigned int		/* flags */
     );
 
diff --git a/Xtranslcl.c b/Xtranslcl.c
index 78572b3..dec8124 100644
--- a/Xtranslcl.c
+++ b/Xtranslcl.c
@@ -2151,7 +2151,8 @@ TRANS(LocalSetOption)(XtransConnInfo ciptr, int option, int arg)
 #ifdef TRANS_SERVER
 
 static int
-TRANS(LocalCreateListener)(XtransConnInfo ciptr, char *port, unsigned int flags _X_UNUSED)
+TRANS(LocalCreateListener)(XtransConnInfo ciptr, const char *port,
+                           unsigned int flags _X_UNUSED)
 
 {
     prmsg(2,"LocalCreateListener(%p->%d,%s)\n",ciptr,ciptr->fd,port);
diff --git a/Xtranssock.c b/Xtranssock.c
index 1b1dd7e..87efd1b 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -947,7 +947,8 @@ TRANS(SocketCreateListener) (XtransConnInfo ciptr,
 
 #ifdef TCPCONN
 static int
-TRANS(SocketINETCreateListener) (XtransConnInfo ciptr, char *port, unsigned int flags)
+TRANS(SocketINETCreateListener) (XtransConnInfo ciptr, const char *port,
+                                 unsigned int flags)
 
 {
 #if defined(IPv6) && defined(AF_INET6)
@@ -1075,7 +1076,7 @@ TRANS(SocketINETCreateListener) (XtransConnInfo ciptr, char *port, unsigned int
 #ifdef UNIXCONN
 
 static int
-TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port,
+TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, const char *port,
 				 unsigned int flags)
 
 {
diff --git a/doc/xtrans.xml b/doc/xtrans.xml
index 5960dfa..2e16e79 100644
--- a/doc/xtrans.xml
+++ b/doc/xtrans.xml
@@ -226,8 +226,8 @@ typedef struct _Xtransport {
 
     int     (*CreateListener)(
      XtransConnInfo,          /* connection */
-     char *,               /* port */
-     int               /* flags */
+     const char *,            /* port */
+     int                      /* flags */
     );
 
     int     (*ResetListener)(
@@ -480,7 +480,7 @@ Based on current usage, the complimentary function
       <funcprototype>
         <funcdef>int <function>TRANS(CreateListener)</function></funcdef>
         <paramdef>XtransConnInfo <parameter>connection</parameter></paramdef>
-        <paramdef>char *<parameter>port</parameter></paramdef>
+        <paramdef>const char *<parameter>port</parameter></paramdef>
         <paramdef>int <parameter>flags</parameter></paramdef>
       </funcprototype>
     </funcsynopsis>
@@ -935,7 +935,7 @@ different transport type is added, or a transport dependent option is defined.
       <funcprototype>
         <funcdef>int <function>CreateListener</function></funcdef>
         <paramdef>struct _Xtransport *<parameter>thistrans</parameter></paramdef>
-        <paramdef>char <parameter>*port</parameter></paramdef>
+        <paramdef>const char <parameter>*port</parameter></paramdef>
         <paramdef>int <parameter>flags</parameter></paramdef>
       </funcprototype>
     </funcsynopsis>

commit fd90a4e00321b22c96565cfa354b8b0efa376979
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sat Aug 23 10:07:22 2014 -0700

    Add const qualifiers to TRANS(Reopen...) port args
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

diff --git a/Xtrans.c b/Xtrans.c
index 6fa5141..79b3b31 100644
--- a/Xtrans.c
+++ b/Xtrans.c
@@ -490,7 +490,7 @@ TRANS(Open) (int type, const char *address)
  */
 
 static XtransConnInfo
-TRANS(Reopen) (int type, int trans_id, int fd, char *port)
+TRANS(Reopen) (int type, int trans_id, int fd, const char *port)
 
 {
     XtransConnInfo	ciptr = NULL;
@@ -616,7 +616,7 @@ TRANS(OpenCLTSServer) (const char *address)
 #ifdef TRANS_REOPEN
 
 XtransConnInfo
-TRANS(ReopenCOTSServer) (int trans_id, int fd, char *port)
+TRANS(ReopenCOTSServer) (int trans_id, int fd, const char *port)
 
 {
     prmsg (2,"ReopenCOTSServer(%d, %d, %s)\n", trans_id, fd, port);
@@ -624,7 +624,7 @@ TRANS(ReopenCOTSServer) (int trans_id, int fd, char *port)
 }
 
 XtransConnInfo
-TRANS(ReopenCLTSServer) (int trans_id, int fd, char *port)


Reply to: