Commit Graph

2441 Commits

Author SHA1 Message Date
Marcel Holtmann 674cb0d167 sim: Add extra errors for EFmsisdn and EFad length mismatches 2012-06-25 00:00:45 -07:00
Denis Kenzior 72ce19bf3e sim: Fix use of uninitialized values
In the case of an error, sim_pin_query_cb should not assume the
pin_type value is valid.
2012-06-19 12:59:42 -05:00
Denis Kenzior d69269b77f sim: Don't re-init the SIM needlessly
When calling ChangePin with the wrong original PIN, we're still left in
the READY state.  Do not re-initialize the SIM needlessly in this case.
2012-06-19 12:54:37 -05:00
Denis Kenzior 4d49f5cd34 ussd: send NotRecognized error for invalid USSD 2012-06-18 09:23:20 -05:00
Denis Kenzior d18414b918 dbus: Add NotRecognized error 2012-06-18 09:21:32 -05:00
Denis Kenzior 333bb8b1d3 common: Match logic to comment: valid_ussd_string 2012-06-18 08:59:04 -05:00
Denis Kenzior cb571f807f simutil: Add entry for EFimsi 2012-06-17 08:11:15 -05:00
Denis Kenzior bc38ef91cd sim: Allow IMSI to be obtained via EF reads 2012-06-17 08:01:04 -05:00
Denis Kenzior 2b606f548c stk: Fix crash when envelope returns sync
ofonod[13066]: src/stk.c:stk_select_item()
ofonod[13066]: src/stk.c:stk_select_item()
ofonod[13066]: src/stk.c:stk_send_envelope()
ofonod[13066]: drivers/qmimodem/stk.c:qmi_envelope()
ofonod[13066]: src/stk.c:envelope_cb() length 0
ofonod[13066]: src/stk.c:menu_selection_envelope_cb()
ofonod[13066]: Sending Menu Selection to UICC failed
process 13066: arguments to dbus_message_new_error() were incorrect,
assertion "reply_to != NULL" failed in file dbus-message.c line 1333.
This is normally a bug in some application using the D-Bus library.
  D-Bus not built with -rdynamic so unable to print a backtrace
  ofonod[13066]: Aborting (signal 6) [./src/ofonod]
  ofonod[13066]: ++++++++ backtrace ++++++++
