comparison src/fdl/PSX.java @ 35:fe338d497c72 meta-comdebug-wokred

FederatedLinda was static singleton. It does not work on Thread based test.
author kono
date Sun, 24 Aug 2008 19:07:28 +0900 (2008-08-24)
parents e7c5958fd285
children d5bca4b5ee95
comparison
equal deleted inserted replaced
34:e7c5958fd285 35:fe338d497c72
137 137
138 public static void send(SocketChannel ch, ByteBuffer command, ByteBuffer data) { 138 public static void send(SocketChannel ch, ByteBuffer command, ByteBuffer data) {
139 // if datalen in the header is different from ByteBuffer remaining(), we lost 139 // if datalen in the header is different from ByteBuffer remaining(), we lost
140 // protocol synchronization. Make sure to have correct length now. 140 // protocol synchronization. Make sure to have correct length now.
141 if (true) { 141 if (true) {
142 int seq = command.getInt(LINDA_SEQ_OFFSET);
143 // if (seq>500)
144 // System.err.println("Illegal seq sent.");
142 int datalen = data==null?0:(data.limit()-data.position()); 145 int datalen = data==null?0:(data.limit()-data.position());
143 if (command.getInt(LINDA_DATA_LENGTH_OFFSET)>0 && (data==null||data.remaining()!=command.getInt(LINDA_DATA_LENGTH_OFFSET))) { 146 if (command.getInt(LINDA_DATA_LENGTH_OFFSET)>0 && (data==null||data.remaining()!=command.getInt(LINDA_DATA_LENGTH_OFFSET))) {
144 System.err.println("Missing data."); 147 System.err.println("Missing data.");
145 } 148 }
146 command.putInt(LINDA_DATA_LENGTH_OFFSET,datalen); 149 command.putInt(LINDA_DATA_LENGTH_OFFSET,datalen);