Skip to content

Commit

Permalink
For receiveSession set node name earlier incase no pcap
Browse files Browse the repository at this point in the history
  • Loading branch information
awick committed Mar 25, 2015
1 parent 43758b3 commit af43c80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion viewer/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4683,6 +4683,7 @@ app.post('/receiveSession', function receiveSession(req, res) {
// If we know the session len and haven't read the session
if (sessionlen !== -1 && !session && buffer.length >= sessionlen) {
session = JSON.parse(buffer.toString("utf8", 0, sessionlen));
session.no = Config.nodeName();
buffer = buffer.slice(sessionlen);

if (filelen > 0) {
Expand All @@ -4692,7 +4693,6 @@ app.post('/receiveSession', function receiveSession(req, res) {
req.resume();
session.ps[0] = - saveId.seq;
session.fs = [saveId.seq];
session.no = Config.nodeName();

if (saveId.start === 0) {
file = fs.createWriteStream(filename, {flags: "w"});
Expand Down

0 comments on commit af43c80

Please sign in to comment.