From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30568 invoked from network); 11 Dec 2023 20:24:26 -0000 Received: from 9front.inri.net (168.235.81.73) by inbox.vuxu.org with ESMTPUTF8; 11 Dec 2023 20:24:26 -0000 Received: from mimir.eigenstate.org ([206.124.132.107]) by 9front; Mon Dec 11 15:22:19 -0500 2023 Received: from mimir.eigenstate.org (localhost [127.0.0.1]) by mimir.eigenstate.org (OpenSMTPD) with ESMTP id 1364ddbd for <9front@9front.org>; Mon, 11 Dec 2023 12:22:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=eigenstate.org; h= message-id:to:subject:date:from:in-reply-to:mime-version :content-type:content-transfer-encoding; s=mail; bh=3BagnJbVnx9G 7MuwEgDn2/b9sg4=; b=jPXD6pRfF0BWQOJmyIv7fyKHUfagE7TqVfqFHsDasTEv cOb51i0CkNTla99T5VCZBat/xJewm8etd88ZwSveAkHfe+BzvqXCdWWNmVPepgkt JglhCbMRyvGtrRt/5VnFT2sE3ZCmH7SkUAVmSqNQX0Yv4BkZQ0yQwYORdK5GM94= DomainKey-Signature: a=rsa-sha1; c=nofws; d=eigenstate.org; h=message-id :to:subject:date:from:in-reply-to:mime-version:content-type :content-transfer-encoding; q=dns; s=mail; b=jbEolZVvcOYgeBNs2np Cp2uEH/zwU93joOVea9Wr9K1M2L2xLMC9tbY0R883vYMNXQfSafDo0eVKOu/wGu3 nYxJyOV3Hv7uYcW8KDm582CrGRQ4UKSPyymytSxVpy1MdELTE1buPeE2Bc1OW2rM f36ncTa7jjXefw7HGi50zgb0= Received: from abbatoir (pool-108-6-24-2.nycmny.fios.verizon.net [108.6.24.2]) by mimir.eigenstate.org (OpenSMTPD) with ESMTPSA id 01da6bd6 (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO) for <9front@9front.org>; Mon, 11 Dec 2023 12:22:17 -0800 (PST) Message-ID: <3706D8B23648E2758A3C35FDAEAC0A12@eigenstate.org> To: 9front@9front.org Date: Mon, 11 Dec 2023 15:22:15 -0500 From: ori@eigenstate.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: flexible lifecycle XMPP over YAML shader CSS-oriented backend Subject: Re: [9front] [PATCH 3/6] nusb/ptp: add mention to nusb man page and fix implementation per spec to start with transaction id 1, not 0. Reply-To: 9front@9front.org Precedence: bulk Looks reasonable; is there any reason you needed to change the session id here too? Quoth Romano : > > Apple iPhones can now be used to transfer images. There is still an issue with the iPhone permission, wherein an actor has to be pretty quick on the trigger to Allow the connection from the iPhone side, but that would require a pause somewhere in the handshake that I did not have time to look into further. This patch at least allows the connection to succeed when permitted. > --- > diff c9c5d6455a6502ffb0f5490d5602396852261f4c 755ac2c11ce134f76d83a2a42edb07a6304d1de8 > --- a/sys/man/4/nusb > +++ b/sys/man/4/nusb > @@ -194,6 +194,10 @@ > The > .B ctl > file supplies the device geometry and partitions when read. > +.I Ptp > +configures and exposes a camera's (and often a mobile > +device's) storage to allow transferring data via the > +Picture Transfer Protocol (PTP). > .SS Ethernet > .I Ether > handles USB ethernet devices. The file system provided is > --- a/sys/src/cmd/nusb/ptp/ptp.c > +++ b/sys/src/cmd/nusb/ptp/ptp.c > @@ -75,9 +75,8 @@ > > static int debug = 0; > static ulong time0; > -static int maxpacket = 64; > -static int sessionId = 1; > -static int transId = 1; > +static int sessionId; > +static int transId; > > static Node **nodes; > static int nnodes; > @@ -556,7 +555,7 @@ > } > > /* > - * another proc migh'v come in and done it for us, > + * another proc might've come in and done it for us, > * so check the cache again. > */ > if(y = cachednode(path, &f)) > @@ -1048,6 +1047,7 @@ > sendp(iochan, ioproc()); > > sessionId = getpid(); > + transId = 0; > if(ptprpc(nil, OpenSession, 1, sessionId) < 0) > sysfatal("open session: %r"); > > >