Ignore:
Timestamp:
2006-03-09T11:41:33+13:00 (18 years ago)
Author:
kjdon
Message:

added in localhost to address resolution methods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/w32server/fnord.cpp

    r10231 r11319  
    331331  // get the url and attempt to start a browser
    332332  if (have_networking) {
    333     // There are now three address resolution methods:
     333    // There are now four address resolution methods:
    334334    //   0: Standard -- get local IP then resolve to a name
    335335    //   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
     336    //   2: localhost -- always use localhost
     337    //   3: 127.0.0.1 -- always use 127.0.0.1
    337338    char gsdl_address[100];
    338339
    339340    DWORD local_ip = GetLocalIP();
    340     if (local_ip == INADDR_ANY || gsdl_address_resolution_method == 2) {
     341    if (local_ip == INADDR_ANY || gsdl_address_resolution_method == 3) {
    341342      local_ip = 127 + (0 << 8) + (0 << 16) + (1 << 24);
    342343    }
    343344
    344     if (gsdl_address_resolution_method == 1 || gsdl_address_resolution_method == 2) {
     345    if (gsdl_address_resolution_method == 1 || gsdl_address_resolution_method == 3) {
    345346      sprintf(gsdl_address, "%d.%d.%d.%d", local_ip & 0xFF, (local_ip >> 8) & 0xFF, (local_ip >> 16) & 0xFF, (local_ip >> 24) & 0xFF);
     347    }
     348    else if (gsdl_address_resolution_method == 2) {
     349      sprintf(gsdl_address, "localhost");
    346350    }
    347351    else {
Note: See TracChangeset for help on using the changeset viewer.