Commit Graph

2375 Commits

Author SHA1 Message Date
Aleksander Morgado
a282237ae5 port-probe: buffer_full_id is a signal handler, not a GSource 2014-01-25 20:56:01 +01:00
Aleksander Morgado
529e94b039 broadband-modem: fix leaked 'QcdmResult' 2014-01-25 19:34:57 +01:00
Aleksander Morgado
561c8b715e bearer-mbim: fix leaked 'MMBearerIpConfig' objects 2014-01-24 21:26:46 +01:00
Aleksander Morgado
ae86ce1cbb bearer-mbim: fix leaked 'MMBearerProperties' 2014-01-24 21:10:28 +01:00
Aleksander Morgado
1547be5181 bearer-mbim: fix several leaked 'MbimMessage' objects
mbim_device_command_finish() returns always a new reference to the response.
2014-01-24 21:09:10 +01:00
Thieu Le
87f0f808bf altair-lte: set subscription state using PCO
This patch sets the subscription state using Verizon's PCO values.
2014-01-18 14:08:31 +01:00
Ben Chan
5c00736f44 iface-modem,sim: make SIM interface initialization cancellable 2014-01-11 23:33:35 +01:00
Ben Chan
fd1a1839ae serial-port: fail open/reopen after a serial port has been forced close
After a MMSerialPort object is forced close, it may be opened again if some
other object still holds a reference to it. When the MMSerialPort object is
eventually disposed, mm_serial_port_close_force is invoked on the object but
does nothing as 'priv->forced_close' is already set to TRUE. 'priv->watch_id'
is still active, which could potentially lead to a crash if data_available is
called after the MMSerialPort object is finalized. This patch prevents such a
scenario by failing mm_serial_port_open / mm_serial_port_reopen after the
MMSerialPort has been forced close.
2014-01-09 13:10:07 +01:00
Yegor Yefremov
84bdcb04ed trivial: resolve maybe-uninitialized warnings
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2014-01-07 09:40:05 -06:00
Aleksander Morgado
0ddbbaab17 sms-mbim: increase timeout when sending SMS part to 30s
Aligned to the value used also in QMI, and likely a much better value than the
original 10s.

See:
  http://lists.freedesktop.org/archives/libmbim-devel/2013-December/000079.html
2014-01-03 12:38:01 +01:00
Aleksander Morgado
52d34ce0db bearer-mbim: parse replies on failure
Based on a patch from: Bjørn Mork <bjorn@mork.no>

Some messages provide an additional NwError cause code from
the network in case of failure. This means that we need to
parse the reply even if the status indicates failure, to be
able to return the exact failure cause.
2013-12-19 18:43:14 +01:00
Ben Chan
ab12d17bfb iface-modem: fix crash in wait_for_final_state_context_complete_and_free
When wait_for_final_state_context_complete_and_free is invoked, if the callback
associated with the GSimpleAsyncResult object of the WaitForFinalStateContext
object updates the modem state via mm_iface_modem_update_state, state_changed
is invoked, which causes wait_for_final_state_context_complete_and_free to be
invoked again on the same WaitForFinalStateContext object. That leads to the
following crash, which is observed sometimes when a modem is being disabled.

Thread 0 *CRASHED* ( SIGSEGV @ 0x00000000 )

