Skip to content
This repository has been archived by the owner on May 26, 2018. It is now read-only.

Commit

Permalink
0.9.87 - see changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbyquaker committed Nov 28, 2013
1 parent e792d44 commit da1245f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CCU.IO
======

*aktuelle Version: 0.9.86*
*aktuelle Version: 0.9.87*

CCU.IO ist eine Node.js Applikation die eine Script-Engine, verschiedene Adapter zum Einbinden von Fremdsystemen und einen Web-Server bereitstellt und via BIN-RPC mit rfd, hs485d und CUxD kommuniziert. Über eine Websocket-Verbindung kann CCU.IO Web-Browser über Events nach dem Push-Prinzip informieren. CCU.IO bringt ausserdem im Verzeichnis /www/lib gängige Bibliotheken für die Entwicklung von Web-Oberflächen mit.

Expand Down Expand Up @@ -539,6 +539,11 @@ Bindet CCU.IO an eine MySQL Datenbank an. Des notwendige Schema und Beispiel-Que

## Changelog

### 0.9.87
* (Hobbyquaker) fehlende jQuery UI Themes hinzugefügt (hat dazu geführt dass DashUI >= 0.9beta39 nicht mehr funktioniert hat)
* (Bluefox) Ping Adapter: minimal-Intervall wird geprüft
* (Smiling-Jack) readdirStat Methode: fängt leere Verzeichnisse ab

### 0.9.86
* (Hobbyquaker) Hue-Adapter: Colormode-Wechsel verbessert, Bugfixes

Expand Down
35 changes: 19 additions & 16 deletions ccu.io/ccu.io.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

var settings = require(__dirname+'/settings.js');

settings.version = "0.9.86";
settings.version = "0.9.87";
settings.basedir = __dirname;
settings.stringTableLanguage = settings.stringTableLanguage || "de";
settings.regahss.metaScripts = [
Expand Down Expand Up @@ -1190,8 +1190,7 @@ function initSocketIO(_io) {
_io.configure(function (){
this.set('authorization', function (handshakeData, callback) {
var isHttps = (serverSsl !== undefined && this.server == serverSsl);
if ((!isHttps && settings.authentication.enabled) ||
( isHttps && settings.authentication.enabledSsl)) {
if ((!isHttps && settings.authentication.enabled) || (isHttps && settings.authentication.enabledSsl)) {
if (handshakeData.query["key"] === undefined || handshakeData.query["key"] != authHash) {
logger.info("ccu.io authetication error on "+(isHttps ? "https from " : "http from ") + handshakeData.address.address);
callback ("Invalid session key", false)
Expand Down Expand Up @@ -1250,28 +1249,32 @@ function initSocketIO(_io) {
}
});
});
socket.on('readdirStat', function (path, callback) {

socket.on('readdirStat', function(path, callback) {
path = __dirname + "/" + path;
logger.info("socket.io <-- readdirStat " + path);
logger.info("socket.io <-- readdir_stat " + path);

fs.readdir(path, function(err, files) {
var data = [];
if (err) {
callback(undefined);
}
files.forEach(function(file) {
fs.stat(path + file, function(err, stats) {
data.push({
"file": file,
"stats": stats
if (files.length == 0) {
callback(undefined);
} else {
files.forEach(function(file) {
fs.stat(path + file, function(err, stats) {
data.push({
"file": file,
"stats": stats
});
if (data.length == files.length) {
callback(data);
logger.info(data);
}
});
if (data.length == files.length) {
callback(data);
logger.info(data);
}
});
});
}
});
});

Expand Down

0 comments on commit da1245f

Please sign in to comment.