libventi: handle rpc when not connected
R=rsc CC=plan9port.codebot http://codereview.appspot.com/5491051
This commit is contained in:
parent
d33a4d7f1b
commit
fc638f7bd4
1 changed files with 6 additions and 0 deletions
|
|
@ -37,6 +37,12 @@ _vtrpc(VtConn *z, Packet *p, VtFcall *tx)
|
||||||
uchar tag, buf[2], *top;
|
uchar tag, buf[2], *top;
|
||||||
Rwait *r, *rr;
|
Rwait *r, *rr;
|
||||||
|
|
||||||
|
if(z == nil){
|
||||||
|
werrstr("not connected");
|
||||||
|
packetfree(p);
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
|
||||||
/* must malloc because stack could be private */
|
/* must malloc because stack could be private */
|
||||||
r = vtmallocz(sizeof(Rwait));
|
r = vtmallocz(sizeof(Rwait));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue