libftdi Archives

Subject: Re: [libftdi-1.0] [PATCH] bug fix for async write and read

From: Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 13 Jul 2010 17:34:13 +0200
Hello Yi-Shin,

On Sunday, 11. July 2010 17:34:11 Yi-Shin Li wrote:
> * In ftdi_write_data_cb(), the tc->offset should be accumulated with
>   transfer->actual_length.

Thanks for the patch! The change looks reasonable to me
and I'm going to apply it the next days.

> 
> * In ftdi_transfer_data_done(), the tc->transfer could be NULL if
>   "(size <= ftdi->readbuffer_remaining)" at ftdi_read_data_submit().
>   Therefore, has to check if it's NULL before accessing it.

Ok

> --- /dev/null
> +++ b/autogen.sh
> @@ -0,0 +1,48 @@
> +#! /bin/sh
> ...
> ...

We are currently discussing the removal of autoconf from libftdi 1.x,
so I'm going to delay that part of the patch if you don't mind.

> --- a/src/ftdi.c
> +++ b/src/ftdi.c
> @@ -1514,17 +1516,20 @@ int ftdi_transfer_data_done(struct
> ftdi_transfer_control *tc)
>                      break;
>              libusb_free_transfer(tc->transfer);
>              free (tc);
> -            tc = NULL;
>              return ret;
>          }
>      }

Do I see it correctly that this change was made
to remove "useless" code, right?

Cheers,
Thomas

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread