Index: /branches/2.2/jabberit_messenger/.classpath
===================================================================
--- /branches/2.2/jabberit_messenger/.classpath	(revision 3451)
+++ /branches/2.2/jabberit_messenger/.classpath	(revision 3451)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="output" path="build"/>
+</classpath>
Index: /branches/2.2/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/filetransfer/socks5/Socks5Send.java
===================================================================
--- /branches/2.2/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/filetransfer/socks5/Socks5Send.java	(revision 3102)
+++ /branches/2.2/jabberit_messenger/java_source/src/nu/fw/jeti/plugins/filetransfer/socks5/Socks5Send.java	(revision 3451)
@@ -24,6 +24,4 @@
 import java.io.*;
 import java.net.*;
-import java.net.ServerSocket;
-import java.net.Socket;
 import java.util.Iterator;
 import java.util.LinkedList;
@@ -39,4 +37,5 @@
 import nu.fw.jeti.plugins.filetransfer.SendFileProgress;
 import nu.fw.jeti.plugins.filetransfer.StreamSend;
+import nu.fw.jeti.plugins.filetransfer.socks5.StreamHost;
 import nu.fw.jeti.plugins.filetransfer.socks5.jsocks.ProxyServer;
 import nu.fw.jeti.plugins.filetransfer.socks5.jsocks.ServerAuthenticatorNone;
@@ -72,5 +71,26 @@
     	this.backend = backend;
     	this.file = file;
-    	
+    	 
+    	/*
+    	 * Esta alteraÃÂ§ÃÂ£o visa recupera a inteface de rede local, usada para transferir arquivo.
+    	 * Previne erro no caso do cliente ter mÃÂºltiplas interface de rede.
+    	 * 
+    	 * emmanuel.ferro@serpro.gov.br em 08/10/2010
+    	 * 
+    	 */    	
+//    	if(Preferences.getBoolean("filetransfer", "useLocalIP", true))
+//    	{
+    		String ip;// =Preferences.getString("filetransfer","ip",null);
+//    		if (ip!=null)
+//    		{
+    			//if(ip.equals("automatic"))ip = Plugin.getIP();
+    			ip = backend.getLocalIP().getHostAddress();
+    			System.out.println("getLocalIP = " + ip);
+//    		   	streamHosts.add(new StreamHost(backend.getMyJID(),ip, Preferences.getInteger("filetransfer","port",7777),null));
+    			streamHosts.add(new StreamHost(backend.getMyJID(),ip,7777,null));
+				startSocksServer(file, backend, jid);
+//   		}
+//    	}
+	
     	if( Preferences.getBoolean("filetransfer", "useLocalIP", true) )
     	{
Index: /branches/2.2/jabberit_messenger/java_source/src/nu/fw/jeti/jabber/Backend.java
===================================================================
--- /branches/2.2/jabberit_messenger/java_source/src/nu/fw/jeti/jabber/Backend.java	(revision 3102)
+++ /branches/2.2/jabberit_messenger/java_source/src/nu/fw/jeti/jabber/Backend.java	(revision 3451)
@@ -25,4 +25,5 @@
 import java.awt.Frame;
 import java.awt.Window;
+import java.net.InetAddress;
 import java.util.*;
 
@@ -122,5 +123,16 @@
 		return Connect.getMyJID();
 	}
-	
+
+	/*
+	 * Este mÃÂ©todo recupera a inteface de rede local, usada para transferir arquivo.
+	 * Previne erro no caso do cliente ter mÃÂºltiplas interface de rede.
+	 * 
+	 * emmanuel.ferro@serpro.gov.br em 08/10/2010
+	 * 
+	 */
+	public InetAddress getLocalIP(){
+		return connect.getSocket().getLocalAddress();
+	}
+
 	/**
 	 * Checks if the password matches the password used to login on this account
Index: /branches/2.2/jabberit_messenger/java_source/src/nu/fw/jeti/backend/Connect.java
===================================================================
--- /branches/2.2/jabberit_messenger/java_source/src/nu/fw/jeti/backend/Connect.java	(revision 3102)
+++ /branches/2.2/jabberit_messenger/java_source/src/nu/fw/jeti/backend/Connect.java	(revision 3451)
@@ -368,10 +368,10 @@
 	       		if( proxy )
 	       		{
-	       			//System.out.println("CONNECT COM PROXY - NÃO SEGURA : " + host);
+	       			//System.out.println("CONNECT COM PROXY - NÃ¯Â¿ÂœO SEGURA : " + host);
 	       			socket = createHTTPTunel(host);
 	       		}
 	       		else
 	       		{
-	       			//System.out.println("CONNECT SEM PROXY - NÃO SEGURA : " + host);
+	       			//System.out.println("CONNECT SEM PROXY - NÃ¯Â¿ÂœO SEGURA : " + host);
 	       			socket = new Socket( host,loginInfo.getPort() );
 	       		}
@@ -608,5 +608,5 @@
 	    gbc.gridy = 3; // linha
 	    gbc.gridx = 1; // coluna
-	    gbc.gridwidth = 2; // duas células na linha
+	    gbc.gridwidth = 2; // duas cÃ¯Â¿Âœlulas na linha
 	    gbc.anchor = GridBagConstraints.WEST;
 	    buttonPanel	= new JPanel();
@@ -933,5 +933,6 @@
 			{
 				jabberHandler.changePacketReceiver(this);
-				socket = null; //clear socket reference
+// Este atributo ÃÂ© usado na transferÃÂªncia de arquivos
+//				socket = null; //clear socket reference
 				this.connectionID = connectionID;
 				// TODO remove lowercase if filetransfer bug fixed
