summaryrefslogtreecommitdiffstats
path: root/src/simfs.c
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-10-22 12:11:26 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-10-22 12:11:26 -0500
commit40904f655ddf06d04011b1161a64ee2fe66ed7a4 (patch)
treedc762eef3007f7db6ca2fd60b80224a4bf185656 /src/simfs.c
parent107a38de85a841947871fca7c06a1127e9b0271d (diff)
downloadofono-40904f655ddf06d04011b1161a64ee2fe66ed7a4.tar.bz2
simfs: Fix issue with check_cached
The only_info logic was inverted, causing us to always read from the modem.
Diffstat (limited to 'src/simfs.c')
-rw-r--r--src/simfs.c8
1 files changed, 4 insertions, 4 deletions
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);