Commit Graph

2803 Commits

Author SHA1 Message Date
Andrzej Zaborowski ab7f88233d stkutil: Refactor command parser error handling
When parsing the full command fails but Command Details has been parsed,
return a struct stk_command containing this information and the type of
parsing problem found.  We need the command details to be able to
even respond to the command.

This patch also makes the parser skip over unknown data objects found
in the BER-TLV, if they don't have Comprehension Required set.
2010-06-23 14:23:06 -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 6f08920c1a Fix huawei udev rules 2010-06-22 09:46:25 -05:00
Denis Kenzior 2f967651fb hfp: Fix style issues 2010-06-21 22:53:05 -05:00
Gustavo F. Padovan f4e1b5ca91 hfp: use bluetooth helpers and remove similar code 2010-06-21 22:49:37 -05:00
Denis Kenzior 8319eee7c0 bluetooth: Various style issues 2010-06-21 22:48:15 -05:00
Gustavo F. Padovan 922d8aed48 bluetooth: add PropertyChanged watch
This one is a bit diferent from the hfp.c one, so a separated patch for
it.
2010-06-21 22:45:50 -05:00
Gustavo F. Padovan 447162185f bluetooth: add watches for service and adapters
Exactly the same code from hfp.c
2010-06-21 22:43:38 -05:00
Gustavo F. Padovan 88ffebf801 bluetooth: add device_properties_cb() and has_uuid() 2010-06-21 22:43:08 -05:00
Gustavo F. Padovan d6154362d3 bluetooth: Move functions from hfp.c to bluetooth.c
The part that call device_properties_cb is commented to permit this patch
compile.
device_properties_cb() will be changed, so it will have separated patch.
2010-06-21 22:40:22 -05:00
Denis Kenzior 9b6876ef25 storage: whitespace issue 2010-06-21 15:40:14 -05:00
Denis Kenzior 6bae7a2aa1 smsutil: Fix up some comment style 2010-06-21 15:33:13 -05:00
Andrzej Zaborowski d5fec53d23 test-common: Avoid accessing an unitialised variable.
Fixes a segfault, reported by valrgind as:
[...]
==6300== Use of uninitialised value of size 4
==6300==    at 0x8048B4D: test_invalid (test-common.c:81)
2010-06-21 15:21:40 -05:00
Andrzej Zaborowski b8f68a5ed3 stkutil: Remove obsolete comment. 2010-06-21 15:21:40 -05:00
Denis Kenzior 054ed2653a atmodem: Support CDS indicators for MBM
MBM does not advertise support for CNMA, yet only supports CDS style
notifications which do not need to be acknowledged.
2010-06-21 15:21:40 -05:00
Denis Kenzior 4d82b67ea1 sms: Only emit property if value actually differs 2010-06-21 15:21:40 -05:00
Denis Kenzior 7a4834a34a test: Fix the no-argument case 2010-06-21 15:21:40 -05:00
Denis Kenzior a2596cb333 unit: Add unit tests for status report assembly 2010-06-21 15:21:40 -05:00
Denis Kenzior 5aa8841440 smsutil: Take ton_npi into account in sr assembly 2010-06-21 15:21:40 -05:00
Denis Kenzior 36bcae5ff1 smsutil: More code cleanup
- Change the flow of the code a bit, in the case that all fragments have
  been sent and an udelivered sr arrives, we can simply remove the node
  and signal undelivered up
