MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / holdOff

Method holdOff

Peering/NeighborTable.cpp:311–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309
310
311void NeighborTable::holdOff(const char* address, unsigned seconds)
312{
313 if (mDB == NULL) { return; } // we already threw an ALERT.
314 assert(address);
315 LOG(DEBUG) << "address " << address << " seconds " << seconds;
316
317 if (!seconds) return;
318
319 time_t holdoffTime = time(NULL) + seconds;
320 char query[200];
321 sprintf(query,"UPDATE NEIGHBOR_TABLE SET HOLDOFF=%lu WHERE IPADDRESS='%s'",
322 holdoffTime, address);
323 if (!sqlite3_command(mDB,query)) {
324 LOG(ALERT) << "cannot access neighbor table";
325 }
326}
327
328void NeighborTable::holdOff(const struct sockaddr_in* peer, unsigned seconds)
329{

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected