Changeset 49818 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Dec 9, 2013 5:52:34 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/HostDnsService.cpp
r49718 r49818 22 22 #include <iprt/cpp/utils.h> 23 23 24 #include "Logging.h" 24 25 #include "VirtualBoxImpl.h" 25 26 #include <iprt/thread.h> … … 34 35 static HostDnsMonitor *g_monitor; 35 36 37 static void dumpHostDnsInformation(const HostDnsInformation&); 38 static void dumpHostDnsStrVector(const std::string&, const std::vector<std::string>&); 36 39 37 40 /* Lockee */ … … 241 244 updateInfo(); 242 245 246 LogRel(("HostDnsMonitorProxy::GetNameServers:\n")); 247 dumpHostDnsStrVector("Name Server", m->info->servers); 248 243 249 detachVectorOfString(m->info->servers, ComSafeArrayOutArg(aNameServers)); 244 250 … … 254 260 updateInfo(); 255 261 262 LogRel(("HostDnsMonitorProxy::GetDomainName:%s\n", m->info->domain.c_str())); 263 256 264 Utf8Str(m->info->domain.c_str()).cloneTo(aDomainName); 257 265 … … 266 274 if (m->fModified) 267 275 updateInfo(); 276 277 LogRel(("HostDnsMonitorProxy::GetSearchStrings:\n")); 278 dumpHostDnsStrVector("Search String", m->info->searchList); 268 279 269 280 detachVectorOfString(m->info->searchList, ComSafeArrayOutArg(aSearchStrings)); … … 288 299 HostDnsInformation *old = m->info; 289 300 301 LogRel(("HostDnsMonitorProxy: Host's DNS information updated:\n")); 302 dumpHostDnsInformation(*info); 303 290 304 m->info = info; 291 305 if (old) 306 { 307 LogRel(("HostDnsMonitorProxy: Old host information:\n")); 308 dumpHostDnsInformation(*old); 309 292 310 delete old; 311 } 293 312 294 313 m->fModified = false; 295 314 } 315 316 317 static void dumpHostDnsInformation(const HostDnsInformation& info) 318 { 319 dumpHostDnsStrVector("DNS server", info.servers); 320 dumpHostDnsStrVector("SearchString", info.searchList); 321 322 if (!info.domain.empty()) 323 LogRel(("DNS domain: %s\n", info.domain.c_str())); 324 } 325 326 327 static void dumpHostDnsStrVector(const std::string& prefix, const std::vector<std::string>& v) 328 { 329 int i = 0; 330 for (std::vector<std::string>::const_iterator it = v.begin(); 331 it != v.end(); 332 ++it, ++i) 333 LogRel(("%s %d: %s\n", prefix.c_str(), i, it->c_str())); 334 }
Note:
See TracChangeset
for help on using the changeset viewer.