RangeNetworks / openbts

GSM+GPRS Radio Access Network Node
GNU Affero General Public License v3.0
864 stars 326 forks source link

Error when setting NEIGHBOR_TABLE_ON_DISK to 1 #33

Open adrianvidal opened 6 years ago

adrianvidal commented 6 years ago

I want OpenBTS to use an SQLite database for tracking neighbors, so I set NEIGHBOR_TABLE_ON_DISK to 1 in /openbts/Peering/NeighborTable.h. By default, the macro is set to 0.

Upon compiling, I encountered several errors. Many of these errors result from several functions/variables being undefined.

NeighborTable.cpp: In member function ‘bool Peering::NeighborTable::ntFindByIP(std::__cxx11::string, Peering::NeighborEntry*)’: NeighborTable.cpp:52:2: error: ‘NeighborTableMap’ has not been declared NeighborTableMap::iterator mit = mNeighborMap.find(ip); ^ NeighborTable.cpp:53:6: error: ‘mit’ was not declared in this scope if (mit == mNeighborMap.end()) { return false; } ^ NeighborTable.cpp:53:13: error: ‘mNeighborMap’ was not declared in this scope if (mit == mNeighborMap.end()) { return false; } ^ NeighborTable.cpp:54:26: error: ‘mit’ was not declared in this scope if (pentry) { *pentry = mit->second; } ^ NeighborTable.cpp: In member function ‘bool Peering::NeighborTable::ntFindByPeerAddr(const sockaddr_in*, Peering::NeighborEntry*)’: NeighborTable.cpp:63:2: error: ‘NeighborTableMap’ has not been declared NeighborTableMap::iterator mit = mNeighborMap.find(ipaddr); ^ NeighborTable.cpp:64:6: error: ‘mit’ was not declared in this scope if (mit == mNeighborMap.end()) { return false; } ^ NeighborTable.cpp:64:13: error: ‘mNeighborMap’ was not declared in this scope if (mit == mNeighborMap.end()) { return false; } ^ NeighborTable.cpp:65:26: error: ‘mit’ was not declared in this scope if (pentry) { *pentry = mit->second; } ^ NeighborTable.cpp: In member function ‘bool Peering::NeighborTable::ntFindByArfcn(int, int, Peering::NeighborEntry*)’: NeighborTable.cpp:77:7: error: ‘NeighborTableMap’ has not been declared for (NeighborTableMap::iterator mit = mNeighborMap.begin(); mit != mNeighborMa ^ NeighborTable.cpp:77:62: error: ‘mit’ was not declared in this scope for (NeighborTableMap::iterator mit = mNeighborMap.begin(); mit != mNeighborMa ^ NeighborTable.cpp:77:69: error: ‘mNeighborMap’ was not declared in this scope for (NeighborTableMap::iterator mit = mNeighborMap.begin(); mit != mNeighborMa ^ NeighborTable.cpp: In function ‘void makeNeighborSet(std::set<std::__cxx11::basic_string<char> >&)’: NeighborTable.cpp:158:20: error: ‘addNeighbor’ was not declared in this scope addNeighbor(&peer); ^ NeighborTable.cpp: In member function ‘bool Peering::NeighborTable::ntAddInfo(Peering::NeighborEntry&)’: NeighborTable.cpp:302:40: error: ‘address’ was not declared in this scope const char *ret = inet_ntop(AF_INET,&(address->sin_addr),addrString,255);

Is there something I am missing here? Or is there another way to configure OpenBTS to use SQLite databases for neighbors?