diff options
author | Andrzej Zaborowski <andrew.zaborowski@intel.com> | 2009-08-04 05:39:40 +0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-08-04 15:01:36 -0500 |
commit | 3cb6e1c90b8f361c19bfb5c5315eebbc56650e1c (patch) | |
tree | b08f5908707e8c76dc19ac80a5e348286c0f5424 /src | |
parent | bbc2a56986b5b2b3ed80e8d1bdbb1ff9ed28d3ec (diff) | |
download | ofono-3cb6e1c90b8f361c19bfb5c5315eebbc56650e1c.tar.bz2 |
Fix invalid queue use in sim_write_cb
Since we pop the queue's head, we can't use sim_op_error
Diffstat (limited to 'src')
-rw-r--r-- | src/sim.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -482,12 +482,10 @@ static void sim_op_write_cb(const struct ofono_error *error, void *data) struct sim_file_op *op = g_queue_pop_head(sim->simop_q); ofono_sim_file_write_cb_t cb = op->cb; - if (error->type != OFONO_ERROR_TYPE_NO_ERROR) { - sim_op_error(modem); - return; - } - - cb(modem, 1, op->userdata); + if (error->type == OFONO_ERROR_TYPE_NO_ERROR) + cb(modem, 1, op->userdata); + else + cb(modem, 0, op->userdata); sim_file_op_free(op); |