This patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)
// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@
- !E
+ E == NULL
// </smpl>
These notifications should be emitted on SIM removal and insertion.
These notifications don't work very well though, on the hardware this
has been tested on, the modem never issued %SIMINS, and %SIMREM was
emitted only in some specific circumenstances.
Like in case of MBM modem, the SIM slot is not easily accessible
while the device is running so we assume there's no need to check
for SIM presence after startup.
Add ofono_sim_inserted_notify function to notify the core of SIM
insertion / removal.
Make every plugin generate a sim inserted event on start. For devices
with removable card, the event should be emitted after the
plugin detects such event. For devices that need to wait for SIM card
initialization, they can emit this event later.
Calypso firmware is just bizarre. It seems that if anything is sent
before CPI=3 to the DLC handling voice commands, the ATD will not return
to command mode immediately, but instead wait until connected / failed
condition occurs.
If CPI=3 is sent first, then calypso will go to command mode immediately
after ATD is issued and report CPI indications as usual.