Commit Graph

47 Commits

Author SHA1 Message Date
Christophe Ronco 7594a000dd common: APN with a dot in second position are not invalid
APN with a dot in second position (example: "t.est") are wrongly
considered invalid.
2020-09-29 09:11:08 -05:00
Philippe De Swert 45efc2354e common: Add new NB-IoT technologies
Add lte-cat-m1 and lte-cat-nb1 technology identifiers.
2019-02-17 21:18:54 -06:00
Giacinto Cifelli 597ab6683f common: Move proto and auth_method related helpers
the following functions:
	gprs_proto_to_string
	gprs_proto_from_string
	gprs_auth_method_to_string
	gprs_auth_method_from_string

are moved from gprs.c to common.c, with related declaration in common.h
so that they can also be accessed from lte core functions
2018-10-09 15:10:25 -05:00
Anirudh Gargi 88358047c8 network: add support eutran sms only states
EUTRAN SMS states mapped to registered and roaming respectively.
2018-10-01 14:42:57 -05:00
Jonas Bonn 3796744b5e Fix out of tree build 2017-09-12 12:48:23 -05:00
Alexander Couzens 9b16b2c23c voicecall,common: move call_status_to_string() to common
call_status_to_string() is useful for debug output.
Change signature to contain enum call_status
Replace default case to get compiler warning when new enums added
2017-09-07 17:29:42 -05:00
Alexander Couzens 7d27ccea5e common: move strlen(apn) check into is_valid_apn() 2017-09-05 10:41:05 -05:00
Lucas De Marchi 53a0fa8c7c common: Fix parsing SS control string
It's not possible to be both greater than '9' and less than '0'. This
would lead to accepting things like "#$33#" as activation and "*$33#" as
deactivation, even though the string makes no sense.
2013-05-22 21:40:19 -05:00
Denis Kenzior 333bb8b1d3 common: Match logic to comment: valid_ussd_string 2012-06-18 08:59:04 -05:00
Philippe Nunes 761f16394d common: Fix typos in error strings 2012-05-30 00:21:58 -05:00
Marcel Holtmann 7e6afe37bf core: Update copyright information 2011-10-10 13:39:42 -07:00
Frédéric Danis 9edf68c553 common: fix buffer length in phone_number_to_string
update buffer length related to OFONO_MAX_PHONE_NUMBER_LENGTH change
78c1e96bf9
2011-03-23 15:02:48 -05:00
Paavo Leinonen 82b75c0bb6 common: '+' is not valid phone number anymore
Reject phone number if it contains only plus sign.
2011-02-24 09:46:48 -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
Lucas De Marchi 80a257098a common: implement initializer for ofono_call 2011-02-01 18:30:53 +01:00
Rafael Ignacio Zurita 4eda451c03 common: add function to validate long numbers
Also, adapt voicecall to use the new function for outgoing calls.
2011-01-25 14:12:24 -06:00
Denis Kenzior f8b2ea9ebe gprs: Move packet bearer stuff into gprs.c 2011-01-20 09:49:36 -06:00
Rémi Denis-Courmont ec34d75bc7 common: Define packet switched bearers 2011-01-20 12:07:31 +01:00
Denis Kenzior 2f11dd0a5d cdma-voicecall: Minor style fixes 2010-12-22 19:09:24 -06:00
Dara Spieker-Doyle a728ff4da1 cdma-voicecall: Add CDMA MO Call Support 2010-12-22 19:01:10 -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 e9d80e40ac common: remove redundant predicate
If the first character is a plus sign, then it is not a nul, then
the string length is true anyway.
2010-11-23 06:48:57 -06:00
Denis Kenzior b75a5574f5 common: Fix mmi code to bearer class mappings
MMI services 22, 21, 20 and 26 were mapped incorrectly.  See the comment
in the code for more information and the thread 'Call Barring and MMI
Supplementary Service codes' on the oFono mailing list.
2010-10-19 12:09:30 -05:00
Denis Kenzior 5fe4694b21 common: Update the basic services in comments 2010-10-15 07:05:37 -05:00
Pekka Pessi 919e305aa1 common: fixup logic of valid_ussd_string()
The logic of valid_ussd_string was not quite correct as it didn't take
care of size 1 USSD strings.  In addition, call_in_progress parameter is
passed in to take care of size 2 USSD strings which might start with a
'1' according to the rules of 22.030.

