shithub: rd

Download patch

ref: dbbe3d1bc62440febca9086f83615ee2859df54c
parent: 8fb518ad2fb092e8bad347bd0623935a7298eb0d
author: Yaroslav Kolomiiets <[email protected]>
date: Wed May 18 14:38:34 EDT 2016

corrections

--- a/rd.c
+++ b/rd.c
@@ -128,6 +128,7 @@
 
 	keyspec = "";
 	doauth = 1;
+	label = nil;
 
 	ARGBEGIN {
 	case 'A':
--- a/rpc.c
+++ b/rpc.c
@@ -122,10 +122,8 @@
 int
 rdphandshake(Rdp* c)
 {
-	int i;
-	int mcsuid, userchan;
+	int i, nv;
 	Vchan* v;
-	int nv;
 	Msg r;
 	Share u;
 
@@ -138,9 +136,6 @@
 	if(attachuser(c) < 0)
 		return -1;
 
-	mcsuid = c->mcsuid;
-	userchan = c->userchan;
-
 	if(joinchannel(c, c->mcsuid, c->userchan) < 0)
 		return -1;
 	if(joinchannel(c, c->mcsuid, GLOBALCHAN) < 0)
@@ -362,7 +357,7 @@
 }
 
 void
-passinput(Rdp* c, ulong msec, int t, int f, int a, int b)
+passinput(Rdp* c, ulong msec, int typ, int f, int a, int b)
 {
 	Msg t;
 
@@ -370,7 +365,7 @@
 	t.originid = c->userchan;
 	t.shareid = c->shareid;
 	t.msec = msec;
-	t.mtype = t;
+	t.mtype = typ;
 	t.flags = f;
 	t.iarg[0] = a;
 	t.iarg[1] = b;