Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #242 from krishnaIndia/patch_0.8
Browse files Browse the repository at this point in the history
fix/ffi_crash: resolve issues #234 #235 and #241
  • Loading branch information
hitman401 authored Aug 23, 2016
2 parents bde7ce8 + ffbe18a commit 0bb75fd
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ window.safeLauncher = angular
eventRegistry.logList = [];
$rootScope.intervals = [];
$rootScope.retryCount = 1;
$rootScope.userInfo = {};
$rootScope.user = {};
};

$rootScope.resetStats = function() {
Expand Down
2 changes: 1 addition & 1 deletion app/server/controllers/dns.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export var getFile = function(req, res, next) {
'Content-Type': mime.lookup(filePath) || 'application/octet-stream'
};
if (fileStats.metadata && fileStats.metadata.length > 0) {
headers.metadata = new Buffer(fileStats.metadata, 'base64').tostring('base64');
headers.metadata = new Buffer(fileStats.metadata, 'base64').toString('base64');
}
res.writeHead(range ? 206 : 200, headers);
if (chunksize === 0) {
Expand Down
3 changes: 3 additions & 0 deletions app/server/controllers/nfs.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ export var createFile = function(req, res, next) {
return responseHandler(err);
}
var writer = new NfsWriter(req, writerId, responseHandler, length);
if (length === 0) {
writer.closeWriter();
}
req.on('aborted', function() {
next(new ResponseError(400, 'Request aborted by client'));
});
Expand Down
5 changes: 5 additions & 0 deletions app/server/stream/nfs_writer.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,8 @@ NfsWriter.prototype._write = function(data, enc, next) {
});
};
/*jscs:enable disallowDanglingUnderscores*/


NfsWriter.prototype.closeWriter = function() {
this.req.app.get('api').nfs.closeWriter(this.writerId, this.responseHandler);
};
2 changes: 1 addition & 1 deletion app/ui_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export default class UIUtils {
reconnect(user) {
var self = this;
this.api.reset();
if (user) {
if (user && Object.keys(user).length !== 0) {
this.api.auth.login(user.accountSecret, user.accountPassword, function(err) {
if (!self.onNetworkStateChange) {
return;
Expand Down

0 comments on commit 0bb75fd

Please sign in to comment.