Commit Graph

7171 Commits

Author SHA1 Message Date
Denis Kenzior e574d44d00 handsfree-audio: Tweak logic a bit 2013-09-12 13:17:40 -05:00
Vinicius Costa Gomes 0de0f496cb handsfree-audio: Add setting SCO air mode 2013-09-12 13:17:40 -05:00
Denis Kenzior 62c2b81db7 hfp_hf_bluez5: Remove Cancel method 2013-09-12 13:17:40 -05:00
Denis Kenzior f2103a7ada hfp_hf_bluez5: Mark Release method as NOREPLY 2013-09-12 13:17:39 -05:00
Denis Kenzior a8e4073d0e test: Add set-msisdn script 2013-09-12 13:17:39 -05:00
Denis Kenzior df25ccac49 test: Add display-icon script 2013-09-12 13:17:39 -05:00
Denis Kenzior a4a170e1ea hfpmodem: Call ofono_voicecall_mpty_hint as needed 2013-09-12 13:17:39 -05:00
Denis Kenzior 0026ae3fb7 atmodem: Update parse_clcc utility function 2013-09-12 13:17:39 -05:00
Denis Kenzior 394069cb59 voicecall: Implement ofono_voicecall_mpty_hint 2013-09-12 13:17:39 -05:00
Denis Kenzior 681bc6d556 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.
2013-09-12 13:17:39 -05:00
Denis Kenzior d94eb705c7 test: Add selecting the modem in private-chat 2013-09-12 13:17:39 -05:00
Denis Kenzior 75e747122c test: Add selecting the modem in create-multiparty 2013-09-12 13:17:39 -05:00
Luiz Augusto von Dentz 2e5938f3bb 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.
2013-09-12 08:25:23 -07:00
Luiz Augusto von Dentz 607c1e088d 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.
2013-09-12 08:25:23 -07:00
Luiz Augusto von Dentz cb5f10d2c2 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.
2013-09-12 08:25:23 -07:00
Luiz Augusto von Dentz b4b4b35d0b 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
2013-09-12 08:25:23 -07:00
Luiz Augusto von Dentz 3849da14e5 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.
2013-09-12 08:25:23 -07:00
Luiz Augusto von Dentz 68cc171e40 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)
2013-09-12 08:25:23 -07:00
Luiz Augusto von Dentz 778b60a94f 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.
2013-09-10 19:07:28 -07:00
Luiz Augusto von Dentz 1ad938a5fd gdbus: Avoid calling dbus_connection_send*
dbus_connection_send* should not be called directly except by
g_dbus_send_message.
2013-09-10 19:07:28 -07:00
Luiz Augusto von Dentz 6a9a09a02a 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
2013-09-10 19:07:28 -07:00
Luiz Augusto von Dentz f462a549f5 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.
2013-09-10 19:07:28 -07:00
Denis Kenzior d7ba153737 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.
2013-09-03 22:58:59 -05:00
Denis Kenzior 0cdf3ced1f test-sms: Add skeleton code for MWI unit test 2013-09-03 22:58:40 -05:00
Denis Kenzior c912e0066a hfp: Set UDUB affected set to WAITING only
INCOMING calls are not affected by UDUB, only by +CHUP.
2013-08-25 01:25:28 -05:00
Denis Kenzior fe36dec9a1 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.
2013-08-25 01:21:23 -05:00
Vinicius Costa Gomes 8a11d38983 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.
2013-08-19 12:14:39 -05:00
Denis Kenzior 9e112379b5 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.
2013-08-07 16:37:23 -05:00
Denis Kenzior b131cfde52 atmodem: Fix whitespace violation 2013-07-22 15:56:28 -05:00
Anthony Viallard d3e8218b50 SIMCOM: add a quirk to fix crsm request 2013-07-22 15:49:59 -05:00
Anthony Viallard d1ac1ba3d4 SIMCOM: add a quirk for signal strength reporting
We must tell we want the signal strength reporting using
AT+AUTOCSQ command (ref. "SIM5215_SIM5216_ATC_V1.18.pdf - §10.7").
2013-07-22 15:48:59 -05:00
Anthony Viallard 8c6eea3385 SIMCOM: add a quirk for AT+CNMI command building
Use mode=1 otherwise it fails (ref. "SIM5215_SIM5216_ATC_V1.18.pdf - §6.9")
2013-07-22 15:48:59 -05:00
Marcel Holtmann aacc10271e build: Use dummy=yes assignment for pkg-config check 2013-07-19 08:30:19 -07:00
Jesper Larsen dff2657093 sim900: Use SIM900 quirk for gprs context
Use the module specific quirk for gprs by using the vendor entry
OFONO_VENDOR_SIMCOM_SIM900
2013-07-19 09:01:09 -05:00
Jesper Larsen ff2051053c atmodem: Add gprs-context quirk for SIM900
The SIM900 module from SIMCOM does have a AT+CGDATA command.
However, it is not possible to make a ppp connection when CGDATA
has been used to bring up the gprs context.

