Jean Tourrilhes <[EMAIL PROTECTED]> writes:
> Hi everybody...
>
> I added a new feature to connect : if you don't specify a
> device address, the IrDA stack will try to find one for you (doing
> discovery and all that jazz). Of course, if you specify an address,
> the old behaviour is used...
> Patch below...
>
> Jean
> + /* Check if user supplied the required destination device address */
> + if (!addr->sir_addr) {
> + /* Try to find one suitable */
> + err = irda_discover_lsap_sel(self, addr->sir_name);
> + if (err) {
> + IRDA_DEBUG(0, __FUNCTION__ "(), connect failed!\n");
> + return -EINVAL;
> + }
> + }
> + else {
> + /* Use the one provided by the user */
> + self->daddr = addr->sir_addr;
> + IRDA_DEBUG(1, __FUNCTION__ "(), daddr = %08x\n", self->daddr);
> +
> + /* Query remote LM-IAS */
> + <- err = irda_find_lsap_sel(self, addr->sir_name);
> + <- if (err) {
> + <- IRDA_DEBUG(0, __FUNCTION__ "(), connect failed!\n");
> + <- return err;
> + <- }
Shouldn't the Query of the remote LM-IAS be done in any case? Since your
discover_lsap_sel() only discovers addresses (and should be renamed) and
does not query the LM-IAS, then the query will not be done when you don't
specify the device address!? Have marked my suggestions with <-.
-- Dag
--
/ Dag Brattli | The Linux-IrDA Project /
// University of Tromsoe, Norway | Infrared communication for Linux //
/// http://www.cs.uit.no/~dagb | http://www.cs.uit.no/linux-irda/ ///
_______________________________________________
Linux-IrDA mailing list - [EMAIL PROTECTED]
http://www4.pasta.cs.UiT.No/mailman/listinfo/linux-irda