Henrique Dante de Almeida
924ee02ff7
Constify GDBus signal tables
...
Constify signal tables with the following command:
find . -name '*.[ch]' -exec \
sed -i 's/\(GDBusSignalTable .* =\)/const \1/g' {} \;
2012-05-20 02:47:56 -07:00
Henrique Dante de Almeida
63bbdebdf2
Constify GDBus method tables
...
Constify method tables with the following command:
find . -name '*.[ch]' -exec \
sed -i 's/\(GDBusMethodTable .* =\)/const \1/g' {} \;
2012-05-20 02:47:56 -07:00
Denis Kenzior
a51004d4f7
sim: Fix crash due to uninitialized spn_watch
2012-02-01 20:12:51 -06:00
Oleg Zhurakivskyy
bdf5939520
sim: Make SPN change atomic for consumers
...
Due to new spn watch semantics, ofono_sim_get_spn()
will report the absence of SPN while reading it,
which is probably incorrect.
2012-01-23 10:27:54 -06:00
Oleg Zhurakivskyy
810bd2aa2e
sim: Add ofono_sim_get_spn() implementation
2012-01-18 10:42:59 -06:00
Oleg Zhurakivskyy
ef658e92f3
sim: Add SPN watch capability
2012-01-15 19:55:58 -06:00
Oleg Zhurakivskyy
3272397ad9
sim: Minor style fixes
2012-01-15 19:36:23 -06:00
Jussi Kukkonen
d9a76824ba
sim: fix "network" is pin type for "networkpuk"
2012-01-01 18:17:36 -06:00
Denis Kenzior
d1d674004f
sim: Fix not creating simfs context in some cases
2011-12-26 18:03:40 -06:00
Denis Kenzior
748259a275
sim: Add __ofono_sim_cphs_service_available
2011-12-16 09:45:31 -06:00
Denis Kenzior
7f18695f46
sim: Reset additional state info
...
We were not resetting 3GPP and CPHS phase information as well as the
CPHS service table entries on sim removal / reset.
2011-12-16 09:44:10 -06:00
Marcel Holtmann
7e6afe37bf
core: Update copyright information
2011-10-10 13:39:42 -07:00
Denis Kenzior
c6c01110ec
sim: Support SIM_STATE_LOCKED_OUT
2011-07-19 14:20:09 -05:00
Denis Kenzior
4adc4a728d
sim: Break out state notification into own method
2011-07-19 14:10:17 -05:00
Denis Kenzior
3c82e9b9cc
sim: Make sure only PINs can be sent to EnterPin
2011-06-02 15:56:18 -05:00
Denis Kenzior
b1f4e981f4
sim: Fix potential use of uninitialized variable
...
In certain circumstances, when the image has been cached but EFimg has
not been read yet, we might end up accessing an unitialized variable.
Fix this by always failing if EFimg has not been read yet.
2011-05-08 23:27:17 -05:00
Frédéric Danis
e7e6ce9983
sim: add +CNUM support for HFP emulator
2011-03-31 14:29:39 -05:00
Denis Kenzior
788a91402e
sim: Handle an error condition better
2011-03-15 20:51:28 -05:00
Andrzej Zaborowski
9c2af56c18
sim: Watch for changes to EFimg files and EFiidf
2011-03-15 20:20:59 -05:00
Andrzej Zaborowski
f2a82b8e8d
sim: Watch for changes to EFmsisdn and EFsdn
2011-03-15 20:20:25 -05:00
Andrzej Zaborowski
0550553c87
sim: Split out sim context into early and main
...
And watch for relevant file changes on the early context.
2011-03-15 20:11:33 -05:00
Denis Kenzior
05c378bae9
sim: Document fall through case in switchcase
2011-02-25 11:53:10 -06:00
Jussi Kangas
c5b321e768
sim: Expose the __ofono_sim_recheck_pin API
2011-02-25 11:51:18 -06:00
Jussi Kangas
9007bf6392
sim: Do not teardown SIM state when PIN2 is asked
...
We should not tear down the SIM state if PIN2 is being asked for, or if
PIN2 is blocked and PUK2 is being asked.
We also want to continue with SIM initialization if the modem requires
PIN2 / PUK2 for some reason.
2011-02-25 11:47:23 -06:00
Denis Kenzior
e8553f5337
sim: Check for SIM lockout condition
...
When a user tries to lock/unlock/change a PIN and enters it wrongly
several times, it is possible to lock themselves out. In this case we
should drop to a pre-sim state, wait for the user to enter the PUK and
re-init the sim.
2011-02-18 11:28:43 -06:00
Denis Kenzior
5543d935c5
sim: Move stuff around and remove forward decl
2011-02-18 11:28:43 -06:00
Denis Kenzior
5d626b6967
sim: move stuff around
2011-02-18 11:28:43 -06:00
Denis Kenzior
ad181b690b
sim: Tweak the behavior of sim_refresh slightly
...
Instead of notifying everyone of sim_inserted condition, we should
simply notify the modem directly. It is the only one interested in this
particular change.
This partly reverts an earlier commit:
9498ad6b5633e350eb529f8efbe08270d95c8003
2011-02-17 15:09:16 -06:00
Andrzej Zaborowski
131d86a2f9
sim: Implement basic Refresh
2011-02-17 15:09:16 -06:00
Denis Kenzior
a8f15c5cf3
sim: Fixup compiler complaints
...
src/sim.c:2396: error: comparison between signed and unsigned integer
expressions
src/sim.c:2396: error: comparison between signed and unsigned integer
expressions
2011-02-08 10:19:52 -06:00
Jussi Kangas
a8671fe1f7
sim: Allow usage of SIM codes longer than 8 digits
...
Some PIN codes (e.g. subsidy locks, etc) can have PIN codes much longer
than the default 8 digits.
2011-02-08 10:19:52 -06:00
Denis Kenzior
53d8bbfe29
sim: Add implementation of sim file watching API
2011-02-07 12:26:50 -06:00
Andrzej Zaborowski
a7a0cb1ed0
simfs: implement ofono_sim_context api
2011-02-03 13:13:37 -06:00
Aki Niemi
a8112dc1ea
sim: Fix style issues
2011-02-02 11:03:21 +02:00
Marcel Holtmann
bd1e6a2a3a
sim: Remove double empty lines
2011-01-22 11:06:34 +01:00
Jukka Saunamaki
0ef557e766
sim: getters for mcc and mnc implementation
2011-01-20 11:04:00 -06:00
Jukka Saunamaki
da535d1288
sim: store mcc and mnc separate from imsi
2011-01-20 11:03:43 -06:00
Jeevaka Badrappan
2b8a358601
sim: fix issue with sizeof call
...
In some compilers, sizeof the functional argument is
not returning the actual sizeof the argument.
2011-01-17 17:05:26 +01:00
Denis Kenzior
a4675c50aa
sim: Minor style fixes
2011-01-10 15:42:24 -06:00
Lucas De Marchi
99dd118c5b
sim: query remaining pin retries
...
Check the remaining pin retries after each operation that might have
changed it, i.e. locking, unlocking, reseting or changing pin.
2011-01-10 15:38:59 -06:00
Andrzej Zaborowski
bb9e26f2a5
sim: Set sane number len in empty EFmsisdn records
...
Valid number length range is 1 - 11 bytes, other values, such as 0xff,
could potentially crash external parsers.
2010-12-21 14:25:09 -06:00
Jeevaka Badrappan
a8c94c044f
sim: fix minor issue in ofono_sim_get_phase
2010-12-12 04:37:52 -06:00
Jeevaka Badrappan
5154d5e38d
sim: be more paranoid for triggering EFest read
2010-11-29 14:57:04 -06:00
Lucas De Marchi
b210838e87
core: explicitly compare pointers to NULL
...
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>
2010-11-29 13:27:15 -06:00
Rémi Denis-Courmont
e7c4442c69
core: Remove stray newlines in messages sent to log
2010-11-26 13:50:15 -06:00
Jeevaka Badrappan
2d0cb92155
src: coding style fixes - rule M6
2010-11-22 05:07:52 -06:00
Andrzej Zaborowski
3083841f72
sim: Add sim_service_available()
...
This is meant to query EFsst or EFust.
The function is not public api because the service constants are in
src/simutil.h.
2010-11-10 09:09:05 -06:00
Denis Kenzior
d7403d521b
sim: Check both EFust and EFest for FDN & BDN
...
We were checking EFest only for whether BDN and FDN were enabled.
According to 31.102 Section 5.3.2 we should be checking both EFust
(availability of the service) and EFest (whether it is enabled)
2010-11-05 09:14:32 -05:00
Denis Kenzior
e613c686a6
sim: Don't read EFest if the file is not available
2010-11-05 09:14:32 -05:00
Guillaume Lucas
aa2c87886f
sim: use mask for check of sim file status
...
It is the first bit of the sim file status who indicates if a file
is valid or not. So a mask must be used to check this.
2010-11-05 09:14:32 -05:00
Denis Kenzior
dc43b56154
sim: Fix minor style issue
2010-10-25 10:39:09 -05:00
Jeevaka Badrappan
233bd42820
sim: add barred dialing support
2010-10-25 10:39:09 -05:00
Denis Kenzior
107a38de85
sim: Pass dbus types
...
Can't really assume they're the same as glib types
2010-10-22 11:58:59 -05:00
Denis Kenzior
8b40f6c1a0
sim: Get rid of unneeded empty line
2010-10-22 11:57:18 -05:00
Denis Kenzior
39a3080a4b
sim: Break out common FDN property signaling
2010-10-22 11:56:35 -05:00
Petteri Tikander
7de5e48df8
sim: check existence of imsi-code
...
For instance: when handling sim_get_properties
in PRE_SIM-state imsi is not received/stored.
2010-10-22 11:23:08 -05:00
Petteri Tikander
d82600c893
sim: check if Fixed Dial is enabled in SIM-card
...
If SIM-card is inserted, status is checked from EFsst
(is FDN activated) and EFadn (is ADN invalidated).
If USIM-card is inserted, status is checked from EFest
(is FDN activated).
If FD is enabled, halt SIM initialization procedure.
New property (FixedDialing) is added. If FD is enabled,
this has been signalled via DBUS.
2010-10-22 11:21:23 -05:00
Denis Kenzior
b92662634d
sim: Read EFust and EFest after phase is known
2010-10-19 14:20:57 -05:00
Denis Kenzior
04755acc3a
sim: Fix setting the correct phase from EFphase
2010-10-19 14:07:41 -05:00
Denis Kenzior
0564176a9c
sim: Fix crash on sim re-insertion
2010-10-15 06:26:34 -05:00
Denis Kenzior
a4d90fd4eb
sim: Refactor iidf reading
...
Get rid of image_data since it can lead to potential memory leaks when
sim is removed while the IIDF operations are in progress.
2010-10-13 08:41:41 -05:00
Denis Kenzior
ccf4b34522
sim: Use ay return signature for GetIcon
2010-10-13 05:04:47 -05:00
Denis Kenzior
56e0a7644f
simfs: Reflow to get rid of unnecessary label
2010-10-13 05:04:46 -05:00
Denis Kenzior
90f531768f
sim: Use g_dbus_create_reply
...
Instead of compound statements
2010-10-13 05:04:46 -05:00
Denis Kenzior
b750de3ec6
sim: Don't re-check for id != 0
...
We already check the id is valid in the get_icon function, there's no
reason to re-check it.
2010-10-13 05:04:46 -05:00
Kristen Carlson Accardi
42c29c795f
sim: implement GetIcon
2010-10-13 05:04:46 -05:00
Jeevaka Badrappan
4196182770
Fix multi-line comment style issues
2010-09-21 21:16:01 -05:00
Denis Kenzior
cd8df455e1
sim: Use sim_fs_check_version
2010-09-09 08:50:29 -05:00
Denis Kenzior
5754eaf7e9
sim: Break out sim file reading into simfs
2010-09-09 08:50:28 -05:00
Denis Kenzior
e3bd339e16
sim: Unify sim_read and sim_read_bytes
2010-09-09 08:50:28 -05:00
Kristen Carlson Accardi
95d957b62e
sim: read EFiidf
...
EFiidf can be larger than 256 bytes, so allow callers to read
portions of the EFiidf from a specified offset. Cache EFiidf
files as blocks of 256 bytes so that it's not necessary to
read the entire (potentially large) file.
2010-09-09 08:45:32 -05:00
Denis Kenzior
4b43650116
sim: cleanup sim atom private structure
...
The number of elements was getting out of hand and out of order
2010-09-01 12:06:59 -05:00
Denis Kenzior
0cf73b73eb
sim: tweak efimg length
2010-09-01 12:06:56 -05:00
Yang Gu
d43b2c0a61
sim: Read EFsst
2010-08-31 13:07:54 -05:00
Denis Kenzior
4292b2dbed
sim: Turn around the order of arguments
...
The void *user argument was first. It should be last instead to be
consistent with the other watch functions.
2010-08-30 14:29:34 -05:00
Kristen Carlson Accardi
d3eb346b40
sim: read EFimg
2010-08-26 18:40:12 -05:00
Denis Kenzior
74a88dda81
sim: Check PIN even if no EFli / EFpl not read
2010-08-25 10:00:09 -05:00
Denis Kenzior
687e171949
sim: Retrieve EFphase according to the spec
2010-08-23 14:29:22 -05:00
Denis Kenzior
38300af0da
sim: Reorder SIM initialization
2010-08-23 14:29:22 -05:00
Denis Kenzior
cbf783c334
sim: Reset mnc_length when removing SIM
...
In case the next SIM doesn't have it or something else weird happens.
2010-08-23 14:29:22 -05:00
Denis Kenzior
f78eaf94cf
sim: Update the SIM initialization comment
2010-08-23 14:29:22 -05:00
Denis Kenzior
fc70af8ea1
sim: Minor style fix
2010-08-23 14:29:21 -05:00
Yang Gu
c679babdc5
sim: Read EFust and EFest
2010-08-23 14:29:21 -05:00
Denis Kenzior
8eb9425f32
sim: Use less space for locked_pins
...
Use only as required, since we only track PINs in this one, not PUKs
2010-08-05 10:19:04 -05:00
Denis Kenzior
764afde1fe
sim: Fix LockedPins in case SIM wants a PUK first
...
In the case that oFono is started with the SIM asking for a PUK, we
don't report LockedPins properly.
2010-08-05 10:00:57 -05:00
Marcel Holtmann
1fedd096a0
Check sanity the MNC length value from the SIM card
...
In case the SIM entry is wrong or we force reading of it, nasty things
like this can happen:
ofonod[12456]: Control:> AT+CRSM=176,28589,0,0,4\r
ofonod[12456]: Control:< +CRSM: 144,0,"00FFFF"\r\n\r\nOK\r\n
*** buffer overflow detected ***: ./src/ofonod terminated
======= Backtrace: =========
/lib64/libc.so.6(__fortify_fail+0x37)[0x3e42efb417]
/lib64/libc.so.6[0x3e42ef9310]
/lib64/libc.so.6(__strncpy_chk+0x17b)[0x3e42ef85cb]
2010-06-22 17:21:03 +02:00
Denis Kenzior
f2f5810942
sim: move ServiceDiallingNumbers to ServiceNumbers
...
In line with the API documentation
2010-05-27 14:58:29 -05:00
Denis Kenzior
73bfae4f46
sim: Read EFiccid after EFphase
2010-05-19 23:48:34 -05:00
Denis Kenzior
bbd6a1d48a
sim: No need for this define
2010-05-19 23:47:41 -05:00
Daniel Wagner
b338033307
Read EF_ICCID property of SIM
...
Tested with phonesim.
2010-05-19 23:41:03 -05:00
Denis Kenzior
50264a311d
Style: Proper indentation
2010-04-15 16:49:42 -05:00
Andrzej Zaborowski
aad4d0de78
Add Sim Toolkit atom
...
- Add ofono_stk atom in stk.c
- Move envelope command from sim driver to stk driver
2010-04-15 16:49:40 -05:00
Denis Kenzior
228e1e735c
Fix: Minor style issues
2010-04-15 16:49:40 -05:00
Denis Kenzior
c63b2c9d44
Fix: Uncomplicate the logic for SIM initialization
...
If we get a sim inserted notify before we are registered, we need to
initialize the SIM once ofono_sim_register is called. The logic for
doing so is rather twisted, simplify it.
2010-04-15 16:49:40 -05:00
Andrzej Zaborowski
6dc4799d1b
Add SIM "Present" property.
2010-04-15 16:49:40 -05:00
Andrzej Zaborowski
ddfe8acf11
Drivers can notify core of SIM insertion / removal
...
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.
2010-04-15 16:49:40 -05:00
Andrzej Zaborowski
22cbe98146
Extend sim-ready watch with card insert/eject
2010-04-15 16:49:40 -05:00
Andrzej Zaborowski
42ef218668
Use stkutil named constants in sim.c
2010-03-31 13:06:14 -05:00
Denis Kenzior
9390dbaf31
Refactor: Remove MobileNetworkCodeLength property
...
Replaced by MNC/MCC properties which is more intuitive for use by
external applications.
2010-03-25 10:21:37 -05:00
Denis Kenzior
a5d54581ad
Move sim manager interface definition to dbus.h
2010-03-22 15:39:13 -05:00