summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorJonathan Rose <jrose@digium.com>2011-08-26 16:38:37 +0000
committerJonathan Rose <jrose@digium.com>2011-08-26 16:38:37 +0000
commit10183c021e723ec05eaa99479500741385d6f7d4 (patch)
tree6b5696a29733fa0b374f3a580bbbaa877ce1a5b1 /res
parenta721549656398fa2b6777454398f2db0886cd203 (diff)
Merged revisions 333410 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10 ................ r333410 | jrose | 2011-08-26 11:28:03 -0500 (Fri, 26 Aug 2011) | 19 lines Merged revisions 333378 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r333378 | jrose | 2011-08-26 11:19:07 -0500 (Fri, 26 Aug 2011) | 13 lines [patch] Buddies are always auto-registered when processing the roster Reporter said autoregister flag was ignored for registering 'buddies' which had a subscription to us. Verified that this was the case and observed how the patch addressed this and made sure it didn't break anything. (closes issue ASTERISK-14233) Reported by: Simon Arlott Patches: asterisk-0015229.patch (license #5756) patch uploaded by Simon Arlott Tested by: Jonathan Rose ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@333428 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r--res/res_jabber.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/res/res_jabber.c b/res/res_jabber.c
index bfbdc7d44..3d4d136f6 100644
--- a/res/res_jabber.c
+++ b/res/res_jabber.c
@@ -3058,10 +3058,12 @@ static int aji_filter_roster(void *data, ikspak *pak)
if (ast_test_flag(&client->flags, AJI_AUTOPRUNE)) {
ast_set_flag(&buddy->flags, AJI_AUTOPRUNE);
ASTOBJ_MARK(buddy);
- } else if (!iks_strcmp(iks_find_attrib(x, "subscription"), "none") || !iks_strcmp(iks_find_attrib(x, "subscription"), "from")) {
- /* subscribe to buddy's presence only
- if we really need to */
- ast_set_flag(&buddy->flags, AJI_AUTOREGISTER);
+ } else if (ast_test_flag(&client->flags, AJI_AUTOREGISTER)) {
+ if (!iks_strcmp(iks_find_attrib(x, "subscription"), "none") || !iks_strcmp(iks_find_attrib(x, "subscription"), "from")) {
+ /* subscribe to buddy's presence only
+ if we really need to */
+ ast_set_flag(&buddy->flags, AJI_AUTOREGISTER);
+ }
}
ASTOBJ_UNLOCK(buddy);
if (buddy) {