rpms/telepathy-gabble/F-11 telepathy-gabble-rejoin-dbus-tube.patch, NONE, 1.1 telepathy-gabble.spec, 1.55, 1.56
Brian Pepple
bpepple at fedoraproject.org
Fri Sep 11 17:05:18 UTC 2009
Author: bpepple
Update of /cvs/pkgs/rpms/telepathy-gabble/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19338
Modified Files:
telepathy-gabble.spec
Added Files:
telepathy-gabble-rejoin-dbus-tube.patch
Log Message:
* Wed Sep 9 2009 Brian Pepple <bpepple at fedoraproject.org> - 0.7.26-3
- Backport patch to allow rejoining of dbus tubes.
telepathy-gabble-rejoin-dbus-tube.patch:
tube-dbus.c | 20 +++++++++++++++-----
tube-dbus.c.orig |only
tube-dbus.h | 3 ++-
tubes-channel.c | 19 +++++++++++--------
4 files changed, 28 insertions(+), 14 deletions(-)
--- NEW FILE telepathy-gabble-rejoin-dbus-tube.patch ---
diff -urp telepathy-gabble-0.7.26.OLD/src/tube-dbus.c telepathy-gabble-0.7.26/src/tube-dbus.c
--- telepathy-gabble-0.7.26.OLD/src/tube-dbus.c 2009-04-02 14:03:31.000000000 -0400
+++ telepathy-gabble-0.7.26/src/tube-dbus.c 2009-09-09 09:31:45.106270421 -0400
@@ -157,6 +157,7 @@ struct _GabbleTubeDBusPrivate
* incoming tubes, always TRUE.
*/
gboolean offered;
+ gboolean requested;
/* our unique D-Bus name on the virtual tube bus (NULL for 1-1 D-Bus tubes)*/
gchar *dbus_local_name;
@@ -733,8 +734,7 @@ gabble_tube_dbus_get_property (GObject *
}
break;
case PROP_REQUESTED:
- g_value_set_boolean (value,
- (priv->initiator == priv->self_handle));
+ g_value_set_boolean (value, priv->requested);
break;
case PROP_INITIATOR_ID:
{
@@ -838,6 +838,9 @@ gabble_tube_dbus_set_property (GObject *
case PROP_MUC:
priv->muc = g_value_get_object (value);
break;
+ case PROP_REQUESTED:
+ priv->requested = g_value_get_boolean (value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -927,7 +930,12 @@ gabble_tube_dbus_constructor (GType type
g_assert (priv->muc == NULL);
}
- if (priv->initiator == priv->self_handle)
+ /* Tube needs to be offered if we initiated AND requested it. Being
+ * the initiator is not enough as we could re-join a muc containing and old
+ * tube we created when we were in this room some time ago. In that case, we
+ * have to accept it if we want to re-join the tube. */
+ if (priv->initiator == priv->self_handle &&
+ priv->requested)
{
priv->offered = FALSE;
}
@@ -1098,7 +1106,7 @@ gabble_tube_dbus_class_init (GabbleTubeD
param_spec = g_param_spec_boolean ("requested", "Requested?",
"True if this channel was requested by the local user",
FALSE,
- G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (object_class, PROP_REQUESTED, param_spec);
param_spec = g_param_spec_object ("muc", "GabbleMucChannel object",
@@ -1484,7 +1492,8 @@ gabble_tube_dbus_new (GabbleConnection *
const gchar *stream_id,
guint id,
GabbleBytestreamIface *bytestream,
- GabbleMucChannel *muc)
+ GabbleMucChannel *muc,
+ gboolean requested)
{
GabbleTubeDBus *tube;
gchar *object_path;
@@ -1504,6 +1513,7 @@ gabble_tube_dbus_new (GabbleConnection *
"stream-id", stream_id,
"id", id,
"muc", muc,
+ "requested", requested,
NULL);
if (bytestream != NULL)
Only in telepathy-gabble-0.7.26/src: tube-dbus.c.orig
diff -urp telepathy-gabble-0.7.26.OLD/src/tube-dbus.h telepathy-gabble-0.7.26/src/tube-dbus.h
--- telepathy-gabble-0.7.26.OLD/src/tube-dbus.h 2009-04-02 11:45:38.000000000 -0400
+++ telepathy-gabble-0.7.26/src/tube-dbus.h 2009-09-09 09:31:37.877270412 -0400
@@ -72,7 +72,8 @@ GType gabble_tube_dbus_get_type (void);
GabbleTubeDBus *gabble_tube_dbus_new (GabbleConnection *conn, TpHandle handle,
TpHandleType handle_type, TpHandle self_handle, TpHandle initiator,
const gchar *service, GHashTable *parameters, const gchar *stream_id,
- guint id, GabbleBytestreamIface *bytestream, GabbleMucChannel *muc);
+ guint id, GabbleBytestreamIface *bytestream, GabbleMucChannel *muc,
+ gboolean requested);
gboolean gabble_tube_dbus_add_name (GabbleTubeDBus *tube, TpHandle handle,
const gchar *name);
diff -urp telepathy-gabble-0.7.26.OLD/src/tubes-channel.c telepathy-gabble-0.7.26/src/tubes-channel.c
--- telepathy-gabble-0.7.26.OLD/src/tubes-channel.c 2009-04-02 11:45:38.000000000 -0400
+++ telepathy-gabble-0.7.26/src/tubes-channel.c 2009-09-09 09:31:37.879268142 -0400
@@ -539,7 +539,8 @@ create_new_tube (GabbleTubesChannel *sel
GHashTable *parameters,
const gchar *stream_id,
guint tube_id,
- GabbleBytestreamIface *bytestream)
+ GabbleBytestreamIface *bytestream,
+ gboolean requested)
{
GabbleTubesChannelPrivate *priv = GABBLE_TUBES_CHANNEL_GET_PRIVATE (self);
GabbleTubeIface *tube;
@@ -550,7 +551,8 @@ create_new_tube (GabbleTubesChannel *sel
case TP_TUBE_TYPE_DBUS:
tube = GABBLE_TUBE_IFACE (gabble_tube_dbus_new (priv->conn,
priv->handle, priv->handle_type, priv->self_handle, initiator,
- service, parameters, stream_id, tube_id, bytestream, self->muc));
+ service, parameters, stream_id, tube_id, bytestream, self->muc,
+ requested));
break;
case TP_TUBE_TYPE_STREAM:
tube = GABBLE_TUBE_IFACE (gabble_tube_stream_new (priv->conn,
@@ -901,7 +903,7 @@ gabble_tubes_channel_presence_updated (G
}
tube = create_new_tube (self, type, initiator_handle,
- service, parameters, stream_id, tube_id, NULL);
+ service, parameters, stream_id, tube_id, NULL, FALSE);
tp_channel_manager_emit_new_channel (priv->conn->muc_factory,
TP_EXPORTABLE_CHANNEL (tube), NULL);
@@ -1223,7 +1225,8 @@ gabble_tubes_channel_tube_si_offered (Ga
}
tube = create_new_tube (self, type, priv->handle, service,
- parameters, stream_id, tube_id, (GabbleBytestreamIface *) bytestream);
+ parameters, stream_id, tube_id, (GabbleBytestreamIface *) bytestream,
+ FALSE);
tp_channel_manager_emit_new_channel (priv->conn->private_tubes_factory,
TP_EXPORTABLE_CHANNEL (tube), NULL);
@@ -1401,7 +1404,7 @@ tube_msg_offered (GabbleTubesChannel *se
}
tube = create_new_tube (self, type, priv->handle, service,
- parameters, NULL, tube_id, NULL);
+ parameters, NULL, tube_id, NULL, FALSE);
tp_channel_manager_emit_new_channel (priv->conn->private_tubes_factory,
TP_EXPORTABLE_CHANNEL (tube), NULL);
@@ -1539,7 +1542,7 @@ GabbleTubeIface *gabble_tubes_channel_tu
stream_id = gabble_bytestream_factory_generate_stream_id ();
tube = create_new_tube (self, type, priv->self_handle, service,
- parameters, stream_id, tube_id, NULL);
+ parameters, stream_id, tube_id, NULL, TRUE);
g_free (stream_id);
g_hash_table_destroy (parameters);
@@ -1575,7 +1578,7 @@ gabble_tubes_channel_offer_d_bus_tube (T
tube_id = generate_tube_id ();
tube = create_new_tube (self, TP_TUBE_TYPE_DBUS, priv->self_handle,
- service, parameters, (const gchar *) stream_id, tube_id, NULL);
+ service, parameters, (const gchar *) stream_id, tube_id, NULL, TRUE);
if (!gabble_tube_dbus_offer (GABBLE_TUBE_DBUS (tube), &error))
{
@@ -1653,7 +1656,7 @@ gabble_tubes_channel_offer_stream_tube (
tube_id = generate_tube_id ();
tube = create_new_tube (self, TP_TUBE_TYPE_STREAM, priv->self_handle,
- service, parameters, (const gchar *) stream_id, tube_id, NULL);
+ service, parameters, (const gchar *) stream_id, tube_id, NULL, TRUE);
g_object_set (tube,
"address-type", address_type,
Index: telepathy-gabble.spec
===================================================================
RCS file: /cvs/pkgs/rpms/telepathy-gabble/F-11/telepathy-gabble.spec,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -p -r1.55 -r1.56
--- telepathy-gabble.spec 23 Aug 2009 22:12:56 -0000 1.55
+++ telepathy-gabble.spec 11 Sep 2009 17:05:18 -0000 1.56
@@ -1,6 +1,6 @@
Name: telepathy-gabble
Version: 0.7.26
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A Jabber/XMPP connection manager
Group: Applications/Communications
@@ -11,6 +11,7 @@ Source0: http://telepathy.freedes
# Patch to add missing pkgconfig check for gthread-2.0
# https://bugs.freedesktop.org/show_bug.cgi?id=20937
Patch0: %{name}-0.7.24-gthread.patch
+Patch1: %{name}-rejoin-dbus-tube.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: dbus-devel >= 1.1.0
@@ -36,7 +37,7 @@ chats and voice calls.
%prep
%setup -q
%patch0 -p1 -b .gthread
-
+%patch1 -p1 -b .dbus
%build
autoreconf
@@ -66,6 +67,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Wed Sep 9 2009 Brian Pepple <bpepple at fedoraproject.org> - 0.7.26-3
+- Backport patch to allow rejoining of dbus tubes.
+
* Sun Aug 23 2009 Brian Pepple <bpepple at fedoraproject.org> - 0.7.26-2
- Enable uuid support.
More information about the fedora-extras-commits
mailing list