예제 #1
0
TEST_F(ConfigTest, config_remove_key_missing) {
  config_t *config = config_new(CONFIG_FILE);
  EXPECT_EQ(config_get_int(config, "DID", "productId", 999), 0x1200);
  EXPECT_TRUE(config_remove_key(config, "DID", "productId"));
  EXPECT_EQ(config_get_int(config, "DID", "productId", 999), 999);
  config_free(config);
}
예제 #2
0
bool btif_config_remove(const char *section, const char *key) {
  assert(config != NULL);
  assert(section != NULL);
  assert(key != NULL);

  pthread_mutex_lock(&lock);
  bool ret = config_remove_key(config, section, key);
  pthread_mutex_unlock(&lock);

  return ret;
}
예제 #3
0
bool btc_config_remove(const char *section, const char *key)
{
    assert(config != NULL);
    assert(section != NULL);
    assert(key != NULL);

    osi_mutex_lock(&lock, OSI_MUTEX_MAX_TIMEOUT);
    bool ret = config_remove_key(config, section, key);
    osi_mutex_unlock(&lock);

    return ret;
}