platform/upstream/ofono.git
10 years agodoc: Add subscriber number to handsfree-api
Andrew Earl [Tue, 8 Apr 2014 08:21:44 +0000 (09:21 +0100)]
doc: Add subscriber number to handsfree-api

10 years agoAUTHORS: Mention Jussi's contributions
Denis Kenzior [Thu, 27 Mar 2014 14:51:26 +0000 (09:51 -0500)]
AUTHORS: Mention Jussi's contributions

10 years agophonesim: Fixup whitespace
Denis Kenzior [Thu, 27 Mar 2014 14:50:56 +0000 (09:50 -0500)]
phonesim: Fixup whitespace

10 years agophonesim: Add conf file override
Jussi Pakkanen [Thu, 27 Mar 2014 13:08:56 +0000 (15:08 +0200)]
phonesim: Add conf file override

OFONO_PHONESIM_CONFIG allows the configuration file location to be
overriden from the default $CONFIGDIR/phonesim.conf (typically /etc)

10 years agogdbus: Add g_dbus_proxy_set_property_array
Claudio Takahasi [Fri, 21 Mar 2014 19:16:36 +0000 (16:16 -0300)]
gdbus: Add g_dbus_proxy_set_property_array

This patch adds a new gdbus utility function to allow setting a property
of fixed, and non-fixed values array.

10 years agohe910: Fix unused variable warning
Denis Kenzior [Thu, 20 Mar 2014 17:55:20 +0000 (12:55 -0500)]
he910: Fix unused variable warning

plugins/he910.c: In function ‘qss_query_cb’:
plugins/he910.c:174:21: error: unused variable ‘data’
[-Werror=unused-variable]

10 years agohe910: Switch to permissive parser
Denis Kenzior [Wed, 5 Mar 2014 18:26:04 +0000 (12:26 -0600)]
he910: Switch to permissive parser

Seems the CCFC implementation on Telit firmware is not v.250 compliant:
ofonod[445]: Aux: > AT+CCFC=0,2\r
ofonod[445]: Aux: < \r\n\r\n+CCFC:0,7\r\n\r\nOK\r\n

10 years agohe910: Fixup SIM detection
Denis Kenzior [Wed, 5 Mar 2014 18:48:21 +0000 (12:48 -0600)]
he910: Fixup SIM detection

In certain cases the #QSS notification is never sent, or sent too early.
Make sure that we enable #QSS notification only after the modem has been
set as powered.  Also make sure that we explicitly query #QSS in case we
missed the earlier #QSS notification.

10 years agohfp: Use enum from hfp.h
Denis Kenzior [Wed, 19 Mar 2014 15:24:57 +0000 (10:24 -0500)]
hfp: Use enum from hfp.h

10 years agohfp: Fixup variable names
Denis Kenzior [Wed, 19 Mar 2014 15:20:28 +0000 (10:20 -0500)]
hfp: Fixup variable names

10 years agohfp: Add CHLD features to drver data
Krzysztof Wilk [Mon, 17 Mar 2014 15:47:29 +0000 (16:47 +0100)]
hfp: Add CHLD features to drver data

10 years agohandsfree: Fixup variable names
Denis Kenzior [Wed, 19 Mar 2014 15:19:35 +0000 (10:19 -0500)]
handsfree: Fixup variable names

10 years agohfp: extend Features to three way calling and CHLD
Krzysztof Wilk [Mon, 17 Mar 2014 15:47:30 +0000 (16:47 +0100)]
hfp: extend Features to three way calling and CHLD

10 years agoinclude: Declaration function to set CHLD features
Krzysztof Wilk [Mon, 17 Mar 2014 15:47:28 +0000 (16:47 +0100)]
include: Declaration function to set CHLD features

10 years agohfp: Define hfp_ag_chld_feature
Krzysztof Wilk [Mon, 17 Mar 2014 15:47:27 +0000 (16:47 +0100)]
hfp: Define hfp_ag_chld_feature

10 years agodoc: Extend Features property
Krzysztof Wilk [Mon, 17 Mar 2014 15:47:26 +0000 (16:47 +0100)]
doc: Extend Features property

10 years agoAUTHORS: Mention Alfonso's contributions
Denis Kenzior [Fri, 14 Mar 2014 17:24:54 +0000 (12:24 -0500)]
AUTHORS: Mention Alfonso's contributions

10 years agounit: Fix test to use valid EF_PNN
Alfonso Sanchez-Beato [Fri, 14 Mar 2014 16:23:44 +0000 (17:23 +0100)]
unit: Fix test to use valid EF_PNN

test-simutil was not using EF_PNN files with a valid format.

10 years agosimutil: Fix EF_PNN access
Alfonso Sanchez-Beato [Fri, 14 Mar 2014 16:23:43 +0000 (17:23 +0100)]
simutil: Fix EF_PNN access

EF_PNN was not being read properly (see TS 24.008, section 10.5.3.5a,
for network names format), which affected the displayed PLMN name for
some MVNOs. Some modems already read the file and return the right
string: these do not show the problem.

10 years agostktest: Remove some unneeded output
Denis Kenzior [Fri, 14 Mar 2014 15:32:32 +0000 (10:32 -0500)]
stktest: Remove some unneeded output

10 years agotest: Make sure test-stk-menu works with python3
Denis Kenzior [Fri, 14 Mar 2014 15:32:06 +0000 (10:32 -0500)]
test: Make sure test-stk-menu works with python3

10 years agoAUTHORS: Mention Martin's contributions
Denis Kenzior [Wed, 12 Mar 2014 00:34:45 +0000 (19:34 -0500)]
AUTHORS: Mention Martin's contributions

10 years agotest: Convert to Python 3
Martin Pitt [Tue, 11 Mar 2014 16:39:22 +0000 (17:39 +0100)]
test: Convert to Python 3

Change raw_input() to input() and unicode to str. This is *not*
compatible with Python 2. Update the hashbangs to run with Python 3.

10 years agotest: Move from static gobject bindings to GI
Martin Pitt [Tue, 11 Mar 2014 16:39:21 +0000 (17:39 +0100)]
test: Move from static gobject bindings to GI

Use GLib gobject-introspection bindings so that we can also use the
scripts with Python 3.

10 years agotest: Replace obsolete has_key() with "in"
Martin Pitt [Tue, 11 Mar 2014 16:39:20 +0000 (17:39 +0100)]
test: Replace obsolete has_key() with "in"

In order to also work with Python 3

10 years agotest: Make exceptions compatible with Python 3
Martin Pitt [Tue, 11 Mar 2014 16:39:19 +0000 (17:39 +0100)]
test: Make exceptions compatible with Python 3

Use "except Type as var" syntax to work with both Python >= 2.6
and Python 3.

10 years agotest: Make print calls compatible with Python 3
Martin Pitt [Tue, 11 Mar 2014 16:39:18 +0000 (17:39 +0100)]
test: Make print calls compatible with Python 3

Turn print calls into print() function calls and avoid using
comma-separated arguments, so that they work and look the same with
both Python 2 and 3.

10 years agohe910: Fix whitespace
Denis Kenzior [Wed, 5 Mar 2014 18:25:43 +0000 (12:25 -0600)]
he910: Fix whitespace

10 years agogdbus: Add g_dbus_client_set_ready_watch()
Claudio Takahasi [Thu, 6 Mar 2014 13:44:19 +0000 (10:44 -0300)]
gdbus: Add g_dbus_client_set_ready_watch()

This patch adds a new gdbus helper to notify the clients that
GetManagedObjects reply was received and the last proxy has been
informed previously by the proxy_added callback.

10 years agoAUTHORS: Mention Tony's contributions
Denis Kenzior [Wed, 5 Mar 2014 14:51:06 +0000 (08:51 -0600)]
AUTHORS: Mention Tony's contributions

10 years agoidmap: use UL for bitshift literals
Tony Espy [Wed, 5 Mar 2014 00:01:34 +0000 (19:01 -0500)]
idmap: use UL for bitshift literals

The current bitshift logic in idmap incorrectly uses
the literal 1 for the value to shift in idmap_alloc(),
idmap_take(), and idmap_alloc_next().  This causes the
resulting value to be an int instead of a long, which
results in the wrong bit being set once the number of
bits to shift operand exceeds sizeof(int).  Also
on some platforms, the behavior of the left bitshift
operator is undefined when this overflow occurs.

