Lines Matching refs:item
72 * named validate_<item>(). Each such function calls validate_<item>()
201 #define is_fixed(item) \
202 ((item)->state == AD_STATE_FIXED)
204 #define is_changed(item, num, param) \
205 ((item)->param_version[num] != (param)->version)
216 update_version(ad_item_t *item, int num, ad_item_t *param)
218 item->param_version[num] = param->version;
224 is_valid(ad_item_t *item)
226 if (item->value != NULL) {
227 if (item->state == AD_STATE_FIXED)
229 if (item->state == AD_STATE_AUTO &&
230 (item->expires == 0 || item->expires > time(NULL)))
238 update_item(ad_item_t *item, void *value, enum ad_item_state state,
241 if (item->value != NULL && value != NULL) {
242 if ((item->type == AD_STRING &&
243 strcmp(item->value, value) != 0) ||
244 (item->type == AD_DIRECTORY &&
245 ad_disc_compare_ds(item->value, value) != 0)||
246 (item->type == AD_DOMAINS_IN_FOREST &&
247 ad_disc_compare_domainsinforest(item->value, value) != 0) ||
248 (item->type == AD_TRUSTED_DOMAINS &&
249 ad_disc_compare_trusteddomains(item->value, value) != 0))
250 item->version++;
251 } else if (item->value != value)
252 item->version++;
254 if (item->value != NULL)
255 free(item->value);
257 item->value = value;
258 item->state = state;
261 item->expires = 0;
263 item->expires = time(NULL) + ttl;