Mercurial > hg > RemoteEditor > REPSessionManager
changeset 366:e391433fa9f1
*** empty log message ***
author | kono |
---|---|
date | Mon, 20 Oct 2008 17:58:02 +0900 |
parents | c432755c3555 |
children | 1bde894edd83 |
files | rep/Editor.java rep/SessionManager.java |
diffstat | 2 files changed, 11 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/rep/Editor.java Mon Oct 20 17:00:42 2008 +0900 +++ b/rep/Editor.java Mon Oct 20 17:58:02 2008 +0900 @@ -46,14 +46,14 @@ assert(sentList.size()<limit); next.send(command); return; - }else if(command.eid == REP.MERGE_EID.id){ + } else if(command.eid == REP.MERGE_EID.id){ //マージコマンドが返ってきた if(translator.checkMergeConflict(command)){ //マージ中にエディタからの割り込みがあった場合 translator.getMergeAgain(this); } endMerge(); - }else if(command.eid == next.getEID()){ + } else if(command.eid == next.getEID()){ // 次のEditorで一周するコマンドが来た if(next==this) return; // singleton case ((Editor) next).checkReturnedCommand(command);
--- a/rep/SessionManager.java Mon Oct 20 17:00:42 2008 +0900 +++ b/rep/SessionManager.java Mon Oct 20 17:58:02 2008 +0900 @@ -597,6 +597,14 @@ break; case SMCMD_PUT_ACK: + if (forwarder.isDirect()) { + // send put_ack to the editor now. + command.setCMD(REP.SMCMD_PUT_ACK); + command.string = command.string; + command.setEID(command.eid); + command.setSID(command.sid); + forwarder.send(command); + } case SMCMD_JOIN_ACK: registEditor(forwarder,command); updateGUI(); @@ -605,6 +613,7 @@ case SMCMD_PUT: { // first connection or forwarded command + routingTable.add(forwarder,getSMID(command.eid),command.sid); if(isMaster()) { command.setCMD(REP.SMCMD_PUT_ACK); command.string = command.string; @@ -613,18 +622,9 @@ smList.sendToSlaves(command); registEditor(forwarder,command); } else { - routingTable.add(forwarder,getSMID(command.eid),command.sid); smList.sendToMaster(command); // registEditor will be done by SMCMD_PUT_ACK } - if (forwarder.isDirect()) { - // send put_ack to the editor now. - command.setCMD(REP.SMCMD_PUT_ACK); - command.string = command.string; - command.setEID(command.eid); - command.setSID(command.sid); - forwarder.send(command); - } updateGUI(); }