plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit fc638f7bd4d11352c44c8d4c6fc6d15e90f17ddb
parent d33a4d7f1b8fcc524c8b56a0d5a2005fbd9d1df0
Author: David du Colombier <0intro@gmail.com>
Date:   Mon, 16 Jan 2012 16:53:08 -0500

libventi: handle rpc when not connected

R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5491051

Diffstat:
Msrc/libventi/rpc.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git 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));