The comment about USSD routing is removed, it is out of scope of oFono.
The cellular network routes the USSD requests based on the rules laid
out in the 22.090, however, any string that can be encoded according to
the rules of 23.030 is valid USSD.
2010-10-10 05:48:25 -05:00
Alexander Kanavin 5ddaed064d Fix typo in SS enum to string conversion 2010-10-07 13:10:09 +02:00
Jeevaka Badrappan 4196182770 Fix multi-line comment style issues 2010-09-21 21:16:01 -05:00
Denis Kenzior 04634af6fe common: Implement ofono_uuid_to_str 2010-09-21 08:44:48 -05:00
Zhenhua Zhang 7111325311 Fix a typo in telephony_error_to_str 2010-04-23 11:52:17 -05:00
Denis Kenzior 0aebcb342c Fix: Regression in PIN validity checking 2010-04-02 09:17:34 -05:00
Denis Kenzior 1e783b33d9 Refactor: Simplify Technology values
Applications don't really understand our current values very well and
would need to look up the spec.  Instead we change to much more commonly
accepted terms.
2010-03-25 10:29:01 -05:00
Marcel Holtmann 256c6e14c7 Revert the default statement for PIN type checking
Also fix the coding style for the switch statement and remove the
number assignment for an internal enum.
2010-03-20 02:26:57 +01:00
Denis Kenzior d6e78f7828 Trivial: Add break statement
In case we ever extend the enum/switch and unwittingly introduce a bug.
2010-03-19 13:52:57 -05:00
Pekka Pessi 9a398a1087 Fix: Check password length based on its type
The different password types have different length requirements, so
update is_valid_pin to validate according to the password type being
validated (PIN / PUK / NET)
2010-03-19 13:48:04 -05:00
Marcel Holtmann 144080e749 Update copyright information 2010-01-01 17:00:10 -08:00
Denis Kenzior ee92dc0b62 Add utility to test for valid APN names 2009-10-30 15:52:29 -05:00
Andrzej Zaborowski 2d992d7912 Always return a string from telephony_error_to_str.
So that it can be used as a printf argument directly.
2009-10-16 11:14:02 -05:00
Andrzej Zaborowski 5773e30373 Refactor: Move network registration status utils
Move the status to string functions to common.c so that they can be
reused in data connection related network registration code.
2009-10-16 11:12:43 -05:00
Denis Kenzior d67ded70ea Fix: Make sure pin isn't empty 2009-09-22 00:07:06 -05:00
Denis Kenzior ee33bc6ab7 Use g_ascii_isdigit 2009-09-17 12:17:42 -05:00
Andrzej Zaborowski 06ea6137a3 Write state of SMS assembly to disk and restore on startup.
This way we can continue receiving segmented messages over a reset or
crash.
2009-09-08 14:44:39 -05:00
Denis Kenzior 7abeb8e4a0 Use types.h instead of driver.h here 2009-08-20 12:48:28 -05:00
Denis Kenzior a8dc75392c Fix minor bug in phone number handling 2009-06-19 21:13:52 -05:00
Andrzej Zaborowski f93376229a Teach USSD to recognise password change strings.
This is slightly hacky, part of ussd.c responsible for registering services
is duplicated and parse_ss_control_string is modified to accept a fourth
SI fragment in the input string.
2009-06-18 16:57:58 -05:00
Denis Kenzior ab68cd8e7e Create ofono_phone_number struct
Creates a new structure in driver.h called ofono_phone_number.
This is meant to replace const char *number, int number_type
arguments everywhere.

Fix up all existing code to use this structure instead.
2009-05-26 18:18:12 -05:00
Denis Kenzior 335749d163 Fix Supplementary Service MMI strings per 22.030 2009-05-21 17:02:56 -05:00
Denis Kenzior a78b36290b Add implementation of telephony daemon 2009-05-05 21:14:19 -07:00