[telepathy-glib/master] Mark default parameters as present

Sjoerd Simons sjoerd.simons at collabora.co.uk
Wed Jul 29 04:21:27 PDT 2009


When creating a new connection BaseConnectionManager sets default parameters in
the parsed_params data structure, but didn't mark them as present. In practise
this meant that the Connection Managers didn't pass the default parameters on
the the Connection object they generate. Which in turns meant they rely on
having the knowledged about which parameters are default in two places (both in
the ConnectionManager object as a flag and in the Connection object as a
property that gets set by default), which seems unfortunate and makes adding
default values for parameters slightly fragile
---
 telepathy-glib/base-connection-manager.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/telepathy-glib/base-connection-manager.c b/telepathy-glib/base-connection-manager.c
index 4785aca..ab7be8f 100644
--- a/telepathy-glib/base-connection-manager.c
+++ b/telepathy-glib/base-connection-manager.c
@@ -719,8 +719,8 @@ parse_parameters (const TpCMParamSpec *paramspec,
             }
           else if (paramspec[i].flags & TP_CONN_MGR_PARAM_FLAG_HAS_DEFAULT)
             {
-              /* FIXME: Should we add it to params_present? */
               set_param_from_default (&paramspec[i], set_param, params);
+              tp_intset_add (params_present, i);
             }
           else
             {
-- 
1.5.6.5



More information about the telepathy-commits mailing list