2012-06-16 23:22:04 -05:00
Denis Kenzior e0e6e2c439 sim: Revert adding special callback for EFiccid
This reverts commit 1960dbbc79.
2012-06-16 09:50:05 -05:00
Denis Kenzior a8247d17af sim: Revert adding special callback for EFmsisdn
This reverts commit c3124b66d9.
2012-06-16 09:50:05 -05:00
Denis Kenzior bee063dd76 sim: Revert adding special callback for EFad
This reverts commit 5522df64fa.
2012-06-16 09:50:05 -05:00
Denis Kenzior 7362e6a802 cdma-sms: Update to the new API declaration 2012-06-16 09:50:05 -05:00
Marcel Holtmann 543db63f19 gprs: Use ofono_bool_t instead of gboolean 2012-06-17 22:23:23 -07:00
Marcel Holtmann 2ead77e133 sms: Make PDU data arrays const 2012-06-17 00:58:35 -07:00
Marcel Holtmann 67c6a01d46 modem: Add function for setting new driver type 2012-06-17 00:58:08 -07:00
Marcel Holtmann 5522df64fa sim: Add special callback for reading MCC and MNC value 2012-06-16 21:30:28 -07:00
Marcel Holtmann c3124b66d9 sim: Add special callback for reading MSISDN value 2012-06-16 20:52:18 -07:00
Marcel Holtmann 1960dbbc79 sim: Add special callback for reading ICCID value 2012-06-16 20:22:30 -07:00
Marcel Holtmann 10297b153a sim: Use ofono_bool_t instead of gboolean 2012-06-16 20:08:10 -07:00
Philippe Nunes a571d2887b call-settings: Return specific errors for SS 2012-05-30 09:06:13 -05:00
Philippe Nunes 308e99dc19 call-forwarding: Return specific errors for SS 2012-05-30 09:05:57 -05:00
Philippe Nunes c935817653 call-barring: Return specific errors for SS 2012-05-30 09:05:39 -05:00
Philippe Nunes 07a2e70283 dbus: Add __ofono_error_from_error utility function 2012-05-30 09:03:23 -05:00
Denis Kenzior 21369944ad sms: Fix GetMessages argument / return signature 2012-05-30 09:00:32 -05:00
Philippe Nunes 1f4e339a13 dbus: Add new error types 2012-05-30 00:22:50 -05:00
Philippe Nunes 761f16394d common: Fix typos in error strings 2012-05-30 00:21:58 -05:00
Marcel Holtmann c98de2a4bf build: Remove dependency on libcap-ng 2012-05-29 08:17:01 +02:00
Lucas De Marchi e0d6f9f0ce Do not set signature and reply in GDBus tables
Use GDBUS_* macros, so signature and reply fields are not set in each
method/signal.
2012-05-20 02:47:57 -07:00
Lucas De Marchi b3489f2ee8 Convert GDBus methods to use macro helpers
With these macro helpers we can separate in/out arguments and use their
own vector.
2012-05-20 02:47:57 -07:00
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
Oleg Zhurakivskyy aa8e11bed6 call-forwarding: Remove unneeded variable 2012-04-23 15:39:35 -05:00
Oleg Zhurakivskyy 6356612822 call-forwarding: Streamline set_query_cf_callback() 2012-04-23 15:39:27 -05:00
Oleg Zhurakivskyy 9d8aa928b8 call-forwarding: Refactor cf_find_unconditional() 2012-04-23 15:35:22 -05:00
Oleg Zhurakivskyy d797a868c0 call-forwarding: Streamline cf_find_timeout() logic 2012-04-23 15:33:44 -05:00
Oleg Zhurakivskyy e67a7fb913 call-forwarding: Get rid of extra variable 2012-04-23 15:32:12 -05:00
Denis Kenzior bed9f4e09b call-forwarding: Make cf_cond_find more readable 2012-04-23 15:31:29 -05:00
Oleg Zhurakivskyy e53723e3c6 call-forwarding: Refactor cf_condition_find_with_cls() 2012-04-23 15:27:47 -05:00
Oleg Zhurakivskyy 9b37eefdb7 call-forwarding: Refactor cf_condition_compare() 2012-04-23 15:21:17 -05:00
Marcel Holtmann 4ce0034803 modem: Add missing empty line 2012-04-12 12:09:32 +02:00
Frédéric Danis 004c8200aa voicecall: Force callheld update after calls swap
In HFP spec, a callheld indicator update should be sent after swapping
calls, even if it stays to 1 (AG has both active and held calls).
2012-03-20 19:26:24 -05:00
Frédéric Danis 1f3935429d emulator: Force indicator event implementation 2012-03-20 19:20:22 -05:00
Oleg Zhurakivskyy 65898b34b8 call-forwarding: Inline get_query_next_cf_cond() 2012-03-19 13:33:41 -05:00
Oleg Zhurakivskyy 021b2145d4 call-forwarding: Remove cf_list_clear()
Use g_slist_free_full() instead.
2012-03-19 13:33:10 -05:00
Frédéric Danis 0efaa9975a voicecall: Improve transitions check
Indicators should not be updated if:
- multiple separate calls are active at same time
- a conf call and a call are active at same time
- multiple separate calls are held at same time
- a conf call and a call are held at same time
- a conf call has call in active and held state
2012-03-13 21:44:15 -05:00
Denis Kenzior f8812ceb23 voicecall: Don't set indicators during transitions 2012-03-07 06:17:06 -06:00
Frédéric Danis 033e518cd4 emulator: fix notify_ring
notify_ring should not use information from waiting call
2012-03-07 06:16:51 -06:00
Denis Kenzior 8b3c9e38a5 call-forwarding: Fix various style issues 2012-02-22 07:17:27 -06:00
Oleg Zhurakivskyy a5372acb1a call-forwarding: Minor code refactoring 2012-02-22 07:05:14 -06:00
Oleg Zhurakivskyy 69453afe9e call-forwarding: Emit signals when cfu is toggled
Emit signals to mask/unmask conditional cfs on cfu
activation/deactivation.
2012-02-22 06:56:58 -06:00
Oleg Zhurakivskyy 0dc3515af4 call-forwarding: Update conditional reporting logic
Don't report conditional cfs when cfu is active
2012-02-22 04:52:14 -06:00
Oleg Zhurakivskyy e4488eef1a call-forwarding: Update conditional setting logic
Due to how the quiescent behavior of conditional call forwarding rules
when CFU is active, do not allow the user to try and set conditional
rules.  This will fail at the network level anyway.
2012-02-22 04:29:16 -06:00
Oleg Zhurakivskyy 12076487aa call-forwarding: Refactoring of is_cfu_enabled()
This also removes the need for uninitialized_var() macro.
2012-02-22 04:24:18 -06:00
Oleg Zhurakivskyy 07adce67e0 call-forwarding: Minor style fixes 2012-02-22 04:23:50 -06:00
Marcel Holtmann 781db98530 location-reporting: Remove a few more empty lines 2012-02-16 09:54:05 +01:00
Marcel Holtmann 179a2e7d7c location-reporting: Fix some minor style issues 2012-02-16 09:43:28 +01:00
Marcel Holtmann 5fb0594750 network: Add debug for signal strength updates 2012-02-16 08:11:35 +01:00
Marcel Holtmann 1f42acc86e network: Add debug for network registration status updates 2012-02-11 07:00:49 +01:00
Frédéric Danis a035f8b0e2 voicecall: Fix emulator AT+CHUP for HFP
AT+CHUP should be able to hang-up active or incoming calls
2012-02-09 14:21:51 -06:00
Denis Kenzior 3805cd91c7 stkutil: Make valgrind happy
==29809== Conditional jump or move depends on uninitialised value(s)
==29809==    at 0x4E826C: stk_file_iter_next (stkutil.c:212)
==29809==    by 0x4E8CF8: parse_dataobj_file_list (stkutil.c:635)
==29809==    by 0x4EBA29: parse_dataobj (stkutil.c:2410)
==29809==    by 0x4ECFB5: parse_refresh (stkutil.c:2971)
==29809==    by 0x4EECA3: parse_command_body (stkutil.c:3826)
==29809==    by 0x4EF0DF: stk_command_new_from_pdu (stkutil.c:3948)
==29809==    by 0x4D50DA: ofono_stk_proactive_command_handled_notify
(stk.c:2885)
2012-02-02 09:17:04 -06: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
Denis Kenzior ae5829e984 modem: Use __ofono_atom_find
Also remove defunct comment about registered status
2012-01-18 13:01:16 -06:00
Denis Kenzior d218070689 stk: find_atom only returns registered atoms
This seems to be an oversight from an earlier refactoring.
2012-01-18 12:58:20 -06:00
Denis Kenzior 65393a2fb3 sms: Don't need the sim member now 2012-01-18 12:55:02 -06:00
Denis Kenzior be914cd32a cbs: finding SIM atom seems to not necessary now 2012-01-18 12:52:01 -06:00
Denis Kenzior ae14a3056a stk: Use __ofono_atom_find 2012-01-18 12:50:55 -06:00
Denis Kenzior 878573b831 gprs: Use __ofono_atom_find 2012-01-18 12:36:37 -06:00
Denis Kenzior cd3edbf984 cdma-connman: Use __ofono_atom_find 2012-01-18 12:21:36 -06:00
Denis Kenzior 15ef5861c5 voicecall: Use __ofono_atom_find 2012-01-18 12:21:36 -06:00
Denis Kenzior 688a788da5 ussd: Use __ofono_atom_find 2012-01-18 12:21:36 -06:00
Denis Kenzior 7e426f96cc emulator: Use __ofono_atom_find 2012-01-18 12:21:36 -06:00
Denis Kenzior 2ad5db2e99 call-forwarding: Use __ofono_atom_find 2012-01-18 12:21:36 -06:00
Denis Kenzior 45402f797b sms: Use __ofono_atom_find 2012-01-18 12:21:34 -06:00
Denis Kenzior dc93f5dbe0 cbs: Use __ofono_atom_find macro 2012-01-18 12:21:33 -06:00
Denis Kenzior 12e481104d network: Use __ofono_atom_find macro 2012-01-18 12:21:33 -06:00
Denis Kenzior 3757fe01f2 message-waiting: Use __ofono_atom_find macro 2012-01-18 12:21:33 -06:00
Denis Kenzior 74d545d8f4 ofono: Add __ofono_atom_find macro 2012-01-18 12:21:30 -06:00
Oleg Zhurakivskyy e04f0ef027 network: Access SPN directly from the sim atom 2012-01-18 10:44:54 -06:00
Oleg Zhurakivskyy 810bd2aa2e sim: Add ofono_sim_get_spn() implementation 2012-01-18 10:42:59 -06:00
Denis Kenzior 137c602351 network: Optimize away one unneeded assignment 2012-01-18 10:41:43 -06:00
Oleg Zhurakivskyy 0f79546eaf network: Use sim SPN watch API 2012-01-18 10:38:51 -06:00
Denis Kenzior b5d6d835fa gprs: Trivial code reflow 2012-01-18 10:33:56 -06:00
Oleg Zhurakivskyy 9ebdfe29db gprs: Use sim SPN watch API 2012-01-18 10:26:03 -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
Denis Kenzior 28af056870 modem: Tweak produced path
For drivers that contain digits at the end the currently produced
path can be somewhat confusing.
2012-01-07 13:23:32 -06:00
Philippe Nunes 21e57a5d36 cdma-netreg: Add provider name and SID support 2012-01-07 12:49:25 -06:00
Philippe Nunes 1c239b3fca cdma-provision: Add driver APIs implementation 2012-01-07 12:39:58 -06:00
Philippe Nunes 4683789b8e ofono.h: add API to get cdma provider name 2012-01-07 12:39:52 -06:00
Jussi Kukkonen d9a76824ba sim: fix "network" is pin type for "networkpuk" 2012-01-01 18:17:36 -06:00
Oleg Zhurakivskyy 60976f1357 gprs: Minor whitespace and style fixes 2011-12-28 16:07:48 -06:00
Denis Kenzior d1d674004f sim: Fix not creating simfs context in some cases 2011-12-26 18:03:40 -06:00
Denis Kenzior 6c2f23cd48 network: Refactor CPHS SPN & Short SPN handling 2011-12-16 18:46:27 -06:00
Denis Kenzior 5e62fe711f network: CPHS Short SPN bits do not apply to SPN 2011-12-16 16:38:20 -06:00
Denis Kenzior 70287f87a6 network: Use __ofono_cphs_service_available 2011-12-16 16:30:57 -06:00
Denis Kenzior 40db3b9528 message-waiting: Use new API for CPHS MBDN 2011-12-16 16:10:21 -06:00
Denis Kenzior 748259a275 sim: Add __ofono_sim_cphs_service_available 2011-12-16 09:45:31 -06:00
Denis Kenzior fe7d012c39 simutil: Add util to find CPHS service availability 2011-12-16 09:44:32 -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
Oleg Zhurakivskyy e4e934c368 network: Add CPHS SPN, short-SPN fallbacks 2011-12-16 08:03:58 -06:00
Denis Kenzior 1245664962 network: Guard PNN reading
In a somewhat bizarre case, both PNN and OPL might change, which will
trigger sim_pnn_opl_changed twice.  This can have some funny
side-effects, so don't allow this to happen in the first place.
2011-12-16 08:02:44 -06:00
Denis Kenzior f0d01bdf37 cdma-voicecall: Refactor previous commit 2011-12-15 23:55:12 -06:00
Caiwen Zhang 42c50e2dc3 Add call waiting support in CDMA voice call 2011-12-15 23:44:42 -06:00
Oleg Zhurakivskyy 1dc0597f36 network: Use netreg_emit_operator_display_name()
Redundant in place code removed, netreg_emit_operator_display_name()
is now used consistently everywhere in network.c
2011-12-15 22:57:12 -06:00
Guillaume Zajac aee17dcfe6 cdma-connman: Add dormant_notify implementation 2011-12-08 06:17:45 -06:00
Denis Kenzior 1e052ef1fe network: Split EFspn and EFspdi Refresh handling
If both EFspn and EFspdi are changed, then we trigger reading of EFspn
twice which leads to a memory leak.  Instead, always read EFspdi if the
relevant service is available.

If EFspdi is changed, use a simple heuristic to update the 'Name'
property if appropriate.  This heuristic is not always correct, but in
the worst case we will emit the same name.
2011-12-02 16:00:02 -06:00
Denis Kenzior 6746715715 network: Refactor sim_spdn_spdi_changed 2011-12-02 15:58:35 -06:00
Denis Kenzior 3df763c4cc network: Tweak naming 2011-12-02 14:27:18 -06:00
Denis Kenzior 3ad70ca28c simutil: Minor whitespace fix 2011-12-02 13:01:14 -06:00
Denis Kenzior 2b1bef59cb simutil: Add CPHS SPN & short SPN to EFdb 2011-12-02 13:00:46 -06:00
Oleg Zhurakivskyy c63dc9ac10 simutil: Add CPHS SPN and short-SPN IDs 2011-12-02 12:54:11 -06:00
Oleg Zhurakivskyy 6e60296eed network: Rename spname to spn 2011-12-02 12:53:16 -06:00
Denis Kenzior d1a7c63b95 network: Go back to the original
The code is a little bit more readable and slightly more efficient this
way
2011-12-02 12:52:27 -06:00
Oleg Zhurakivskyy a67bc1a4b0 network: Refactor sim_spn_read_cb()
Refactor sim_spn_read_cb() for CPHS SPN, short-SPN inclusion
2011-12-02 12:44:52 -06:00
Oleg Zhurakivskyy 58fc48c6c4 network: M9 coding style corrections 2011-12-02 12:39:50 -06:00
Guillaume Zajac 7852f25079 simfs: Call callback even if impl isn't provided 2011-11-27 06:03:14 -06:00
Philippe Nunes 97359e7f7b cdma-netreg: Add skeleton sid query implementation 2011-11-24 17:50:17 -06:00
Daniel Wagner 20d33aa924 modem: Add Type property to GetProperties result 2011-11-22 20:38:20 -06:00
Guillaume Zajac 708d12909c cdma-connman: Add public api definition 2011-11-04 15:13:59 -05:00
Denis Kenzior 42eabb6cc8 cdma-connman: Refactor previous commit 2011-11-04 15:13:24 -05:00
Guillaume Zajac 092acfde67 cdma-connman: Check netreg when changing Powered 2011-11-04 14:53:24 -05:00
Denis Kenzior 0e3a73f5a8 dbus: Tweak wording 2011-11-04 14:52:47 -05:00
Guillaume Zajac 2bc86cb96e dbus: Add new D-Bus error message NotRegistered 2011-11-04 14:52:36 -05:00
Guillaume Zajac 7004706c6f cdma-netreg: Implement new public API 2011-10-30 02:13:29 -05:00
Denis Kenzior 2f77d1a3e4 netreg: Fix memory leak in HFP case 2011-10-21 14:02:51 -05:00
Denis Kenzior 6861213024 handsfree: add ofono_handsfree_set_ag_features 2011-10-21 13:56:43 -05:00
Mikel Astiz b6f99b6200 devinfo: avoid crash if query_model not supported 2011-10-21 13:17:50 -05:00
Mikel Astiz c5f7886cf2 handsfree: Implement voice recognition function 2011-10-21 13:13:48 -05:00
Marcel Holtmann ac4c9d7237 core: Some more copyright fixes 2011-10-15 12:21:12 -07:00
Mikel Astiz 03866e30e2 handsfree: Removed ASYNC flag from GetProperties 2011-10-13 13:49:01 -05:00
Mikel Astiz 7b9fa9455c handsfree: Expose RequestPhoneNumber in D-Bus API 2011-10-13 13:20:13 -05:00
Denis Kenzior e32346aa51 handsfree: Don't emit signals if not registered 2011-10-13 13:01:17 -05:00
Mikel Astiz a50e52cdfe handsfree: Copyright statement correction 2011-10-13 12:27:17 -05:00
Denis Kenzior f5d84faf22 voicecall: Make emulator use release_queue 2011-10-12 16:14:06 -05:00
Denis Kenzior 4ced8116a9 voicecall: Fix HangupAll for HFP
HFP does not implement HangupAll natively and most AGs do not support
releasing held calls by id.  Work around this by using hangup active and
then dropping all held calls if no waiting calls exist.  Otherwise
fall back to releasing calls by id.
2011-10-12 16:00:00 -05:00
Marcel Holtmann 7e6afe37bf core: Update copyright information 2011-10-10 13:39:42 -07:00
Marcel Holtmann 98be0dc588 log: Rename program executable variable 2011-10-06 12:20:43 -07:00
Marcel Holtmann 35ea6a5a05 log: Add support for backtrace symbole resolving 2011-10-05 19:41:40 -07:00
Mikel Astiz 6072a98109 handsfree: Implement inband ring settings 2011-09-09 00:30:54 -05:00
Mikel Astiz 8de8e9f0c7 handsfree: Add skeleton implementation 2011-09-09 00:10:06 -05:00
Denis Kenzior 51d0ac1ce4 gprs: Allow NULL context names while provisioning 2011-09-08 23:50:19 -05:00
Denis Kenzior abe97aa939 emulator: Minor style tweaks inside bia_cb 2011-09-08 03:41:07 -05:00
Frédéric Danis 4a8db5985b emulator: add AT+BIA support for HFP 2011-09-08 03:27:37 -05:00
Denis Kenzior cb21b7f442 voicecall: Relax reqs for hangup of held calls
If we have a single held call, then it should be possible to hang it up
with 'Hangup' even if active calls exist.  Only if multiple held calls
or a waiting call exists should we disallow the request due to possible
side-effects.
2011-08-18 19:28:40 -05:00
Denis Kenzior 236f1ffb36 voicecall: Move stuff around 2011-08-18 19:28:20 -05:00
Denis Kenzior ddbacc2dda gprs: Experimental fix for twitchy Huawei firmware 2011-08-18 14:23:04 -05:00
Denis Kenzior ee0c621e54 network: Fix crash with an empty mcc/mnc cops list
Some hardware returns an empty mcc/mnc operator during an operator scan
when no operators are found (e.g. on an LTE dongle in a non-LTE area).
This results in oFono mistaking trying to update a non-existent operator
object.

For reference:
ofonod[27532]: Device: < \r\n+NWSTATEIND: 4\r\n\r\n+COPS:
(0,"","","",255),,(0-4),(0-2)\r\n\r
\nOK\r\n
process 27532: arguments to dbus_message_new_signal() were incorrect,
assertion "_dbus_check_
is_valid_path (path)" failed in file dbus-message.c line 1289.
This is normally a bug in some application using the D-Bus library.
  D-Bus not built with -rdynamic so unable to print a backtrace
2011-08-18 13:51:40 -05:00
Marcel Holtmann 28b0049930 plugin: Use simpler version mismatch error 2011-08-15 16:22:03 -07:00
Marcel Holtmann 652b2d0c43 plugin: Add debug support for external plugins 2011-08-15 16:16:36 -07:00
Marcel Holtmann 1d8ff99f75 log: Use separate function for enable logging 2011-08-15 16:12:26 -07:00
Caiwen Zhang 041f8dbb06 cdma-voicecall: Implement SendTones method 2011-08-15 00:56:29 -05:00
Caiwen Zhang fbf909fad4 cdma-voicecall: Implement SendFlash method 2011-08-15 00:53:59 -05:00
Caiwen Zhang e2be184afb cdma-voicecall: Implement Answer method 2011-08-15 00:50:36 -05:00
Frédéric Danis 0001866186 emulator: fix indicator notification 2011-08-15 00:25:27 -05:00
Marcel Holtmann 1f1544d0be stkagent: Define DBUS_TIMEOUT_INFINITE if undefined 2011-08-15 11:15:20 -07:00
Denis Kenzior d4687e9529 stkagent: Use infinite timeouts
for DisplayActionInformation and DisplayAction
2011-08-14 22:56:45 -05:00
Denis Kenzior c8131fb10e stk: Fix crashes 2011-08-14 22:56:45 -05:00
Denis Kenzior b1fd862273 cdma-netreg: Initialize hdr strength 2011-08-09 13:34:24 -05:00
Denis Kenzior 5c412c1bc4 cdma-netreg: Implement HDR strength updates 2011-08-09 13:13:06 -05:00
Bertrand Aygon 92d4ff44c5 cdma-netreg: Add Strength property support 2011-08-05 10:48:49 -05:00
Bertrand Aygon 8dfd369ba5 cdma-netreg: implement support for Status property 2011-08-05 10:48:49 -05:00
Bertrand Aygon a8bf6e96b6 cdma-netreg: Add initial stub implementation 2011-08-05 10:48:49 -05:00
Marcel Holtmann efcfbe9d9d modem: Add some more debug outputs 2011-07-29 14:30:58 +02:00
Marcel Holtmann e85b17118a main: Print message when starting to shutdown 2011-07-29 14:12:18 +02:00
Marcel Holtmann a159a0f9fc network: Force auto-only mode if manual registration is not supported
If the network registration driver decides to not provide a manual
registration method, then force the mode to auto-only.
2011-07-27 23:54:37 +02:00
Denis Kenzior 968efe08ba stk: Fix missing break statement 2011-07-25 22:59:06 -05:00
Denis Kenzior fe757a5b83 voicecall: Be more paranoid and null terminate 2011-07-25 22:57:08 -05:00
Denis Kenzior 625045dcb1 voicecall: Use defined constants 2011-07-25 22:55:30 -05:00
Denis Kenzior 55279f16c2 stk: Make sure to set cancel_cmd
For handled commands, in case the terminal response is not reported by
the modem, we must set the cancel_cmd variable so the command is
canceled properly.

This patch also modifies the behavior so that pending_cmd is freed,
since stk_proactive_command_cancel expects cancel_cmd to be set if
pending_cmd is not NULL.
2011-07-25 22:45:55 -05:00
Denis Kenzior bb59d39539 stk: Remove code that does nothing 2011-07-25 22:25:05 -05:00
Denis Kenzior 0c42430f2b stk: Fix possible crash
We can't call stk_command_free on a NULL object
2011-07-25 22:21:46 -05:00
Jeevaka Badrappan f837bdc90a stk: Handle set up call in handled_notify 2011-07-25 21:44:55 -05:00
Jeevaka Badrappan 14b003c7d9 voicecall: api for set/clear alpha and icon id 2011-07-25 21:43:04 -05:00
Bertrand Aygon 806389adb2 cdma-connman: fix the set_property Activate reply 2011-07-24 16:50:16 +02:00
Denis Kenzior 4b3796cc6b network: handle hfp operator change correctly 2011-07-22 04:52:12 -05:00
Frédéric Danis c7610c44af voicecall: remove usage of em_atd_number
as emulator atom can only run with a 'ready' SIM,
use saved number instead of em_atd_number
2011-07-21 20:26:43 -05:00
Denis Kenzior 43962ae05b cdma-connman: emit PropertyChanged signal
When Username / Password are changed, we should emit the PropertyChanged
signal
2011-07-21 04:41:34 -05:00
Guillaume Zajac cbeb0a454b cdma-connman: Add Username and Password properties 2011-07-21 04:33:49 -05:00
Denis Kenzior aa58348bbc voicecall: Free settings when sim gets locked out 2011-07-19 15:07:02 -05: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
Frédéric Danis 9751914274 voicecall: close settings when SIM is removed
This also fixes the case where +BLDN uses an invalid number when the SIM
is removed.
2011-07-19 12:09:22 -05:00
Frédéric Danis d3f8eae1ff voicecall: fix callheld indicator for PTS
Fix PTS test TP/TWC/BV-03-I [Call Waiting- Hold Active/Retrieve
Waiting Call or Held].

