~indicator-network-developers/ofono/trunk.packaging

« back to all changes in this revision

Viewing changes to src/call-forwarding.c

  • Committer: Kalle Valo
  • Date: 2011-02-21 07:46:07 UTC
  • mfrom: (2738.1.2125)
  • Revision ID: kalle.valo@canonical.com-20110221074607-u4rocuj2p75kpht9
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        int query_end;
62
62
        struct cf_ss_request *ss_req;
63
63
        struct ofono_sim *sim;
 
64
        struct ofono_sim_context *sim_context;
64
65
        unsigned char cfis_record_id;
65
66
        struct ofono_ussd *ussd;
66
67
        unsigned int ussd_watch;
276
277
                        data[3] = 128;
277
278
                }
278
279
 
279
 
                ofono_sim_write(cf->sim, SIM_EFCFIS_FILEID,
 
280
                ofono_sim_write(cf->sim_context, SIM_EFCFIS_FILEID,
280
281
                                        sim_cfis_update_cb,
281
282
                                        OFONO_SIM_FILE_STRUCTURE_FIXED,
282
283
                                        cf->cfis_record_id, data,
287
288
        if (cf->flags & CALL_FORWARDING_FLAG_CPHS_CFF) {
288
289
                unsigned char cff_voice = cfu_voice ? 0x0A : 0x05;
289
290
 
290
 
                ofono_sim_write(cf->sim, SIM_EF_CPHS_CFF_FILEID,
 
291
                ofono_sim_write(cf->sim_context, SIM_EF_CPHS_CFF_FILEID,
291
292
                                        sim_cphs_cff_update_cb,
292
293
                                        OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
293
294
                                        0, &cff_voice, sizeof(cff_voice), cf);
1337
1338
        const char *path = __ofono_atom_get_path(cf->atom);
1338
1339
        dbus_bool_t cfu_voice;
1339
1340
 
1340
 
        if (!ok || total_length < 1) {
 
1341
        if (!ok || total_length < 1)
1341
1342
                return;
1342
 
        }
1343
1343
 
1344
1344
        cf->flags |= CALL_FORWARDING_FLAG_CPHS_CFF;
1345
1345
 
1363
1363
        if (__ofono_sim_service_available(cf->sim,
1364
1364
                        SIM_UST_SERVICE_CFIS,
1365
1365
                        SIM_SST_SERVICE_CFIS) == TRUE)
1366
 
                ofono_sim_read(cf->sim, SIM_EFCFIS_FILEID,
 
1366
                ofono_sim_read(cf->sim_context, SIM_EFCFIS_FILEID,
1367
1367
                                OFONO_SIM_FILE_STRUCTURE_FIXED,
1368
1368
                                sim_cfis_read_cb, cf);
1369
1369
        else
1370
 
                ofono_sim_read(cf->sim, SIM_EF_CPHS_CFF_FILEID,
 
1370
                ofono_sim_read(cf->sim_context, SIM_EF_CPHS_CFF_FILEID,
1371
1371
                                OFONO_SIM_FILE_STRUCTURE_TRANSPARENT,
1372
1372
                                sim_cphs_cff_read_cb, cf);
1373
1373
}
1402
1402
        g_dbus_unregister_interface(conn, path,
1403
1403
                                        OFONO_CALL_FORWARDING_INTERFACE);
1404
1404
 
 
1405
        if (cf->sim_context) {
 
1406
                ofono_sim_context_free(cf->sim_context);
 
1407
                cf->sim_context = NULL;
 
1408
        }
 
1409
 
1405
1410
        if (cf->ussd)
1406
1411
                cf_unregister_ss_controls(cf);
1407
1412
 
1499
1504
 
1500
1505
        if (sim_atom) {
1501
1506
                cf->sim = __ofono_atom_get_data(sim_atom);
 
1507
                cf->sim_context = ofono_sim_context_create(cf->sim);
1502
1508
 
1503
1509
                sim_read_cf_indicator(cf);
1504
1510
        }