comparison rlgwebd.js @ 110:18a81cc0084b

RLG-Web: fix lockfile mixup. Put the terminal dimensions into the lockfile in the proper order.
author John "Elwin" Edwards <elwin@sdf.org>
date Sun, 15 Jul 2012 21:03:36 -0700
parents 67b393f10c2b
children f56fdfeed01a
comparison
equal deleted inserted replaced
109:67b393f10c2b 110:18a81cc0084b
122 gamemux.emit('begin', this.sessid, this.pname, this.game.uname); 122 gamemux.emit('begin', this.sessid, this.pname, this.game.uname);
123 /* Set up the lockfile and ttyrec */ 123 /* Set up the lockfile and ttyrec */
124 var ts = timestamp(); 124 var ts = timestamp();
125 var progressdir = "/dgldir/inprogress-" + this.game.uname; 125 var progressdir = "/dgldir/inprogress-" + this.game.uname;
126 this.lock = path.join(progressdir, this.pname + ":node:" + ts + ".ttyrec"); 126 this.lock = path.join(progressdir, this.pname + ":node:" + ts + ".ttyrec");
127 var lmsg = this.term.pid.toString() + '\n' + this.w + '\n' + this.h + '\n'; 127 var lmsg = this.term.pid.toString() + '\n' + this.h + '\n' + this.w + '\n';
128 fs.writeFile(this.lock, lmsg, "utf8"); 128 fs.writeFile(this.lock, lmsg, "utf8");
129 var ttyrec = path.join("/dgldir/ttyrec", this.pname, this.game.uname, 129 var ttyrec = path.join("/dgldir/ttyrec", this.pname, this.game.uname,
130 ts + ".ttyrec"); 130 ts + ".ttyrec");
131 this.record = fs.createWriteStream(ttyrec, { mode: 0664 }); 131 this.record = fs.createWriteStream(ttyrec, { mode: 0664 });
132 /* Holds the output since the last screen clear, so watchers can begin 132 /* Holds the output since the last screen clear, so watchers can begin