Changeset 20949
- Timestamp:
- 2009-11-16T19:45:24+13:00 (14 years ago)
- Location:
- gsdl/trunk/runtime-src/src/w32server
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/runtime-src/src/w32server/fnord.cpp
r19548 r20949 338 338 // 3: 127.0.0.1 -- always use 127.0.0.1 339 339 char gsdl_address[100]; 340 char hostIP[25]; // 16 should be enough to represent an IP address + null byte 340 341 341 342 DWORD local_ip = GetLocalIP(); 343 // always work out the hostIP: 344 sprintf(hostIP, "%d.%d.%d.%d", local_ip & 0xFF, (local_ip >> 8) & 0xFF, (local_ip >> 16) & 0xFF, (local_ip >> 24) & 0xFF); 345 342 346 if (local_ip == INADDR_ANY || gsdl_address_resolution_method == 3) { 343 347 local_ip = 127 + (0 << 8) + (0 << 16) + (1 << 24); … … 350 354 sprintf(gsdl_address, "localhost"); 351 355 } 352 else { 356 else { 353 357 strcpy(gsdl_address, GetLocalName(NULL)); 354 358 } … … 356 360 text_t url = "http://" + text_t(gsdl_address); 357 361 362 gsdl_host_IP = text_t(hostIP); 358 363 gsdl_url = url; 359 364 write_settings(gsdl_url); -
gsdl/trunk/runtime-src/src/w32server/settings.cpp
r19210 r20949 69 69 int gsdl_start_browser = 1; 70 70 int gsdl_address_resolution_method = 2; // use localhost since users may switch between computers 71 text_t gsdl_host_IP; 71 72 // The resolution method was previously on 1: Get an IP, but don't resolve to a name 72 73 … … 318 319 write_ini_line(fout, "start_browser", text_t(gsdl_start_browser)); 319 320 write_ini_line(fout, "address_resolution_method", text_t(gsdl_address_resolution_method)); 321 write_ini_line(fout, "hostIP", gsdl_host_IP); 320 322 321 323 // collection levels -
gsdl/trunk/runtime-src/src/w32server/settings.h
r19210 r20949 67 67 extern char gsdl_browser_exe[MAX_FILENAME_SIZE]; 68 68 extern text_t gsdl_url; 69 extern text_t gsdl_host_IP; 69 70 extern text_t gsdl_conffile; 70 71 extern int gsdl_start_browser;
Note:
See TracChangeset
for help on using the changeset viewer.