Skip to content

Commit

Permalink
Generate a core.added-config event, for any config_recs added.
Browse files Browse the repository at this point in the history
This can be used by listeners (via third-party modules) to watch which configs
are added, and when, to become part of the config tree.
  • Loading branch information
Castaglia committed Aug 21, 2021
1 parent cb3f7b2 commit e089a68
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/configdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ config_rec *pr_config_add_set(xaset_t **set, const char *name, int flags) {
xaset_insert_end(*set, (xasetmember_t *) c);
}

/* Generate an event about the added config, for any interested parties.
* This is useful for tracking the origins of the config tree.
*/
pr_event_generate("core.added-config", c);

return c;
}

Expand Down

0 comments on commit e089a68

Please sign in to comment.