commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: jakarta-commons-sandbox/net/src/java/org/apache/commons/net/tftp TFTPClient.java
Date Tue, 17 Sep 2002 21:48:08 GMT
dfs         2002/09/17 14:48:07

  Modified:    net/src/java/org/apache/commons/net/tftp TFTPClient.java
  Log:
  Applied my patch from May 2002 which addresses the situation whereby
  the IP address that answers a TFTP file transfer request is different
  from the one it was sent to.  We handle this by using the address
  in the first response packet as the host address.
  
  Revision  Changes    Path
  1.4       +6 -0      jakarta-commons-sandbox/net/src/java/org/apache/commons/net/tftp/TFTPClient.java
  
  Index: TFTPClient.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/net/src/java/org/apache/commons/net/tftp/TFTPClient.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TFTPClient.java	6 Aug 2002 15:23:37 -0000	1.3
  +++ TFTPClient.java	17 Sep 2002 21:48:07 -0000	1.4
  @@ -228,6 +228,12 @@
                   {
                       hostPort = received.getPort();
                       ack.setPort(hostPort);
  +                    if(!host.equals(received.getAddress()))
  +                    {
  +                        host = received.getAddress();
  +                        ack.setAddress(host);
  +                        sent.setAddress(host);
  +                    }
                   }
   
                   // Comply with RFC 783 indication that an error acknowledgement
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message