- We ignore temporary and temporary final status reports
2010-06-21 15:21:40 -05:00
Denis Kenzior cbc27e06b3 smsutil: Make code flow easier to understand 2010-06-21 15:21:40 -05:00
Denis Kenzior a8bd87cda9 smsutil: multiline comments to preferred style 2010-06-21 15:21:40 -05:00
Denis Kenzior 65b8cab616 smsutil: Minor code style & indentation fixes 2010-06-21 15:21:39 -05:00
Denis Kenzior 74a8ce2e8b sms: Fixup minor style issues with status reports 2010-06-21 15:21:39 -05:00
Pasi Miettinen 84d095860f sms: Status report notify 2010-06-21 15:21:39 -05:00
Denis Kenzior d7dacd2fad smsutil: memcpy is preferable to struct assignment 2010-06-21 15:21:39 -05:00
Denis Kenzior c967766070 smsutil: Streamline flow of sr add_fragment 2010-06-21 15:21:39 -05:00
Denis Kenzior cf62a6e8d5 Fix: Make distcheck pass
No need to include history.h anyway
2010-06-21 15:21:39 -05:00
Denis Kenzior c3d61c9467 history: Make example_history use Delivery Reports 2010-06-21 15:21:39 -05:00
Pasi Miettinen dee07e4ad7 history: API change for status report notify 2010-06-21 10:52:32 -05:00
Pasi Miettinen a7372209f3 smsutil: Status report assembly 2010-06-21 10:52:27 -05:00
Denis Kenzior 84a106b92d Mention Arun's contributions 2010-06-21 09:32:33 -05:00
Arun Ravindran 7aab2d07aa Enabling PDP Context support in atmodem. 2010-06-21 09:32:06 -05:00
Zhenhua Zhang 47766f3f4d TODO: PPP server support owner 2010-06-21 09:21:31 -05:00
Zhenhua Zhang 9f180fc27a ppp: Fix leak in pppcp_send_protocol_reject
Free the reject pppcp packet after ppp_transmit.
2010-06-21 09:19:55 -05:00
Yang Gu c80432bfde Refactor ussd parser 2010-06-21 09:19:01 -05:00
Marcel Holtmann 11d9063e57 Add test script for scanning networks 2010-06-19 20:17:05 +02:00
Denis Kenzior 681aaef1ab atmodem: Use a switch/case in sim.c 2010-06-18 14:24:18 -05:00
Andrzej Zaborowski 4f72a3a1f7 mbm: Use MBM vendor quirk of the sim driver. 2010-06-18 14:14:53 -05:00
Andrzej Zaborowski a2dc7dfee0 atmodem: Add PIN entry quirk for mbm.
Wait for *EPEV unsolicited response after PIN entered, otherwise the
next AT+CPIN? query still returns the old value for a fraction of a
second and ofono gets stuck until the next PIN entry attempt.
2010-06-18 14:14:39 -05:00
Andrzej Zaborowski 56c8033f9f mbm: Register stk driver post sim. 2010-06-18 14:11:26 -05:00
Andrzej Zaborowski 713805ae57 mbmmodem: Allow no response data for envelope.
Partially reverts
http://git.kernel.org/?p=network/ofono/ofono.git;a=commitdiff;h=f98c6dc91702c0d14c0afa2a4e32102d3105568d
2010-06-18 14:11:11 -05:00
Andrzej Zaborowski d0018e9772 test-stkutil: Add a More Time response builder test 2010-06-18 14:04:57 -05:00
Andrzej Zaborowski 1b4dd4cd83 stkutil: Add More Time terminal response builder 2010-06-18 14:04:54 -05:00
Denis Kenzior 3b5d3fe1ef stkutil: USSD max len is 160 2010-06-18 13:59:15 -05:00
Yang Gu 6018d1fe82 stk: Add parser for timing advance objects 2010-06-18 13:57:55 -05:00
Yang Gu 042724c5ab teststk: Add test for send ussd parser 2010-06-18 13:18:34 -05:00
Yang Gu 179c14fe39 smsutil: Add a decoder for ussd pdus 2010-06-18 13:18:12 -05:00
Yang Gu 31d29608e0 stk: Add parser for send ussd commands 2010-06-18 13:15:31 -05:00
Florian Steinel a769091803 huawei: Import Huawei rules
From 10-Huawei-Datacard.rules (Linux Driver 4.08.01.108.tar.gz)
2010-06-18 12:58:07 -05:00