mirror of
https://github.com/privacore/open-source-search-engine.git
synced 2025-07-15 02:36:08 -04:00
Revert "Removed unused local function isMyIp()"
This reverts commit 0d832e32ad
.
This commit is contained in:
@ -30,6 +30,7 @@ uint32_t g_listIps [ MAX_HOSTS * 4 ];
|
||||
uint16_t g_listPorts [ MAX_HOSTS * 4 ];
|
||||
int32_t g_listNumTotal = 0;
|
||||
|
||||
static bool isMyIp(int32_t ip);
|
||||
|
||||
void Hostdb::resetPortTables () {
|
||||
g_hostTableUdp.reset();
|
||||
@ -1778,6 +1779,14 @@ int32_t *getLocalIps ( ) {
|
||||
return s_localIps;
|
||||
}
|
||||
|
||||
static bool isMyIp(int32_t ip) {
|
||||
int32_t *localIp = getLocalIps();
|
||||
for ( ; *localIp ; localIp++ ) {
|
||||
if ( ip == *localIp ) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Host *Hostdb::getHost2 ( const char *cwd , int32_t *localIps ) {
|
||||
for ( int32_t i = 0 ; i < m_numHosts ; i++ ) {
|
||||
|
Reference in New Issue
Block a user