Re: Balsa hangs when turning off SSL for IMAP
- From: Peter Bloomfield <PeterBloomfield bellsouth net>
- To: balsa-list gnome org
- Cc: balsa-list gnome org, Peter Bloomfield <PeterBloomfield bellsouth net>
- Subject: Re: Balsa hangs when turning off SSL for IMAP
- Date: Thu, 19 Aug 2004 16:34:13 +0000
On 08/19/2004 12:12:40 PM, Miquel van Smoorenburg wrote:
[ snip ]
Perhaps Balsa should remove :993 automatically when SSL is used
(likewise :143 when SSL isn't turned on), that would make
things more logical for those migrating from 2.0 to 2.2
Yes, that would make sense.
[ snip ]
Still have to enter the password 5 times though .. so that
wasn't related.
That should be fixed in cvs. The attached patch should achieve
the same thing for a 2.2.x tree with earlier patches applied
(mailbox-imap-patch and mailbox-node-patch).
Peter
Index: libbalsa/mailbox_imap.c
===================================================================
RCS file: /cvs/gnome/balsa/libbalsa/mailbox_imap.c,v
retrieving revision 1.215
retrieving revision 1.216
diff -u -r1.215 -r1.216
--- libbalsa/mailbox_imap.c 19 Aug 2004 12:12:48 -0000 1.215
+++ libbalsa/mailbox_imap.c 19 Aug 2004 13:38:35 -0000 1.216
@@ -285,8 +285,9 @@
g_free(mailbox->path); mailbox->path = NULL;
if(remote->server) {
- g_signal_handlers_disconnect_by_func(remote->server,
- server_host_settings_changed_cb,
+ g_signal_handlers_disconnect_matched(remote->server,
+ G_SIGNAL_MATCH_DATA, 0,
+ (GQuark) 0, NULL, NULL,
remote);
g_object_unref(G_OBJECT(remote->server));
remote->server = NULL;
Index: libbalsa/server.c
===================================================================
RCS file: /cvs/gnome/balsa/libbalsa/server.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- libbalsa/server.c 14 Aug 2004 19:31:15 -0000 1.33
+++ libbalsa/server.c 19 Aug 2004 13:38:35 -0000 1.34
@@ -417,3 +417,13 @@
}
va_end(alist);
}
+
+void
+libbalsa_server_connect_signals(LibBalsaServer * server, GCallback cb,
+ gpointer cb_data)
+{
+ if (!g_signal_has_handler_pending(server,
+ libbalsa_server_signals
+ [GET_PASSWORD], 0, TRUE))
+ g_signal_connect(server, "get-password", cb, cb_data);
+}
Index: libbalsa/server.h
===================================================================
RCS file: /cvs/gnome/balsa/libbalsa/server.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- libbalsa/server.h 8 May 2004 14:25:39 -0000 1.15
+++ libbalsa/server.h 19 Aug 2004 13:38:35 -0000 1.16
@@ -95,4 +95,7 @@
void libbalsa_server_user_cb(ImapUserEventType ue, void *arg, ...);
+
+void libbalsa_server_connect_signals(LibBalsaServer * server, GCallback cb,
+ gpointer cb_data);
#endif /* __LIBBALSA_SERVER_H__ */
Index: src/mailbox-node.c
===================================================================
RCS file: /cvs/gnome/balsa/src/mailbox-node.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -r1.86 -r1.87
--- src/mailbox-node.c 19 Aug 2004 12:47:55 -0000 1.86
+++ src/mailbox-node.c 19 Aug 2004 13:38:35 -0000 1.87
@@ -525,8 +525,6 @@
balsa_mailbox_node_new_from_config(const gchar* prefix)
{
BalsaMailboxNode * folder = balsa_mailbox_node_new();
- static guint get_password_signal = 0;
-
gnome_config_push_prefix(prefix);
folder->server = LIBBALSA_SERVER(libbalsa_imap_server_new_from_config());
@@ -538,15 +536,8 @@
G_CALLBACK(folder_conf_imap_node), NULL);
g_signal_connect(G_OBJECT(folder), "append-subtree",
G_CALLBACK(imap_dir_cb), NULL);
-
- if (!get_password_signal)
- get_password_signal =
- g_signal_lookup("get-password", LIBBALSA_TYPE_SERVER);
- if (!g_signal_has_handler_pending(G_OBJECT(folder->server),
- get_password_signal, 0, TRUE))
- g_signal_connect(G_OBJECT(folder->server), "get-password",
- G_CALLBACK(ask_password), NULL);
-
+ libbalsa_server_connect_signals(folder->server,
+ G_CALLBACK(ask_password), NULL);
balsa_mailbox_node_load_config(folder, prefix);
folder->dir = gnome_config_get_string("Directory");
Index: src/save-restore.c
===================================================================
RCS file: /cvs/gnome/balsa/src/save-restore.c,v
retrieving revision 1.289
retrieving revision 1.290
diff -u -r1.289 -r1.290
--- src/save-restore.c 18 Aug 2004 02:14:38 -0000 1.289
+++ src/save-restore.c 19 Aug 2004 13:38:35 -0000 1.290
@@ -506,9 +506,9 @@
if (mailbox == NULL)
return FALSE;
if (LIBBALSA_IS_MAILBOX_REMOTE(mailbox))
- g_signal_connect(G_OBJECT(LIBBALSA_MAILBOX_REMOTE_SERVER(mailbox)),
- "get-password", G_CALLBACK(ask_password),
- mailbox);
+ libbalsa_server_connect_signals(LIBBALSA_MAILBOX_REMOTE_SERVER
+ (mailbox),
+ G_CALLBACK(ask_password), mailbox);
if (LIBBALSA_IS_MAILBOX_POP3(mailbox)) {
g_signal_connect(G_OBJECT(mailbox),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]