MCPcopy Create free account
hub / github.com/acl-dev/acl / open_option_tbl

Function open_option_tbl

app/net_tools/net_store.cpp:61–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59")";
60
61static acl::db_handle* open_option_tbl()
62{
63 const char* path = global::get_instance().get_path();
64 acl::string dbpath;
65 dbpath.format("%s/net_store.db", path);
66
67 acl::db_handle* db = new acl::db_sqlite(dbpath.c_str());
68 if (db->open() == false)
69 {
70 logger_error("open db: %s failed", dbpath.c_str());
71 delete db;
72 return NULL;
73 }
74 else if (create_option_tbl(*db, "option_tbl", CREATE_OPT_TBL) == false)
75 {
76 delete db;
77 return NULL;
78 }
79 else
80 return db;
81}
82
83bool net_store::get_key(const char* name, acl::string& out)
84{

Callers 2

get_keyMethod · 0.85
set_keyMethod · 0.85

Calls 5

create_option_tblFunction · 0.85
get_pathMethod · 0.45
formatMethod · 0.45
c_strMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…