aboutsummaryrefslogtreecommitdiff
path: root/src/libventi
diff options
context:
space:
mode:
authorDavid du Colombier <0intro@gmail.com>2012-01-16 16:53:08 -0500
committerRuss Cox <rsc@swtch.com>2012-01-16 16:53:08 -0500
commitfc638f7bd4d11352c44c8d4c6fc6d15e90f17ddb (patch)
treeafa69f3902a98f94df91ef5883cec6e6285bc4a9 /src/libventi
parentd33a4d7f1b8fcc524c8b56a0d5a2005fbd9d1df0 (diff)
downloadplan9port-fc638f7bd4d11352c44c8d4c6fc6d15e90f17ddb.tar.gz
plan9port-fc638f7bd4d11352c44c8d4c6fc6d15e90f17ddb.tar.bz2
plan9port-fc638f7bd4d11352c44c8d4c6fc6d15e90f17ddb.zip
libventi: handle rpc when not connected
R=rsc CC=plan9port.codebot http://codereview.appspot.com/5491051
Diffstat (limited to 'src/libventi')
-rw-r--r--src/libventi/rpc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libventi/rpc.c b/src/libventi/rpc.c
index 5a820a99..8f268633 100644
--- a/src/libventi/rpc.c
+++ b/src/libventi/rpc.c
@@ -37,6 +37,12 @@ _vtrpc(VtConn *z, Packet *p, VtFcall *tx)
uchar tag, buf[2], *top;
Rwait *r, *rr;
+ if(z == nil){
+ werrstr("not connected");
+ packetfree(p);
+ return nil;
+ }
+
/* must malloc because stack could be private */
r = vtmallocz(sizeof(Rwait));