9front - general discussion about 9front
 help / color / mirror / Atom feed
From: ori@eigenstate.org
To: 9front@9front.org
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.
Date: Mon, 11 Dec 2023 15:22:15 -0500	[thread overview]
Message-ID: <3706D8B23648E2758A3C35FDAEAC0A12@eigenstate.org> (raw)
In-Reply-To: <EBCFE23973C760D3F1C5D0BD348A5447@smtp.pobox.com>

Looks reasonable; is there any reason you needed to change the session
id here too?

Quoth Romano <unobe@cpan.org>:
> 
> 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");
>  
> 
> 


  parent reply	other threads:[~2023-12-11 20:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-28  6:26 Romano
2023-09-28  7:01 ` unobe
2023-12-11 19:19   ` [9front] [PATCH 3/6] nusb/ptp: add mention to nusb man page and fix implementation per spec to start with transaction id 0, not 1 unobe
2023-12-11 20:22 ` ori [this message]
2023-12-11 22:55   ` [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 unobe
2023-12-11 20:36 ` ori
2024-01-12  4:14   ` unobe
2024-01-12  8:05     ` igor
2024-01-12 15:16     ` ori
2024-01-12 17:22       ` [9front] [PATCH 3/6] nusb/ptp: add mention to nusb man page and fix implementation per spec to start with transaction id 0, not 1 unobe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3706D8B23648E2758A3C35FDAEAC0A12@eigenstate.org \
    --to=ori@eigenstate.org \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).