13 struct timespec mtime;
16 struct tr_cfgwatch_data {
17 struct timeval poll_interval; /* how often should we check for updates? */
18 struct timeval settling_time; /* how long should we wait for changes to settle before updating? */
19 char *config_dir; /* what directory are we watching? */
20 struct tr_fstat *fstat_list; /* file names and mtimes */
21 int n_files; /* number of files in fstat_list */
22 int change_detected; /* have we detected a change? */
23 struct timeval last_change_detected; /* when did we last note a changed mtime? */
24 TALLOC_CTX *ctx; /* what context should own configuration talloc blocks? */
25 TR_INSTANCE *tr; /* what trust router are we updating? */
27 typedef struct tr_cfgwatch_data TR_CFGWATCH;
31 TR_CFGWATCH *tr_cfgwatch_create(TALLOC_CTX *mem_ctx);
32 int tr_read_and_apply_config(TR_CFGWATCH *cfgwatch);
33 int tr_cfgwatch_event_init(struct event_base *base, TR_CFGWATCH *cfg_status, struct event **cfgwatch_ev);
35 #endif /* TR_CFGWATCH_H */