PTS test fails after receiving intermediate update of callheld indicator
with value 0 (no held call) before it receives update to value 1
(active and held calls). This is due to the non-atomic update of calls
status after call swap (moving first call to active state before moving
second one to hold state).

HFP 1.5 spec specifies that an update of callheld indicator to 1 should
be sent after AT+CHLD=2 command.
As oFono emulator sends +CIEV only if the indicator value changes, we
need to use an intermediate state for callheld indicator (2, all calls on
hold).

So, in case of multiple active calls, or an active call with an active
mutiparty call, force update of callheld indicator to 2.
2011-07-19 11:18:22 -05:00
Jeevaka Badrappan 213d70dca3 stk: Fix crash seen in stk_alpha_id_unset
If there is no default agent, then current agent also will
be NULL. So, call stk_agent_request_cancel only when there is a valid
current agent.
2011-07-15 11:35:13 -05:00
Denis Kenzior fd47c3a502 voicecall: Minor style fix 2011-07-14 19:58:32 -05:00
Denis Kenzior e825cf3ee4 voicecall: dial_request_user_cancel is not safe
It is not safe to call dial_request_user_cancel directly.  This is
because there might be a situation where the SIM requested the calls to
be dropped first.  If we're still executing the release_all_active
request and someone calls hangup -> crash.

Instead it is safer to throttle the hangup requests until the call is
actually dialing.

In similar fashion, we should not allow hanging up a specific call if a
dial request is active, unless that call is part of the SIM dial
request.  Note that by default this is not known until the driver's dial
implementation returns and the call is in the dialing (or alerting /
connected) state.
2011-07-14 19:15:53 -05:00
Denis Kenzior 70df9939db voicecall: Send busy to DBus if emulator is pending 2011-07-14 18:28:37 -05:00
Denis Kenzior 688258a7c6 voicecall: Don't send response to defunct emulator 2011-07-14 18:28:37 -05:00
Denis Kenzior b0566f0bb7 voicecall: Throttle emulators
Make sure that only a single request from (possibly multiple) emulators
is ever sent to the voicecall driver.  In the beginning it wasn't clear
whether this will be necessary, however several command implementations
already implemented basic throttling (+CHUP, ATD, CHLD=3, CHLD=2x) and
it made sense to make this more formal.

The other constraint is the abrupt removal of the emulator atom while an
operation is pending.  This case must be handled gracefully.  See next
commit.
2011-07-14 18:28:33 -05:00
Denis Kenzior 2ff685ac54 voicecall: Minor style fixes 2011-07-14 18:25:31 -05:00
Frédéric Dalleau f403f71573 voicecall: manage multiparty list in AT+CHLD=2X 2011-07-14 18:25:31 -05:00
Frédéric Dalleau 90311a6313 voicecall: manage multiparty list in AT+CHLD=3 2011-07-14 18:25:31 -05:00
Denis Kenzior 5179489b11 voicecall: Minor style fix 2011-07-14 18:25:31 -05:00
Denis Kenzior a4cfed9eae emulator: Make the logic a bit more readable 2011-07-06 04:16:16 -05:00
Frédéric Danis 8c64487098 emulator: fix CCWA for PTS
During test TP/TCA/BV-05-I [Terminate Ongoing Call – While Call Waiting]
PTS fails if multiple +CCWA are sent (waiting for 1st phone number when
waiting one becomes incoming, intead of 2nd phone number).
So, send only 1 +CCWA.

Update RING timer management to be started as soon as an incoming call
exists, and retrieve +CLIP info for incoming or waiting call (in case
of waiting call becoming incoming call, call indicator changes before
internal call status is updated)

