[patch] pop-port and some questions
- From: Carlos Morgado <chbm chbm nu>
- To: balsa-list gnome org
- Subject: [patch] pop-port and some questions
- Date: Sat, 6 May 2000 00:12:16 +0100
Hi, i'm new to the list and balsa devel. I been following balsa since arcane
versions but only now am i looking at the code.
Below is a small patch to make the Port field in pop3 servers actually work
(bug #10262). This is rather usefull when you want to check pop over an ssh
tunnel.
Now the questions, what is libmutt relation to real mutt ? It was forked ? I
see some balsa mods on the code. Is it supposed to be synched back ? Are the
balsa maintaners supposed to balsa in synch with mutt ?
Balsa seems to give up when it can't talk to a pop server. This strikes me
as Wrong but seems like a libmutt problem (the above is relevant here).
Cheers
The patch --->
diff -ru balsa-0.8.0-pre1.orig/libbalsa/mailbox.c balsa-0.8.0-pre1/libbalsa/mailbox.c
--- balsa-0.8.0-pre1.orig/libbalsa/mailbox.c Sun Apr 2 01:19:24 2000
+++ balsa-0.8.0-pre1/libbalsa/mailbox.c Fri May 5 23:01:53 2000
@@ -216,7 +216,7 @@
if (MAILBOX_POP3 (mailbox)->check)
{
PopHost = g_strdup (MAILBOX_POP3(mailbox)->server->host);
- PopPort = 110;
+ PopPort = (MAILBOX_POP3(mailbox)->server->port);
PopPass = g_strdup (MAILBOX_POP3(mailbox)->server->passwd);
PopUser = g_strdup (MAILBOX_POP3(mailbox)->server->user);
diff -ru balsa-0.8.0-pre1.orig/src/save-restore.c balsa-0.8.0-pre1/src/save-restore.c
--- balsa-0.8.0-pre1.orig/src/save-restore.c Tue Apr 4 22:34:51 2000
+++ balsa-0.8.0-pre1/src/save-restore.c Fri May 5 22:44:37 2000
@@ -225,6 +225,9 @@
{
char tmp[32];
+ snprintf (tmp, sizeof (tmp), "%d", MAILBOX_POP3 (mailbox)->server->port);
+ pl_dict_add_str_str (mbox_dict, "Port", tmp);
+
snprintf (tmp, sizeof (tmp), "%d", MAILBOX_POP3 (mailbox)->check);
pl_dict_add_str_str (mbox_dict, "Check", tmp);
@@ -507,6 +510,11 @@
if ((field = pl_dict_get_str (mbox, "Server")) == NULL)
return FALSE;
MAILBOX_POP3 (mailbox)->server->host = g_strdup (field);
+
+ if ((field = pl_dict_get_str (mbox, "Port")) == NULL)
+ MAILBOX_POP3 (mailbox)->server->port = 110;
+ else
+ MAILBOX_POP3 (mailbox)->server->port = atol (field);
if ((field = pl_dict_get_str (mbox, "Check")) == NULL)
MAILBOX_POP3 (mailbox)->check = FALSE;
<---
--
Carlos Morgado - chbm(at)chbm(dot)nu - http://chbm.nu/ -- gpgkey: 0x1FC57F0A
http://wwwkeys.pgp.net/ FP:0A27 35D3 C448 3641 0573 6876 2A37 4BB2 1FC5 7F0A
[.sig died]
diff -ru balsa-0.8.0-pre1.orig/libbalsa/mailbox.c balsa-0.8.0-pre1/libbalsa/mailbox.c
--- balsa-0.8.0-pre1.orig/libbalsa/mailbox.c Sun Apr 2 01:19:24 2000
+++ balsa-0.8.0-pre1/libbalsa/mailbox.c Fri May 5 23:01:53 2000
@@ -216,7 +216,7 @@
if (MAILBOX_POP3 (mailbox)->check)
{
PopHost = g_strdup (MAILBOX_POP3(mailbox)->server->host);
- PopPort = 110;
+ PopPort = (MAILBOX_POP3(mailbox)->server->port);
PopPass = g_strdup (MAILBOX_POP3(mailbox)->server->passwd);
PopUser = g_strdup (MAILBOX_POP3(mailbox)->server->user);
diff -ru balsa-0.8.0-pre1.orig/src/save-restore.c balsa-0.8.0-pre1/src/save-restore.c
--- balsa-0.8.0-pre1.orig/src/save-restore.c Tue Apr 4 22:34:51 2000
+++ balsa-0.8.0-pre1/src/save-restore.c Fri May 5 22:44:37 2000
@@ -225,6 +225,9 @@
{
char tmp[32];
+ snprintf (tmp, sizeof (tmp), "%d", MAILBOX_POP3 (mailbox)->server->port);
+ pl_dict_add_str_str (mbox_dict, "Port", tmp);
+
snprintf (tmp, sizeof (tmp), "%d", MAILBOX_POP3 (mailbox)->check);
pl_dict_add_str_str (mbox_dict, "Check", tmp);
@@ -507,6 +510,11 @@
if ((field = pl_dict_get_str (mbox, "Server")) == NULL)
return FALSE;
MAILBOX_POP3 (mailbox)->server->host = g_strdup (field);
+
+ if ((field = pl_dict_get_str (mbox, "Port")) == NULL)
+ MAILBOX_POP3 (mailbox)->server->port = 110;
+ else
+ MAILBOX_POP3 (mailbox)->server->port = atol (field);
if ((field = pl_dict_get_str (mbox, "Check")) == NULL)
MAILBOX_POP3 (mailbox)->check = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]