Ignore:
Timestamp:
07/24/11 20:43:08 (13 years ago)
Author:
tbretz
Message:
Added the possibility to setup DIM_HOST_NODE with the --host program option.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/chatclient.cc

    r10802 r11574  
    33#include "Configuration.h"
    44#include "ChatClient.h"
     5#include "DimSetup.h"
    56
    67using namespace std;
     
    3031    po::options_description config("Program options");
    3132    config.add_options()
    32         ("dns",       var<string>("localhost"), "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)")
     33        ("dns",       var<string>("localhost"),       "Dim nameserver (overwites DIM_DNS_NODE environment variable)")
     34        ("host",      var<string>(""),                "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)")
    3335        ("log,l",     var<string>(n), "Write log-file")
    3436        ("console,c", var<int>(),     "Use console (0=shell, 1=simple buffered, X=simple unbuffered)")
    3537        ;
    3638
    37     conf.AddEnv("dns", "DIM_DNS_NODE");
     39    conf.AddEnv("dns",  "DIM_DNS_NODE");
     40    conf.AddEnv("host", "DIM_HOST_NODE");
    3841
    3942    conf.AddOptions(config);
     
    103106    }
    104107
    105     // To allow overwriting of DIM_DNS_NODE set 0 to 1
    106     setenv("DIM_DNS_NODE", conf.Get<string>("dns").c_str(), 1);
     108    Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host"));
    107109
    108110    if (conf.Get<int>("console")==0)
Note: See TracChangeset for help on using the changeset viewer.