diff options
author | marha <marha@users.sourceforge.net> | 2010-09-30 15:32:32 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-09-30 15:32:32 +0000 |
commit | d718b0dd8ed27c6f8497077b8d4b088d9b7f7bd3 (patch) | |
tree | 824bb49a4ca6d26a1b8f2a6b5b1b42d214dae66b /xorg-server/os/xdmcp.c | |
parent | 7c8072b9a9a9a4f23bfa6e84e44bbfad90c4565f (diff) | |
download | vcxsrv-d718b0dd8ed27c6f8497077b8d4b088d9b7f7bd3.tar.gz vcxsrv-d718b0dd8ed27c6f8497077b8d4b088d9b7f7bd3.tar.bz2 vcxsrv-d718b0dd8ed27c6f8497077b8d4b088d9b7f7bd3.zip |
Solved problem when having multiple network cards
Diffstat (limited to 'xorg-server/os/xdmcp.c')
-rw-r--r-- | xorg-server/os/xdmcp.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/xorg-server/os/xdmcp.c b/xorg-server/os/xdmcp.c index 901a91d41..b16fba61e 100644 --- a/xorg-server/os/xdmcp.c +++ b/xorg-server/os/xdmcp.c @@ -592,6 +592,32 @@ XdmcpInit(void) (pointer) 0);
timeOutRtx = 0;
DisplayNumber = (CARD16) atoi(display);
+ if (ConnectionTypes.length>1 && xdm_from==NULL)
+ {
+ unsigned i=0;
+ char ErrorMessage[1024];
+ sprintf(ErrorMessage,"Multiple ip-addresses detected:\n");
+ for (i=0; i<ConnectionTypes.length; i++)
+ {
+ int AddrLen=ConnectionAddresses.data[i].length;
+ if (AddrLen==4)
+ sprintf(ErrorMessage+strlen(ErrorMessage)," %d.%d.%d.%d\n",
+ ConnectionAddresses.data[i].data[0],
+ ConnectionAddresses.data[i].data[1],
+ ConnectionAddresses.data[i].data[2],
+ ConnectionAddresses.data[i].data[3]);
+ else
+ {
+ int j;
+ sprintf(ErrorMessage+strlen(ErrorMessage)," ");
+ for (j=0; j<AddrLen; j++)
+ sprintf(ErrorMessage+strlen(ErrorMessage),"%02x",ConnectionAddresses.data[i].data[j]);
+ sprintf(ErrorMessage+strlen(ErrorMessage),"\n");
+ }
+ }
+ sprintf(ErrorMessage+strlen(ErrorMessage),"Please specify the ip-address you want to use with -from\n");
+ FatalError(ErrorMessage);
+ }
get_xdmcp_sock();
send_packet();
}
|