=================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/os/xdmcp.c,v retrieving revision 1.1.4.3 retrieving revision 1.1.4.3.2.1 diff -u -r1.1.4.3 -r1.1.4.3.2.1 --- xc/programs/Xserver/os/xdmcp.c 2003/11/30 16:47:13 1.1.4.3 +++ xc/programs/Xserver/os/xdmcp.c 2004/03/02 19:28:53 1.1.4.3.2.1 @@ -279,8 +279,7 @@ } if (strcmp(argv[i], "-port") == 0) { if (++i == argc) { - ErrorF("Xserver: missing port number in command line\n"); - exit(1); + FatalError("Xserver: missing port number in command line\n"); } xdm_udp_port = (unsigned short) atoi(argv[i]); return (i + 1); @@ -295,8 +294,7 @@ } if (strcmp(argv[i], "-class") == 0) { if (++i == argc) { - ErrorF("Xserver: missing class name in command line\n"); - exit(1); + FatalError("Xserver: missing class name in command line\n"); } defaultDisplayClass = argv[i]; return (i + 1); @@ -304,8 +302,7 @@ #ifdef HASXDMAUTH if (strcmp(argv[i], "-cookie") == 0) { if (++i == argc) { - ErrorF("Xserver: missing cookie data in command line\n"); - exit(1); + FatalError("Xserver: missing cookie data in command line\n"); } xdmAuthCookie = argv[i]; return (i + 1); @@ -313,8 +310,7 @@ #endif if (strcmp(argv[i], "-displayID") == 0) { if (++i == argc) { - ErrorF("Xserver: missing displayID in command line\n"); - exit(1); + FatalError("Xserver: missing displayID in command line\n"); } XdmcpRegisterManufacturerDisplayID (argv[i], strlen (argv[i])); return (i + 1); @@ -1069,8 +1065,7 @@ if (xdmcpSocket >= 0 && xdm_from != NULL) { if (bind(xdmcpSocket, (struct sockaddr *)&FromAddress, FromAddressLen) < 0) { - ErrorF("Xserver: failed to bind to -from address: %s\n", xdm_from); - exit(1); + FatalError("Xserver: failed to bind to -from address: %s\n", xdm_from); } } #endif /* STREAMSCONN */ @@ -1502,8 +1497,7 @@ } else if (port > 0 && port < 65535) { sprintf(portstr, "%d", port); } else { - ErrorF("Xserver: port out of range: %d\n", port); - exit(1); + FatalError("Xserver: port out of range: %d\n", port); } if (*aifirstp != NULL) { @@ -1517,17 +1511,15 @@ break; } if ((ai == NULL) || (ai->ai_addrlen > sizeof(SOCKADDR_TYPE))) { - ErrorF ("Xserver: %s host %s not on supported network type\n", + FatalError ("Xserver: %s host %s not on supported network type\n", argtype, namestr); - exit (1); } else { *aip = ai; *addrlen = ai->ai_addrlen; memcpy(addr, ai->ai_addr, ai->ai_addrlen); } } else { - ErrorF("Xserver: %s: %s %s\n", gai_strerror(gaierr), argtype, namestr); - exit(1); + FatalError("Xserver: %s: %s %s\n", gai_strerror(gaierr), argtype, namestr); } #else struct hostent *hep; @@ -1537,8 +1529,7 @@ if (!(hep = _XGethostbyname(namestr, hparams))) { - ErrorF("Xserver: %s unknown host: %s\n", argtype, namestr); - exit(1); + FatalError("Xserver: %s unknown host: %s\n", argtype, namestr); } if (hep->h_length == sizeof (struct in_addr)) { @@ -1549,8 +1540,7 @@ } else { - ErrorF ("Xserver: %s host on strange network %s\n", argtype, namestr); - exit (1); + FatalError("Xserver: %s host on strange network %s\n", argtype, namestr); } #endif } @@ -1564,8 +1554,7 @@ if ((i + 1) == argc) { - ErrorF("Xserver: missing %s host name in command line\n", argv[i]); - exit(1); + FatalError("Xserver: missing %s host name in command line\n", argv[i]); } get_addr_by_name(argv[i], argv[i+1], xdm_udp_port, SOCK_DGRAM, @@ -1589,8 +1578,7 @@ #endif if (i == argc) { - ErrorF("Xserver: missing -from host name in command line\n"); - exit(1); + FatalError("Xserver: missing -from host name in command line\n"); } get_addr_by_name("-from", argv[i], 0, 0, &FromAddress, &FromAddressLen #if defined(IPv6) && defined(AF_INET6) @@ -1619,9 +1607,8 @@ if ((i < argc) && (argv[i][0] != '-') && (argv[i][0] != '+')) { hopcount = strtol(argv[i++], NULL, 10); if ((hopcount < 1) || (hopcount > 255)) { - ErrorF("Xserver: multicast hop count out of range: %d\n", + FatalError("Xserver: multicast hop count out of range: %d\n", hopcount); - exit(1); } } } @@ -1629,8 +1616,7 @@ if (xdm_udp_port > 0 && xdm_udp_port < 65535) { sprintf(portstr, "%d", xdm_udp_port); } else { - ErrorF("Xserver: port out of range: %d\n", xdm_udp_port); - exit(1); + FatalError("Xserver: port out of range: %d\n", xdm_udp_port); } bzero(&hints, sizeof(hints)); hints.ai_socktype = SOCK_DGRAM; @@ -1646,9 +1632,8 @@ break; } if (ai == NULL) { - ErrorF ("Xserver: address not supported multicast type %s\n", + FatalError ("Xserver: address not supported multicast type %s\n", address); - exit (1); } else { struct multicastinfo *mcastinfo, *mcl; @@ -1667,8 +1652,7 @@ } } } else { - ErrorF("Xserver: %s: %s\n", gai_strerror(gaierr), address); - exit(1); + FatalError("Xserver: %s: %s\n", gai_strerror(gaierr), address); } return i; }