Force to send +CCWA (if needed) on reception of AT+CCWA=1
2011-07-06 04:16:12 -05:00
Andrzej Zaborowski 045ac8cf94 stk: Use the right command pointer 2011-07-06 04:14:47 -05:00
Marcel Holtmann b63c34adcf main: Move signalfd setup in its own function 2011-07-01 21:33:16 -07:00
Marcel Holtmann 0ca2a09f34 stkutil: Fix alignment issue with channel data length 2011-06-30 19:32:46 -07:00
Marcel Holtmann 6a183627f5 stkutil: Fix alignment issue with building event list 2011-06-30 19:32:11 -07:00
Marcel Holtmann 263e554d53 stkutil: Add missing call to va_end() 2011-06-30 17:33:59 -07:00
Guillaume Zajac cc2d6bb1f4 emulator: Use ACFC and PFC by default 2011-06-29 00:33:57 -05:00
Philippe Nunes 00bd7f8735 stk: Remove deprecated structure 2011-06-29 00:02:43 -05:00
Frédéric Danis ba81abed67 voicecall: add ATD> support for HFP emulator 2011-06-21 12:08:25 -05:00
Frédéric Danis a79546eaf4 message-waiting: API to retrieve voicemail number 2011-06-21 12:07:23 -05:00
Frédéric Danis b22b0ab57b emulator: fix local HFP AG features 2011-06-20 04:21:51 -05:00
Frédéric Danis 3bcaa862f8 voicecall: add +BLDN support for HFP emulator 2011-06-16 06:23:14 -05:00
Frédéric Danis d3322b3510 voicecall: add ATD support for HFP emulator 2011-06-16 06:22:20 -05:00
Nicolas Bertrand 51aee138de call-settings: fix typo 2011-06-16 03:55:58 -05:00
Frédéric Danis 2de3a97495 emulator: fix request tests 2011-06-15 09:20:44 -05:00
Dara Spieker-Doyle 388fe2f45a cdma-voicecall: Fix for crash when unregistering atom 2011-06-12 17:47:27 -05:00
Denis Kenzior 03a6bb8bec cdma-smsutil: Fix uninitialized var on gcc >= 4.5 2011-06-05 22:17:58 -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 ea07cbfa1b gprs: Unify logic inside registration_status_cb
And delay reseting the ATTACHING flag until we had a chance to query the
CGREG status.
2011-06-02 15:56:18 -05:00
Denis Kenzior 9ff1b9f2c5 emulator: Don't try to release in case of error 2011-06-01 21:50:02 -05:00
Frédéric Danis b230549b43 voicecall: save last dialed number 2011-06-01 20:26:41 -05:00
Frédéric Danis 3b12d765bb voicecall: create generic dial function
split manager_dial between generic and dbus parts
2011-06-01 19:34:07 -05:00
Denis Kenzior cdb98a70d0 stk: Cancel pending DTMF tones if session is ended
The Send DTMF command is special in its use of DisplayAction method of
STK agent.  This allows the user to send a 'User Terminated Session'
response to the SIM.  If the user performs this action, then any pending
DTMFs should also be canceled as soon as possible.
2011-05-31 23:31:41 -05:00
Philippe Nunes 4c2d897614 stk: simplify respond_on_exit flag handling
respond_on_exit flag is set by commands which are dispatched to the
agent, so that if the agent exits prematurely, a 'User Terminated
Session' response is sent to the SIM.

There were a couple of corner cases not quite handled correctly:

- During Set Up Call, if the user confirmation phase succeeded and the
  call was dispatched to voicecall atom successfully, and the agent
  exited at this point, then no terminal response would be sent until
  the call succeeded / failed.  Now the agent termination results in an
  'User Terminated Session' response being sent immediately, but the
  call setup proceeding.