0x7fcb7728f202   [libgobject-2.0.so.0.3400.3] - gobject.c:2916              g_object_unref
0x7fcb7743205c   [ModemManager]               - mm-broadband-modem.c:8034   disabling_context_complete_and_free
0x7fcb77434d64   [ModemManager]               - mm-broadband-modem.c:8130   disabling_wait_for_final_state_ready
0x7fcb770c0b86   [libgio-2.0.so.0.3400.3]     - gsimpleasyncresult.c:775    g_simple_async_result_complete
0x7fcb7740cdbc   [ModemManager]               - mm-iface-modem.c:101]       wait_for_final_state_context_complete_and_free
0x7fcb7740ce19   [ModemManager]               - mm-iface-modem.c:128]       state_changed_wait_expired
0x7fcb76f78c33   [libglib-2.0.so.0.3400.3]    - gmain.c:4026]               g_timeout_dispatch
0x7fcb76f78087   [libglib-2.0.so.0.3400.3]    - gmain.c:2715]               g_main_context_dispatch
0x7fcb76f78437   [libglib-2.0.so.0.3400.3]    - gmain.c:3290]               g_main_context_iterate
0x7fcb76f78891   [libglib-2.0.so.0.3400.3]    - gmain.c:3484]               g_main_loop_run
0x7fcb773f4d55   [ModemManager]               - main.c:142]                 main
0x7fcb7698a9c6   [libc-2.15.so]               - libc-start.c:234]           __libc_start_main
0x7fcb773f48b8   [ModemManager]               + 0x000218b8]
2013-12-17 01:37:13 +01:00
Aleksander Morgado
004924b038 broadband-modem-qmi: fix segfault when using AT-fallback mode for messaging
The default broadband modem implementation doesn't have a method to disable
unsolicited messages for SMS.
2013-12-16 12:37:20 +01:00
Ben Chan
5aa2f11535 sim-mbim: prevent potential leak when loading SIM idenitifier and IMSI
This patch addresses a potential memory leak when load_sim_identifier or
load_imsi in MMSimMbim is called but the caller does not provide a
GAsyncReadyCallback.
2013-12-10 10:28:06 +01:00
Ben Chan
4c213d460e broadband-modem-mbim: prevent potential leak when scanning networks
This patch addresses a potential memory leak when scan_networks in
MMBroadbandModemMbim is called but the caller does not provide a
GAsyncReadyCallback.

Reported by Aleksander Morgado <aleksander@lanedo.com>
2013-12-10 10:26:57 +01:00
Ben Chan
ebadb6786a sim-mbim: prevent potential leak when loading operator idenitifier and name
This patch addresses a potential memory leak when
load_operator_identifier or load_operator_name in MMSimMbim is called
but the caller does not provide a GAsyncReadyCallback.

Reported by Aleksander Morgado <aleksander@lanedo.com>
2013-12-10 10:24:52 +01:00
Ben Chan
073163fb0b core: fix some typos in comments 2013-12-05 13:04:18 -06:00
Ben Chan
2db3df9d93 broadband-modem-mbim: implement network scan 2013-12-05 13:01:44 -06:00
Ben Chan
891f55f25c broadband-modem-mbim: fix source tag of GSimpleAsyncResult objects 2013-12-04 08:09:15 -06:00
Ben Chan
1e8baaf7a2 sim-mbim: implement operator identifier and name loading 2013-12-03 10:11:16 -06:00
Dan Williams
1b34fe6c51 broadband-bearer-qmi: ensure errors are cleared before re-using them
If the bearer doesn't have one of IPv4 or IPv6 configuration, then the
qmi_message_wds_get_current_settings_output_get_ip*_address() functions
will return FALSE with a filled error, which was not cleared.

This fixes a glib warning message about overwriting an already-filled
GError.
2013-12-01 14:20:19 -06:00
Aleksander Morgado
c30a8f67ef base-modem: also release cdc-wdm ports 2013-11-22 15:00:52 +01:00
Aleksander Morgado
f7546ad824 introspection,api: new 'Messages' property in the Messaging interface
https://bugzilla.gnome.org/show_bug.cgi?id=712276
2013-11-21 11:36:21 +01:00
Aleksander Morgado
7f442b777c introspection,api: new 'Bearers' property in the Modem interface
https://bugzilla.gnome.org/show_bug.cgi?id=712276
2013-11-21 10:50:49 +01:00
Thieu Le
c21709b32e altair-lte: add SIMREFRESH support
Register for SIMREFRESH event and reload own numbers and reregister
modem with network when this happens.
2013-11-21 10:48:53 +01:00
Aleksander Morgado
5e7fee1d11 build: use 'g_cclosure_marshal_generic' by default
Avoid custom marshalers, and just use libffi-based 'g_cclosure_marshal_generic'.
2013-11-20 15:17:09 +01:00
Aleksander Morgado
fe744b4534 base-modem: fix port validity checks 2013-11-20 15:00:07 +01:00
Aleksander Morgado
85d5d96824 port: remove 'carrier-detect' property
It is no longer used since commit 736aa0d2d.
2013-11-15 17:25:33 +01:00
Prathmesh Prabhu
3c6428fa58 bearer: notify final disconnect status using mm_bearer_report_connection_status
Some MMBearer methods to disconnect the bearer assume that the bearer is
disconnected even if the operation fails in a subclass. This leaves MMBearer
and MMBroadbandBearer states out of sync.

