Skip to content
Snippets Groups Projects
Commit 7bfc6bf5 authored by deuce's avatar deuce
Browse files

Pass socket into recv_file()

parent 0a8f0d9e
No related branches found
No related tags found
No related merge requests found
...@@ -220,9 +220,9 @@ CVS = new (function () { ...@@ -220,9 +220,9 @@ CVS = new (function () {
return ret; return ret;
} }
function recv_file() { function recv_file(socket) {
var length=parseInt(this.socket.recvline()); var length=parseInt(socket.recvline());
return this.socket.recv(length); return socket.recv(length);
} }
for(;;) { for(;;) {
...@@ -250,7 +250,7 @@ CVS = new (function () { ...@@ -250,7 +250,7 @@ CVS = new (function () {
var repofile=this.socket.recvline(65535,10); var repofile=this.socket.recvline(65535,10);
var entries=this.socket.recvline(65535,10); var entries=this.socket.recvline(65535,10);
var mode=this.socket.recvline(65535,10); var mode=this.socket.recvline(65535,10);
var filedata=recv_file(); var filedata=recv_file(this.socket);
this.files[repofile]={}; this.files[repofile]={};
this.files[repofile].meta={}; this.files[repofile].meta={};
...@@ -274,7 +274,7 @@ CVS = new (function () { ...@@ -274,7 +274,7 @@ CVS = new (function () {
log(LOG_INFO, cmd[1]); log(LOG_INFO, cmd[1]);
break; break;
case 'MT': case 'MT':
var m=cmd[1].split_cmd(' ',2); var m=split_cmd(cmd[1],2);
switch(m[0]) { switch(m[0]) {
case 'newline': case 'newline':
if(js.global.writeln) if(js.global.writeln)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment