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

Function SMSCBConnectDatabase

Control/SMSCB.cpp:46–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44
45
46sqlite3* SMSCBConnectDatabase(const char* path, sqlite3 **DB)
47{
48 int rc = sqlite3_open(path,DB);
49 if (rc) {
50 LOG(EMERG) << "Cannot open SMSCB database on path " << path << ": " << sqlite3_errmsg(*DB);
51 sqlite3_close(*DB);
52 *DB = NULL;
53 return NULL;
54 }
55 if (!sqlite3_command(*DB,createSMSCBTable)) {
56 LOG(EMERG) << "Cannot create SMSCB table";
57 return NULL;
58 }
59 // Set high-concurrency WAL mode.
60 if (!sqlite3_command(*DB,enableWAL)) {
61 LOG(EMERG) << "Cannot enable WAL mode on database at " << path << ", error message: " << sqlite3_errmsg(*DB);
62 }
63 return *DB;
64}
65
66
67void encode7(char mc, int &shift, unsigned int &dp, int &buf, char *thisPage)

Callers 1

SMSCBSenderMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected