changeset 44:618d76c06b9e

*** empty log message ***
author pin
date Sun, 11 Nov 2007 00:19:19 +0900
parents 24829e1969a0
children 10f1adf6d74d
files rep/REPPacketSend.java
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rep/REPPacketSend.java	Sat Nov 10 23:48:20 2007 +0900
+++ b/rep/REPPacketSend.java	Sun Nov 11 00:19:19 2007 +0900
@@ -30,7 +30,10 @@
 	}
 	
 	public ByteBuffer packUConv(REPCommand command){		
-    	System.out.println("send command byUTF8: " + command.toString());    	
+    	System.out.println("send command byUTF8: " + command.toString());
+    	if(command.string == null){
+    		command.setString("test");
+    	}
     	ByteBuffer buffer = ByteBuffer.allocateDirect(24+(command.string).length()*5);
     	buffer.clear();  // position = 0 
     	buffer.putInt(command.cmd); buffer.putInt(command.sid); buffer.putInt(command.eid);
@@ -58,7 +61,7 @@
 	
 	public void send(REPCommand command){
 		try {
-			socketchannel.write(pack(command));
+			socketchannel.write(packUConv(command));
 			//System.out.println(command.toString());
 		} catch (IOException e) {
 			e.printStackTrace();