Commit Graph

7171 Commits

Author SHA1 Message Date
Martin Pitt c027ab9fbc 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.
2014-03-11 19:34:08 -05:00
Martin Pitt ad4f90684f test: Move from static gobject bindings to GI
Use GLib gobject-introspection bindings so that we can also use the
scripts with Python 3.
2014-03-11 19:33:16 -05:00
Martin Pitt 5bf5cf8ddd test: Replace obsolete has_key() with "in"
In order to also work with Python 3
2014-03-11 19:33:04 -05:00
Martin Pitt 0393a41e35 test: Make exceptions compatible with Python 3
Use "except Type as var" syntax to work with both Python >= 2.6
and Python 3.
2014-03-11 19:32:46 -05:00
Martin Pitt 0c1fcd2b50 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.
2014-03-11 19:32:18 -05:00
Denis Kenzior c54e4763f8 he910: Fix whitespace 2014-03-10 11:53:22 -05:00
Claudio Takahasi ea2b34eacd 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.
2014-03-06 09:36:48 -08:00
Denis Kenzior 472e6650d4 AUTHORS: Mention Tony's contributions 2014-03-05 08:51:06 -06:00
Tony Espy 201d34b0a1 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.
2014-03-05 08:49:50 -06:00
Luiz Augusto von Dentz 76a7f9014d gdbus: Replace g_timeout_add with g_idle_add
Passing 0 as timeout to g_timeout_add should equivalent to g_idle_add.
2014-02-18 23:13:53 -08:00
Anderson Lizardo 29401d8587 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)
2014-02-18 23:13:53 -08:00
Anderson Lizardo 90abd44ead gdbus: Fix memory leak
data->conn and data->path must be destroyed before freeing "data".
2014-02-18 23:13:53 -08:00
Slava Monich 278dba2ec8 mbpi: Pop subparser stack after mmsc and mmsproxy 2014-02-07 08:56:44 -06:00
Marcel Holtmann f83233d295 gatchat: Fix handling of WRITE_SCHEDULER_DEBUG 2014-01-19 16:48:04 -08:00
Slava Monich c2e58405ee include: Be more const-correct in ofono_dbus_* 2014-01-13 10:19:54 -06:00
Marcel Holtmann e99e52e5de Release 1.14 2013-12-22 13:03:11 -08:00
Marcel Holtmann c86997223a unit: Ignore errors about deprecated g_test_trap_fork 2013-12-21 13:27:36 -08:00
Marcel Holtmann ed93490647 build: Remove unused dependency on USB library 2013-12-21 13:13:07 -08:00
Denis Kenzior d6af339c99 git: Fixup messed up permissions 2013-12-21 13:39:54 -06:00
Krzysztof Wilk ed4e155acd features: Describe Siri feature 2013-12-18 15:28:56 -06:00
Denis Kenzior 5b89d3068c AUTHORS: Mention Krzysztof's contributions 2013-12-18 00:10:19 -06:00
Krzysztof Wilk 9d847687eb phonesim: Enable Siri atom 2013-12-18 00:07:47 -06:00
Krzysztof Wilk c8a3172c00 hfp_hf_bluez5: Enable Siri atom 2013-12-18 00:07:47 -06:00
Krzysztof Wilk 1e14b217b0 hfp_hf_bluez4: Enable Siri atom 2013-12-18 00:07:47 -06:00
Krzysztof Wilk 171d4dee76 siri: Add atom driver 2013-12-18 00:07:47 -06:00
Krzysztof Wilk 5c11e13019 siri: Add atom implementation 2013-12-18 00:07:47 -06:00
Krzysztof Wilk 5b07c59f34 include: Add Siri interface definition 2013-12-18 00:07:47 -06:00
Krzysztof Wilk 8621d36c15 dbus: Define Siri DBUS Interface 2013-12-18 00:07:47 -06:00
Krzysztof Wilk 203409a25b doc: Add Siri API 2013-12-18 00:07:47 -06:00
Denis Kenzior fc98985d14 AUTHORS: Mention Andrew's contributions 2013-12-05 03:50:05 -06:00
Andrew Earl e0aeebae0a hfp: Add Voice Recognition flag to BRSF 2013-12-05 03:45:48 -06:00
Denis Kenzior 7c7cdd8759 he910: tweak initialization logic 2013-11-26 16:25:48 -06:00
Denis Kenzior 85cdacb509 netreg: Turn off CIEV indications other than rssi 2013-11-26 16:25:03 -06:00
Denis Kenzior 3722e626f3 AUTHORS: Mention Slava's contributions 2013-11-26 15:33:08 -06:00
Slava Monich a7ba6d1e9e mbpi: Provision mmsc and message_proxy 2013-11-26 15:32:03 -06:00
Denis Kenzior 9b224fff79 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.
2013-11-25 11:33:57 -06:00
Denis Kenzior 06598ef47c udevng: Add he910 detection logic 2013-11-25 10:55:59 -06:00
Denis Kenzior 6e52f03f64 plugins: Add initial Telit he910 driver 2013-11-25 10:55:59 -06:00
Denis Kenzior 8440f77f9a build: Always build the connman plugin
It is not related to BLUEZ 4 support
2013-11-25 10:55:59 -06:00
Bastien Nocera 7a6da06f27 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
2013-11-11 01:06:19 -08:00
Marcel Holtmann 9be2fb1b10 Release 1.13 2013-11-08 00:34:09 -08:00
Denis Kenzior 0aeeaefdce mbm: Fix segfault with hot-plugged MD300 modem 2013-10-17 15:25:52 -05:00
Szymon Janc 2d925003a4 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.
2013-10-14 06:06:31 -07:00
Szymon Janc df8cf542d8 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.
2013-10-14 06:06:31 -07:00
Denis Kenzior 2158249069 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.
2013-10-01 11:35:27 -05:00
Denis Kenzior c49ed15a8f hfp_hf_bluez5: Add version debug info 2013-10-01 11:28:19 -05:00
Vinicius Costa Gomes 51982e7b13 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.
2013-09-12 13:17:40 -05:00
Vinicius Costa Gomes 6d08a47ec3 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.
2013-09-12 13:17:40 -05:00
Vinicius Costa Gomes e84bd27b99 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.
2013-09-12 13:17:40 -05:00
Vinicius Costa Gomes ff16aed8bd 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.
2013-09-12 13:17:40 -05:00