On Thu, 14 Oct 2010 11:18:00 -0700
Kristen Carlson Accardi <kris...@linux.intel.com> wrote:

> ---
>  src/simfs.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/src/simfs.c b/src/simfs.c
> index fd768ef..bcb6ff8 100644
> --- a/src/simfs.c
> +++ b/src/simfs.c
> @@ -231,8 +231,7 @@ static void sim_fs_op_read_block_cb(const struct 
> ofono_error *error,
>               tocopy = MIN(256 - op->offset % 256,
>                               op->num_bytes - op->current * 256);
>       } else {
> -             bufoff = (op->current - start_block - 1) * 256 +
> -                             op->offset % 256;
> +             bufoff = op->current * 256;
>               dataoff = 0;
>               tocopy = MIN(256, op->num_bytes - op->current * 256);
>       }
> @@ -294,8 +293,7 @@ static gboolean sim_fs_op_read_block(gpointer user_data)
>                       toread = MIN(256 - op->offset % 256,
>                                       op->num_bytes - op->current * 256);
>               } else {
> -                     bufoff = (op->current - start_block - 1) * 256 +
> -                                     op->offset % 256;
> +                     bufoff = op->current * 256;
>                       seekoff = SIM_CACHE_HEADER_SIZE + op->current * 256;
>                       toread = MIN(256, op->num_bytes - op->current * 256);
>               }

Denis - any feedback on this patch?  If we don't add this bugfix,
reads > 256 bytes will be broken.

Thanks,
Kristen

_______________________________________________
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono

Reply via email to