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); }
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; }
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; }