comparison src/connection.c @ 6468:4aa3b1cec52b

[gaim-migrate @ 6977] Destroying the connection after requesting a password works great when we just pop up the dialog waiting for a callback, but UIs that actually wait for the input for the dialog will set the password, try to connect (which it won't, since it's connected), and then disconnect. Not what we want. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 14 Aug 2003 08:19:41 +0000
parents ff4551719cc7
children 70d5122bc3ff
comparison
equal deleted inserted replaced
6467:aabb0b331ac8 6468:4aa3b1cec52b
135 gchar *primary; 135 gchar *primary;
136 gchar *escaped; 136 gchar *escaped;
137 const gchar *username = gaim_account_get_username(account); 137 const gchar *username = gaim_account_get_username(account);
138 138
139 gaim_debug(GAIM_DEBUG_INFO, "connection", "Requesting password\n"); 139 gaim_debug(GAIM_DEBUG_INFO, "connection", "Requesting password\n");
140 gaim_connection_destroy(gc);
140 escaped = g_markup_escape_text(username, strlen(username)); 141 escaped = g_markup_escape_text(username, strlen(username));
141 primary = g_strdup_printf(_("Enter password for %s"), escaped); 142 primary = g_strdup_printf(_("Enter password for %s"), escaped);
142 gaim_request_input(gc, NULL, primary, NULL, NULL, FALSE, TRUE, 143 gaim_request_input(gc, NULL, primary, NULL, NULL, FALSE, TRUE,
143 _("OK"), G_CALLBACK(request_pass_ok_cb), 144 _("OK"), G_CALLBACK(request_pass_ok_cb),
144 _("Cancel"), NULL, account); 145 _("Cancel"), NULL, account);
145 g_free(primary); 146 g_free(primary);
146 g_free(escaped); 147 g_free(escaped);
147 gaim_connection_destroy(gc);
148 148
149 return; 149 return;
150 } 150 }
151 151
152 gaim_connection_set_state(gc, GAIM_CONNECTING); 152 gaim_connection_set_state(gc, GAIM_CONNECTING);