Changeset 11526
- Timestamp:
- 07/22/11 08:45:50 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/DimSetup.cc
r11250 r11526 67 67 if (ec) 68 68 { 69 cout << "WARNING - Failure in name-resolution of '" << dns << ":0': "; 69 //cout << "WARNING - Failure in name-resolution of '" << dns << ":0': "; 70 cout << "WARNING - Could not resolve local ip address: "; 70 71 cout << ec.message() << " (" << ec << ")" << endl; 71 72 return dns; … … 78 79 if (ec) 79 80 { 80 cout << "WARNING - connect to '" << dns << ":0' failed: ";81 cout << "WARNING - Could not resolve local ip address: "; 81 82 cout << ec.message() << " (" << ec << ")" << endl; 82 83 continue; … … 84 85 85 86 const string addr = socket.local_endpoint().address().to_v4().to_string(); 86 cout << "Setting DIM_HOST_NODE=" << addr << endl;87 87 return addr; 88 88 } 89 89 90 return dns;90 return "localhost"; 91 91 92 92 /* … … 160 160 void Dim::Setup(const std::string &dns) 161 161 { 162 setenv("DIM_DNS_NODE", dns.c_str(), 1); 163 setenv("DIM_HOST_NODE", Dim::GetLocalIp().c_str(), 1); 162 const string loc = Dim::GetLocalIp().c_str(); 164 163 165 cout << "Setting DIM_DNS_NODE=" << dns << endl; 164 setenv("DIM_DNS_NODE", dns.c_str(), 1); 165 setenv("DIM_HOST_NODE", loc.c_str(), 1); 166 167 cout << "Setting DIM_DNS_NODE =" << dns << endl; 168 cout << "Setting DIM_HOST_NODE=" << loc << endl; 166 169 } 167 170 … … 172 175 static string rc; 173 176 rc = Dim::GetLocalIp(); 177 cout << "Setting DIM_HOST_NODE=" << rc << endl; 174 178 return rc.c_str(); 175 179 }
Note:
See TracChangeset
for help on using the changeset viewer.