diff options
author | David Laban <david.laban@collabora.co.uk> | 2010-12-13 17:33:56 +0000 |
---|---|---|
committer | David Laban <david.laban@collabora.co.uk> | 2010-12-15 14:34:32 +0000 |
commit | d2a65899f22ea3d91d7c47793298c55082668be1 (patch) | |
tree | 4b335fda4281a5b21ed651d056e531469ac7fd7f /src | |
parent | 75a2d3a792b54c328b809e1f260ad1e49632fb6e (diff) |
Don't ask the user for a password on connect
We don't need to do this until the server asks us to authenticate.
Diffstat (limited to 'src')
-rw-r--r-- | src/sip-connection.c | 45 |
1 files changed, 1 insertions, 44 deletions
diff --git a/src/sip-connection.c b/src/sip-connection.c index ad5caef..b515699 100644 --- a/src/sip-connection.c +++ b/src/sip-connection.c @@ -1005,41 +1005,6 @@ tpsip_connection_finalize (GObject *obj) G_OBJECT_CLASS (tpsip_connection_parent_class)->finalize (obj); } -static void -_password_manager_prompt_cb (GObject *source_object, - GAsyncResult *result, - gpointer user_data) -{ - TpsipConnection *self = user_data; - TpsipConnectionPrivate *priv = TPSIP_CONNECTION_GET_PRIVATE (self); - TpBaseConnection *base_conn = (TpBaseConnection *) self; - GError *error = NULL; - const GString *password; - - password = tp_simple_password_manager_prompt_finish ( - TP_SIMPLE_PASSWORD_MANAGER (source_object), result, &error); - - if (error != NULL) - { - DEBUG ("Auth channel failed: %s", error->message); - - if (base_conn->status != TP_CONNECTION_STATUS_DISCONNECTED) - { - tp_base_connection_disconnect_with_dbus_error (base_conn, - tp_error_get_dbus_name (error->code), NULL, - TP_CONNECTION_STATUS_REASON_AUTHENTICATION_FAILED); - } - - g_error_free (error); - return; - } - - g_free (priv->password); - priv->password = g_strdup (password->str); - - nua_register (priv->register_op, TAG_NULL()); -} - static gboolean tpsip_connection_start_connecting (TpBaseConnection *base, GError **error) @@ -1136,15 +1101,7 @@ tpsip_connection_start_connecting (TpBaseConnection *base, tpsip_event_target_attach (priv->register_op, (GObject *) self); - if (priv->password != NULL) - { - nua_register (priv->register_op, TAG_NULL()); - } - else - { - tp_simple_password_manager_prompt_async (priv->password_manager, - _password_manager_prompt_cb, self); - } + nua_register (priv->register_op, TAG_NULL()); return TRUE; } |