mirror of
https://github.com/gigablast/open-source-search-engine.git
synced 2024-10-04 12:17:35 +03:00
Merge branch 'diffbot' of github.com:gigablast/open-source-search-engine into diffbot
This commit is contained in:
commit
93d62a1f9e
11
Hostdb.cpp
11
Hostdb.cpp
@ -96,6 +96,12 @@ bool Hostdb::init ( char *filename , long hostId , char *netName ,
|
||||
m_useTmpCluster = useTmpCluster;
|
||||
m_initialized = true;
|
||||
|
||||
// try localhosts.conf first
|
||||
if ( strcmp ( filename , "./hosts.conf" ) == 0 )
|
||||
filename = "./localhosts.conf";
|
||||
|
||||
retry:
|
||||
|
||||
/*
|
||||
// for yippy use host as port
|
||||
long yippyPort;
|
||||
@ -151,6 +157,11 @@ bool Hostdb::init ( char *filename , long hostId , char *netName ,
|
||||
g_errno = ENOHOSTSFILE;
|
||||
log(
|
||||
"conf: Filename %s does not exist." ,filename);
|
||||
// if doing localhosts.conf now try hosts.conf
|
||||
if ( strcmp(filename,"./localhosts.conf") == 0 ) {
|
||||
filename = "./hosts.conf";
|
||||
goto retry;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
// get file size
|
||||
|
Loading…
Reference in New Issue
Block a user