commit - 4fa53a98ae6a42ada0b4d4b5516b7eb84e67ba6b
commit + 5c420a813d66f7a90375a80954e11eb7945ebb6c
blob - 601ae0b31aa6b6b4def0c5e61370662b1719ca54
blob + a7796b2dc55580cd77bc2da5b8a18c7728877970
--- client.c
+++ client.c
#include <endian.h>
#include <errno.h>
#include <fcntl.h>
+#include <inttypes.h>
#include <pwd.h>
#include <signal.h>
#include <stdlib.h>
static struct evbuffer *evb;
static uint32_t peerid;
-static int handshaked;
+static int handshaked, attached;
uint32_t msize;
static ATTR_DEAD void client_shutdown(void);
break;
case Tattach:
+ if (attached) {
+ np_error(hdr.tag, "already attached");
+ return;
+ }
+
/* fid[4] afid[4] uname[s] aname[s] */
/* for the moment, happily ignore afid */
return;
}
+ log_debug("qid{path=%"PRIu64" vers=%d type=0x%x}",
+ qid->path, qid->vers, qid->type);
np_attach(hdr.tag, qid);
+ attached = 1;
break;