From 10e41144596fc9ced40fc349d9ecd099b1c2ea19 Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 11 Dec 2009 20:21:27 +0000 Subject: Initial import of Trinity 3.5.11 to kdebase Extends krandrtray, adds iccconfig kcontrol module, adds run dialog autocomplete and lots of bugfixes Will need to check for commit warnings and repair as encountered Also needs full compile test git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1061475 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdm/backend/xdmcp.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'kdm/backend/xdmcp.c') diff --git a/kdm/backend/xdmcp.c b/kdm/backend/xdmcp.c index 2925a6bbc..e82305f89 100644 --- a/kdm/backend/xdmcp.c +++ b/kdm/backend/xdmcp.c @@ -386,7 +386,8 @@ NetworkAddressToName( CARD16 connectionType, ARRAY8Ptr connectionAddress, ASPrintf( &name, "localhost:%d", displayNumber ); else { if (removeDomainname) { - char *localDot, *remoteDot; + char *remoteDot; + char *localDot; /* check for a common domain name. This * could reduce names by recognising common @@ -394,8 +395,8 @@ NetworkAddressToName( CARD16 connectionType, ARRAY8Ptr connectionAddress, * this is as useful, and will confuse more * people */ - if ((localDot = strchr( localhost, '.' )) && - (remoteDot = strchr( hostname, '.' ))) + if ((localDot = (char*)strchr( localhost, '.' )) && + (remoteDot = (char*)strchr( hostname, '.' ))) { /* smash the name in place; it won't * be needed later. @@ -924,6 +925,9 @@ manage( struct sockaddr *from, int fromlen, int length, int fd ) } d->clientAddr = clientAddress; d->connectionType = connectionType; + d->remoteHost = NetworkAddressToHostname (pdpy->connectionType, + &pdpy->connectionAddress); + XdmcpDisposeARRAY8( &clientPort ); if (pdpy->fileAuthorization) { d->authorizations = (Xauth **)Malloc( sizeof(Xauth *) ); @@ -1048,7 +1052,8 @@ NetworkAddressToHostname( CARD16 connectionType, ARRAY8Ptr connectionAddress ) #endif { struct hostent *he; - char *myDot, *name, *lname; + char *name, *lname; + char *myDot; int af_type; #if defined(IPv6) && defined(AF_INET6) char dotted[INET6_ADDRSTRLEN]; @@ -1094,7 +1099,7 @@ NetworkAddressToHostname( CARD16 connectionType, ARRAY8Ptr connectionAddress ) oki: if (StrDup( &name, he->h_name ) && !strchr( name, '.' ) && - (myDot = strchr( localHostname(), '.' ))) + (myDot = (char*)strchr( localHostname(), '.' ))) { if (ASPrintf( &lname, "%s%s", name, myDot )) { #if defined(IPv6) && defined(AF_INET6) -- cgit v1.2.3