This patch notifies the bearer object of the final disconnection using
mm_bearer_report_connection_status. This gives the subclasses a chance to update
their state even when the disconnection attempt fails.
2013-11-08 08:45:38 +01:00
Aleksander Morgado
1b3114a0f9 modem-helpers: handle +CGDCONT=? replies with single context
https://bugzilla.gnome.org/show_bug.cgi?id=708983
2013-11-01 15:50:12 +01:00
Aleksander Morgado
04b52d590f tests: enable logging if 'ENABLE_TEST_MESSAGE_TRACES' is defined 2013-11-01 15:50:09 +01:00
Aleksander Morgado
6a26ad7b53 blacklist: include the whole Openmoko VID 2013-10-30 16:12:06 +01:00
Aleksander Morgado
b09044bcb3 plugin: for non-AT ports, don't expect vendor/product string probing
When running the pre-probing VID/PID filters, the ports were not filtered out if
the plugin had configured post-probing vendor/product string filters. But, these
post-probing filters are only applicable to AT ports.

From now on, this logic will not be applied to non-serial ports. In other words,
pre-probing VID/PID filters applied to non-serial ports will always result in
the port being filtered out or being allowed, regardless of any additional
vendor/product string post-probing filter configured by the plugin.

https://bugzilla.gnome.org/show_bug.cgi?id=710437
2013-10-28 18:13:14 +01:00
Dan Williams
c431fb8208 blacklist/greylist: add more GPS devices (rh #1023234)
Attempt to blacklist entire drivers that we know aren't modems,
and add a sprinkling of specific devices too.
2013-10-25 16:25:14 -05:00
Aleksander Morgado
adc7df200f sms-part-cdma,test: new tests for Latin and Unicode encodings 2013-10-25 19:49:57 +02:00
Aleksander Morgado
c669464eec sms-part-cdma: fix log message 2013-10-25 19:49:56 +02:00
Aleksander Morgado
364df3106a sms-part-cdma: improve logging when creating PDUs 2013-10-25 19:49:56 +02:00
Aleksander Morgado
80f55923ed sms-part-cdma: support parsing SMS with Unicode encoding 2013-10-25 19:49:56 +02:00
Aleksander Morgado
66f134b7bd sms-part-cdma: support generating SMS with Latin or Unicode encodings 2013-10-25 19:49:56 +02:00
Aleksander Morgado
3174b7b73f sms-part-cdma: support receiving SMS with Latin encoding 2013-10-25 19:49:56 +02:00
Aleksander Morgado
57882f6dad sms: decide whether to create a 3GPP2 or 3GPP SMS based on caps
Don't rely on receiving a Teleservice ID. If none received, and the modem is
CDMA-only, default to WMT.
2013-10-25 19:49:56 +02:00
Aleksander Morgado
43694e2677 sms: unknown delivery state in newly created SMS objects 2013-10-25 19:49:56 +02:00
Aleksander Morgado
0341c1663c sms: handle CDMA SMS when creating new ones from MMSmsProperties 2013-10-25 19:49:56 +02:00
Aleksander Morgado
663017a3d2 sms: clear generated parts when storing/sending fails 2013-10-25 19:47:20 +02:00
Aleksander Morgado
bd05787b51 sms-qmi: check whether the modem supports the specific SMS type 2013-10-25 19:47:20 +02:00
Aleksander Morgado
b728b14efb sms: only set concat reference on multipart messages 2013-10-25 19:47:19 +02:00
Aleksander Morgado
9ed42af537 sms: handle CDMA SMS part creation 2013-10-25 19:47:19 +02:00
Aleksander Morgado
7a56b143aa sms-qmi: handle CDMA SMS messages 2013-10-25 19:47:19 +02:00
Aleksander Morgado
2eb5e0d578 sms-part-cdma: new CDMA SMS creator
Currently very limited:
 * Only WMT teleservice.
 * Only DMTF-encoded numbers.
 * Only either raw binary data or ASCII-7 text.
2013-10-25 19:47:19 +02:00
Aleksander Morgado
cadbc0412d sms-part-3gpp: ensure PDU type in part is the correct one when building SUBMIT 2013-10-25 19:47:19 +02:00