[Beepcore-java-commits] CVS: beepcore-java/src/org/beepcore/beep/core Channel.java,1.22,1.23 Session
Status: Beta
Brought to you by:
huston
From: Huston F. <hu...@us...> - 2002-05-11 01:45:00
|
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core In directory usw-pr-cvs1:/tmp/cvs-serv17334 Modified Files: Channel.java Session.java Log Message: cleanup Index: Channel.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/Channel.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** Channel.java 8 May 2002 02:56:32 -0000 1.22 --- Channel.java 11 May 2002 01:44:57 -0000 1.23 *************** *** 47,51 **** static final int STATE_CLOSING = 3; static final int STATE_CLOSED = 4; - static final int STATE_ERROR = 5; private static final BufferSegment zeroLengthSegment = new BufferSegment(new byte[0]); --- 47,50 ---- *************** *** 351,357 **** if (state != STATE_OK) { switch (state) { - case STATE_ERROR : - throw new BEEPException("Channel in currently experiencing " + - "technical difficulties."); case STATE_UNINITIALISED : throw new BEEPException("Channel is uninitialised."); --- 350,353 ---- *************** *** 400,404 **** * STATE_OK - a channel is acknowledged by the other session * STATE_CLOSED - the channel has been closed - * STATE_ERROR - an error occured during creation or transmission */ int getState() --- 396,399 ---- *************** *** 808,814 **** if (state != STATE_OK) { switch (state) { - case STATE_ERROR : - throw new BEEPException("Channel in currently experiencing " + - "technical difficulties."); case STATE_UNINITIALISED : throw new BEEPException("Channel is uninitialised."); --- 803,806 ---- Index: Session.java =================================================================== RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/Session.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** Session.java 8 May 2002 02:56:32 -0000 1.24 --- Session.java 11 May 2002 01:44:57 -0000 1.25 *************** *** 207,211 **** // check the channel state and return the appropriate exception ! if (zero.getState() == Channel.STATE_ERROR) { throw new BEEPException("Greeting exchange failed"); } --- 207,211 ---- // check the channel state and return the appropriate exception ! if (state != SESSION_STATE_ACTIVE) { throw new BEEPException("Greeting exchange failed"); } *************** *** 1667,1671 **** this.error = err; ! channel.setState(Channel.STATE_ERROR); channels.remove(channel.getNumberAsString()); --- 1667,1671 ---- this.error = err; ! channel.setState(Channel.STATE_CLOSED); channels.remove(channel.getNumberAsString()); *************** *** 1760,1764 **** // set the state ! channel.setState(Channel.STATE_ERROR); channels.remove(channel.getNumberAsString()); --- 1760,1764 ---- // set the state ! channel.setState(Channel.STATE_OK); channels.remove(channel.getNumberAsString()); |