]> git.saurik.com Git - apt.git/commitdiff
Reordered some things to make dante happier. Closes: #92757
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:57:28 +0000 (16:57 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:57:28 +0000 (16:57 +0000)
Author: jgg
Date: 2001-04-10 04:51:50 GMT
Reordered some things to make dante happier. Closes: #92757

debian/changelog
methods/ftp.cc

index 472cae153113698c75f828b436b00273270242ec..a36fe97b3cd29e86c9e143b5a427c3d8d9f94328 100644 (file)
@@ -12,6 +12,7 @@ apt (0.5.4) unstable; urgency=low
   * no_proxy and ftp. Closes: #89671
   * Philippe Batailler's man page patches.
   * Fix for display bug. Closes: #92033
+  * Reordered some things to make dante happier. Closes: #92757
   
  -- Jason Gunthorpe <jgg@debian.org>  Thu,  8 Mar 2001 22:48:06 -0700
 
index 4f9410bfc911cfbde9eb7570f0f1e039e8d6655f..89f144fe5d5a1cd5005abf904b28c769e050504c 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: ftp.cc,v 1.26 2001/03/24 22:34:55 jgg Exp $
+// $Id: ftp.cc,v 1.27 2001/04/10 04:51:50 jgg Exp $
 /* ######################################################################
 
    FTP Aquire Method - This is the FTP aquire method for APT.
@@ -153,6 +153,10 @@ bool FTPConn::Open(pkgAcqMethod *Owner)
    RotateDNS();
    if (Connect(Host,Port,"ftp",21,ServerFd,TimeOut,Owner) == false)
       return false;
+
+   // Login must be before getpeername otherwise dante won't work.
+   Owner->Status("Logging in");
+   bool Res = Login();
    
    // Get the remote server's address
    PeerAddrLen = sizeof(PeerAddr);
@@ -164,8 +168,7 @@ bool FTPConn::Open(pkgAcqMethod *Owner)
    if (getsockname(ServerFd,(sockaddr *)&ServerAddr,&ServerAddrLen) != 0)
       return _error->Errno("getsockname","Unable to determine the local name");
    
-   Owner->Status("Logging in");
-   return Login();
+   return Res;
 }
                                                                        /*}}}*/
 // FTPConn::Login - Login to the remote server                         /*{{{*/