Changeset 11319 for trunk


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

added in localhost to address resolution methods

Location:
trunk/gsdl/src/w32server
Files:
5 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 {
  • trunk/gsdl/src/w32server/resource.h

    r11096 r11319  
    3939#define ID_ARM_IP                       1025
    4040#define ID_ARM_127_0_0_1                1026
     41#define ID_ARM_LOCALHOST                1027
    4142#define ID_PROJECT_SETTINGS             40001
    4243#define ID_PROJECT_EXIT                 40002
     
    4950#define _APS_NEXT_RESOURCE_VALUE        127
    5051#define _APS_NEXT_COMMAND_VALUE         40011
    51 #define _APS_NEXT_CONTROL_VALUE         1026
     52#define _APS_NEXT_CONTROL_VALUE         1030
    5253#define _APS_NEXT_SYMED_VALUE           102
    5354#endif
  • trunk/gsdl/src/w32server/settings.cpp

    r11096 r11319  
    590590  if (SendDlgItemMessage(hwndDlg, ID_ARM_IP,
    591591             BM_GETCHECK, 0, 0) == 1) return ARM_IP;
     592  if (SendDlgItemMessage(hwndDlg, ID_ARM_LOCALHOST,
     593             BM_GETCHECK, 0, 0) == 1) return ARM_LOCALHOST;
    592594  if (SendDlgItemMessage(hwndDlg, ID_ARM_127_0_0_1,
    593595             BM_GETCHECK, 0, 0) == 1) return ARM_127_0_0_1;
     
    602604  SendDlgItemMessage(hwndDlg, ID_ARM_IP, BM_SETCHECK,
    603605             (address_res_method == ARM_IP) ? BST_CHECKED : BST_UNCHECKED, 0);
     606  SendDlgItemMessage(hwndDlg, ID_ARM_LOCALHOST, BM_SETCHECK,
     607             (address_res_method == ARM_LOCALHOST) ? BST_CHECKED : BST_UNCHECKED, 0);
    604608  SendDlgItemMessage(hwndDlg, ID_ARM_127_0_0_1, BM_SETCHECK,
    605609             (address_res_method == ARM_127_0_0_1) ? BST_CHECKED : BST_UNCHECKED, 0);
     
    754758    dialog_update_enables(hwndDlg);
    755759    return 1;
     760    case ID_ARM_LOCALHOST:
     761    set_address_resolution_field (hwndDlg, ARM_LOCALHOST);
     762    dialog_update_enables(hwndDlg);
     763    return 1;
    756764     case ID_ARM_127_0_0_1:
    757765    set_address_resolution_field (hwndDlg, ARM_127_0_0_1);
  • trunk/gsdl/src/w32server/settings.h

    r11096 r11319  
    3737#define ARM_NAME 0
    3838#define ARM_IP 1
    39 #define ARM_127_0_0_1 2
     39#define ARM_LOCALHOST 2
     40#define ARM_127_0_0_1 3
    4041
    4142#include "text_t.h"
Note: See TracChangeset for help on using the changeset viewer.