[Telepathy-commits] [telepathy-gabble/master] add gabble_bytestream_ibb_close_received
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Tue Mar 10 04:32:50 PDT 2009
---
src/bytestream-factory.c | 7 +------
src/bytestream-ibb.c | 13 +++++++++++++
src/bytestream-ibb.h | 3 +++
3 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/src/bytestream-factory.c b/src/bytestream-factory.c
index 8a3254b..e66e19a 100644
--- a/src/bytestream-factory.c
+++ b/src/bytestream-factory.c
@@ -878,12 +878,7 @@ handle_ibb_close_iq (GabbleBytestreamFactory *self,
}
else
{
- DEBUG ("received IBB close stanza. Bytestream closed");
-
- g_object_set (bytestream, "state", GABBLE_BYTESTREAM_STATE_CLOSED,
- NULL);
-
- _gabble_connection_acknowledge_set_iq (priv->conn, msg);
+ gabble_bytestream_ibb_close_received (bytestream, msg);
}
return TRUE;
diff --git a/src/bytestream-ibb.c b/src/bytestream-ibb.c
index de7ab49..492cbc4 100644
--- a/src/bytestream-ibb.c
+++ b/src/bytestream-ibb.c
@@ -920,6 +920,19 @@ gabble_bytestream_ibb_block_reading (GabbleBytestreamIface *iface,
}
}
+void
+gabble_bytestream_ibb_close_received (GabbleBytestreamIBB *self,
+ LmMessage *iq)
+{
+ GabbleBytestreamIBBPrivate *priv = GABBLE_BYTESTREAM_IBB_GET_PRIVATE (self);
+
+ DEBUG ("received IBB close stanza. Bytestream closed");
+
+ g_object_set (self, "state", GABBLE_BYTESTREAM_STATE_CLOSED,
+ NULL);
+
+ _gabble_connection_acknowledge_set_iq (priv->conn, iq);
+}
static void
bytestream_iface_init (gpointer g_iface,
diff --git a/src/bytestream-ibb.h b/src/bytestream-ibb.h
index f4d9b2a..5357fa6 100644
--- a/src/bytestream-ibb.h
+++ b/src/bytestream-ibb.h
@@ -65,6 +65,9 @@ GType gabble_bytestream_ibb_get_type (void);
void gabble_bytestream_ibb_receive (GabbleBytestreamIBB *ibb,
LmMessage *msg, gboolean is_iq);
+void gabble_bytestream_ibb_close_received (GabbleBytestreamIBB *ibb,
+ LmMessage *iq);
+
G_END_DECLS
#endif /* #ifndef __GABBLE_BYTESTREAM_IBB_H__ */
--
1.5.6.5
More information about the telepathy-commits
mailing list