various bug fixes
diff --git a/src/libventi/srvhello.c b/src/libventi/srvhello.c
index 20aedbe..029f57b 100644
--- a/src/libventi/srvhello.c
+++ b/src/libventi/srvhello.c
@@ -8,29 +8,31 @@
 	VtFcall tx, rx;
 	Packet *p;
 
-	if((p = vtrecv(z)) == nil)
-		return 0;
+	if((p = vtrecv(z)) == nil){
+		werrstr("unexpected eof on venti connection");
+		return -1;
+	}
 
 	if(vtfcallunpack(&tx, p) < 0){
 		packetfree(p);
-		return 0;
+		return -1;
 	}
 	packetfree(p);
 
 	if(tx.type != VtThello){
 		vtfcallclear(&tx);
 		werrstr("bad packet type %d; want Thello %d", tx.type, VtThello);
-		return 0;
+		return -1;
 	}
 	if(tx.tag != 0){
 		vtfcallclear(&tx);
 		werrstr("bad tag in hello");
-		return 0;
+		return -1;
 	}
 	if(strcmp(tx.version, z->version) != 0){
 		vtfcallclear(&tx);
 		werrstr("bad version in hello");
-		return 0;
+		return -1;
 	}
 	vtfree(z->uid);
 	z->uid = tx.uid;
@@ -42,9 +44,9 @@
 	rx.tag = tx.tag;
 	rx.sid = "anonymous";
 	if((p = vtfcallpack(&rx)) == nil)
-		return 0;
+		return -1;
 	if(vtsend(z, p) < 0)
-		return 0;
+		return -1;
 
-	return 1;
+	return 0;
 }