# HG changeset patch # User pin # Date 1193983030 -32400 # Node ID cb482350a1aa53c1c86924e63f5b2ea010537a96 # Parent 78c211017d3da0b6e6fabea2b6d36f5c087470ab *** empty log message *** diff -r 78c211017d3d -r cb482350a1aa rep/REPPacketReceive.java --- a/rep/REPPacketReceive.java Fri Nov 02 14:49:42 2007 +0900 +++ b/rep/REPPacketReceive.java Fri Nov 02 14:57:10 2007 +0900 @@ -79,7 +79,7 @@ host = st2.nextToken(); String portstring = st2.nextToken(); port = Integer.parseInt(portstring); - int socketInfoLength = host.length() + portstring.length() + 1; + int socketInfoLength = host.length() + portstring.length() + 2; command.setString(string.substring(0, string.length() - socketInfoLength)); } } diff -r 78c211017d3d -r cb482350a1aa rep/SessionManager.java --- a/rep/SessionManager.java Fri Nov 02 14:49:42 2007 +0900 +++ b/rep/SessionManager.java Fri Nov 02 14:57:10 2007 +0900 @@ -183,12 +183,13 @@ } private void sm_join_ack(SocketChannel channel, REPCommand repCmd) { - SocketAddress address = channel.socket().getRemoteSocketAddress(); - System.out.println(address); + //SocketAddress address = channel.socket().getRemoteSocketAddress(); + String socketstring = getSocketString(channel); + System.out.println(socketstring); smList.add(channel); //SessionManagerのリストへ追加 //repCmd.setCMD(repCmd.cmd + 1); repCmd.setCMD(REP.SMCMD_SM_JOIN_ACK); - repCmd.setString(repCmd.string + address.toString()); + repCmd.setString(repCmd.string + ":" + socketstring); REPPacketSend repSend4 = new REPPacketSend(channel); repSend4.send(repCmd); //ACK } @@ -250,7 +251,7 @@ String socketString = null; while(stn.hasMoreTokens()){ socketString = stn.nextToken(); - System.out.println(socketString); + //System.out.println(socketString); } return socketString; }