10 years agogdbus: Replace g_timeout_add with g_idle_add
Luiz Augusto von Dentz [Tue, 18 Feb 2014 20:16:56 +0000 (22:16 +0200)]
gdbus: Replace g_timeout_add with g_idle_add

Passing 0 as timeout to g_timeout_add should equivalent to g_idle_add.

10 years agogdbus: Fix incorrect DBusConnection reference counting
Anderson Lizardo [Tue, 18 Feb 2014 16:45:17 +0000 (12:45 -0400)]
gdbus: Fix incorrect DBusConnection reference counting

Commit abfc2b0dd5c3e33abfdf1a815b16d492c1751c06 attempted to fix a crash
related to improper reference counting, but the main issue was that the
reference was taken only during the function call (which is usually
unnecessary for single thread), but still passed a pointer to
DBusConnection to a function that is called by the mainloop. This left a
window where the DBusConnection can be destroyed.

Fixes this crash on unit/test-gdbus-client:

==32642== Invalid read of size 4
==32642==    at 0x690D0A6: dbus_connection_ref (in
/lib/i386-linux-gnu/libdbus-1.so.3.7.6)
==32642==    by 0x804CEDB: message_dispatch (mainloop.c:73)
==32642==    by 0x684580E: g_timeout_dispatch (gmain.c:4450)
==32642==    by 0x6844A75: g_main_context_dispatch (gmain.c:3065)
==32642==    by 0x6844E14: g_main_context_iterate.isra.23 (gmain.c:3712)
==32642==    by 0x68452FA: g_main_loop_run (gmain.c:3906)
==32642==    by 0x804C7D3: client_connect_disconnect
(test-gdbus-client.c:188)
==32642==    by 0x6868DB2: g_test_run_suite_internal (gtestutils.c:2067)
==32642==    by 0x6868F8D: g_test_run_suite_internal (gtestutils.c:2138)
==32642==    by 0x6869320: g_test_run_suite (gtestutils.c:2189)
==32642==    by 0x686936B: g_test_run (gtestutils.c:1508)
==32642==    by 0x696D4D2: (below main) (libc-start.c:226)
==32642==  Address 0x709c6e4 is 140 bytes inside a block of size 144
free'd
==32642==    at 0x67E806C: free (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==32642==    by 0x692D62E: dbus_free (in
/lib/i386-linux-gnu/libdbus-1.so.3.7.6)
==32642==    by 0x690E1C2: ??? (in
/lib/i386-linux-gnu/libdbus-1.so.3.7.6)
==32642==    by 0x804AAEC: destroy_context (test-gdbus-client.c:104)
==32642==    by 0x6868DB2: g_test_run_suite_internal (gtestutils.c:2067)
==32642==    by 0x6868F8D: g_test_run_suite_internal (gtestutils.c:2138)
==32642==    by 0x6869320: g_test_run_suite (gtestutils.c:2189)
==32642==    by 0x686936B: g_test_run (gtestutils.c:1508)
==32642==    by 0x696D4D2: (below main) (libc-start.c:226)

10 years agogdbus: Fix memory leak
Anderson Lizardo [Mon, 10 Feb 2014 17:14:56 +0000 (13:14 -0400)]
gdbus: Fix memory leak

data->conn and data->path must be destroyed before freeing "data".

10 years agombpi: Pop subparser stack after mmsc and mmsproxy
Slava Monich [Thu, 6 Feb 2014 12:12:26 +0000 (14:12 +0200)]
mbpi: Pop subparser stack after mmsc and mmsproxy

10 years agogatchat: Fix handling of WRITE_SCHEDULER_DEBUG
Marcel Holtmann [Mon, 20 Jan 2014 00:48:04 +0000 (16:48 -0800)]
gatchat: Fix handling of WRITE_SCHEDULER_DEBUG

10 years agoinclude: Be more const-correct in ofono_dbus_*
Slava Monich [Sat, 11 Jan 2014 11:32:10 +0000 (13:32 +0200)]
include: Be more const-correct in ofono_dbus_*

10 years agoRelease 1.14 1.14
Marcel Holtmann [Sun, 22 Dec 2013 21:03:11 +0000 (13:03 -0800)]
Release 1.14

10 years agounit: Ignore errors about deprecated g_test_trap_fork
Marcel Holtmann [Sat, 21 Dec 2013 21:27:36 +0000 (13:27 -0800)]
unit: Ignore errors about deprecated g_test_trap_fork

10 years agobuild: Remove unused dependency on USB library
Marcel Holtmann [Sat, 21 Dec 2013 21:13:07 +0000 (13:13 -0800)]
build: Remove unused dependency on USB library

10 years agogit: Fixup messed up permissions
Denis Kenzior [Sat, 21 Dec 2013 19:39:54 +0000 (13:39 -0600)]
git: Fixup messed up permissions

10 years agofeatures: Describe Siri feature
Krzysztof Wilk [Wed, 18 Dec 2013 15:03:02 +0000 (15:03 +0000)]
features: Describe Siri feature

10 years agoAUTHORS: Mention Krzysztof's contributions
Denis Kenzior [Wed, 18 Dec 2013 06:10:19 +0000 (00:10 -0600)]
AUTHORS: Mention Krzysztof's contributions

10 years agophonesim: Enable Siri atom
Krzysztof Wilk [Mon, 16 Dec 2013 17:52:44 +0000 (17:52 +0000)]
phonesim: Enable Siri atom

10 years agohfp_hf_bluez5: Enable Siri atom
Krzysztof Wilk [Mon, 16 Dec 2013 17:52:43 +0000 (17:52 +0000)]
hfp_hf_bluez5: Enable Siri atom

10 years agohfp_hf_bluez4: Enable Siri atom
Krzysztof Wilk [Mon, 16 Dec 2013 17:52:42 +0000 (17:52 +0000)]
hfp_hf_bluez4: Enable Siri atom

10 years agosiri: Add atom driver
Krzysztof Wilk [Mon, 16 Dec 2013 17:52:41 +0000 (17:52 +0000)]
siri: Add atom driver

10 years agosiri: Add atom implementation
Krzysztof Wilk [Mon, 16 Dec 2013 17:52:40 +0000 (17:52 +0000)]
siri: Add atom implementation

10 years agoinclude: Add Siri interface definition
Krzysztof Wilk [Mon, 16 Dec 2013 17:52:39 +0000 (17:52 +0000)]
include: Add Siri interface definition

10 years agodbus: Define Siri DBUS Interface
Krzysztof Wilk [Mon, 16 Dec 2013 17:52:38 +0000 (17:52 +0000)]
dbus: Define Siri DBUS Interface

10 years agodoc: Add Siri API
Krzysztof Wilk [Mon, 16 Dec 2013 17:52:37 +0000 (17:52 +0000)]
doc: Add Siri API

10 years agoAUTHORS: Mention Andrew's contributions
Denis Kenzior [Thu, 5 Dec 2013 09:50:05 +0000 (03:50 -0600)]
AUTHORS: Mention Andrew's contributions

10 years agohfp: Add Voice Recognition flag to BRSF
Andrew Earl [Wed, 4 Dec 2013 14:36:13 +0000 (15:36 +0100)]
hfp: Add Voice Recognition flag to BRSF

10 years agohe910: tweak initialization logic
Denis Kenzior [Tue, 26 Nov 2013 22:25:48 +0000 (16:25 -0600)]
he910: tweak initialization logic

10 years agonetreg: Turn off CIEV indications other than rssi
Denis Kenzior [Tue, 26 Nov 2013 22:25:03 +0000 (16:25 -0600)]
netreg: Turn off CIEV indications other than rssi

10 years agoAUTHORS: Mention Slava's contributions
Denis Kenzior [Tue, 26 Nov 2013 21:33:08 +0000 (15:33 -0600)]
AUTHORS: Mention Slava's contributions

10 years agombpi: Provision mmsc and message_proxy
Slava Monich [Mon, 25 Nov 2013 22:00:41 +0000 (00:00 +0200)]
mbpi: Provision mmsc and message_proxy

10 years agohfp_ag_bluez5: Try to support non-phone hardware
Denis Kenzior [Mon, 25 Nov 2013 17:33:57 +0000 (11:33 -0600)]
hfp_ag_bluez5: Try to support non-phone hardware

For devices which are not 'real' phone modems, the voicecall
initialization can happen outside of the pre-sim state.  In this case
the voicecall atom detection logic fails.  Try to detect the voicecall
atom separately, and register the profile if the SIM atom is already
present and in state 'READY'.

For all other cases, the previous logic still applies.

10 years agoudevng: Add he910 detection logic
Denis Kenzior [Mon, 11 Nov 2013 22:01:51 +0000 (16:01 -0600)]
udevng: Add he910 detection logic

10 years agoplugins: Add initial Telit he910 driver
Denis Kenzior [Mon, 25 Nov 2013 16:54:51 +0000 (10:54 -0600)]
plugins: Add initial Telit he910 driver

10 years agobuild: Always build the connman plugin
Denis Kenzior [Fri, 22 Nov 2013 22:03:27 +0000 (16:03 -0600)]
build: Always build the connman plugin

It is not related to BLUEZ 4 support

10 years agogdbus: Fix trying to remove already removed sources
Bastien Nocera [Sat, 9 Nov 2013 17:02:57 +0000 (18:02 +0100)]
gdbus: Fix trying to remove already removed sources

When we return FALSE from idle handlers, the source is removed.
This will be causing warnings in glib 2.40.

See https://bugzilla.gnome.org/show_bug.cgi?id=710724

10 years agoRelease 1.13 1.13 upstream/1.13
Marcel Holtmann [Fri, 8 Nov 2013 08:34:09 +0000 (00:34 -0800)]
Release 1.13

10 years agombm: Fix segfault with hot-plugged MD300 modem
Denis Kenzior [Thu, 17 Oct 2013 20:24:56 +0000 (15:24 -0500)]
mbm: Fix segfault with hot-plugged MD300 modem

10 years agogdbus: Remove not needed check for NULL DBusPendingCall
Szymon Janc [Thu, 26 Sep 2013 08:02:35 +0000 (10:02 +0200)]
gdbus: Remove not needed check for NULL DBusPendingCall

It is now checked by g_dbus_send_message_with_reply() so there is no
need to double check that in caller.

10 years agogdbus: Check for NULL DBusPendingCall in g_dbus_send_message_with_reply
Szymon Janc [Thu, 26 Sep 2013 08:02:34 +0000 (10:02 +0200)]
gdbus: Check for NULL DBusPendingCall in g_dbus_send_message_with_reply

"Warning: if the connection is disconnected or you try to send Unix file
descriptors on a connection that does not support them, the
DBusPendingCall will be set to NULL, so be careful with this."

Check this in g_dbus_send_message_with_reply so that callers don't need
to double check for NULL if g_dbus_send_message_with_reply returned
TRUE.

This also fix crash if passing FD over D-Bus is blocked e.g. by SELinux
policy.

bluetoothd[1894]: profiles/audio/avdtp.c:session_cb()
bluetoothd[1894]: profiles/audio/avdtp.c:avdtp_parse_cmd() Received
    SET_CONFIGURATION_CMD
bluetoothd[1894]: profiles/audio/a2dp.c:endpoint_setconf_ind() Source
    0x6c5000: Set_Configuration_Ind
bluetoothd[1894]: profiles/audio/avdtp.c:avdtp_ref() 0x6df360: ref=1
bluetoothd[1894]: profiles/audio/a2dp.c:setup_ref() 0x6d32b0: ref=1
process 1894: arguments to dbus_pending_call_set_notify() were incorrect,
     assertion "pending != NULL" failed in file dbus-pending-call.c line
     636.
This is normally a bug in some application using the D-Bus library.

10 years agohfp_hf_bluez5: Be more pedantic in get_version
Denis Kenzior [Tue, 1 Oct 2013 16:35:27 +0000 (11:35 -0500)]
hfp_hf_bluez5: Be more pedantic in get_version

If no 'Version' key is found we might be assigning an uninitialized
value.  Return an error in this case as the 'Version' key is required.

10 years agohfp_hf_bluez5: Add version debug info
Denis Kenzior [Tue, 1 Oct 2013 16:28:19 +0000 (11:28 -0500)]
hfp_hf_bluez5: Add version debug info

10 years agohandsfree-audio: Don't listen() if no defer_setup
Vinicius Costa Gomes [Wed, 11 Sep 2013 00:09:44 +0000 (21:09 -0300)]
handsfree-audio: Don't listen() if no defer_setup

As we won't allow any card to be registered when the kernel doesn't
support defer_setup, we don't need to have the listening SCO socket
open in this case.

10 years agohandsfree-audio: Don't register if no defer_setup
Vinicius Costa Gomes [Wed, 11 Sep 2013 00:09:43 +0000 (21:09 -0300)]
handsfree-audio: Don't register if no defer_setup

If the kernel doesn't support defer_setup for SCO, we shouldn't allow
cards to be registered, because in that case we won't be able to
properly send the file descriptor to the Agent.

10 years agohandsfree-audio: Set socket parameters
Vinicius Costa Gomes [Wed, 11 Sep 2013 00:09:42 +0000 (21:09 -0300)]
handsfree-audio: Set socket parameters

In the AG case, the voice setting needs to be set before we can
use Transparent SCO mode, which is necessary for Wideband speech
support.

10 years agohandsfree-audio: Detect transparent SCO in kernel
Vinicius Costa Gomes [Wed, 11 Sep 2013 00:09:41 +0000 (21:09 -0300)]
handsfree-audio: Detect transparent SCO in kernel

Deferred SCO setup is not enough for HFP 1.6 wideband codec support.
Wideband speech also requires Transparent SCO to be enabled in the
kernel.

10 years agohandsfree-audio: Tweak logic a bit
Denis Kenzior [Thu, 12 Sep 2013 18:07:33 +0000 (13:07 -0500)]
handsfree-audio: Tweak logic a bit

10 years agohandsfree-audio: Add setting SCO air mode
Vinicius Costa Gomes [Wed, 11 Sep 2013 00:09:40 +0000 (21:09 -0300)]
handsfree-audio: Add setting SCO air mode

10 years agohfp_hf_bluez5: Remove Cancel method
Denis Kenzior [Tue, 10 Sep 2013 16:26:22 +0000 (11:26 -0500)]
hfp_hf_bluez5: Remove Cancel method

10 years agohfp_hf_bluez5: Mark Release method as NOREPLY
Denis Kenzior [Tue, 10 Sep 2013 16:25:50 +0000 (11:25 -0500)]
hfp_hf_bluez5: Mark Release method as NOREPLY

10 years agotest: Add set-msisdn script
Denis Kenzior [Tue, 10 Sep 2013 16:01:55 +0000 (11:01 -0500)]
test: Add set-msisdn script

10 years agotest: Add display-icon script
Denis Kenzior [Tue, 10 Sep 2013 16:01:18 +0000 (11:01 -0500)]
test: Add display-icon script

10 years agohfpmodem: Call ofono_voicecall_mpty_hint as needed
Denis Kenzior [Tue, 10 Sep 2013 15:58:14 +0000 (10:58 -0500)]
hfpmodem: Call ofono_voicecall_mpty_hint as needed

10 years agoatmodem: Update parse_clcc utility function
Denis Kenzior [Tue, 10 Sep 2013 15:57:42 +0000 (10:57 -0500)]
atmodem: Update parse_clcc utility function

10 years agovoicecall: Implement ofono_voicecall_mpty_hint
Denis Kenzior [Tue, 10 Sep 2013 15:56:44 +0000 (10:56 -0500)]
voicecall: Implement ofono_voicecall_mpty_hint

10 years agoinclude: Add voicecall multiparty hint method
Denis Kenzior [Tue, 10 Sep 2013 15:54:05 +0000 (10:54 -0500)]
include: Add voicecall multiparty hint method

On protocols that support creation of multiparty calls outside of
oFono's control, we need a way to detect multiparty call transitions.
This method adds a way for the driver to hint the core which calls
should be part of the multiparty call.

Right now this is relevant only to HFP.  Real modem hardware should not
be using this method.

10 years agotest: Add selecting the modem in private-chat
Denis Kenzior [Tue, 10 Sep 2013 15:53:49 +0000 (10:53 -0500)]
test: Add selecting the modem in private-chat

10 years agotest: Add selecting the modem in create-multiparty
Denis Kenzior [Tue, 10 Sep 2013 15:53:17 +0000 (10:53 -0500)]
test: Add selecting the modem in create-multiparty

10 years agogdbus/client: Use g_dbus_add_properties_watch to track properties
Luiz Augusto von Dentz [Wed, 4 Sep 2013 18:57:20 +0000 (21:57 +0300)]
gdbus/client: Use g_dbus_add_properties_watch to track properties

This make the handling much simpler and avoids duplicates of the same
match rule.

10 years agogdbus/client: Use g_dbus_add_signal_watch to track signals
Luiz Augusto von Dentz [Mon, 2 Sep 2013 15:54:33 +0000 (18:54 +0300)]
gdbus/client: Use g_dbus_add_signal_watch to track signals

This make the handling much simpler and avoids duplicates of the same
match rule.

10 years agogdbus/client: Use g_dbus_add_service_watch to track services
Luiz Augusto von Dentz [Mon, 2 Sep 2013 13:02:05 +0000 (16:02 +0300)]
gdbus/client: Use g_dbus_add_service_watch to track services

This make the handling much simpler and avoids duplicates of the same
match rule.

10 years agogdbus/watch: Fix crash when disconnecting from D-Bus
Luiz Augusto von Dentz [Mon, 9 Sep 2013 08:25:12 +0000 (11:25 +0300)]
gdbus/watch: Fix crash when disconnecting from D-Bus

When disconnecting from D-Bus a message could be recieved with no sender:
Invalid read of size 1
   at 0x4A09EE1: strcmp (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x3B03C386B8: g_str_equal (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x4065D6: message_filter (watch.c:529)
   by 0x3B0700F9E5: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.7.4)
   by 0x4052E7: message_dispatch (mainloop.c:76)
   by 0x3B03C48962: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x3B03C47E05: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x3B03C48157: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x3B03C48559: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x4038C5: client_proxy_removed (test-gdbus-client.c:902)
   by 0x3B03C6B566: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
   by 0x3B03C6B6E5: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
 Address 0x0 is not stack'd, malloc'd or (recently) free'd

10 years agogdbus/watch: Fix aborting when removing D-Bus filter
Luiz Augusto von Dentz [Tue, 3 Sep 2013 15:00:35 +0000 (18:00 +0300)]
gdbus/watch: Fix aborting when removing D-Bus filter

In case of filter_data having a watch to a service name it may call
dbus_connection_remove_filter twice causing libdbus to abort:

process 24723: Attempt to remove filter function 0x4063e0 user data (nil), but no such filter has been added

To fix this the code will now only attempt to call
dbus_connection_remove_filter once in filter_data_free which is the
counterpart of filter_data_get where dbus_connection_add_filter is called.

10 years agogdbus/watch: Fix crash when g_dbus_remove_watch is called from connect callback
Luiz Augusto von Dentz [Mon, 2 Sep 2013 12:55:45 +0000 (15:55 +0300)]
gdbus/watch: Fix crash when g_dbus_remove_watch is called from connect callback

 at 0x40570C: update_service (watch.c:601)
 by 0x40584B: service_reply (watch.c:627)
 by 0x3B0700C511: ??? (in /usr/lib64/libdbus-1.so.3.7.4)
 by 0x3B0700F740: dbus_connection_dispatch (in /usr/lib64/libdbus-1.so.3.7.4)
 by 0x405167: message_dispatch (mainloop.c:76)
 by 0x3B03C48962: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
 by 0x3B03C47E05: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.3)
 by 0x3B03C48157: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
 by 0x3B03C48559: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.3)
Address 0x4c58a30 is 32 bytes inside a block of size 56 free'd
 at 0x4A074C4: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
 by 0x3B03C4D9AE: g_free (in /usr/lib64/libglib-2.0.so.0.3600.3)
 by 0x406102: filter_data_remove_callback (watch.c:378)
 by 0x405FC0: g_dbus_remove_watch (watch.c:798)
 by 0x40A22B: g_dbus_client_unref (client.c:1227)
 by 0x40570B: update_service (watch.c:599)
 by 0x40584B: service_reply (watch.c:627)

10 years agogdbus: Fix emitting PropertiesChanged twice
Luiz Augusto von Dentz [Mon, 19 Aug 2013 13:54:35 +0000 (16:54 +0300)]
gdbus: Fix emitting PropertiesChanged twice

This fixes double emission of PropertiesChanged introduced by flushing
changes, the flushing can happen during the pending processing so the
pending_prop flag needs to be updated in the beginning and the list of
properties can be freed before g_dbus_send_message as it is not required
anymore.

10 years agogdbus: Avoid calling dbus_connection_send*
Luiz Augusto von Dentz [Mon, 19 Aug 2013 13:05:15 +0000 (16:05 +0300)]
gdbus: Avoid calling dbus_connection_send*

dbus_connection_send* should not be called directly except by
g_dbus_send_message.

10 years agogdbus: Add g_dbus_send_message_with_reply
Luiz Augusto von Dentz [Mon, 19 Aug 2013 12:25:57 +0000 (15:25 +0300)]
gdbus: Add g_dbus_send_message_with_reply

g_dbus_send_message_with_reply flushes pending signals before calling
dbus_connection_send_with_reply so it does not alter the message order

10 years agogdbus: Fix sending ObjectManager/Properties signals out of order
Luiz Augusto von Dentz [Mon, 19 Aug 2013 11:39:28 +0000 (14:39 +0300)]
gdbus: Fix sending ObjectManager/Properties signals out of order

In some cases the order of the messages is altered when a message is
sent without processing the pending signals first, currently this affect
client_check_order unit test:

/gdbus/client_check_order: **
ERROR:unit/test-gdbus-client.c:795:property_check_order: assertion failed: (g_strcmp0(string, "value1") == 0)

As can be observed the value of the property is not yet updated because the
signal it is still pending, once this fix is applied the test pass:

/gdbus/client_check_order: OK

Note that the flushing only works when g_dbus_send_message is used so
places where dbus_connection_send and other variants are called directly
may still change the order.

10 years agosmsutil: Make sure to return 1/0
Denis Kenzior [Wed, 4 Sep 2013 03:58:59 +0000 (22:58 -0500)]
smsutil: Make sure to return 1/0

