summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xtrans.c2
-rw-r--r--Xtrans.h2
-rw-r--r--Xtransint.h4
-rw-r--r--Xtranslcl.c3
-rw-r--r--Xtranssock.c8
-rw-r--r--doc/xtrans.xml10
6 files changed, 16 insertions, 13 deletions
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>