Lucas De Marchi [Thu, 4 Oct 2012 20:42:33 +0000 (17:42 -0300)]
gdbus: Fix invalid memory access while unregistering
If an interface is added and removed on the same mailoop iteration,
ObjectManager would try to send InterfacesAdded signal while running the
idler because the interface was added to data->added list.
This is easily reproduced by forcing an error path in a plugin
registration, like on sap_server_register(), resulting in the following
error:
==11795== Invalid read of size 4
==11795== at 0x496F592: dbus_message_iter_append_basic (dbus-message.c:2598)
==11795== by 0x117B39: append_interface (object.c:554)
==11795== by 0x48955E7: g_slist_foreach (gslist.c:840)
==11795== by 0x11923B: process_changes (object.c:592)
==11795== by 0x11956D: generic_unregister (object.c:980)
==11795== by 0x4973BAC: _dbus_object_tree_unregister_and_unlock (dbus-object-tree.c:516)
==11795== by 0x4965240: dbus_connection_unregister_object_path (dbus-connection.c:5776)
==11795== by 0x1178A5: object_path_unref (object.c:1219)
==11795== by 0x118517: g_dbus_unregister_interface (object.c:1344)
==11795== by 0x19AF5B: sap_exit (sap.c:385)
==11795== by 0x13E9E2: sap_server_register (server.c:1428)
==11795== by 0x13C092: sap_server_probe (manager.c:44)
With this patch we don't send the InterfacesAdded signal, removing it
from data->added while unregistering.
Lucas De Marchi [Thu, 4 Oct 2012 07:26:37 +0000 (04:26 -0300)]
gdbus: Implement PropertiesChanged signal
Luiz Augusto von Dentz [Thu, 4 Oct 2012 07:26:36 +0000 (04:26 -0300)]
gdbus: Simplify code for appending properties
This reuse append_properties for GetAll and GetManagedObjects
Luiz Augusto von Dentz [Thu, 4 Oct 2012 07:26:35 +0000 (04:26 -0300)]
gdbus: Integrates ObjectManager with Properties interface
This appends the properties and its values when using ObjectManager.
Luiz Augusto von Dentz [Thu, 4 Oct 2012 07:26:34 +0000 (04:26 -0300)]
gdbus: Only export ObjectManager interface on root path
ObjectManager should be exported only in the root path and list all
the children paths.
Luiz Augusto von Dentz [Thu, 4 Oct 2012 07:26:33 +0000 (04:26 -0300)]
gdbus: Group interface changes to reduce the amount of signals emitted
InterfacesAdded and InterfacesRemoved can group all the interfaces
changes together in one message.
Luiz Augusto von Dentz [Thu, 4 Oct 2012 07:26:32 +0000 (04:26 -0300)]
gdbus: Add support for org.freedesktop.DBus.ObjectManager interface
This implements initial support for ObjectManager, it automatically adds
objects to its parents so no action is needed by daemons to get their
objects managed by this interface.
ObjectManager is part of D-Bus spec since revision 0.17:
http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager
Lucas De Marchi [Thu, 4 Oct 2012 07:26:31 +0000 (04:26 -0300)]
gdbus: Add properties into Introspectable interface
Lucas De Marchi [Thu, 4 Oct 2012 07:26:30 +0000 (04:26 -0300)]
gdbus: Implement DBus.Properties.Set method
Contrary to Get() and GetAll(), Set() is asynchronous so we pass an id
to the setter so later it can declare the Set() as successful or
otherwise.
Lucas De Marchi [Thu, 4 Oct 2012 07:26:29 +0000 (04:26 -0300)]
gdbus: Implement DBus.Properties.GetAll method
Lucas De Marchi [Thu, 4 Oct 2012 07:26:28 +0000 (04:26 -0300)]
gdbus: Implement DBus.Properties.Get method
Lucas De Marchi [Thu, 4 Oct 2012 07:26:27 +0000 (04:26 -0300)]
gdbus: Add skeleton of DBus.Properties interface
This interface is responsible for handling properties of all objects in
a given path. Right now it only registers itself, doing nothing useful.
A conversion to this new layout will be done by subsequent patches.
org.freedesktop.org.DBus.Properties spec can be found at
http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-properties
Lucas De Marchi [Thu, 4 Oct 2012 07:26:26 +0000 (04:26 -0300)]
gdbus: Use macros to add annotations
Besides being more readable this way it avoids going over 80 chars.
Lucas De Marchi [Thu, 4 Oct 2012 07:26:25 +0000 (04:26 -0300)]
gdbus: Move typedefs up
Move the typedefs up so they can be used by functions and callbacks.
Marcel Holtmann [Sun, 25 Nov 2012 20:18:03 +0000 (21:18 +0100)]
unit: Fix SMS unit tests
Denis Kenzior [Fri, 23 Nov 2012 13:21:46 +0000 (07:21 -0600)]
atmodem: Always quote data in CRSM write operations
Denis Kenzior [Fri, 23 Nov 2012 13:09:29 +0000 (07:09 -0600)]
atmodem: Support CRSM with paths
For GET STATUS and READ BINARY variations, support appending of the
optional path in the CRSM command
Denis Kenzior [Fri, 23 Nov 2012 12:41:27 +0000 (06:41 -0600)]
sim: Read icons with a full SIM/USIM path
Denis Kenzior [Fri, 23 Nov 2012 12:40:55 +0000 (06:40 -0600)]
simfs: Handle optional EF paths
Denis Kenzior [Fri, 23 Nov 2012 12:39:59 +0000 (06:39 -0600)]
include: Tweak ofono_sim_read_bytes API
Reading of icons requires us to specify the path
Marcel Holtmann [Sun, 25 Nov 2012 19:02:59 +0000 (20:02 +0100)]
qmimodem: Add support for UIM service handling
Marcel Holtmann [Sun, 25 Nov 2012 19:00:38 +0000 (20:00 +0100)]
udev: Let Huawei detection also check for cdc_wdm drivers
Marcel Holtmann [Sun, 25 Nov 2012 19:00:07 +0000 (20:00 +0100)]
udev: Use Qualcomm Gobi driver if QMI based modem
Marcel Holtmann [Sun, 25 Nov 2012 18:57:43 +0000 (19:57 +0100)]
udev: Handle USB descriptors from Vodafone K5005 modem
Marcel Holtmann [Sun, 25 Nov 2012 18:56:42 +0000 (19:56 +0100)]
gobi: Use UIM service is available
Marcel Holtmann [Sun, 25 Nov 2012 14:34:41 +0000 (15:34 +0100)]
sim: Assume CPHS files are in ADFusim
Marcel Holtmann [Sun, 25 Nov 2012 14:02:23 +0000 (15:02 +0100)]
test: Fix modem path handling for icon testing
Marcel Holtmann [Sun, 25 Nov 2012 09:20:15 +0000 (10:20 +0100)]
test: Allow STK testing without voice call manager
Marcel Holtmann [Sun, 25 Nov 2012 09:19:40 +0000 (10:19 +0100)]
qmimodem: Print error string instead of code if available
Marcel Holtmann [Sat, 24 Nov 2012 23:05:54 +0000 (00:05 +0100)]
qmimodem: Pretty print service name in debug logs
Marcel Holtmann [Sat, 24 Nov 2012 23:05:15 +0000 (00:05 +0100)]
qmimodem: Fix debug printing of messages
Marcel Holtmann [Sat, 24 Nov 2012 23:04:14 +0000 (00:04 +0100)]
qmimodem: Add helper for error message strings
Denis Kenzior [Thu, 22 Nov 2012 15:42:28 +0000 (09:42 -0600)]
unit: Add 2G and 3G path lookup tests
Denis Kenzior [Thu, 22 Nov 2012 15:42:16 +0000 (09:42 -0600)]
unit: Fix Style
Denis Kenzior [Thu, 22 Nov 2012 15:41:29 +0000 (09:41 -0600)]
unit: Remove failing test
We removed the needed file id from the sim database. It was not being
used.
Denis Kenzior [Thu, 22 Nov 2012 15:41:08 +0000 (09:41 -0600)]
simutil: Add 2G and 3G path lookup utilities
Denis Kenzior [Thu, 22 Nov 2012 15:40:52 +0000 (09:40 -0600)]
simfs: Update to the new SIM api
Denis Kenzior [Thu, 22 Nov 2012 15:40:39 +0000 (09:40 -0600)]
sim: Update to the new sim reading API
Denis Kenzior [Thu, 22 Nov 2012 15:40:18 +0000 (09:40 -0600)]
atmodem: Update sim driver to the new api
Denis Kenzior [Thu, 22 Nov 2012 15:40:05 +0000 (09:40 -0600)]
qmi: Update sim-legacy driver to the new API
Denis Kenzior [Thu, 22 Nov 2012 15:39:52 +0000 (09:39 -0600)]
isi: Update UICC driver to the new API
Denis Kenzior [Thu, 22 Nov 2012 15:39:37 +0000 (09:39 -0600)]
isimodem: Update sim driver to the new API
Denis Kenzior [Thu, 22 Nov 2012 15:38:34 +0000 (09:38 -0600)]
include: Add path and path_len arguments
The CRSM command has an additional parameter called pathlen which can be
used to specify the path of the elementary file outside the well-known
path range.
Denis Kenzior [Thu, 22 Nov 2012 14:24:03 +0000 (08:24 -0600)]
simutil: Introduce 2G and 3G parent paths
Marcel Holtmann [Sat, 24 Nov 2012 18:14:27 +0000 (19:14 +0100)]
test: Allow DisplayText to be interrupted by incoming calls
Denis Kenzior [Thu, 22 Nov 2012 12:56:33 +0000 (06:56 -0600)]
voicecall: Handle RESETTING sim state
Denis Kenzior [Thu, 22 Nov 2012 12:56:23 +0000 (06:56 -0600)]
modem: Handle RESETTING sim state
Denis Kenzior [Thu, 22 Nov 2012 12:50:32 +0000 (06:50 -0600)]
test: Fix ascii conversion exception
Denis Kenzior [Thu, 22 Nov 2012 12:47:50 +0000 (06:47 -0600)]
simutil: Add file type information to sim_db
Denis Kenzior [Thu, 22 Nov 2012 12:33:22 +0000 (06:33 -0600)]
simutil: Rename structure variable
Denis Kenzior [Thu, 22 Nov 2012 12:44:34 +0000 (06:44 -0600)]
ifx: Move connman atom to post_sim state
Denis Kenzior [Thu, 22 Nov 2012 12:42:04 +0000 (06:42 -0600)]
ifx: Get rid of have_sim tracking
Denis Kenzior [Thu, 22 Nov 2012 12:45:10 +0000 (06:45 -0600)]
sim: Fix SIM re-init case of SIM Refresh
When the SIM is being refreshed, we try to access the SIM too fast after
the SIM REFRESH proactive command is received. Instead set the sim atom
into the 'RESETTING' state and wait until the modem driver signals the
sim insertion again.
Denis Kenzior [Thu, 22 Nov 2012 12:48:11 +0000 (06:48 -0600)]
include: Add RESETTING state
Denis Kenzior [Thu, 22 Nov 2012 12:47:23 +0000 (06:47 -0600)]
stk: Fix crash in SIM refresh handling
Denis Kenzior [Wed, 21 Nov 2012 13:26:28 +0000 (07:26 -0600)]
stk: Always include IdleModeText in GetProperties
Denis Kenzior [Wed, 21 Nov 2012 13:11:46 +0000 (07:11 -0600)]
sim: destroy spn info as part of sim main state
Denis Kenzior [Tue, 20 Nov 2012 14:55:28 +0000 (08:55 -0600)]
stk: Use the shorter timeout for select item
Denis Kenzior [Mon, 19 Nov 2012 16:43:10 +0000 (10:43 -0600)]
stk: use longer timeout for ImmediateResponse
Denis Kenzior [Thu, 22 Nov 2012 12:46:57 +0000 (06:46 -0600)]
stk: Use short timeout for get_inkey
Denis Kenzior [Mon, 19 Nov 2012 16:42:24 +0000 (10:42 -0600)]
stk: Use a shorter timeout for DisplayText
For any commands that are tagged as wait-for-user to clear, we should
use the shorter timeout. The test system expects 25 to 35 seconds.
Marcel Holtmann [Fri, 23 Nov 2012 15:41:23 +0000 (16:41 +0100)]
ifx: Add comments about unhandled SIM states
Marcel Holtmann [Fri, 23 Nov 2012 15:20:15 +0000 (16:20 +0100)]
atmodem: Monitor IFX technology and band changes
Marcel Holtmann [Fri, 23 Nov 2012 15:18:52 +0000 (16:18 +0100)]
test: Handle DisplayText with async_callbacks option
Cedric Jehasse [Thu, 15 Nov 2012 08:35:51 +0000 (09:35 +0100)]
atmodem: add PIN retry count for Alcatel modems
Cedric Jehasse [Wed, 14 Nov 2012 11:08:40 +0000 (12:08 +0100)]
alcatel: create sim atom with vendor alcatel
Denis Kenzior [Mon, 12 Nov 2012 19:31:21 +0000 (13:31 -0600)]
AUTHORS: Mention Cedric's contributions
Cedric Jehasse [Fri, 9 Nov 2012 13:16:53 +0000 (14:16 +0100)]
atmodem: Poll SIM state after entering PIN
Encountered a problem of CME ERROR 14: SIM busy on Alcatel and Huawei modem.
The Huawei modem has a ^SIMST unsollicited sim state indication, but not all
Huawei modems support this.
So poll the SIM state, as was already done for ZTE modems.
Cedric Jehasse [Fri, 9 Nov 2012 13:16:53 +0000 (14:16 +0100)]
atmodem: Add ALCATEL vendor
Denis Kenzior [Wed, 7 Nov 2012 13:59:57 +0000 (07:59 -0600)]
mbm: Fix SIM not inserted detection
Denis Kenzior [Fri, 2 Nov 2012 19:17:31 +0000 (14:17 -0500)]
stktest: Add Poll Interval test sequence 1.1
Denis Kenzior [Fri, 2 Nov 2012 19:17:17 +0000 (14:17 -0500)]
unit: Move Poll Interval test data 1.1
Denis Kenzior [Fri, 2 Nov 2012 19:04:49 +0000 (14:04 -0500)]
stktest: Label stktest modem as type TEST
Denis Kenzior [Fri, 2 Nov 2012 19:03:16 +0000 (14:03 -0500)]
modem: Add support for modem type TEST
Denis Kenzior [Fri, 2 Nov 2012 19:03:03 +0000 (14:03 -0500)]
doc: Update modem API to reflect modem type test
Denis Kenzior [Fri, 2 Nov 2012 19:02:26 +0000 (14:02 -0500)]
include: Add TEST modem type
Denis Kenzior [Fri, 2 Nov 2012 18:27:13 +0000 (13:27 -0500)]
stktest: Add Play Tone test sequence 6.1
Denis Kenzior [Fri, 2 Nov 2012 18:27:01 +0000 (13:27 -0500)]
unit: Move Play Tone 6.1 test data
Denis Kenzior [Fri, 2 Nov 2012 18:18:42 +0000 (13:18 -0500)]
stktest: Add Play Tone test sequence 5.1
Denis Kenzior [Fri, 2 Nov 2012 18:18:24 +0000 (13:18 -0500)]
unit: Move Play Tone 5.1 test data
Denis Kenzior [Fri, 2 Nov 2012 17:55:33 +0000 (12:55 -0500)]
stktest: Add PlayTone test sequence 4.1-4.10
Denis Kenzior [Fri, 2 Nov 2012 17:55:13 +0000 (12:55 -0500)]
unit: Fixup unit test PlayTone 4.10
Denis Kenzior [Fri, 2 Nov 2012 17:55:00 +0000 (12:55 -0500)]
unit: Move Play Tone 4.1-4.10 test data
Denis Kenzior [Thu, 1 Nov 2012 09:59:08 +0000 (04:59 -0500)]
AUTHORS: Mention Holger's contributions
Holger Hans Peter Freyther [Thu, 1 Nov 2012 09:05:03 +0000 (10:05 +0100)]
wavecom: Add peculiar CPIN as terminator behavior
Holger Hans Peter Freyther [Thu, 1 Nov 2012 09:05:03 +0000 (10:05 +0100)]
sim: Fix the quirk handling of CPIN for Wavecom
The Wavecom Q2XXX support broke in commit
72ce19bf3e87b5e73c053f7ea1.
This is because at_cpin_cb called decode_at_error with final and not
with OK. This lead to an error being set in the error variable and the
new code returns early when an error is set.
The addition of the terminator in at_sim_probe for Wavecom broke in
git commit
ac524be99f8c72a2593e4ffcecad8beea7679e55 because
terminators can not be added on cloned chats.
Move the addition of the terminator from the atmodem to the wavecom
plugin. Use the same terminator for Q2XXX and the normal Wavecom
class. The WAVECOM terminator has been tested on a Q2XXX modem.
Apply the CPIN quirk for both WAVECOM and WAVECOM_Q2XXX inside the
sim.c file. Introduce needs_wavecom_sim_quirk to handle it for
WAVECOM and WAVECOM_Q2XXX.
Luiz Augusto von Dentz [Wed, 3 Oct 2012 11:57:24 +0000 (14:57 +0300)]
gdbus: Fix not freeing list node by using g_slist_delete_link
g_slist_remove_link does not free the node which can cause leaks so
replace that with g_slist_delete_link which does free memory properly.
Lucas De Marchi [Wed, 3 Oct 2012 11:57:23 +0000 (14:57 +0300)]
gdbus: Refactor filter_data_find()
Now this function is only used for searching the listeners of a
connection and the other parameters are not needed anymore.
Lucas De Marchi [Wed, 3 Oct 2012 11:57:22 +0000 (14:57 +0300)]
gdbus: Fix wrong signal handler match
When we add a signal handler with g_dbus_add_signal_watch(), this
function tries to multiplex the matches added in libdbus by checking
if there's a previous filter_data with the same fields. However, if the
field is NULL it accepts as being the same. The result is that the
following watches will use the same filter data:
watch1 = g_dbus_add_signal_watch(conn, BUS_NAME, NULL, iface, member,
cb1, data1, NULL);
watch2 = g_dbus_add_signal_watch(conn, BUS_NAME, "/path2", iface, member,
cb2, data2, NULL);
watch3 = g_dbus_add_signal_watch(conn, BUS_NAME, "/path3", iface, member,
cb3, data3, NULL);
The result is that when a signal arrives with path == "/path2", all 3
callbacks above will be called, with the same signal delivered to all of
them.
Another problem is that, if we invert the calls like below, only signals
to cb1 will never be trigerred, nonetheless it used path == NULL.
watch2 = g_dbus_add_signal_watch(conn, BUS_NAME, "/path2", iface, member,
cb2, data2, NULL);
watch1 = g_dbus_add_signal_watch(conn, BUS_NAME, NULL, iface, member,
cb1, data1, NULL);
watch3 = g_dbus_add_signal_watch(conn, BUS_NAME, "/path3", iface, member,
cb3, data3, NULL);
This is fixed by not multiplexing the matchs with filter data if any of
the fields are different, including being NULL. When a signal arrives,
if a field is NULL we accept it as a match, but not when adding the
signal handler.
Johan Hedberg [Wed, 3 Oct 2012 11:57:21 +0000 (14:57 +0300)]
gdbus: Fix crash when getting disconnected from the bus
When getting disconnected from the bus sometimes (maybe always?)
dbus_watch_handle() can cause the "info" context to be free'd meaning
that we should not try to access it after the call. The only member we
need access to is the connection pointer and as the code already has a
ref() call for it it's only natural to solve the issue by adding a local
variable not dependent on "info".
The backtrace of the crash fixed looks as follows:
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)
Denis Kenzior [Wed, 31 Oct 2012 17:13:12 +0000 (12:13 -0500)]
stktest: Add Play Tone test sequence 3.1-3.4
Denis Kenzior [Wed, 31 Oct 2012 17:13:00 +0000 (12:13 -0500)]
unit: Move Play Tone 3.1-3.4 test data
Denis Kenzior [Wed, 31 Oct 2012 16:55:37 +0000 (11:55 -0500)]
stktest: Add PlayTone test sequence 2.1
Denis Kenzior [Wed, 31 Oct 2012 16:55:24 +0000 (11:55 -0500)]
unit: Move PlayTone 2.1 test data
Denis Kenzior [Wed, 31 Oct 2012 16:50:03 +0000 (11:50 -0500)]
stktest: Use a define for Cyrillic test data
Denis Kenzior [Wed, 31 Oct 2012 16:44:44 +0000 (11:44 -0500)]
stktest: Add Play Tone test sequence 1.1.9-1.1.15
Denis Kenzior [Wed, 31 Oct 2012 13:48:46 +0000 (08:48 -0500)]
stktest: Add PlayTone test sequence 1.1.1-1.1.8
Denis Kenzior [Wed, 31 Oct 2012 13:48:08 +0000 (08:48 -0500)]
unit: Move PlayTone test data for test sequence 1.1
Denis Kenzior [Wed, 31 Oct 2012 13:46:43 +0000 (08:46 -0500)]
stk: Tweak the concept of continuous tones
The spec explicitly mentions continuous or repeatable tones. 02.40 only
mentions the RP-ACK tone as a single tone, all other tones seem to be
repeatable
Denis Kenzior [Wed, 31 Oct 2012 11:46:58 +0000 (06:46 -0500)]
stktest: Add stk_add_timed_test