* [PATCH 1/5] simfs: Cache flushing functions.
@ 2010-12-10 13:59 Andrzej Zaborowski
2010-12-10 13:59 ` [PATCH 2/5][RfC] Add SIM filesystem watch api Andrzej Zaborowski
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Andrzej Zaborowski @ 2010-12-10 13:59 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2149 bytes --]
---
src/simfs.c | 35 +++++++++++++++++++++++++++--------
src/simfs.h | 2 ++
2 files changed, 29 insertions(+), 8 deletions(-)
diff --git a/src/simfs.c b/src/simfs.c
index 8e52f7b..2f58d9b 100644
--- a/src/simfs.c
+++ b/src/simfs.c
@@ -903,17 +903,39 @@ void sim_fs_check_version(struct sim_fs *fs)
const char *imsi = ofono_sim_get_imsi(fs->sim);
enum ofono_sim_phase phase = ofono_sim_get_phase(fs->sim);
unsigned char version;
- struct dirent **entries;
- int len;
- char *path;
if (read_file(&version, 1, SIM_CACHE_VERSION, imsi, phase) == 1)
if (version == SIM_FS_VERSION)
return;
- path = g_strdup_printf(SIM_CACHE_BASEPATH, imsi, phase);
+ sim_fs_cache_flush(fs, 0);
+
+ version = SIM_FS_VERSION;
+ write_file(&version, 1, SIM_CACHE_MODE, SIM_CACHE_VERSION, imsi, phase);
+}
+
+void sim_fs_cache_flush(struct sim_fs *fs, int id)
+{
+ const char *imsi = ofono_sim_get_imsi(fs->sim);
+ enum ofono_sim_phase phase = ofono_sim_get_phase(fs->sim);
+ int len;
+ char *path;
+ struct dirent **entries;
+
+ /* Id of 0 flushes all cache content */
+ if (id > 0) {
+ path = g_strdup_printf(SIM_CACHE_PATH, imsi, phase, id);
+ remove(path);
+ g_free(path);
+
+ path = g_strdup_printf(SIM_IMAGE_CACHE_PATH, imsi, phase, id);
+ remove(path);
+ g_free(path);
+
+ return;
+ }
- ofono_info("Detected old simfs version in %s, removing", path);
+ path = g_strdup_printf(SIM_CACHE_BASEPATH, imsi, phase);
len = scandir(path, &entries, NULL, alphasort);
g_free(path);
@@ -940,7 +962,4 @@ void sim_fs_check_version(struct sim_fs *fs)
g_free(entries);
}
-
- version = SIM_FS_VERSION;
- write_file(&version, 1, SIM_CACHE_MODE, SIM_CACHE_VERSION, imsi, phase);
}
diff --git a/src/simfs.h b/src/simfs.h
index ef962db..ace25bf 100644
--- a/src/simfs.h
+++ b/src/simfs.h
@@ -47,4 +47,6 @@ char *sim_fs_get_cached_image(struct sim_fs *fs, int id);
void sim_fs_cache_image(struct sim_fs *fs, const char *image, int id);
+void sim_fs_cache_flush(struct sim_fs *fs, int id);
+
void sim_fs_free(struct sim_fs *fs);
--
1.7.1.86.g0e460.dirty
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/5][RfC] Add SIM filesystem watch api.
2010-12-10 13:59 [PATCH 1/5] simfs: Cache flushing functions Andrzej Zaborowski
@ 2010-12-10 13:59 ` Andrzej Zaborowski
2010-12-10 13:59 ` [PATCH 3/5][RfC] sim: Implement file watching and basic refresh Andrzej Zaborowski
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Andrzej Zaborowski @ 2010-12-10 13:59 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 1325 bytes --]
This allows code that reads files from the SIM card to also watch for
changes in these files signalled in a Refresh command by the SIM.
---
include/sim.h | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/include/sim.h b/include/sim.h
index 7860e24..aab981c 100644
--- a/include/sim.h
+++ b/include/sim.h
@@ -114,6 +114,8 @@ typedef void (*ofono_sim_lock_unlock_cb_t)(const struct ofono_error *error,
typedef void (*ofono_sim_locked_cb_t)(const struct ofono_error *error,
int locked, void *data);
+typedef void (*ofono_sim_file_notify_t)(int id, void *userdata);
+
struct ofono_sim_driver {
const char *name;
int (*probe)(struct ofono_sim *sim, unsigned int vendor, void *data);
@@ -207,6 +209,14 @@ int ofono_sim_write(struct ofono_sim *sim, int id,
int ofono_sim_read_bytes(struct ofono_sim *sim, int id,
unsigned short offset, unsigned short num_bytes,
ofono_sim_file_read_cb_t cb, void *data);
+
+int ofono_sim_add_file_watch(struct ofono_sim *sim, int id,
+ enum ofono_sim_state reset_state,
+ ofono_sim_file_notify_t notify, void *userdata);
+
+void ofono_sim_remove_file_watch(struct ofono_sim *sim, int id,
+ ofono_sim_file_notify_t notify, void *userdata);
+
#ifdef __cplusplus
}
#endif
--
1.7.1.86.g0e460.dirty
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/5][RfC] sim: Implement file watching and basic refresh.
2010-12-10 13:59 [PATCH 1/5] simfs: Cache flushing functions Andrzej Zaborowski
2010-12-10 13:59 ` [PATCH 2/5][RfC] Add SIM filesystem watch api Andrzej Zaborowski
@ 2010-12-10 13:59 ` Andrzej Zaborowski
2010-12-10 13:59 ` [PATCH 4/5][RfC] sim: Watch files we keep in memory Andrzej Zaborowski
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Andrzej Zaborowski @ 2010-12-10 13:59 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 5663 bytes --]
---
src/ofono.h | 4 ++
src/sim.c | 175 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 179 insertions(+), 0 deletions(-)
diff --git a/src/ofono.h b/src/ofono.h
index 792134b..6c660b6 100644
--- a/src/ofono.h
+++ b/src/ofono.h
@@ -296,6 +296,10 @@ ofono_bool_t __ofono_sim_service_available(struct ofono_sim *sim,
int ust_service,
int sst_service);
+void __ofono_sim_refresh(struct ofono_sim *sim, GSList *file_list,
+ ofono_bool_t full_file_change,
+ ofono_bool_t naa_init);
+
#include <ofono/stk.h>
typedef void (*__ofono_sms_sim_download_cb_t)(ofono_bool_t ok,
diff --git a/src/sim.c b/src/sim.c
index c523982..da098b7 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -92,6 +92,7 @@ struct ofono_sim {
struct ofono_watchlist *state_watches;
struct sim_fs *simfs;
+ GSList *fs_watches;
unsigned char *iidf_image;
@@ -113,6 +114,13 @@ struct service_number {
struct ofono_phone_number ph;
};
+struct fs_watch {
+ int id;
+ enum ofono_sim_state reset_state;
+ ofono_sim_file_notify_t notify;
+ void *notify_data;
+};
+
static const char *const passwd_name[] = {
[OFONO_SIM_PASSWORD_NONE] = "none",
[OFONO_SIM_PASSWORD_SIM_PIN] = "pin",
@@ -2172,6 +2180,12 @@ static void sim_remove(struct ofono_atom *atom)
sim->simfs = NULL;
}
+ if (sim->fs_watches != NULL) {
+ g_slist_foreach(sim->fs_watches, (GFunc) g_free, NULL);
+ g_slist_free(sim->fs_watches);
+ sim->fs_watches = NULL;
+ }
+
g_free(sim);
}
@@ -2253,3 +2267,164 @@ void *ofono_sim_get_data(struct ofono_sim *sim)
{
return sim->driver_data;
}
+
+static gint fs_watch_compare_by_id(gconstpointer a, gconstpointer b)
+{
+ const struct fs_watch *w = a;
+ const int *id = b;
+
+ return w->id - *id;
+}
+
+int ofono_sim_add_file_watch(struct ofono_sim *sim, int id,
+ enum ofono_sim_state reset_state,
+ ofono_sim_file_notify_t notify, void *userdata)
+{
+ struct fs_watch *item;
+
+ DBG("%p", sim);
+
+ if (sim == NULL)
+ return 0;
+
+ if (notify == NULL)
+ return 0;
+
+ /* Currently there's no need for multiple watches per file */
+ if (g_slist_find_custom(sim->fs_watches, &id, fs_watch_compare_by_id))
+ return -EEXIST;
+
+ item = g_new0(struct fs_watch, 1);
+
+ item->id = id;
+ item->notify = notify;
+ item->notify_data = userdata;
+ item->reset_state = reset_state;
+
+ sim->fs_watches = g_slist_prepend(sim->fs_watches, item);
+
+ return id;
+}
+
+void ofono_sim_remove_file_watch(struct ofono_sim *sim, int id,
+ ofono_sim_file_notify_t notify, void *userdata)
+{
+ GSList *item = g_slist_find_custom(sim->fs_watches,
+ &id, fs_watch_compare_by_id);
+ if (!item)
+ return;
+
+ g_free(item->data);
+ sim->fs_watches = g_slist_remove(sim->fs_watches, item->data);
+}
+
+void __ofono_sim_refresh(struct ofono_sim *sim, GSList *file_list,
+ ofono_bool_t full_file_change, ofono_bool_t naa_init)
+{
+ GSList *l;
+ enum sim_reset_state {
+ RESET_STATE_NOT_PRESENT = OFONO_SIM_STATE_NOT_PRESENT,
+ RESET_STATE_INSERTED = OFONO_SIM_STATE_INSERTED,
+ RESET_STATE_READY = OFONO_SIM_STATE_READY,
+ RESET_STATE_NONE,
+ } reset_state = RESET_STATE_NONE;
+
+ /* Flush cached content for affected files */
+ if (full_file_change)
+ sim_fs_cache_flush(sim->simfs, 0);
+ else
+ for (l = file_list; l; l = l->next) {
+ struct stk_file *file = l->data;
+ int id = (file->file[file->len - 2] << 8) |
+ (file->file[file->len - 1] << 0);
+
+ sim_fs_cache_flush(sim->simfs, id);
+ }
+
+ if (naa_init)
+ reset_state = RESET_STATE_INSERTED;
+
+ /*
+ * Check if we have file change handlers for all of the affected
+ * files. If not, we will fall back to re-initialising the
+ * application which ensures that all files are re-read.
+ */
+ for (l = sim->fs_watches; l; l = l->next) {
+ struct fs_watch *w = l->data;
+
+ if (full_file_change) {
+ if (w->notify)
+ continue;
+
+ if (w->reset_state < reset_state)
+ reset_state = reset_state;
+
+ continue;
+ }
+
+ for (l = file_list; l; l = l->next) {
+ struct stk_file *file = l->data;
+ int id = (file->file[file->len - 2] << 8) |
+ (file->file[file->len - 1] << 0);
+
+ if (id != w->id)
+ continue;
+
+ if (w->notify)
+ break;
+
+ if (w->reset_state < reset_state)
+ reset_state = reset_state;
+
+ break;
+ }
+ }
+
+ /*
+ * Notify the subscribers of files that have changed unless we
+ * have determined that a re-initialisation is necessary and
+ * will trigger re-reading of those files anyway.
+ */
+ for (l = sim->fs_watches; l; l = l->next) {
+ struct fs_watch *w = l->data;
+
+ if (full_file_change) {
+ if (w->reset_state < reset_state)
+ w->notify(w->id, w->notify_data);
+
+ continue;
+ }
+
+ for (l = file_list; l; l = l->next) {
+ struct stk_file *file = l->data;
+ int id = (file->file[file->len - 2] << 8) |
+ (file->file[file->len - 1] << 0);
+
+ if (id != w->id)
+ continue;
+
+ if (w->reset_state < reset_state)
+ w->notify(w->id, w->notify_data);
+
+ break;
+ }
+ }
+
+ switch (reset_state) {
+ case RESET_STATE_NOT_PRESENT:
+ ofono_sim_inserted_notify(sim, FALSE);
+ ofono_sim_inserted_notify(sim, TRUE);
+ break;
+ case RESET_STATE_INSERTED:
+ sim_free_state(sim);
+ sim->state = OFONO_SIM_STATE_INSERTED;
+ sim_initialize(sim);
+ break;
+ case RESET_STATE_READY:
+ sim->state = OFONO_SIM_STATE_INSERTED;
+ sim_set_ready(sim);
+ break;
+ case RESET_STATE_NONE:
+ break;
+ }
+}
--
1.7.1.86.g0e460.dirty
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/5][RfC] sim: Watch files we keep in memory.
2010-12-10 13:59 [PATCH 1/5] simfs: Cache flushing functions Andrzej Zaborowski
2010-12-10 13:59 ` [PATCH 2/5][RfC] Add SIM filesystem watch api Andrzej Zaborowski
2010-12-10 13:59 ` [PATCH 3/5][RfC] sim: Implement file watching and basic refresh Andrzej Zaborowski
@ 2010-12-10 13:59 ` Andrzej Zaborowski
2010-12-10 13:59 ` [PATCH 5/5][RfC] stk: Partially handle Refresh command Andrzej Zaborowski
2010-12-23 2:57 ` [PATCH 1/5] simfs: Cache flushing functions Denis Kenzior
4 siblings, 0 replies; 6+ messages in thread
From: Andrzej Zaborowski @ 2010-12-10 13:59 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 5521 bytes --]
These are dummy watches on files who's state is kept in memory, just
to ensure that on a refresh affecting any of those files ofono
re-reads them from SIM. The flow of the code in sim.c has become
a little complicated, maybe watches should be automatically set for
files that are being read and removed when the sim state changes to
a lower state or atom is removed, for example, but this wouldn't be
flexible enough for some of the corner cases.
---
src/sim.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 46 insertions(+), 1 deletions(-)
diff --git a/src/sim.c b/src/sim.c
index da098b7..2368b3d 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -1192,15 +1192,28 @@ static void sim_ready(enum ofono_sim_state new_state, void *user)
{
struct ofono_sim *sim = user;
- if (new_state != OFONO_SIM_STATE_READY)
+ if (new_state != OFONO_SIM_STATE_READY) {
+ ofono_sim_remove_file_watch(sim, SIM_EFMSISDN_FILEID,
+ NULL, sim);
+ ofono_sim_remove_file_watch(sim, SIM_EFSDN_FILEID, NULL, sim);
+ ofono_sim_remove_file_watch(sim, SIM_EFIMG_FILEID, NULL, sim);
+
return;
+ }
sim_own_numbers_update(sim);
+ ofono_sim_add_file_watch(sim, SIM_EFMSISDN_FILEID,
+ OFONO_SIM_STATE_READY, NULL, sim);
ofono_sim_read(sim, SIM_EFSDN_FILEID, OFONO_SIM_FILE_STRUCTURE_FIXED,
sim_sdn_read_cb, sim);
+ ofono_sim_add_file_watch(sim, SIM_EFSDN_FILEID,
+ OFONO_SIM_STATE_READY, NULL, sim);
+
ofono_sim_read(sim, SIM_EFIMG_FILEID, OFONO_SIM_FILE_STRUCTURE_FIXED,
sim_efimg_read_cb, sim);
+ ofono_sim_add_file_watch(sim, SIM_EFIMG_FILEID,
+ OFONO_SIM_STATE_READY, NULL, sim);
}
static void sim_imsi_cb(const struct ofono_error *error, const char *imsi,
@@ -1464,6 +1477,9 @@ static void sim_efust_read_cb(int ok, int length, int record,
ofono_sim_read(sim, SIM_EFEST_FILEID,
OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
sim_efest_read_cb, sim);
+ ofono_sim_add_file_watch(sim, SIM_EFEST_FILEID,
+ OFONO_SIM_STATE_INSERTED,
+ NULL, sim);
return;
}
@@ -1525,6 +1541,9 @@ static void sim_efphase_read_cb(int ok, int length, int record,
ofono_sim_read(sim, SIM_EFUST_FILEID,
OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
sim_efust_read_cb, sim);
+ ofono_sim_add_file_watch(sim, SIM_EFUST_FILEID,
+ OFONO_SIM_STATE_INSERTED,
+ NULL, sim);
return;
}
@@ -1547,6 +1566,8 @@ static void sim_efphase_read_cb(int ok, int length, int record,
ofono_sim_read(sim, SIM_EFSST_FILEID,
OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
sim_efsst_read_cb, sim);
+ ofono_sim_add_file_watch(sim, SIM_EFSST_FILEID,
+ OFONO_SIM_STATE_INSERTED, NULL, sim);
}
static void sim_initialize_after_pin(struct ofono_sim *sim)
@@ -1554,10 +1575,14 @@ static void sim_initialize_after_pin(struct ofono_sim *sim)
ofono_sim_read(sim, SIM_EFPHASE_FILEID,
OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
sim_efphase_read_cb, sim);
+ ofono_sim_add_file_watch(sim, SIM_EFPHASE_FILEID,
+ OFONO_SIM_STATE_INSERTED, NULL, sim);
ofono_sim_read(sim, SIM_EFAD_FILEID,
OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
sim_ad_read_cb, sim);
+ ofono_sim_add_file_watch(sim, SIM_EFAD_FILEID,
+ OFONO_SIM_STATE_INSERTED, NULL, sim);
/*
* Read CPHS-support bits, this is still part of the SIM
@@ -1566,6 +1591,8 @@ static void sim_initialize_after_pin(struct ofono_sim *sim)
ofono_sim_read(sim, SIM_EF_CPHS_INFORMATION_FILEID,
OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
sim_cphs_information_read_cb, sim);
+ ofono_sim_add_file_watch(sim, SIM_EF_CPHS_INFORMATION_FILEID,
+ OFONO_SIM_STATE_INSERTED, NULL, sim);
}
static void sim_pin_query_cb(const struct ofono_error *error,
@@ -1856,6 +1883,8 @@ static void sim_initialize(struct ofono_sim *sim)
ofono_sim_read(sim, SIM_EF_ICCID_FILEID,
OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
sim_iccid_read_cb, sim);
+ ofono_sim_add_file_watch(sim, SIM_EF_ICCID_FILEID,
+ OFONO_SIM_STATE_INSERTED, NULL, sim);
/* EFecc is read by the voicecall atom */
@@ -1870,9 +1899,14 @@ static void sim_initialize(struct ofono_sim *sim)
ofono_sim_read(sim, SIM_EFLI_FILEID,
OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
sim_efli_read_cb, sim);
+ ofono_sim_add_file_watch(sim, SIM_EFLI_FILEID,
+ OFONO_SIM_STATE_INSERTED, NULL, sim);
+
ofono_sim_read(sim, SIM_EFPL_FILEID,
OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
sim_efpl_read_cb, sim);
+ ofono_sim_add_file_watch(sim, SIM_EFPL_FILEID,
+ OFONO_SIM_STATE_INSERTED, NULL, sim);
}
int ofono_sim_read_bytes(struct ofono_sim *sim, int id,
@@ -2037,6 +2071,17 @@ static void sim_free_state(struct ofono_sim *sim)
sim->fixed_dialing = FALSE;
sim->barred_dialing = FALSE;
+
+ ofono_sim_remove_file_watch(sim, SIM_EFUST_FILEID, NULL, sim);
+ ofono_sim_remove_file_watch(sim, SIM_EFEST_FILEID, NULL, sim);
+ ofono_sim_remove_file_watch(sim, SIM_EFSST_FILEID, NULL, sim);
+ ofono_sim_remove_file_watch(sim, SIM_EFPHASE_FILEID, NULL, sim);
+ ofono_sim_remove_file_watch(sim, SIM_EFAD_FILEID, NULL, sim);
+ ofono_sim_remove_file_watch(sim, SIM_EF_CPHS_INFORMATION_FILEID,
+ NULL, sim);
+ ofono_sim_remove_file_watch(sim, SIM_EF_ICCID_FILEID, NULL, sim);
+ ofono_sim_remove_file_watch(sim, SIM_EFLI_FILEID, NULL, sim);
+ ofono_sim_remove_file_watch(sim, SIM_EFPL_FILEID, NULL, sim);
}
void ofono_sim_inserted_notify(struct ofono_sim *sim, ofono_bool_t inserted)
--
1.7.1.86.g0e460.dirty
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 5/5][RfC] stk: Partially handle Refresh command.
2010-12-10 13:59 [PATCH 1/5] simfs: Cache flushing functions Andrzej Zaborowski
` (2 preceding siblings ...)
2010-12-10 13:59 ` [PATCH 4/5][RfC] sim: Watch files we keep in memory Andrzej Zaborowski
@ 2010-12-10 13:59 ` Andrzej Zaborowski
2010-12-23 2:57 ` [PATCH 1/5] simfs: Cache flushing functions Denis Kenzior
4 siblings, 0 replies; 6+ messages in thread
From: Andrzej Zaborowski @ 2010-12-10 13:59 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 2007 bytes --]
Only the four "NAA initialisation" modes are handled at the moment.
---
src/stk.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 48 insertions(+), 0 deletions(-)
diff --git a/src/stk.c b/src/stk.c
index 09229ce..455bf35 100644
--- a/src/stk.c
+++ b/src/stk.c
@@ -1951,6 +1951,10 @@ static gboolean handle_command_refresh(const struct stk_command *cmd,
struct stk_response *rsp,
struct ofono_stk *stk)
{
+ struct ofono_error failure = { .type = OFONO_ERROR_TYPE_FAILURE };
+ struct ofono_sim *sim = NULL;
+ struct ofono_atom *sim_atom;
+ int err;
GSList *l;
DBG("");
@@ -2004,6 +2008,50 @@ static gboolean handle_command_refresh(const struct stk_command *cmd,
cmd->refresh.icon_id.qualifier);
DBG("Alpha ID: %s", cmd->refresh.alpha_id);
+ sim_atom = __ofono_modem_find_atom(__ofono_atom_get_modem(stk->atom),
+ OFONO_ATOM_TYPE_SIM);
+ if (sim_atom)
+ sim = __ofono_atom_get_data(sim_atom);
+
+ if (sim == NULL) {
+ rsp->result.type = STK_RESULT_TYPE_NOT_CAPABLE;
+ return TRUE;
+ }
+
+ if (cmd->qualifier < 4) {
+ int qualifier = stk->pending_cmd->qualifier;
+ GSList *file_list = stk->pending_cmd->refresh.file_list;
+
+ /* Don't free the list yet */
+ stk->pending_cmd->refresh.file_list = NULL;
+
+ /*
+ * Queue the TERMINAL RESPONSE before triggering potential
+ * file accesses.
+ */
+ err = stk_respond(stk, rsp, stk_command_cb);
+ if (err)
+ stk_command_cb(&failure, stk);
+
+ switch (qualifier) {
+ case 0:
+ __ofono_sim_refresh(sim, file_list, TRUE, TRUE);
+ break;
+ case 1:
+ __ofono_sim_refresh(sim, file_list, FALSE, FALSE);
+ break;
+ case 2:
+ case 3:
+ __ofono_sim_refresh(sim, file_list, FALSE, TRUE);
+ break;
+ }
+
+ g_slist_foreach(file_list, (GFunc) g_free, NULL);
+ g_slist_free(file_list);
+
+ return FALSE;
+ }
+
rsp->result.type = STK_RESULT_TYPE_NOT_CAPABLE;
return TRUE;
}
--
1.7.1.86.g0e460.dirty
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/5] simfs: Cache flushing functions.
2010-12-10 13:59 [PATCH 1/5] simfs: Cache flushing functions Andrzej Zaborowski
` (3 preceding siblings ...)
2010-12-10 13:59 ` [PATCH 5/5][RfC] stk: Partially handle Refresh command Andrzej Zaborowski
@ 2010-12-23 2:57 ` Denis Kenzior
4 siblings, 0 replies; 6+ messages in thread
From: Denis Kenzior @ 2010-12-23 2:57 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 658 bytes --]
Hi Andrew,
<snip>
> diff --git a/src/simfs.h b/src/simfs.h
> index ef962db..ace25bf 100644
> --- a/src/simfs.h
> +++ b/src/simfs.h
> @@ -47,4 +47,6 @@ char *sim_fs_get_cached_image(struct sim_fs *fs, int id);
>
> void sim_fs_cache_image(struct sim_fs *fs, const char *image, int id);
>
> +void sim_fs_cache_flush(struct sim_fs *fs, int id);
> +
> void sim_fs_free(struct sim_fs *fs);
So as I mentioned on IRC I think you have the right idea. However, I'd
prefer that we separate the three types of flushes:
- Full simfs flush
- specific ef cache flush
- specific icon cache flush
- full icon cache flush
Regards,
-Denis
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-12-23 2:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-10 13:59 [PATCH 1/5] simfs: Cache flushing functions Andrzej Zaborowski
2010-12-10 13:59 ` [PATCH 2/5][RfC] Add SIM filesystem watch api Andrzej Zaborowski
2010-12-10 13:59 ` [PATCH 3/5][RfC] sim: Implement file watching and basic refresh Andrzej Zaborowski
2010-12-10 13:59 ` [PATCH 4/5][RfC] sim: Watch files we keep in memory Andrzej Zaborowski
2010-12-10 13:59 ` [PATCH 5/5][RfC] stk: Partially handle Refresh command Andrzej Zaborowski
2010-12-23 2:57 ` [PATCH 1/5] simfs: Cache flushing functions Denis Kenzior
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox