Re: [RFCv1 4/9] android/hal-sock: Initial listen handle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Johan,

On Wed, Nov 13, 2013 at 02:15:37PM +0200, Johan Hedberg wrote:
> > +struct rfcomm_slot {
> > +	int fd;
> > +	int hal_fd;
> > +	int real_sock;
> > +	uint32_t channel;
> > +};
> 
> You should really have comments here for what each struct member is used
> for (you have this info in your cover letter but it should also be part
> of the code). Why do you keep hal_fd here? Shouldn't we close it on our
> side as soon as we've handed it over to the HAL?

Basically hal_fd is needed until it is passed to the Android framework.

Do you want it to be like this:

int hal_fd;
rfslot = create_rfslot(&hal_fd, int sock);

send(hal_fd);
close(hal_fd);

Best regards 
Andrei Emeltchenko 

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux