platform/upstream/ofono.git
10 years agohfp_hf_bluez5: Implement sco_connected_hint
Denis Kenzior [Wed, 22 Apr 2015 23:07:14 +0000 (18:07 -0500)]
hfp_hf_bluez5: Implement sco_connected_hint

10 years agohandsfree-audio: Call sco_connected_hint
Denis Kenzior [Wed, 22 Apr 2015 22:58:50 +0000 (17:58 -0500)]
handsfree-audio: Call sco_connected_hint

10 years agoinclude: Add sco_connected_hint to handsfree-audio
Denis Kenzior [Wed, 22 Apr 2015 22:58:15 +0000 (17:58 -0500)]
include: Add sco_connected_hint to handsfree-audio

10 years agogatchat: Introduce g_at_chat_get_userdata
Denis Kenzior [Wed, 22 Apr 2015 22:57:53 +0000 (17:57 -0500)]
gatchat: Introduce g_at_chat_get_userdata

10 years agohandsfree-audio: Add additional debugs
Denis Kenzior [Wed, 22 Apr 2015 22:12:48 +0000 (17:12 -0500)]
handsfree-audio: Add additional debugs

10 years agogdbus: Close private connection if setup fails
Luiz Augusto von Dentz [Fri, 10 Apr 2015 12:54:37 +0000 (15:54 +0300)]
gdbus: Close private connection if setup fails

Private connection should be properly closed with dbus_connection_close
otherwise libdbus exits with the following error:

  'The last reference on a connection was dropped without closing the
   connection. This is a bug in an application. See
   dbus_connection_unref() documentation for details. Most likely, the
   application was supposed to call dbus_connection_close(), since this
   is a private connection.'

10 years agogdbus: Fix crash in g_dbus_create_error_valist
Szymon Janc [Tue, 7 Apr 2015 20:07:41 +0000 (22:07 +0200)]
gdbus: Fix crash in g_dbus_create_error_valist

Passing NULL format parameter to vsnprintf results in invalid argument
error on glibc. But with some other libc libraries (musl and uClibc)
this results in dereferencing NULL pointer and crash due to
segmentation fault.

10 years agogdbus: Use g_dbus_create_error_valist internally
Szymon Janc [Tue, 7 Apr 2015 19:57:19 +0000 (21:57 +0200)]
gdbus: Use g_dbus_create_error_valist internally

There is no need to duplicate code in g_dbus_send_error_valist.

10 years agogdbus: Add g_dbus_get_flags function
Michael Janssen [Fri, 3 Apr 2015 22:02:11 +0000 (15:02 -0700)]
gdbus: Add g_dbus_get_flags function

The g_dbus_get_flags function enables detection of when the
G_DBUS_FLAG_ENABLE_EXPERIMENTAL is set.

10 years agogdbus: Make GDBusClient work without ObjectManager
Luiz Augusto von Dentz [Tue, 24 Mar 2015 11:56:26 +0000 (13:56 +0200)]
gdbus: Make GDBusClient work without ObjectManager

This makes GDBusClient work normally without ObjectManager.

10 years agogdbus/client: Allow specifying ObjectManager path
Arman Uguray [Fri, 27 Feb 2015 08:16:25 +0000 (00:16 -0800)]
gdbus/client: Allow specifying ObjectManager path

GDBusClient currently hard-codes "/" as the remote ObjectManager path.
This is generally incorrect, as an application can choose to expose an
ObjectManager at any well-known path. This patch fixes this by allowing
the user to pass in the ObjectManager path by introducing a new
conctructor "g_dbus_client_new_full".

10 years agogdbus/client: Don't GetManagedObjects w/o handlers
Arman Uguray [Fri, 27 Feb 2015 08:16:24 +0000 (00:16 -0800)]
gdbus/client: Don't GetManagedObjects w/o handlers

The client code currently issues GetManagedObjects if new handlers are
set via g_dbus_client_set_proxy_handlers. An application may set these
to NULL before unref'ing a client or to simply prevent further events.
Hence, there is no need to refresh objects or properties if all handlers
are NULL.

10 years agohfpmodem: slc.c: make sure to use none_prefix
Kuba Pawlak [Tue, 24 Mar 2015 16:04:26 +0000 (17:04 +0100)]
hfpmodem: slc.c: make sure to use none_prefix

10 years agohfpmodem: hfpmodem.c make sure to use none_prefix
Kuba Pawlak [Tue, 24 Mar 2015 16:04:25 +0000 (17:04 +0100)]
hfpmodem: hfpmodem.c make sure to use none_prefix

10 years agohfp_ag_bluez5: use none prefix for AT+BCC.
Kuba Pawlak [Tue, 24 Mar 2015 14:20:40 +0000 (15:20 +0100)]
hfp_ag_bluez5: use none prefix for AT+BCC.

iPhone 5s with iOS8.2 sometimes failes to acknowledge AT+BCC
with OK. This means +CIEV events get consumed by this command
and call ended notification is not parsed.

Nov 30 00:00:19 ofonod[938]: > AT+BCC\r
Nov 30 00:00:28 ofonod[938]: < \r\n+CIEV: 2,0\r\n

10 years agogdbus: Fix not calling disconnect function
Szymon Janc [Mon, 23 Feb 2015 18:33:00 +0000 (19:33 +0100)]
gdbus: Fix not calling disconnect function

If daemon gets disconnected from D-Bus sender is NULL. Watches that
was explicitly added with NULL sender (ie disconnected_signal in
g_dbus_set_disconnect_function) should be called anyway.

10 years agogdbus: Don't refresh objects/props if disconnected
Arman Uguray [Sat, 21 Feb 2015 01:56:47 +0000 (17:56 -0800)]
gdbus: Don't refresh objects/props if disconnected

If g_dbus_client_set_proxy_handlers gets called from within a
proxy_removed callback, the code may end up refreshing the proxy's
properties and incorrectly access the client's proxy_list as it gets
freed. This patch fixes this, so that get_managed_objects does nothing
if it gets called during a service disconnect.

10 years agohfpmodem: Make sure to use none_prefix
Denis Kenzior [Fri, 20 Feb 2015 16:30:21 +0000 (10:30 -0600)]
hfpmodem: Make sure to use none_prefix

ofonod[253]: > AT+CCWA=1\r
ofonod[253]: < \r\n+BCS:2\r\n
ofonod[253]: < \r\nOK\r\n

10 years agohfpmodem: Make sure to set the prefix properly
Denis Kenzior [Fri, 20 Feb 2015 16:28:24 +0000 (10:28 -0600)]
hfpmodem: Make sure to set the prefix properly

ofonod[1239]: > AT+COPS=3,0\r
ofonod[1239]: < \r\n+BCS:2\r\n
ofonod[1239]: < \r\nOK\r\n

10 years agosmsutil: Add additional sanity check
Denis Kenzior [Fri, 13 Feb 2015 15:59:59 +0000 (09:59 -0600)]
smsutil: Add additional sanity check

We make sure that after performing the UTF8 -> GSM conversion, the
number of GSM bytes is not greater than 11, which is the maximum
payload.

10 years agounit: Add test to encode / decode 11 char TP-OA
Tommi Kenakkala [Fri, 13 Feb 2015 12:47:34 +0000 (14:47 +0200)]
unit: Add test to encode / decode 11 char TP-OA

10 years agosms: Fix alphanumeric TP-OA handling
Tommi Kenakkala [Fri, 13 Feb 2015 15:50:16 +0000 (17:50 +0200)]
sms: Fix alphanumeric TP-OA handling

TP-OA max length comparisons were incorrect because TP-OA's 7-bit
coded octets transport eleven 8-bit chars.  The current code assumed
only 10 chars were possible.

The patch
- increases the array size to 23, (maximum of 22 bytes for UTF8
  encoding + null terminator)
- Updates the sanity check to account for the correct maximum
- For encoding, checks the maximum length in UTF8 characters instead of
  bytes

10 years agoAUTHORS: Mention Tommi's contributions
Denis Kenzior [Mon, 2 Feb 2015 15:29:46 +0000 (09:29 -0600)]
AUTHORS: Mention Tommi's contributions

10 years agohandsfree-audio: Refactor manager init / cleanup
Tommi Kenakkala [Mon, 2 Feb 2015 12:43:06 +0000 (14:43 +0200)]
handsfree-audio: Refactor manager init / cleanup

10 years agomain: Remove handsfree_audio_manager init/cleanup
Tommi Kenakkala [Mon, 2 Feb 2015 12:43:05 +0000 (14:43 +0200)]
main: Remove handsfree_audio_manager init/cleanup

Init allocates a SCO audio socket always. oFono should do that
with bluez5 but not with bluez4.  This patch starts the refactoring of
the handsfree_audio_manager init/cleanup functionality.

10 years agoatmodem: fix retries reporting from AT+CPINR
Cedric Jehasse [Mon, 2 Feb 2015 09:32:45 +0000 (10:32 +0100)]
atmodem: fix retries reporting from AT+CPINR

The retries array was not correctly filled in.

10 years agoatmodem: Sierra modems should be polled after CPIN
Cedric Jehasse [Mon, 2 Feb 2015 09:32:44 +0000 (10:32 +0100)]
atmodem: Sierra modems should be polled after CPIN

Sierra modem will return "CME ERROR: 14" when polled right after pin has
been entered. Use the existing vendor quirk to handle this.

10 years agosierra: add sim state polling after CFUN enable
Cedric Jehasse [Fri, 30 Jan 2015 10:34:32 +0000 (11:34 +0100)]
sierra: add sim state polling after CFUN enable

When pin is queried shortly after a Siera dongle is plugged in,
"AT+CPIN?" responds with "CME ERROR 14: SIM".
Poll the sim, as already done by several other vendor plugins.

10 years agoRelease 1.16 1.16
Marcel Holtmann [Sat, 13 Dec 2014 01:56:19 +0000 (02:56 +0100)]
Release 1.16

10 years agoradio-settings: Show all available technologies
Alfonso Sanchez-Beato [Fri, 12 Dec 2014 11:25:35 +0000 (12:25 +0100)]
radio-settings: Show all available technologies

Not all possible futures technologies were being showed on the DBus
interface.

10 years agophonesim: Instantiate radio-settings in post_sim
Denis Kenzior [Wed, 10 Dec 2014 17:02:14 +0000 (11:02 -0600)]
phonesim: Instantiate radio-settings in post_sim

10 years agophonesim: Add minimal radio-settings functionality
Denis Kenzior [Wed, 10 Dec 2014 17:01:37 +0000 (11:01 -0600)]
phonesim: Add minimal radio-settings functionality

10 years agophonesim: Add skeleton of radio settings driver
Denis Kenzior [Wed, 10 Dec 2014 04:54:35 +0000 (22:54 -0600)]
phonesim: Add skeleton of radio settings driver

10 years agoradio-settings: Always query available rats
Denis Kenzior [Wed, 10 Dec 2014 17:00:49 +0000 (11:00 -0600)]
radio-settings: Always query available rats

If fast dormancy query is not implemented the available rats are not
queried.

10 years agoradio-settings: Add additional sanity check
Denis Kenzior [Wed, 10 Dec 2014 16:40:26 +0000 (10:40 -0600)]
radio-settings: Add additional sanity check

10 years agoradio-settings: rework AvailableTechnologies logic
Denis Kenzior [Wed, 10 Dec 2014 16:38:42 +0000 (10:38 -0600)]
radio-settings: rework AvailableTechnologies logic

Take advantage of the new enum structure to future proof and simplify
the logic of generating the AvailableTechnologies property

10 years agoinclude: No need for OFONO_FLAG* defines
Denis Kenzior [Wed, 10 Dec 2014 16:28:49 +0000 (10:28 -0600)]
include: No need for OFONO_FLAG* defines

10 years agotest: Add AvailableTechnologies to list-modems
Alfonso Sanchez-Beato [Tue, 9 Dec 2014 12:34:39 +0000 (13:34 +0100)]
test: Add AvailableTechnologies to list-modems

10 years agosrc: Implement RAT list property
Alfonso Sanchez-Beato [Tue, 9 Dec 2014 12:34:38 +0000 (13:34 +0100)]
src: Implement RAT list property

10 years agoinclude: Add method to list RATs to radio-settings
Alfonso Sanchez-Beato [Tue, 9 Dec 2014 12:34:37 +0000 (13:34 +0100)]
include: Add method to list RATs to radio-settings

10 years agodoc: Add AvailableTechnologies property
Alfonso Sanchez-Beato [Tue, 9 Dec 2014 12:34:36 +0000 (13:34 +0100)]
doc: Add AvailableTechnologies property

This new property in org.ofono.RadioSettings interface will hold the
possible values for radio access technology for the modem.

10 years agosim: Fix pin retries bogus values on some arch-es
Denis Kenzior [Wed, 3 Dec 2014 23:31:09 +0000 (17:31 -0600)]
sim: Fix pin retries bogus values on some arch-es

On some architectures the SimManager.Retries property was getting bogus
values.  This is because we were sending an array which pointed to int
values instead of the expected unsigned char values.

This fix allocates a temporary array of unsigned chars to hold the
actual D-Bus values being sent.  Additionally, the dictionary array is
changed to point to the temporary unsigned char based values instead of
the raw 'int' based retry values.

10 years agotest: Support receiving SMS with non-ASCII chars
Neil Jerram [Fri, 21 Nov 2014 01:48:26 +0000 (01:48 +0000)]
test: Support receiving SMS with non-ASCII chars

Without this I get the following Python traceback, for an SMS that
contains the UK pound sign.

ERROR:dbus.connection:Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 230, in maybe_handle_message
    self._handler(*args, **kwargs)
  File "./receive-sms", line 9, in incoming_message
    print("%s" % (message))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in position 51: ordinal not in range(128)

10 years agohe910: Update copyright
Kuba Pawlak [Mon, 20 Oct 2014 17:12:05 +0000 (19:12 +0200)]
he910: Update copyright

10 years agohe910: enable location raporting atom
Kuba Pawlak [Thu, 16 Oct 2014 12:34:44 +0000 (14:34 +0200)]
he910: enable location raporting atom

10 years agoudev: add GPS port definition for HE910
Kuba Pawlak [Thu, 16 Oct 2014 12:29:05 +0000 (14:29 +0200)]
udev: add GPS port definition for HE910

10 years agotelitmodem: Fix a few coding style violations
Denis Kenzior [Thu, 23 Oct 2014 02:21:49 +0000 (21:21 -0500)]
telitmodem: Fix a few coding style violations

10 years agoAUTHORS: Mention Kuba's contributions
Denis Kenzior [Thu, 23 Oct 2014 02:21:18 +0000 (21:21 -0500)]
AUTHORS: Mention Kuba's contributions

10 years agotelitmodem: location reporting driver
Kuba Pawlak [Thu, 16 Oct 2014 12:28:34 +0000 (14:28 +0200)]
telitmodem: location reporting driver

10 years agodoc: new file doc/telit-modem.txt
Kuba Pawlak [Tue, 21 Oct 2014 16:04:42 +0000 (18:04 +0200)]
doc: new file doc/telit-modem.txt

10 years agoemulator: Refine +BIND support
Denis Kenzior [Mon, 10 Feb 2014 17:01:28 +0000 (11:01 -0600)]
emulator: Refine +BIND support

10 years agohfp_ag_bluez5: Bump HFP version to 1.7
Denis Kenzior [Sat, 1 Feb 2014 15:11:17 +0000 (09:11 -0600)]
hfp_ag_bluez5: Bump HFP version to 1.7

10 years agoemulator_fuzz: Add test plugin
Denis Kenzior [Sat, 1 Feb 2014 15:05:10 +0000 (09:05 -0600)]
emulator_fuzz: Add test plugin

This plugin creates an org.ofono.test.EmulatorFuzz interface on path
/test.  Currently only one method is implemented, SetIndicatorActive.

SetIndicatorActive("DistractedDrivingReduction", True|False) allows to
activate / deactivate the HF indicator via +BIND unsolicited
notification.

10 years agoemulator: Implement new API
Denis Kenzior [Sat, 1 Feb 2014 15:04:52 +0000 (09:04 -0600)]
emulator: Implement new API

10 years agoinclude: Add API to (de)activate HF indicators
Denis Kenzior [Sat, 1 Feb 2014 15:04:17 +0000 (09:04 -0600)]
include: Add API to (de)activate HF indicators

10 years agotest: Add test/set-ddr
Denis Kenzior [Fri, 31 Jan 2014 21:17:23 +0000 (15:17 -0600)]
test: Add test/set-ddr

Script to set DistractedDrivingReduction property

10 years agohandsfree: Be extra pedantic with booleans
Denis Kenzior [Fri, 31 Jan 2014 21:14:08 +0000 (15:14 -0600)]
handsfree: Be extra pedantic with booleans

10 years agohfp_hf_bluez5: Use latest HFP version
Denis Kenzior [Fri, 31 Jan 2014 21:07:40 +0000 (15:07 -0600)]
hfp_hf_bluez5: Use latest HFP version

10 years agohandsfree: Don't try to send a method return
Denis Kenzior [Fri, 31 Jan 2014 21:05:40 +0000 (15:05 -0600)]
handsfree: Don't try to send a method return

When we are simply updating the AG of HF indicator changes, do not try
to send a method return message.

10 years agoslc: Make sure to initialize variables
Denis Kenzior [Fri, 31 Jan 2014 21:05:25 +0000 (15:05 -0600)]
slc: Make sure to initialize variables

10 years agohfp: Implement +BIND notifications
Denis Kenzior [Mon, 27 Jan 2014 17:56:33 +0000 (11:56 -0600)]
hfp: Implement +BIND notifications

10 years agohfp: Notify core of HF indicators supported by AG
Denis Kenzior [Mon, 27 Jan 2014 17:56:44 +0000 (11:56 -0600)]
hfp: Notify core of HF indicators supported by AG

This information was obtained from SLC negotiation

10 years agohfp: Track supported / active indicators
Denis Kenzior [Mon, 27 Jan 2014 17:54:21 +0000 (11:54 -0600)]
hfp: Track supported / active indicators

This information is obtained during SLC establishment

10 years agohandsfree: Implement new HF indicators API
Denis Kenzior [Mon, 27 Jan 2014 17:53:45 +0000 (11:53 -0600)]
handsfree: Implement new HF indicators API

10 years agoinclude: Add HF Indicators related API
Denis Kenzior [Mon, 27 Jan 2014 17:52:21 +0000 (11:52 -0600)]
include: Add HF Indicators related API

10 years agohfp: Add implementation of +BIEV
Denis Kenzior [Wed, 22 Jan 2014 16:16:01 +0000 (10:16 -0600)]
hfp: Add implementation of +BIEV

10 years agoemulator: Refactor data types
Denis Kenzior [Wed, 22 Jan 2014 16:10:44 +0000 (10:10 -0600)]
emulator: Refactor data types

10 years agohfp: Add HF Indicators BRSF feature for 1.7
Denis Kenzior [Tue, 21 Jan 2014 03:43:37 +0000 (21:43 -0600)]
hfp: Add HF Indicators BRSF feature for 1.7

If HFP 1.7 client is used, enable the right BRSF feature

10 years agohandsfree: Skeleton implementation of DDR
Denis Kenzior [Mon, 20 Jan 2014 04:06:21 +0000 (22:06 -0600)]
handsfree: Skeleton implementation of DDR

Distracted Driving Reduction or Enhanced Safety is implemented using HF
indicator 0x0001

10 years agohandsfree: Add new driver method for HF indicators
Denis Kenzior [Mon, 20 Jan 2014 04:06:03 +0000 (22:06 -0600)]
handsfree: Add new driver method for HF indicators

10 years agohfp: Add initial SLC negotiation for HFP 1.7
Denis Kenzior [Mon, 20 Jan 2014 03:39:26 +0000 (21:39 -0600)]
hfp: Add initial SLC negotiation for HFP 1.7

10 years agodoc: Add Distracted Driving Reduction to Handsfree
Denis Kenzior [Mon, 20 Jan 2014 04:05:49 +0000 (22:05 -0600)]
doc: Add Distracted Driving Reduction to Handsfree

10 years agohandsfree: Implement new Features property value
Denis Kenzior [Mon, 20 Jan 2014 04:05:15 +0000 (22:05 -0600)]
handsfree: Implement new Features property value

10 years agodoc: Add 'hf-indicators' feature to Handsfree API
Denis Kenzior [Mon, 20 Jan 2014 04:04:53 +0000 (22:04 -0600)]
doc: Add 'hf-indicators' feature to Handsfree API

10 years agoemulator: Enable HF Indicator feature
Denis Kenzior [Tue, 21 Jan 2014 03:42:58 +0000 (21:42 -0600)]
emulator: Enable HF Indicator feature

10 years agoemulator: Extend BRSF bitmap
Denis Kenzior [Tue, 21 Jan 2014 03:41:23 +0000 (21:41 -0600)]
emulator: Extend BRSF bitmap

The current check of 8 bits is not enough with HFP 1.7

10 years agoemulator: Add +BIEV implementation
Denis Kenzior [Fri, 17 Jan 2014 20:38:56 +0000 (14:38 -0600)]
emulator: Add +BIEV implementation

10 years agoemulator: Add +BIND implementation
Denis Kenzior [Fri, 17 Jan 2014 20:38:39 +0000 (14:38 -0600)]
emulator: Add +BIND implementation

10 years agoemulator: Fix CHLD=? not treated as part of SLC
Denis Kenzior [Tue, 21 Jan 2014 03:42:13 +0000 (21:42 -0600)]
emulator: Fix CHLD=? not treated as part of SLC

10 years agoemulator: Improve SLC establishment logic
Denis Kenzior [Fri, 17 Jan 2014 20:37:41 +0000 (14:37 -0600)]
emulator: Improve SLC establishment logic

10 years agohfp: Add enum for known HF Indicators
Denis Kenzior [Fri, 17 Jan 2014 20:36:28 +0000 (14:36 -0600)]
hfp: Add enum for known HF Indicators

10 years agohfp: Update for new HFP 1.7 values
Denis Kenzior [Fri, 17 Jan 2014 05:04:30 +0000 (23:04 -0600)]
hfp: Update for new HFP 1.7 values

10 years agodoc: Fixup Handsfree API
Denis Kenzior [Mon, 20 Jan 2014 04:03:53 +0000 (22:03 -0600)]
doc: Fixup Handsfree API

10 years agohandsfree-audio: Fix broken coding style in switch statement
Marcel Holtmann [Sat, 20 Sep 2014 14:13:45 +0000 (16:13 +0200)]
handsfree-audio: Fix broken coding style in switch statement

10 years agogdbus: Fix match rule for NameOwnerChanged
Alban Crequy [Tue, 15 Jul 2014 10:29:41 +0000 (11:29 +0100)]
gdbus: Fix match rule for NameOwnerChanged

