Skip to content

Commit

Permalink
Silence deprecated warning.
Browse files Browse the repository at this point in the history
Use sdskv_provider_attach_database instead of
sdskv_provider_add_database.
  • Loading branch information
samuelkgutierrez committed Jun 26, 2018
1 parent 0b663ab commit 70ec6ef
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/sdsdkv-server.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ struct sdsdkv_server : public personality {
//
sdskv_database_id_t m_dbid;
//
sdskv_config_t m_sdskv_config;
//
int
m_margo_init(void)
{
Expand Down Expand Up @@ -118,12 +120,18 @@ struct sdsdkv_server : public personality {
// that was created with a smaller number of servers.
const int pid = m_mpi->get_pgroup_id();
const std::string db_name = personality::m_get_db_name(pid);
int rc = sdskv_provider_add_database(
// TODO(skg) No overwrite? What's that?
static const int db_no_overwrite = 0;
m_sdskv_config = {
db_name.c_str(),
m_config->db_path.c_str(),
sdsdkv_iconfig::get_real_db_type(m_config->db_type),
m_config->cmp_fn,
db_no_overwrite
};
int rc = sdskv_provider_attach_database(
m_provider,
db_name.c_str(),
m_config->db_path.c_str(),
sdsdkv_iconfig::get_real_db_type(m_config->db_type),
m_config->cmp_fn,
&m_sdskv_config,
&m_dbid
);
if (rc != SDSKV_SUCCESS) return sdskv2irc(rc);
Expand Down

0 comments on commit 70ec6ef

Please sign in to comment.