- Empty lists should be supported, as clearing the MSISDN is OK
- Initialization of empty MSISDN record should also be possible
- Overwriting of unused records should be possible
- Simplify resource cleanup
This implements writing SubscriberNumbers if the SIM allows this
(optional to the SIM provider). Because the property is an array
of phone numbers, setting the property needs to write multiple
records on the SIM so it's not atomic and potentially can fail
partially. In this case we have to report a write error to DBus
client but at the same time file may be changed and we send a
PropertyChanged.
This allows ofono_sim_read and ofono_sim_write callbacks to queue new
read or write operations. The callback must not be called between
removing the operation from queue and checking queue length.
This would also stall the SIM op queue if there's a read error for a record
other than the first. The other solution would be "goto next;" (keep
reading further records).
SIM File Access conditions would be reported similarly between various
stacks, so it seems like the core logic of figuring out the access
conditions belongs up in the daemon.
This also fixes various problems, including:
- access conditions read from bytes 10-12, instead of 9-11.
- read/update, invalidate/rehabilitate and increase conditions
read from the wrong bits (0-3 instead of 4-7 and vice versa)
This uses plain files in /var/lib/ofono for storing contents of the
operator lists to avoid possibly numerous queries to the SIM on every
startup. Files are indexed with IMSI. I'm not 100% sure about the
autoconf magic.
Users need to rerun bootstrap-configure after applying this.
Depends on [PATCH] Return SIM file access conditions from read_file_info.