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

Method createEntry

GSM/PhysicalStatus.cpp:90–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88}
89
90bool PhysicalStatus::createEntry(const L2LogicalChannel* chan)
91{
92 assert(mDB);
93 assert(chan);
94
95 ScopedLock lock(mLock);
96
97 const char* chanString = chan->descriptiveString();
98 LOG(DEBUG) << chan->descriptiveString();
99
100 /* Check to see if the key exists. */
101 if (!sqlite3_exists(mDB, "PHYSTATUS", "CN_TN_TYPE_AND_OFFSET", chanString)) {
102 /* No? Ok, it should now. */
103 char query[500];
104 sprintf(query, "INSERT INTO PHYSTATUS (CN_TN_TYPE_AND_OFFSET, ACCESSED) VALUES "
105 "(\"%s\", %u)",
106 chanString, (unsigned)time(NULL));
107 return sqlite3_command(mDB, query);
108 }
109
110 return false;
111}
112
113bool PhysicalStatus::setPhysical(const L2LogicalChannel* chan,
114 const L3MeasurementResults& measResults)

Callers

nothing calls this directly

Calls 1

descriptiveStringMethod · 0.45

Tested by

no test coverage detected