[telepathy-gabble/master] Don't ignore subscription='remove' if remote-pending

Will Thompson will.thompson at collabora.co.uk
Tue May 26 04:52:00 PDT 2009


In response to subscription='none' or subscription='from', the contact
is only removed from 'subscribe' if they're not remote pending., with
the explanation 'presence="unsubscribed" does that'. From my reading of
the RFC, that makes sense.

But I think the same guard for subscription='remove' makes no sense at
all: they're being removed entirely from the roster, so clearly we're
cancelling the subscription request.
---
 src/roster.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/src/roster.c b/src/roster.c
index 39a7710..03a2c39 100644
--- a/src/roster.c
+++ b/src/roster.c
@@ -1316,11 +1316,7 @@ gabble_roster_iq_cb (LmMessageHandler *handler,
                 }
               break;
             case GABBLE_ROSTER_SUBSCRIPTION_REMOVE:
-              if (!tp_handle_set_is_member (sub_chan->group.remote_pending,
-                    handle))
-                {
-                  tp_intset_add (sub_rem, handle);
-                }
+              tp_intset_add (sub_rem, handle);
               break;
             default:
               g_assert_not_reached ();
@@ -1339,11 +1335,7 @@ gabble_roster_iq_cb (LmMessageHandler *handler,
                   tp_intset_add (stored_add, handle);
               break;
             case GABBLE_ROSTER_SUBSCRIPTION_REMOVE:
-              if (!tp_handle_set_is_member (sub_chan->group.remote_pending,
-                    handle))
-                {
-                  tp_intset_add (stored_rem, handle);
-                }
+              tp_intset_add (stored_rem, handle);
               break;
             default:
               g_assert_not_reached ();
-- 
1.5.6.5




More information about the telepathy-commits mailing list