diff options
author | Philippe Sultan <philippe.sultan@gmail.com> | 2008-09-09 22:08:56 +0000 |
---|---|---|
committer | Philippe Sultan <philippe.sultan@gmail.com> | 2008-09-09 22:08:56 +0000 |
commit | 7ea67a07ee2e94cc4bda63353e278221b90d0872 (patch) | |
tree | 8cee838848eb7f31fbc517a83a7b055b9e28e3be /res | |
parent | 3226c29cd634e7800f8ec65874ba69b009f9c29b (diff) |
Disable autoprune by default.
(closes issue #13411)
Reported by: caio1982
Patches:
res_jabber_autoprune1.diff uploaded by caio1982 (license 22)
Tested by: caio1982
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142280 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r-- | res/res_jabber.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/res/res_jabber.c b/res/res_jabber.c index 432b4a292..8f8f91af8 100644 --- a/res/res_jabber.c +++ b/res/res_jabber.c @@ -159,7 +159,7 @@ struct aji_client_container clients; struct aji_capabilities *capabilities = NULL; /*! \brief Global flags, initialized to default values */ -static struct ast_flags globalflags = { AJI_AUTOPRUNE | AJI_AUTOREGISTER }; +static struct ast_flags globalflags = { AJI_AUTOREGISTER }; /*! * \brief Deletes the aji_client data structure. @@ -2076,7 +2076,7 @@ static void aji_pruneregister(struct aji_client *client) ASTOBJ_RDLOCK(iterator); /* For an aji_buddy, both AUTOPRUNE and AUTOREGISTER will never * be called at the same time */ - if (ast_test_flag(&iterator->flags, AJI_AUTOPRUNE)) { + if (ast_test_flag(&iterator->flags, AJI_AUTOPRUNE)) { /* If autoprune is set on jabber.conf */ res = ast_aji_send(client, iks_make_s10n(IKS_TYPE_UNSUBSCRIBE, iterator->name, "GoodBye. Your status is no longer needed by Asterisk the Open Source PBX" " so I am no longer subscribing to your presence.\n")); @@ -2881,7 +2881,7 @@ static int aji_load_config(int reload) return -1; /* Reset flags to default value */ - ast_set_flag(&globalflags, AJI_AUTOPRUNE | AJI_AUTOREGISTER); + ast_set_flag(&globalflags, AJI_AUTOREGISTER); if (!cfg) { ast_log(LOG_WARNING, "No such configuration file %s\n", JABBER_CONFIG); @@ -2890,12 +2890,13 @@ static int aji_load_config(int reload) cat = ast_category_browse(cfg, NULL); for (var = ast_variable_browse(cfg, "general"); var; var = var->next) { - if (!strcasecmp(var->name, "debug")) + if (!strcasecmp(var->name, "debug")) { debug = (ast_false(ast_variable_retrieve(cfg, "general", "debug"))) ? 0 : 1; - else if (!strcasecmp(var->name, "autoprune")) + } else if (!strcasecmp(var->name, "autoprune")) { ast_set2_flag(&globalflags, ast_true(var->value), AJI_AUTOPRUNE); - else if (!strcasecmp(var->name, "autoregister")) + } else if (!strcasecmp(var->name, "autoregister")) { ast_set2_flag(&globalflags, ast_true(var->value), AJI_AUTOREGISTER); + } } while (cat) { |