shithub: 9pro

Download patch

ref: d1a7ba61b9c5cf0a7f8246a52653b5980c20ac34
parent: 0f081a707ef163222e261699a9207ad3300faf9a
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Thu May 27 16:03:45 EDT 2021

ignore "ping" walks

--- a/9gc.c
+++ b/9gc.c
@@ -40,7 +40,7 @@
 };
 
 static const char *nick;
-static int printjoin;
+static int printjoin, needopen;
 static uint64_t chatoff, skipuntil;
 //static char *regsrv = "tcp!registry.9p.zone!6675";
 static char *chatsrv = "tcp!chat.9p.zone!9990";
@@ -188,10 +188,11 @@
 		path[0] = channel;
 		path[1] = NULL;
 		c9walk(ctx, &tag, Rootfid, Chatfid, path);
+		needopen = 1;
 		break;
 
 	case Rwalk:
-		c9open(ctx, &tag, Chatfid, C9rdwr);
+		needopen = needopen && c9open(ctx, &tag, Chatfid, C9rdwr);
 		break;
 
 	case Rread: