Re: [PATCH v4 1/4] transport-helper: no connection restriction in connect_helper
Jiang Xin <worldhello.net@gmail.com> writes:
Show 9 quoted lines
> If both data->connect and data->stateless_connect are false,
> process_connect_service() will return 0 instead of making a connection
> and returning 1. The return value will be checked in the function
> connect_helper() as follows:
>
> if (!process_connect_service(transport, name, exec))
> die(_("can't connect to subservice %s"), name);
>
> So I think it's not necessary to make double check in connect_helper().Ah, thank you for the clarification.
Show 15 quoted lines
> The best position to address the bug that both data->connect and
> data->stateless_connect are enabled is in the function get_helper() as
> below:
>
> } else if (!strcmp(capname, "connect")) {
> data->connect = 1;
> } else if (!strcmp(capname, "stateless-connect")) {
> data->stateless_connect = 1;
> }
> ... ...
> if (data->connect && data->stateless_connect)
> die("cannot have both connect and stateless_connect enabled");
>
> I consider this change to be off-topic and it will not be introduced
> in this series.