directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r726250 - in /directory/clients/trunk/kerberos: client/src/main/java/org/apache/directory/client/kerberos/ password/src/main/java/org/apache/directory/client/password/
Date Sat, 13 Dec 2008 18:24:55 GMT
Author: elecharny
Date: Sat Dec 13 10:24:55 2008
New Revision: 726250

URL: http://svn.apache.org/viewvc?rev=726250&view=rev
Log:
Fixed the connection part

Modified:
    directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java
    directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java
    directory/clients/trunk/kerberos/password/src/main/java/org/apache/directory/client/password/ChangePassword.java

Modified: directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java
URL: http://svn.apache.org/viewvc/directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java?rev=726250&r1=726249&r2=726250&view=diff
==============================================================================
--- directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java
(original)
+++ directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetServiceTicket.java
Sat Dec 13 10:24:55 2008
@@ -23,6 +23,7 @@
 import java.io.IOException;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
+import java.net.SocketAddress;
 import java.security.SecureRandom;
 import java.util.Date;
 
@@ -64,8 +65,6 @@
 import org.apache.mina.core.future.ConnectFuture;
 import org.apache.mina.core.service.IoConnector;
 import org.apache.mina.core.session.IoSession;
-import org.apache.mina.transport.socket.DatagramConnector;
-import org.apache.mina.transport.socket.SocketConnector;
 import org.apache.mina.transport.socket.nio.NioDatagramConnector;
 import org.apache.mina.transport.socket.nio.NioSocketConnector;
 import org.slf4j.Logger;
@@ -130,8 +129,10 @@
         throws KdcConnectionException
     {
         IoConnector connector = getConnector( transport );
-
-        ConnectFuture future = connector.connect( new InetSocketAddress( hostname, port ),
new KerberosClientHandler() );
+        SocketAddress address = new InetSocketAddress( hostname, port );
+        
+        connector.setHandler( new KerberosClientHandler() );
+        ConnectFuture future = connector.connect( address );
 
         future.awaitUninterruptibly();
 

Modified: directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java
URL: http://svn.apache.org/viewvc/directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java?rev=726250&r1=726249&r2=726250&view=diff
==============================================================================
--- directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java
(original)
+++ directory/clients/trunk/kerberos/client/src/main/java/org/apache/directory/client/kerberos/GetTicketGrantingTicket.java
Sat Dec 13 10:24:55 2008
@@ -23,6 +23,7 @@
 import java.io.IOException;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
+import java.net.SocketAddress;
 import java.security.SecureRandom;
 import java.text.ParseException;
 import java.util.Collections;
@@ -122,8 +123,10 @@
         throws KdcConnectionException
     {
         IoConnector connector = getConnector( transport );
-
-        ConnectFuture future = connector.connect( new InetSocketAddress( hostname, port ),
new KerberosClientHandler() );
+        SocketAddress address = new InetSocketAddress( hostname, port );
+        
+        connector.setHandler( new KerberosClientHandler() );
+        ConnectFuture future = connector.connect(address );
 
         future.awaitUninterruptibly();
 

Modified: directory/clients/trunk/kerberos/password/src/main/java/org/apache/directory/client/password/ChangePassword.java
URL: http://svn.apache.org/viewvc/directory/clients/trunk/kerberos/password/src/main/java/org/apache/directory/client/password/ChangePassword.java?rev=726250&r1=726249&r2=726250&view=diff
==============================================================================
--- directory/clients/trunk/kerberos/password/src/main/java/org/apache/directory/client/password/ChangePassword.java
(original)
+++ directory/clients/trunk/kerberos/password/src/main/java/org/apache/directory/client/password/ChangePassword.java
Sat Dec 13 10:24:55 2008
@@ -23,6 +23,7 @@
 import java.io.UnsupportedEncodingException;
 import java.net.InetAddress;
 import java.net.InetSocketAddress;
+import java.net.SocketAddress;
 import java.net.UnknownHostException;
 import java.security.SecureRandom;
 import java.util.Arrays;
@@ -126,8 +127,10 @@
         throws PasswordConnectionException
     {
         IoConnector connector = getConnector( transport );
+        SocketAddress address = new InetSocketAddress( hostname, port );
 
-        ConnectFuture future = connector.connect( new InetSocketAddress( hostname, port ),
new PasswordClientHandler() );
+        connector.setHandler( new PasswordClientHandler() );
+        ConnectFuture future = connector.connect( address );
 
         future.awaitUninterruptibly();
 



Mime
View raw message