This patch adds a quirk that uses the alternative ATD*99***<cid>#
command instead.
2013-07-18 14:10:38 -05:00
Jesper Larsen f6930db19c atmodem: Add vendor entry for SIM900 module 2013-07-18 14:10:38 -05:00
Marcel Holtmann 1edf7d5b5e build: Build a simpler version of libgdbus-internal 2013-07-18 08:04:22 -07:00
Lucas De Marchi ba9d78d229 build-sys: Use libgdbus-internal.la
With the current approach if we have different CFLAGS for each binary we would
build gdbus several times for no reason.

Instead of prepending $(gdbus_sources) to several _SOURCES variable, use
a convenience library thas is used internally only, thus with a "-internal"
suffix.
2013-07-18 07:54:17 -07:00
Jesper Larsen cf031b11f9 sim900: Fix order of dlc prefixes
The order of the defines for the dlc prefixes does not match
the order of the array containing the strings to print.
2013-07-17 10:28:24 -05:00
Denis Kenzior 0bc4e32db1 AUTHORS: Mention Jesper's contributions 2013-07-17 10:19:58 -05:00
Jesper Larsen 33b4645f41 sim900: Enable serial receiver
The read option must be set to 'on' in order for two-way
communication with SIM900 module to work.
2013-07-17 10:19:11 -05:00
Gustavo Padovan a96aa11bb5 dundee: return error if there is a connection procedure ongoing 2013-06-29 21:10:21 +02:00
Frederic Danis d6a601f8d1 hfp_hf_bluez5: Fix SDP record with correct features 2013-06-26 10:39:11 -05:00
Frederic Danis 8fb70d6271 hfpmodem: Fix ECNR HF feature 2013-06-26 10:39:08 -05:00
Henrique Dante de Almeida 2e2b588a46 gdbus: Remove proxies when client disconnects
Remove proxies and generate proxy_removed callbacks even when there are
no corresponding InterfaceRemoved signals.

This patch fixes having zombie gdbus proxy object when a server
disconnects without sending InterfaceRemoved signals. These objects
may interact with new server instances, for example, making
InterfaceAdded signals of new objects with the same name be filtered
out as duplicated, or staying allocated, but unused, if the new server
doesn't reuse the object paths. Note that as a side-effect, the
lifetime of a gdbus proxy becomes stricter: it lives at most for the
duration of a single connection to a single instance of a server
process.
2013-06-19 08:11:35 +02:00
Lucas De Marchi 53a0fa8c7c common: Fix parsing SS control string
It's not possible to be both greater than '9' and less than '0'. This
would lead to accepting things like "#$33#" as activation and "*$33#" as
deactivation, even though the string makes no sense.
2013-05-22 21:40:19 -05:00
Lucas De Marchi 816b6946f7 gitignore: Ignore file generated by Automake 1.13
Automake >= 1.13 enables parallel-tests option by default which uses a
test-driver script (copied by automake). Ignore this file and the files
generated by this script.
2013-05-22 21:38:48 -05:00
Lucas De Marchi 874a9ee285 stk: Fix sizeof on memcpy
src/stk.c: In function ‘__ofono_cbs_sim_download’:
src/stk.c:283:45: error: argument to ‘sizeof’ in ‘memcpy’ call is the
same expression as the source; did you mean to dereference it?
[-Werror=sizeof-pointer-memaccess]
  memcpy(&e.cbs_pp_download.page, msg, sizeof(msg));
                                               ^
2013-05-22 21:37:52 -05:00
Anderson Lizardo 1c75edf59a gdbus: Fix using NULL DBusPendingCall when disconnected from D-Bus
From D-Bus documentation for dbus_connection_send_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."

Fix these errors when killing D-Bus daemon with the client still
running:

process 5712: arguments to dbus_pending_call_set_notify() were
incorrect, assertion "pending != NULL" failed in file
../../dbus/dbus-pending-call.c line 596.
This is normally a bug in some application using the D-Bus library.
process 5712: arguments to dbus_pending_call_unref() were incorrect,
assertion "pending != NULL" failed in file
../../dbus/dbus-pending-call.c line 572.
This is normally a bug in some application using the D-Bus library.
2013-05-08 11:28:11 +02:00
Anderson Lizardo 4059dd878c gdbus: Fix segfault when D-Bus daemon exits
Fix this crash if D-Bus exits while the client is still connected to it:

==5570== Invalid read of size 1
==5570==    at 0x402D28E: strcmp (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==5570==    by 0x4070E22: g_str_equal (ghash.c:1704)
==5570==    by 0x8055F61: message_filter (client.c:1123)
==5570==    by 0x4141500: dbus_connection_dispatch (in
/lib/i386-linux-gnu/libdbus-1.so.3.5.8)
==5570==    by 0x80506F7: message_dispatch (mainloop.c:76)
==5570==    by 0x4081A7E: g_timeout_dispatch (gmain.c:3882)
==5570==    by 0x4080D85: g_main_context_dispatch (gmain.c:2539)
==5570==    by 0x4081124: g_main_context_iterate.isra.21 (gmain.c:3146)
==5570==    by 0x408156A: g_main_loop_run (gmain.c:3340)
==5570==    by 0x41BF4D2: (below main) (libc-start.c:226)
==5570==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==5570==
==5570==
2013-05-08 11:28:11 +02:00