diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-07-14 13:09:00 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-07-14 15:45:06 -0500 |
commit | 000a983b2b23b3e1e0e442960f0bc14c57c27d67 (patch) | |
tree | 50b6a1c81d506b60f7d762811511040c745b76f0 | |
parent | 864e09481ccb0ccb42ef4fd4147b328b3b486a67 (diff) | |
download | ofono-000a983b2b23b3e1e0e442960f0bc14c57c27d67.tar.bz2 |
Make sure record length is not zero
Record length can be reported as 0 by the driver if it is for a
a binary (non-record based) file. Set it to the file length in
this case
-rw-r--r-- | src/sim.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -386,7 +386,12 @@ static void sim_op_info_cb(const struct ofono_error *error, int length, op->structure = structure; op->length = length; - op->record_length = record_length; + + if (structure == OFONO_SIM_FILE_STRUCTURE_TRANSPARENT) + op->record_length = length; + else + op->record_length = record_length; + op->current = 1; g_timeout_add(0, sim_op_retrieve_next, modem); |