CVS: beepcore-java/src/org/beepcore/beep/core TuningProfile.java,1.10.2.1,1.10.2.2 PiggybackedMSG.java,1.1.2.1,1.1.2.2 SessionImpl.java,1.8.2.1,1.8.2.2

Huston Franklin <[email protected]> Tue, 22 Jul 2003 08:23:27 -0700
Newsgroups gmane.network.beep.beepcore.java.cvs
Message-ID <[email protected]>
Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core
In directory sc8-pr-cvs1:/tmp/cvs-serv10229/src/org/beepcore/beep/core

Modified Files:
      Tag: PIGGYBACKED
	TuningProfile.java PiggybackedMSG.java SessionImpl.java 
Log Message:
fixed state change for piggybacked tuning requests

Index: TuningProfile.java
===================================================================
RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/TuningProfile.java,v
retrieving revision 1.10.2.1
retrieving revision 1.10.2.2
diff -C2 -r1.10.2.1 -r1.10.2.2
*** TuningProfile.java	13 Jul 2003 14:27:46 -0000	1.10.2.1
--- TuningProfile.java	22 Jul 2003 15:23:25 -0000	1.10.2.2
***************
*** 107,110 ****
--- 107,111 ----
              ((ChannelImpl)channel).setState(ChannelImpl.STATE_TUNING);
              session.sendProfile(profile, data, (ChannelImpl)channel);
+             ((ChannelImpl)channel).setState(ChannelImpl.STATE_ACTIVE);
              session.disableIO();
          } catch (Exception x) {
***************
*** 257,260 ****
--- 258,262 ----
      {
          ((SessionImpl)session).sendProfile(uri, data, (ChannelImpl)channel);
+         ((ChannelImpl)channel).setState(ChannelImpl.STATE_ACTIVE);
      }
  

Index: PiggybackedMSG.java
===================================================================
RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/Attic/PiggybackedMSG.java,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** PiggybackedMSG.java	13 Jul 2003 14:27:46 -0000	1.1.2.1
--- PiggybackedMSG.java	22 Jul 2003 15:23:25 -0000	1.1.2.2
***************
*** 100,103 ****
--- 100,108 ----
          }
  
+         if (this.channel.getState() != ChannelImpl.STATE_TUNING) {
+             this.channel.setState(ChannelImpl.STATE_ACTIVE);
+             ((SessionImpl)this.channel.getSession()).enableIO();
+         }
+ 
          s.fireChannelStarted(this.channel);
          

Index: SessionImpl.java
===================================================================
RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/SessionImpl.java,v
retrieving revision 1.8.2.1
retrieving revision 1.8.2.2
diff -C2 -r1.8.2.1 -r1.8.2.2
*** SessionImpl.java	13 Jul 2003 14:27:46 -0000	1.8.2.1
--- SessionImpl.java	22 Jul 2003 15:23:25 -0000	1.8.2.2
***************
*** 963,967 ****
  
          // Store the Channel
-         ch.setState(ChannelImpl.STATE_ACTIVE);
          channels.put(ch.getNumberAsString(), ch);
          ((MessageMSG)zero.getAppData()).sendRPY(ds);
--- 963,966 ----
***************
*** 1293,1296 ****
--- 1292,1296 ----
                  try {
                      sendProfile(p.uri, ch.getStartData(), ch);
+                     ch.setState(ChannelImpl.STATE_ACTIVE);
                  } catch (BEEPException e) {
                      terminate("Error sending profile. " + e.getMessage());
***************
*** 1300,1307 ****
  
                  fireChannelStarted(ch);
-             }
  
!             if (p.data == null || ch.getState() != ChannelImpl.STATE_TUNING) {
!                 this.enableIO();
              }
  
--- 1300,1307 ----
  
                  fireChannelStarted(ch);
  
!                 if (p.data == null && ch.getState() != ChannelImpl.STATE_TUNING) {
!                     this.enableIO();
!                 }
              }
  
***************
*** 1958,1963 ****
      static class CLOSED_SessionOperations implements SessionOperations {
          public void changeState(SessionImpl s, int newState) throws BEEPException {
!             throw new BEEPException("Illegal session state transition (" +
!                                     newState + ")");
          }
  
--- 1958,1967 ----
      static class CLOSED_SessionOperations implements SessionOperations {
          public void changeState(SessionImpl s, int newState) throws BEEPException {
!             if (newState == Session.SESSION_STATE_ABORTED) {
!                 log.equals("Error aborting, session already in a closed state.");
!             } else {
!                 throw new BEEPException("Illegal session state transition (" +
!                                         newState + ")");
!             }
          }
  



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0