Comments (3)
The console protocol is fatally flawed, I should never have tried to shoehorn a console into plain http. The better way available now would be to use websockets.
from diva-distribution.
I do have a temporary fix for this issue but am struggling trying to push my commit for a pull request.
from diva-distribution.
It's an issue with the ReadResponses function. My band-aid fix can be seen below.
function ReadResponses(console, xml, status) {
ShowStatus(console, status);
if (xml) {
Output(TRACE, "[ReadResponses:".concat(console.name, "] Processing response"));
elements = xml.getElementsByTagName('Line');
if (elements) {
ScrollBottom.Save(console, element.MESSAGES);
UpdateScrollback(elements.length);
for (var i = 0; i < elements.length; ++i) {
var lineNode = elements[i];
//var lines = lineNode.firstChild.nodeValue.split('\n');
//var parts = lines.shift().split(':');
var parts;
var line;
var level = xml.getElementsByTagName('Level');
if(lineNode.firstChild != null){
parts = lineNode.firstChild.nodeValue.split(':');
line = parts.join(':');
if (line.substr(1, 2) == '++') { // Prompt
if (line.substr(0, 1) == '+') {
// Normal prompt is used as title
SetTitle(console, line.substr(3));
}
else {
// Interactive prompt for requesting input
ShowPrompt(console, line.substr(3));
}
UpdateScrollback(1); Output(TRACE, "[ReadResponses:".concat(console.name, "] '", line, "'"), true);
continue;
}
else if (line.length >= 1024) {
UpdateScrollback(1); Output(TRACE, "[ReadResponses:".concat(console.name, "] Long line with ", line.length, " bytes"), true);
}
var matches = line.match(LinePattern);
//line = new Array();
if (matches) {
line = new Array();
// Timestamp
line[0] = document.createTextNode(matches[1]);
// Module name
line[1] = document.createElement('span');
line[1].setAttribute('style', 'color:' + Colors.GetForString(matches[2]));
line[1].appendChild(document.createTextNode(matches[2]));
// Colon & whitespace
line[2] = document.createTextNode(matches[3]);
// Message
line[3] = document.createElement('span');
line[3].setAttribute('class', level);
line[3].appendChild(document.createTextNode(matches[4]));
}
}
else{
parts = lineNode;
line = parts;
}
if (console.prompt)
HidePrompt(console, true);
//if (lines.length)
// UpdateScrollback(lines.length);
//for (var l in lines)
// line.push(document.createTextNode(lines[l]));
Output(MSG + " " + console.name, line, true);
}
ScrollBottom.Restore(console, element.MESSAGES);
}
}
if (console.sessionId) {
try {
void AjaxSend(console.serviceURL.concat('/ReadResponses/', console.sessionId, '/'), '',
function(xml, status) { ReadResponses(console, xml, status); },
console.consoleRequest);
}
catch (e) {
NoConnection(console);
}
}
if (wifi && (console.name == ID.DEFAULT_CONSOLE))
if (++wifi.heartbeatCounter >= wifi.HEARTBEAT_THRESHOLD) {
// Keep session active
wifi.heartbeatCounter = 0;
Output(TRACE, "[ReadResponses:".concat(console.name, "] Wifi Heartbeat"));
void AjaxSend(location.protocol.concat('//', location.host, location.pathname, 'heartbeat/', location.search));
}
}
from diva-distribution.
Related Issues (20)
- drag of objects from clothing library only possible once per server run
- Console in wifi page opensim 072 dev HOT 2
- Wifi for opensim 0.7.1.1 standalone
- Physic's Issue with the diva-distribution HOT 1
- Unable to make other user superuser (DIVA 7.1.1 / SuSe 11.4 / Mono 2.10) HOT 1
- enabling lightshare/windlight produces grey clouds
- Inventory Male, Female and Neutral Avatar HOT 1
- Wifi in Standalone 0.7.3.1 problem HOT 1
- Wifi add-on with opensim 0.7.4 HOT 2
- Typo in DivaPreferences.ini
- Wifi admin user not loggin
- Wifi User Management module missing! help! HOT 1
- Issues with Hollowing out Prims?! HOT 1
- using 0.7.6 post fixed
- Improve email sending HOT 1
- UserAccounts.ServiceURLs column blank
- Can't make wifi-09000.zip work! (Ubuntu 15, HyperGrid, robust).
- OpenSim 0.9.1.0 uses .NET Framework 4.6 HOT 1
- Denial of Service attack HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diva-distribution.