[telepathy-gabble/master] fd.o#24558: Flag the password param as secret, and enhance write-mgr-file to put this in the .manager file

Simon McVittie simon.mcvittie at collabora.co.uk
Fri Nov 20 11:27:48 PST 2009


Signed-off-by: Will Thompson <will.thompson at collabora.co.uk>
---
 src/connection-manager.c |    4 +++-
 src/write-mgr-file.c     |    5 +++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/connection-manager.c b/src/connection-manager.c
index 5753b27..9e798d0 100644
--- a/src/connection-manager.c
+++ b/src/connection-manager.c
@@ -126,7 +126,9 @@ static TpCMParamSpec jabber_params[] = {
     /* FIXME: validate the JID according to the RFC */
     tp_cm_param_filter_string_nonempty, NULL },
   { "password", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING,
-    TP_CONN_MGR_PARAM_FLAG_REQUIRED | TP_CONN_MGR_PARAM_FLAG_REGISTER, NULL,
+    TP_CONN_MGR_PARAM_FLAG_REQUIRED | TP_CONN_MGR_PARAM_FLAG_REGISTER |
+      TP_CONN_MGR_PARAM_FLAG_SECRET,
+    NULL,
     G_STRUCT_OFFSET(GabbleParams, password), NULL, NULL },
 
   { "server", DBUS_TYPE_STRING_AS_STRING, G_TYPE_STRING, 0, NULL,
diff --git a/src/write-mgr-file.c b/src/write-mgr-file.c
index a5c9cd9..8a26a50 100644
--- a/src/write-mgr-file.c
+++ b/src/write-mgr-file.c
@@ -48,9 +48,10 @@ mgr_file_contents (const char *busname,
       for (row = protocol->parameters; row->name; row++)
         {
           gchar *param_name = g_strdup_printf ("param-%s", row->name);
-          gchar *param_value = g_strdup_printf ("%s%s%s", row->dtype,
+          gchar *param_value = g_strdup_printf ("%s%s%s%s", row->dtype,
               (row->flags & TP_CONN_MGR_PARAM_FLAG_REQUIRED ? " required" : ""),
-              (row->flags & TP_CONN_MGR_PARAM_FLAG_REGISTER ? " register" : ""));
+              (row->flags & TP_CONN_MGR_PARAM_FLAG_REGISTER ? " register" : ""),
+              (row->flags & TP_CONN_MGR_PARAM_FLAG_SECRET ? " secret" : ""));
           g_key_file_set_string (f, section_name, param_name, param_value);
           g_free (param_value);
           g_free (param_name);
-- 
1.5.6.5



More information about the telepathy-commits mailing list