diff options
author | George Joseph <gjoseph@digium.com> | 2017-04-16 18:59:54 -0600 |
---|---|---|
committer | George Joseph <gjoseph@digium.com> | 2017-04-16 18:59:54 -0600 |
commit | b55d21ad919b42829721ca3a0f7425a0b429ff12 (patch) | |
tree | 636725d646446ad0f21130e1bf765a0c21d19284 /res/res_ari_device_states.c | |
parent | 49535c17fc6feefb1533e5460d9bde5815178647 (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: I94b97035311eccf52b0101b8590223265a7881d4
Diffstat (limited to 'res/res_ari_device_states.c')
-rw-r--r-- | res/res_ari_device_states.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/res/res_ari_device_states.c b/res/res_ari_device_states.c index b2aea525e..d6de5dff8 100644 --- a/res/res_ari_device_states.c +++ b/res/res_ari_device_states.c @@ -321,19 +321,24 @@ static struct stasis_rest_handlers deviceStates = { .children = { &deviceStates_deviceName, } }; +static int unload_module(void) +{ + ast_ari_remove_handler(&deviceStates); + stasis_app_unref(); + return 0; +} + static int load_module(void) { int res = 0; stasis_app_ref(); res |= ast_ari_add_handler(&deviceStates); - return res; -} + if (res) { + unload_module(); + return AST_MODULE_LOAD_DECLINE; + } -static int unload_module(void) -{ - ast_ari_remove_handler(&deviceStates); - stasis_app_unref(); - return 0; + return AST_MODULE_LOAD_SUCCESS; } AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "RESTful API module - Device state resources", |