]> granicus.if.org Git - neomutt/commitdiff
Revert Glanzmann's imap_parse_mailbox patch.
authorBrendan Cully <brendan@kublai.com>
Sun, 24 Jul 2005 18:18:29 +0000 (18:18 +0000)
committerBrendan Cully <brendan@kublai.com>
Sun, 24 Jul 2005 18:18:29 +0000 (18:18 +0000)
imap/util.c

index a83bcc2801cc73d779c5a9b8fe3403442ea70cfd..5062786b3c51b2e25d6b9f35d1a1f09f1f35867e 100644 (file)
@@ -138,11 +138,11 @@ int imap_parse_path (const char* path, IMAP_MBOX* mx)
     {
       *c = '\0';
       strfcpy (mx->account.user, tmp, sizeof (mx->account.user));
-      c++;
+      strfcpy (tmp, c+1, sizeof (tmp));
       mx->account.flags |= M_ACCT_USER;
     }
   
-    if ((n = sscanf (c, "%127[^:/]%127s", mx->account.host, c)) < 1)
+    if ((n = sscanf (tmp, "%127[^:/]%127s", mx->account.host, tmp)) < 1)
     {
       dprint (1, (debugfile, "imap_parse_path: NULL host in %s\n", path));
       FREE (&mx->mbox);
@@ -150,11 +150,11 @@ int imap_parse_path (const char* path, IMAP_MBOX* mx)
     }
   
     if (n > 1) {
-      if (sscanf (c, ":%hu%127s", &(mx->account.port), c) >= 1)
+      if (sscanf (tmp, ":%hu%127s", &(mx->account.port), tmp) >= 1)
        mx->account.flags |= M_ACCT_PORT;
-      if (sscanf (c, "/%s", c) == 1)
+      if (sscanf (tmp, "/%s", tmp) == 1)
       {
-       if (!ascii_strncmp (c, "ssl", 3))
+       if (!ascii_strncmp (tmp, "ssl", 3))
          mx->account.flags |= M_ACCT_SSL;
        else
        {