changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: sshnet: fix write count for ctl message writes

changeset 7119: 47b33e9a0878
parent 7118: 177a74aa942a
child 7120: 415689b1872a
author: cinap_lenrek@felloff.net
date: Tue, 02 Apr 2019 17:32:34 +0200
files: sys/src/cmd/sshnet.c
description: sshnet: fix write count for ctl message writes
     1.1--- a/sys/src/cmd/sshnet.c
     1.2+++ b/sys/src/cmd/sshnet.c
     1.3@@ -782,13 +782,13 @@ ctlwrite(Req *r, Client *c)
     1.4 	int nf;
     1.5 
     1.6 	s = emalloc9p(r->ifcall.count+1);
     1.7+	r->ofcall.count = r->ifcall.count;
     1.8 	memmove(s, r->ifcall.data, r->ifcall.count);
     1.9 	s[r->ifcall.count] = '\0';
    1.10 
    1.11 	nf = tokenize(s, f, 3);
    1.12 	if(nf == 0){
    1.13 		free(s);
    1.14-		r->ofcall.count = r->ifcall.count;
    1.15 		respond(r, nil);
    1.16 		return;
    1.17 	}
    1.18@@ -799,7 +799,6 @@ ctlwrite(Req *r, Client *c)
    1.19 		if(nf != 1)
    1.20 			goto Badarg;
    1.21 		teardownclient(c);
    1.22-		r->ofcall.count = r->ifcall.count;
    1.23 		respond(r, nil);
    1.24 	}else if(strcmp(f[0], "connect") == 0){
    1.25 		if(c->state != Closed)