So the value might be used directly for D-Bus property emission.
Otherwise D-Bus asserts and screws itself with:
ofonod[7427]: src/sms.c:handle_mwi()
process 7427: arguments to dbus_message_iter_append_basic() were
incorrect, assertion "*bool_p == 0 || *bool_p == 1" failed in file
../../dbus/dbus-message.c line 2549.

10 years agotest-sms: Add skeleton code for MWI unit test
Denis Kenzior [Wed, 4 Sep 2013 03:58:40 +0000 (22:58 -0500)]
test-sms: Add skeleton code for MWI unit test

10 years agohfp: Set UDUB affected set to WAITING only
Denis Kenzior [Sun, 25 Aug 2013 06:25:28 +0000 (01:25 -0500)]
hfp: Set UDUB affected set to WAITING only

INCOMING calls are not affected by UDUB, only by +CHUP.

10 years agohfp: Fix up disconnect reason handling for +CHUP
Denis Kenzior [Sun, 25 Aug 2013 06:21:23 +0000 (01:21 -0500)]
hfp: Fix up disconnect reason handling for +CHUP

The affected call types for +CHUP were set to only ACTIVE calls.
Instead the affected set should include INCOMING, DIALING, ALERTING and
ACTIVE calls.

Thanks to Ionut Dediu for the diagnosing and reporting this issue.

10 years agobluetooth: Add define for SCO voice settings
Vinicius Costa Gomes [Fri, 16 Aug 2013 02:26:04 +0000 (23:26 -0300)]
bluetooth: Add define for SCO voice settings

Add defines for SCO voice setting (Air Coding). Air mode "Transparent
Data" shall be supported if wide band speech is supported.

10 years agohandsfree-audio: Make sure to reset has_wideband
Denis Kenzior [Wed, 7 Aug 2013 21:37:23 +0000 (16:37 -0500)]
handsfree-audio: Make sure to reset has_wideband

When Agent is unregistered we do not know whether the wideband speech is
supported.  Default to false.