[Telepathy-commits] [telepathy-gabble/master] conn-requests: comment why the magic number for channels is (number of managers + number of factories) * 2

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Aug 20 09:38:36 PDT 2008


20080730154559-53eee-de557a08024b7173ff108378f5255879cf9e7e5e.gz
---
 src/conn-requests.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/conn-requests.c b/src/conn-requests.c
index d699117..db41d30 100644
--- a/src/conn-requests.c
+++ b/src/conn-requests.c
@@ -806,6 +806,8 @@ manager_get_channel_details_foreach (GabbleExportableChannel *chan,
 static GPtrArray *
 conn_requests_get_channel_details (GabbleConnection *self)
 {
+  /* guess that each ChannelManager and each ChannelFactory has two
+   * channels, on average */
   GPtrArray *details = g_ptr_array_sized_new (self->channel_managers->len * 2
       + self->channel_factories->len * 2);
   guint i;
-- 
1.5.6.3




More information about the Telepathy-commits mailing list