summaryrefslogtreecommitdiffstats
path: root/kdm/backend/xdmcp.c
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 20:21:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-11 20:21:27 +0000
commit10e41144596fc9ced40fc349d9ecd099b1c2ea19 (patch)
tree88ab04e475ff5a4cd889cb082f5760b6e0bf5e4e /kdm/backend/xdmcp.c
parent4aed2c8219774f5d797760606b8489a92ddc5163 (diff)
downloadtdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.tar.gz
tdebase-10e41144596fc9ced40fc349d9ecd099b1c2ea19.zip
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
Diffstat (limited to 'kdm/backend/xdmcp.c')
-rw-r--r--kdm/backend/xdmcp.c15
1 files changed, 10 insertions, 5 deletions
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)