Changeset 11574 for trunk/FACT++
- Timestamp:
- 07/24/11 20:43:08 (13 years ago)
- Location:
- trunk/FACT++/src
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/DimSetup.cc
r11526 r11574 158 158 //! Address of the Dim-dns 159 159 //! 160 void Dim::Setup(const std::string &dns )160 void Dim::Setup(const std::string &dns, const std::string &host) 161 161 { 162 const string loc = Dim::GetLocalIp().c_str();162 const string loc = host.empty() ? Dim::GetLocalIp() : host; 163 163 164 164 setenv("DIM_DNS_NODE", dns.c_str(), 1); -
trunk/FACT++/src/DimSetup.h
r11236 r11574 8 8 //std::string GetLocalIp(const std::string &dns="192.168.0.255"); 9 9 std::string GetLocalIp(const std::string &dns="14.0.0.1"); 10 void Setup(const std::string &dns );10 void Setup(const std::string &dns, const std::string &host=""); 11 11 } 12 12 -
trunk/FACT++/src/biasctrl.cc
r11483 r11574 644 644 po::options_description config("Program options"); 645 645 config.add_options() 646 ("dns", var<string>("localhost"), "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)") 646 ("dns", var<string>("localhost"), "Dim nameserver (overwites DIM_DNS_NODE environment variable)") 647 ("host", var<string>(""), "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)") 647 648 ("log,l", var<string>(n), "Write log-file") 648 649 ("no-dim,d", po_bool(), "Disable dim services") … … 659 660 ; 660 661 661 conf.AddEnv("dns", "DIM_DNS_NODE"); 662 conf.AddEnv("dns", "DIM_DNS_NODE"); 663 conf.AddEnv("host", "DIM_HOST_NODE"); 662 664 663 665 conf.AddOptions(config); … … 742 744 } 743 745 744 Dim::Setup(conf.Get<string>("dns") );746 Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host")); 745 747 746 748 //try -
trunk/FACT++/src/chatclient.cc
r10802 r11574 3 3 #include "Configuration.h" 4 4 #include "ChatClient.h" 5 #include "DimSetup.h" 5 6 6 7 using namespace std; … … 30 31 po::options_description config("Program options"); 31 32 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)") 33 35 ("log,l", var<string>(n), "Write log-file") 34 36 ("console,c", var<int>(), "Use console (0=shell, 1=simple buffered, X=simple unbuffered)") 35 37 ; 36 38 37 conf.AddEnv("dns", "DIM_DNS_NODE"); 39 conf.AddEnv("dns", "DIM_DNS_NODE"); 40 conf.AddEnv("host", "DIM_HOST_NODE"); 38 41 39 42 conf.AddOptions(config); … … 103 106 } 104 107 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")); 107 109 108 110 if (conf.Get<int>("console")==0) -
trunk/FACT++/src/chatserv.cc
r11481 r11574 16 16 po::options_description config("Program options"); 17 17 config.add_options() 18 ("dns", var<string>("localhost"), "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)") 18 ("dns", var<string>("localhost"), "Dim nameserver (overwites DIM_DNS_NODE environment variable)") 19 ("host", var<string>(""), "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)") 19 20 ("log,l", var<string>(n), "Write log-file") 20 21 ; 21 22 22 conf.AddEnv("dns", "DIM_DNS_NODE"); 23 conf.AddEnv("dns", "DIM_DNS_NODE"); 24 conf.AddEnv("host", "DIM_HOST_NODE"); 23 25 24 26 conf.AddOptions(config); … … 104 106 } 105 107 106 Dim::Setup(conf.Get<string>("dns") );108 Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host")); 107 109 108 110 WindowLog log; -
trunk/FACT++/src/datalogger.cc
r11535 r11574 2449 2449 po::options_description configp("Program options"); 2450 2450 configp.add_options() 2451 ("dns", var<string>("localhost"), "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)") 2451 ("dns", var<string>("localhost"), "Dim nameserver (overwites DIM_DNS_NODE environment variable)") 2452 ("host", var<string>(""), "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)") 2452 2453 ("log,l", var<string>(n), "Write log-file") 2453 2454 ("console,c", var<int>(), "Use console (0=shell, 1=simple buffered, X=simple unbuffered)") … … 2470 2471 ; 2471 2472 2472 conf.AddEnv("dns", "DIM_DNS_NODE"); 2473 conf.AddEnv("dns", "DIM_DNS_NODE"); 2474 conf.AddEnv("host", "DIM_HOST_NODE"); 2473 2475 2474 2476 conf.AddOptions(configp); … … 2509 2511 } 2510 2512 2511 Dim::Setup(conf.Get<string>("dns") );2513 Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host")); 2512 2514 2513 2515 // try -
trunk/FACT++/src/dimctrl.cc
r11403 r11574 40 40 po::options_description config("Program options"); 41 41 config.add_options() 42 ("dns", var<string>("localhost"), "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)") 42 ("dns", var<string>("localhost"), "Dim nameserver (overwites DIM_DNS_NODE environment variable)") 43 ("host", var<string>(""), "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)") 43 44 ("log,l", var<string>(n), "Write log-file") 44 45 ("console,c", var<int>(0), "Use console (0=shell, 1=simple buffered, X=simple unbuffered)") … … 48 49 ; 49 50 50 conf.AddEnv("dns", "DIM_DNS_NODE"); 51 conf.AddEnv("dns", "DIM_DNS_NODE"); 52 conf.AddEnv("host", "DIM_HOST_NODE"); 51 53 52 54 conf.AddOptions(config); … … 113 115 } 114 116 115 Dim::Setup(conf.Get<string>("dns") );117 Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host")); 116 118 117 119 if (conf.Get<int>("console")==0) -
trunk/FACT++/src/drivectrl.cc
r11483 r11574 942 942 po::options_description config("Program options"); 943 943 config.add_options() 944 ("dns", var<string>("localhost"), "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)") 944 ("dns", var<string>("localhost"), "Dim nameserver (overwites DIM_DNS_NODE environment variable)") 945 ("host", var<string>(""), "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)") 945 946 ("log,l", var<string>(n), "Write log-file") 946 947 ("no-dim,d", po_switch(), "Disable dim services") … … 957 958 ; 958 959 959 conf.AddEnv("dns", "DIM_DNS_NODE"); 960 conf.AddEnv("dns", "DIM_DNS_NODE"); 961 conf.AddEnv("host", "DIM_HOST_NODE"); 960 962 961 963 conf.AddOptions(config); … … 1040 1042 } 1041 1043 1042 Dim::Setup(conf.Get<string>("dns") );1044 Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host")); 1043 1045 1044 1046 //try -
trunk/FACT++/src/fadctrl.cc
r11544 r11574 2065 2065 po::options_description config("Program options"); 2066 2066 config.add_options() 2067 ("dns", var<string>("localhost"), "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)") 2067 ("dns", var<string>("localhost"), "Dim nameserver (overwites DIM_DNS_NODE environment variable)") 2068 ("host", var<string>(""), "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)") 2068 2069 ("log,l", var<string>(n), "Write log-file") 2069 2070 // ("no-dim,d", po_switch(), "Disable dim services") … … 2124 2125 ; 2125 2126 2126 conf.AddEnv("dns", "DIM_DNS_NODE"); 2127 conf.AddEnv("dns", "DIM_DNS_NODE"); 2128 conf.AddEnv("host", "DIM_HOST_NODE"); 2127 2129 2128 2130 conf.AddOptions(config); … … 2187 2189 } 2188 2190 2189 Dim::Setup(conf.Get<string>("dns") );2191 Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host")); 2190 2192 2191 2193 // try -
trunk/FACT++/src/fscctrl.cc
r11483 r11574 613 613 po::options_description config("Program options"); 614 614 config.add_options() 615 ("dns", var<string>("localhost"), "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)") 615 ("dns", var<string>("localhost"), "Dim nameserver (overwites DIM_DNS_NODE environment variable)") 616 ("host", var<string>(""), "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)") 616 617 ("log,l", var<string>(n), "Write log-file") 617 618 ("no-dim,d", po_bool(), "Disable dim services") … … 628 629 ; 629 630 630 conf.AddEnv("dns", "DIM_DNS_NODE"); 631 conf.AddEnv("dns", "DIM_DNS_NODE"); 632 conf.AddEnv("host", "DIM_HOST_NODE"); 631 633 632 634 conf.AddOptions(config); … … 711 713 } 712 714 713 Dim::Setup(conf.Get<string>("dns") );715 Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host")); 714 716 715 717 //try -
trunk/FACT++/src/ftmctrl.cc
r11563 r11574 2423 2423 po::options_description config("Program options"); 2424 2424 config.add_options() 2425 ("dns", var<string>("localhost"), "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)")2426 (" log,l", var<string>(n), "Write log-file")2425 ("dns", var<string>("localhost"), "Dim nameserver (overwites DIM_DNS_NODE environment variable)") 2426 ("host", var<string>(""), "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)") 2427 2427 ("no-dim,d", po_bool(), "Disable dim services") 2428 2428 ("console,c", var<int>(), "Use console (0=shell, 1=simple buffered, X=simple unbuffered)") … … 2481 2481 ; 2482 2482 2483 conf.AddEnv("dns", "DIM_DNS_NODE"); 2483 conf.AddEnv("dns", "DIM_DNS_NODE"); 2484 conf.AddEnv("host", "DIM_HOST_NODE"); 2484 2485 2485 2486 conf.AddOptions(config); … … 2565 2566 } 2566 2567 2567 Dim::Setup(conf.Get<string>("dns") );2568 Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host")); 2568 2569 2569 2570 //try -
trunk/FACT++/src/mcp.cc
r11516 r11574 515 515 po::options_description config("Program options"); 516 516 config.add_options() 517 ("dns", var<string>("localhost"), "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)") 517 ("dns", var<string>("localhost"), "Dim nameserver (overwites DIM_DNS_NODE environment variable)") 518 ("host", var<string>(""), "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)") 518 519 ("log,l", var<string>(n), "Write log-file") 519 520 // ("no-dim,d", po_bool(), "Disable dim services") … … 530 531 ; 531 532 */ 532 conf.AddEnv("dns", "DIM_DNS_NODE"); 533 conf.AddEnv("dns", "DIM_DNS_NODE"); 534 conf.AddEnv("host", "DIM_HOST_NODE"); 533 535 534 536 conf.AddOptions(config); … … 613 615 } 614 616 615 Dim::Setup(conf.Get<string>("dns") );617 Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host")); 616 618 617 619 //try -
trunk/FACT++/src/scheduler.cc
r11483 r11574 805 805 po::options_description config("Configuration"); 806 806 config.add_options() 807 ("dns", var<string>("localhost"), "Dim nameserver host name (Overwites DIM_DNS_NODE environment variable)") 807 ("dns", var<string>("localhost"), "Dim nameserver (overwites DIM_DNS_NODE environment variable)") 808 ("host", var<string>(""), "Address with which the Dim nameserver can connect to this host (overwites DIM_HOST_NODE environment variable)") 808 809 ("log,l", var<string>(n), "Write log-file") 809 810 ("no-dim,d", po_switch(), "Disable dim services") … … 842 843 p.add("schedule", 1); // The first positional options 843 844 844 conf.AddEnv("dns", "DIM_DNS_NODE"); 845 conf.AddEnv("dns", "DIM_DNS_NODE"); 846 conf.AddEnv("host", "DIM_HOST_NODE"); 847 845 848 conf.AddOptions(config); 846 849 conf.AddOptions(control); … … 902 905 } 903 906 904 Dim::Setup(conf.Get<string>("dns") );907 Dim::Setup(conf.Get<string>("dns"), conf.Get<string>("host")); 905 908 906 909 // try
Note:
See TracChangeset
for help on using the changeset viewer.