From 40904f655ddf06d04011b1161a64ee2fe66ed7a4 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Fri, 22 Oct 2010 12:11:26 -0500 Subject: simfs: Fix issue with check_cached The only_info logic was inverted, causing us to always read from the modem. --- src/simfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/simfs.c b/src/simfs.c index 6e2b5690..4204aca0 100644 --- a/src/simfs.c +++ b/src/simfs.c @@ -484,17 +484,17 @@ static void sim_fs_op_info_cb(const struct ofono_error *error, int length, op->record_length = length; op->current = op->offset / 256; - if (!op->info_only) + if (op->info_only == FALSE) fs->op_source = g_idle_add(sim_fs_op_read_block, fs); } else { op->record_length = record_length; op->current = 1; - if (!op->info_only) + if (op->info_only == FALSE) fs->op_source = g_idle_add(sim_fs_op_read_record, fs); } - if (op->info_only) { + if (op->info_only == TRUE) { /* * It's info-only request. So there is no need to request * actual contents of the EF-files. Just return the EF-info. @@ -551,7 +551,7 @@ static gboolean sim_fs_op_check_cached(struct sim_fs *fs) enum ofono_sim_file_structure structure; int record_length; - if (!imsi || !op->info_only) + if (imsi == NULL || op->info_only == TRUE) return FALSE; path = g_strdup_printf(SIM_CACHE_PATH, imsi, phase, op->id); -- cgit v1.2.3