When subscribing to the D-Bus signal NameOwnerChanged from the bus driver,
specify the object path and the sender in the match rule. Otherwise, random
connections on the bus could impersonate the bus driver.

10 years agogdbus: Fix crash when watch is toggled or disconnected
Luiz Augusto von Dentz [Tue, 12 Aug 2014 12:31:24 +0000 (15:31 +0300)]
gdbus: Fix crash when watch is toggled or disconnected

This partially reverts 510b32b7156625b9df737c916b7a7a5c6fb285b9 since it
still necessary to take a reference before calling dbus_watch_handle
since internally it can call watch_info_free as in the following trace:

 Invalid read of size 8
   at 0x121085: watch_func (mainloop.c:105)
   by 0x4C72694: g_main_context_dispatch (gmain.c:2539)
   by 0x4C729C7: g_main_context_iterate.isra.23 (gmain.c:3146)
   by 0x4C72DC1: g_main_loop_run (gmain.c:3340)
   by 0x120541: main (main.c:551)
 Address 0x5bbcd90 is 16 bytes inside a block of size 24 free'd
   at 0x4A079AE: free (vg_replace_malloc.c:427)
   by 0x4C7837E: g_free (gmem.c:252)
   by 0x4F708BF: dbus_watch_set_data (dbus-watch.c:614)
   by 0x4F70938: _dbus_watch_unref (dbus-watch.c:132)
   by 0x4F6E9A7: _dbus_transport_handle_watch (dbus-transport.c:884)
   by 0x4F59AFB: _dbus_connection_handle_watch (dbus-connection.c:1497)
   by 0x4F70AF9: dbus_watch_handle (dbus-watch.c:683)
   by 0x121084: watch_func (mainloop.c:103)
   by 0x4C72694: g_main_context_dispatch (gmain.c:2539)
   by 0x4C729C7: g_main_context_iterate.isra.23 (gmain.c:3146)
   by 0x4C72DC1: g_main_loop_run (gmain.c:3340)
   by 0x120541: main (main.c:551)

10 years agogdbus: Fix crash when calling g_dbus_add_service_watch
Luiz Augusto von Dentz [Tue, 12 Aug 2014 12:11:29 +0000 (15:11 +0300)]
gdbus: Fix crash when calling g_dbus_add_service_watch

If g_dbus_add_service_watch is called for service which bus name is
already known the following crash can happen:

invalid read of size 1
  at 0x4C2A2F2: strlen (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
  by 0x4E97722: g_strdup (in /usr/lib64/libglib-2.0.so.0.3800.2)
  by 0x405B0C: update_name_cache (watch.c:435)
  by 0x405C37: update_service (watch.c:593)
  by 0x4E7A2A5: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3800.2)
  by 0x4E7A627: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
  by 0x4E7AA39: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3800.2)
  by 0x4038EA: client_ready (test-gdbus-client.c:1014)
  by 0x4E9E5E0: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
  by 0x4E9E7A5: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
  by 0x4E9EB1A: g_test_run_suite (in /usr/lib64/libglib-2.0.so.0.3800.2)
  by 0x403614: main (test-gdbus-client.c:1058)
Address 0x5dbe5d0 is 0 bytes inside a block of size 7 free'd
  at 0x4C28577: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
  by 0x4E7FF7E: g_free (in /usr/lib64/libglib-2.0.so.0.3800.2)
  by 0x405B04: update_name_cache (watch.c:434)
  by 0x405C37: update_service (watch.c:593)
  by 0x4E7A2A5: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3800.2)
  by 0x4E7A627: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
  by 0x4E7AA39: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3800.2)
  by 0x4038EA: client_ready (test-gdbus-client.c:1014)
  by 0x4E9E5E0: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
  by 0x4E9E7A5: ??? (in /usr/lib64/libglib-2.0.so.0.3800.2)
  by 0x4E9EB1A: g_test_run_suite (in /usr/lib64/libglib-2.0.so.0.3800.2)
  by 0x403614: main (test-gdbus-client.c:1058)

10 years agoRevert "gdbus: Don't include just added interfaces in GetManagedObjects"
Luiz Augusto von Dentz [Mon, 11 Aug 2014 14:58:37 +0000 (17:58 +0300)]
Revert "gdbus: Don't include just added interfaces in GetManagedObjects"

This actually creates a problem since the code now does flush any pending
message on the queue any signal will be send right away before the
actual reply to GetManagedObjects which will not contain those interfaces.

10 years agogdbus: Fix use after free
Andrei Emeltchenko [Mon, 11 Aug 2014 07:50:44 +0000 (10:50 +0300)]
gdbus: Fix use after free

Refactor filter_data_remove_callback so that we do not iterate over
freed pointer.

10 years agogdbus: Avoid reporting GDBusClient disconnect twice
Claudio Takahasi [Wed, 2 Apr 2014 18:30:21 +0000 (15:30 -0300)]
gdbus: Avoid reporting GDBusClient disconnect twice

No matter if disconnection was reported previously, g_dbus_client_unref()
was always calling service disconnect callback. This patch fix the
following scenario:
1) service disconnects from the bus
2) disconnect callback gets called
3) client calls g_dbus_client_unref(), disconnect callback is called
   again.

10 years agobuild: Avoid warnings about _FORTIFY_SOURCE
Denis Kenzior [Fri, 1 Aug 2014 14:29:40 +0000 (09:29 -0500)]
build: Avoid warnings about _FORTIFY_SOURCE

Gentoo (and others) define _FORTIFY_SOURCE=2 by default.  We redefine
it, resulting in an error / configure failure.

10 years agoublox: Minor style cleanup
Denis Kenzior [Tue, 8 Jul 2014 13:58:48 +0000 (08:58 -0500)]
ublox: Minor style cleanup

10 years agoublox: Remove unneeded VENDOR flags
Denis Kenzior [Tue, 8 Jul 2014 13:56:55 +0000 (08:56 -0500)]
ublox: Remove unneeded VENDOR flags

devinfo and netreg atoms don't use vendor specific behavior

10 years agoplugins: new driver for u-blox SARA-U270 modems
Philip Paeps [Thu, 3 Jul 2014 10:32:04 +0000 (12:32 +0200)]
plugins: new driver for u-blox SARA-U270 modems

This driver may also work (perhaps with more or less trivial changes)
with other u-blox modems (SARA, LISA, LEON) but this hasn't been tested.

10 years agoatmodem: set the auth method for u-blox modems
Philip Paeps [Thu, 3 Jul 2014 10:32:06 +0000 (12:32 +0200)]
atmodem: set the auth method for u-blox modems

10 years agosim: query u-blox PIN retries with AT+UPINCNT
Philip Paeps [Thu, 3 Jul 2014 10:32:05 +0000 (12:32 +0200)]
sim: query u-blox PIN retries with AT+UPINCNT

10 years agoudevng: add detection logic for u-blox modems
Philip Paeps [Thu, 3 Jul 2014 10:32:03 +0000 (12:32 +0200)]
udevng: add detection logic for u-blox modems

10 years agoquectel: Minor style cleanup
Denis Kenzior [Tue, 8 Jul 2014 13:44:21 +0000 (08:44 -0500)]
quectel: Minor style cleanup

10 years agoquectel: Remove unneeded VENDOR flags
Denis Kenzior [Tue, 8 Jul 2014 13:43:01 +0000 (08:43 -0500)]
quectel: Remove unneeded VENDOR flags

Only the sim atom has QUECTEL specific code

10 years agoplugins: add a new driver for Quectel UC15 modems
Philip Paeps [Mon, 7 Jul 2014 09:54:47 +0000 (11:54 +0200)]
plugins: add a new driver for Quectel UC15 modems