diff options
author | George Joseph <gjoseph@digium.com> | 2017-04-16 18:58:27 -0600 |
---|---|---|
committer | George Joseph <gjoseph@digium.com> | 2017-04-16 18:58:27 -0600 |
commit | 26780e6da47122b3199e8f44a99dd697209e57c0 (patch) | |
tree | ee14f73de3d3832f9eae758b1bd317686292da56 /res/res_ari_endpoints.c | |
parent | eaecccf25930d091f979721066363097f6d8403a (diff) |
make ari-stubs so doc periodic jobs can run
The periodic doc job does a make ari-stubs and checks that
there are no changes before generating the docs. Since I changed
the mustache template (and the generated code directly) recently
and forgot to regenerate the stubs, the doc job thinks they're out
of date.
Change-Id: I5b47094b3480ed6a952efe7d45a77111d89b6eca
Diffstat (limited to 'res/res_ari_endpoints.c')
-rw-r--r-- | res/res_ari_endpoints.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/res/res_ari_endpoints.c b/res/res_ari_endpoints.c index 1843b6d2f..eee1c84b8 100644 --- a/res/res_ari_endpoints.c +++ b/res/res_ari_endpoints.c @@ -447,19 +447,24 @@ static struct stasis_rest_handlers endpoints = { .children = { &endpoints_sendMessage,&endpoints_tech, } }; +static int unload_module(void) +{ + ast_ari_remove_handler(&endpoints); + stasis_app_unref(); + return 0; +} + static int load_module(void) { int res = 0; stasis_app_ref(); res |= ast_ari_add_handler(&endpoints); - return res; -} + if (res) { + unload_module(); + return AST_MODULE_LOAD_DECLINE; + } -static int unload_module(void) -{ - ast_ari_remove_handler(&endpoints); - stasis_app_unref(); - return 0; + return AST_MODULE_LOAD_SUCCESS; } AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Endpoint resources", |