]> granicus.if.org Git - neomutt/commitdiff
pop: allow user-specified port to override default in URL.
authorAntonio Radici <antonio@dyne.org>
Mon, 1 Mar 2010 01:19:10 +0000 (17:19 -0800)
committerAntonio Radici <antonio@dyne.org>
Mon, 1 Mar 2010 01:19:10 +0000 (17:19 -0800)
Closes #3322.

ChangeLog
pop_lib.c

index 1a30473480b9918b5ed3723532797ac848c11d26..1ef5205cd11501783c5ce11ac06b5fce491d4c61 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-02-28 17:00 -0800  ludwig  <ludwig@fh-worms.de>  (2c78b28027cc)
+
+       * crypt-gpgme.c: GPGME: Sender verification should be canse-
+       insensitive for domain names. Closes #2180
+
+2010-02-26 18:18 -0800  Brendan Cully  <brendan@kublai.com>  (40eca68c394a)
+
+       * UPDATING, init.h: Make $thorough_search default to yes
+       (closes #3386)
+
 2010-02-23 12:42 -0800  Brendan Cully  <brendan@kublai.com>  (57124ea5592e)
 
        * commands.c: Don't use freed ctx.path when updating utime of target
index ccbf691845485b999c025db740996a88c1b89739..f763123e06d239e9d203a5daf21a8efcb637cc2c 100644 (file)
--- a/pop_lib.c
+++ b/pop_lib.c
@@ -43,6 +43,7 @@ int pop_parse_path (const char* path, ACCOUNT* acct)
   /* Defaults */
   acct->flags = 0;
   acct->type = M_ACCT_TYPE_POP;
+  acct->port = 0;
 
   c = safe_strdup (path);
   url_parse_ciss (&url, c);
@@ -60,10 +61,12 @@ int pop_parse_path (const char* path, ACCOUNT* acct)
     acct->flags |= M_ACCT_SSL;
 
   service = getservbyname (url.scheme == U_POP ? "pop3" : "pop3s", "tcp");
-  if (service)
-    acct->port = ntohs (service->s_port);
-  else
-    acct->port = url.scheme == U_POP ? POP_PORT : POP_SSL_PORT;;
+  if (!acct->port) {
+    if (service)
+      acct->port = ntohs (service->s_port);
+    else
+      acct->port = url.scheme == U_POP ? POP_PORT : POP_SSL_PORT;;
+  }
 
   FREE (&c);
   return 0;