/* Basically, we start a IAP query, and then go to sleep. When the query return, irnet_getvalue_confirm will wake us up, and we can examine the result of the query... Note that in some case, the query fail even before we go to sleep, creating some races...  */
static int irnet_find_lsap_sel(irnet_socket *self)
/* Basically, we start a IAP query, and then go to sleep. When the query return, irnet_getvalue_confirm will wake us up, and we can examine the result of the query... Note that in some case, the query fail even before we go to sleep, creating some races...  */
static int irnet_find_lsap_sel(irnet_socket *self)
{
  DENTER(IRDA_SR_TRACE, "(self=0x%p)\n", self);
  DABORT(self->iriap, -EBUSY, IRDA_SR_ERROR, "busy with a previous query.\n");
  self->iriap = iriap_open(LSAP_ANY, IAS_CLIENT, self,
			   irnet_getvalue_confirm);
  self->errno = -EHOSTUNREACH;
  iriap_getvaluebyclass_request(self->iriap, self->rsaddr, self->daddr,
				IRNET_SERVICE_NAME, IRNET_IAS_VALUE);
  DEXIT(IRDA_SR_TRACE, "\n");
  return 0;
}