Update of /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core
In directory sc8-pr-cvs1:/tmp/cvs-serv7897/core
Modified Files:
Session.java
Log Message:
David Blacka's servername patch applied
Index: Session.java
===================================================================
RCS file: /cvsroot/beepcore-java/beepcore-java/src/org/beepcore/beep/core/Session.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -r1.32 -r1.33
*** Session.java 5 Oct 2002 15:29:24 -0000 1.32
--- Session.java 8 Mar 2003 16:39:18 -0000 1.33
***************
*** 130,133 ****
--- 130,135 ----
private boolean allowChannelWindowUpdates;
private DocumentBuilder builder; // generic XML parser
+ private String serverName;
+ private boolean sentServerName = false;
/**
***************
*** 146,150 ****
protected Session(ProfileRegistry registry, int firstChannel,
SessionCredential localCred, SessionCredential peerCred,
! SessionTuningProperties tuning)
throws BEEPException
{
--- 148,152 ----
protected Session(ProfileRegistry registry, int firstChannel,
SessionCredential localCred, SessionCredential peerCred,
! SessionTuningProperties tuning, String servername)
throws BEEPException
{
***************
*** 159,162 ****
--- 161,165 ----
properties = new Hashtable(DEFAULT_PROPERTIES_SIZE);
tuningProperties = tuning;
+ serverName = servername;
try {
***************
*** 543,546 ****
--- 546,553 ----
startBuffer.append("<start number='");
startBuffer.append(channelNumber);
+ if (serverName != null && !sentServerName) {
+ startBuffer.append("' serverName='");
+ startBuffer.append(serverName);
+ }
startBuffer.append("'>");
***************
*** 612,615 ****
--- 619,626 ----
}
+ if (serverName != null) {
+ sentServerName = true;
+ }
+
fireChannelStarted(ch);
return ch;
***************
*** 816,819 ****
--- 827,835 ----
}
+ public String getServerName()
+ {
+ return serverName;
+ }
+
/**
* This method is designed to allow for flow control across the multiplexed
***************
*** 1350,1354 ****
// this attribute is implied
! String serverName = topElement.getAttribute("serverName");
NodeList profiles =
topElement.getElementsByTagName("profile");
--- 1366,1370 ----
// this attribute is implied
! serverName = topElement.getAttribute("serverName");
NodeList profiles =
topElement.getElementsByTagName("profile");
|