Changeset 10231 for trunk/gsdl/src/w32server/fnord.cpp
- Timestamp:
- 2005-07-08T11:54:05+12:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/w32server/fnord.cpp
r9636 r10231 330 330 331 331 // get the url and attempt to start a browser 332 char *localname = GetLocalName(NULL);333 332 if (have_networking) { 334 text_t url = "http://" + text_t(localname); 333 // There are now three address resolution methods: 334 // 0: Standard -- get local IP then resolve to a name 335 // 1: IP only -- as above, but use IP only -- don't resolve to a name 336 // 2: 127.0.0.1 -- always use 127.0.0.1 337 char gsdl_address[100]; 338 339 DWORD local_ip = GetLocalIP(); 340 if (local_ip == INADDR_ANY || gsdl_address_resolution_method == 2) { 341 local_ip = 127 + (0 << 8) + (0 << 16) + (1 << 24); 342 } 343 344 if (gsdl_address_resolution_method == 1 || gsdl_address_resolution_method == 2) { 345 sprintf(gsdl_address, "%d.%d.%d.%d", local_ip & 0xFF, (local_ip >> 8) & 0xFF, (local_ip >> 16) & 0xFF, (local_ip >> 24) & 0xFF); 346 } 347 else { 348 strcpy(gsdl_address, GetLocalName(NULL)); 349 } 350 351 text_t url = "http://" + text_t(gsdl_address); 335 352 336 353 gsdl_url = url; … … 1058 1075 exit (0); 1059 1076 } 1060 1077 1061 1078 if (!gsdl_init()) // quit if can't initialise the library correctly 1062 1079 exit (0);
Note:
See TracChangeset
for help on using the changeset viewer.