2011-05-31 18:43:04 -05:00
Denis Kenzior d80698f25d netreg: Remove unused variable 2011-05-31 11:32:56 -05:00
Marcel Holtmann e861d1369a smsutil: Mark variable properly as unused 2011-05-29 11:55:48 -07:00
Denis Kenzior 551f53fa29 emulator: Fix make distcheck 2011-05-25 10:01:16 -05:00
Marcel Holtmann f13bedd9dc smsutil: Fix missing error handling for strtol function 2011-05-27 09:48:45 -07:00
Denis Kenzior 4f7027de6f emulator: Reflow ato implementation logic 2011-05-25 04:54:41 -05:00
Guillaume Zajac a65cc631ea emulator: add ATO implementation 2011-05-25 04:52:53 -05:00
Denis Kenzior 375a32e1f3 emulator: Make sure to cleanup on forceful exit 2011-05-24 13:45:36 -05:00
Denis Kenzior 4f7a2c06fd emulator: simplify ath callback 2011-05-24 13:45:26 -05:00
Denis Kenzior 42bed7b16a emulator: Update to the new GAtPPP API 2011-05-24 12:34:32 -05:00
Denis Kenzior a8e58a5f39 emulator: Send a NO CARRIER where appropriate 2011-05-24 12:11:01 -05:00
Denis Kenzior c54cdecc12 emulator: Get rid of return at the end of func 2011-05-24 12:11:01 -05:00
Denis Kenzior 831e5ac4ec emulator: optimize request_private_network_cb flow 2011-05-24 12:11:01 -05:00
Guillaume Zajac 5021c1ee46 emulator: add request/release private network calls 2011-05-24 12:11:01 -05:00
Guillaume Zajac 3f58ff93d8 private-network: add initial implementation 2011-05-24 12:11:01 -05:00
Lei Yu 257d5a9330 cdma-sms: Add CDMA SMS Support 2011-05-24 11:58:41 -05:00
Lei Yu d7ab83a50f cdma-sms: Add CDMA SMS Support 2011-05-24 11:55:18 -05:00
Frédéric Dalleau 871dd70833 voicecall: remove unnecessary local var 2011-05-24 11:47:47 -05:00
Frédéric Dalleau a3998f46e2 voicecall: add +VTS support for HFP emulator 2011-05-22 06:06:39 -05:00
Gustavo F. Padovan fba5050f7f simutil: remove set but not used var 2011-05-20 15:06:07 -05:00
Gustavo F. Padovan fe4b81d69a gprs: remove set but not used var 2011-05-20 15:04:59 -05:00
Gustavo F. Padovan 39f23f6fe1 sms: remove set but not used var 2011-05-20 15:03:49 -05:00
Frédéric Dalleau de2b26c906 voicecall: fix CHLD support reply 2011-05-16 23:37:59 -05:00
Denis Kenzior 543b54a34e gprs: Make sure to clean up interfaces
When going down, it is sometimes possible for us not to ifconfig down
the interface or reset the MMS context IPv4 address propertly
2011-05-11 13:29:33 -05:00
Denis Kenzior 652f2963ae simfs: Fix error reported by valgrind
==20365== Invalid read of size 8
==20365==    at 0x4B3501: sim_fs_free (simfs.c:114)
==20365==    by 0x493CEC: sim_remove (sim.c:2485)
==20365==    by 0x4703D7: modem_change_state (modem.c:410)
==20365==    by 0x470664: set_powered (modem.c:848)
==20365==    by 0x4706BA: __ofono_modem_shutdown (modem.c:2137)
==20365==    by 0x46F2C5: signal_cb (main.c:76)
==20365==    by 0x52F555E: g_io_unix_dispatch (giounix.c:166)
==20365==    by 0x52A0AAB: g_main_dispatch (gmain.c:2440)
==20365==    by 0x52A203B: g_main_context_dispatch (gmain.c:3013)
==20365==    by 0x52A2501: g_main_context_iterate (gmain.c:3091)
==20365==    by 0x52A2C98: g_main_loop_run (gmain.c:3299)
==20365==    by 0x46F0D3: main (main.c:243)
==20365==  Address 0x63ff998 is 8 bytes inside a block of size 16 free'd
==20365==    at 0x4C2612D: free (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==20365==    by 0x52AA4A1: g_free (gmem.c:263)
==20365==    by 0x52C433D: g_slice_free1 (gslice.c:907)
==20365==    by 0x52C58D0: g_slist_free_1 (gslist.c:192)
==20365==    by 0x52C5C5F: g_slist_remove (gslist.c:465)
==20365==    by 0x4B342A: sim_fs_context_free (simfs.c:192)
==20365==    by 0x4B3500: sim_fs_free (simfs.c:117)
==20365==    by 0x493CEC: sim_remove (sim.c:2485)
==20365==    by 0x4703D7: modem_change_state (modem.c:410)
==20365==    by 0x470664: set_powered (modem.c:848)
==20365==    by 0x4706BA: __ofono_modem_shutdown (modem.c:2137)
==20365==    by 0x46F2C5: signal_cb (main.c:76)
2011-05-11 12:29:59 -05:00
Denis Kenzior 993acd4132 simfs: Fix issue reported by valgrind
==20287== Invalid read of size 4
==20287==    at 0x52B5C6B: g_queue_peek_nth_link (gqueue.c:704)
==20287==    by 0x52B5F57: g_queue_peek_nth (gqueue.c:848)
==20287==    by 0x4B33ED: sim_fs_context_free (simfs.c:170)
==20287==    by 0x4B34F8: sim_fs_free (simfs.c:116)
==20287==    by 0x493CEC: sim_remove (sim.c:2485)
==20287==    by 0x4703D7: modem_change_state (modem.c:410)
==20287==    by 0x470664: set_powered (modem.c:848)
==20287==    by 0x4706BA: __ofono_modem_shutdown (modem.c:2137)
==20287==    by 0x46F2C5: signal_cb (main.c:76)
==20287==    by 0x52F555E: g_io_unix_dispatch (giounix.c:166)
==20287==    by 0x52A0AAB: g_main_dispatch (gmain.c:2440)
==20287==    by 0x52A203B: g_main_context_dispatch (gmain.c:3013)
==20287==  Address 0x63fae70 is 16 bytes inside a block of size 24
free'd
==20287==    at 0x4C2612D: free (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==20287==    by 0x52AA4A1: g_free (gmem.c:263)
==20287==    by 0x52C433D: g_slice_free1 (gslice.c:907)
==20287==    by 0x52B4E96: g_queue_free (gqueue.c:60)
==20287==    by 0x4B34E0: sim_fs_free (simfs.c:107)
==20287==    by 0x493CEC: sim_remove (sim.c:2485)
==20287==    by 0x4703D7: modem_change_state (modem.c:410)
==20287==    by 0x470664: set_powered (modem.c:848)
==20287==    by 0x4706BA: __ofono_modem_shutdown (modem.c:2137)
==20287==    by 0x46F2C5: signal_cb (main.c:76)
==20287==    by 0x52F555E: g_io_unix_dispatch (giounix.c:166)
==20287==    by 0x52A0AAB: g_main_dispatch (gmain.c:2440)
2011-05-11 12:20:59 -05:00
Denis Kenzior 4714d8199a gprs: Mark context inactive on removal 2011-05-11 12:11:23 -05:00
Denis Kenzior 623183d996 gprs: Fix valgrind error
This fixes an invalid access condition for the case where the
gprs atom is destroyed before context atoms are.
2011-05-11 12:11:23 -05:00
Denis Kenzior de0b882acf gprs: emit Active changed for contexts being removed 2011-05-11 12:11:23 -05:00
Denis Kenzior 5646ecaf35 gprs: Add additional debug statements 2011-05-11 12:11:23 -05:00
Philippe Nunes 563fcc5fe9 stkutil: Send at least the data currently available 2011-05-08 23:30:10 -05:00