diff -Nru modemmanager-1.12.8/AUTHORS modemmanager-1.16.6/AUTHORS --- modemmanager-1.12.8/AUTHORS 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/AUTHORS 2021-06-06 21:40:59.000000000 +0800 @@ -17,13 +17,16 @@ Riccardo Vangelisti Alexander Sack Guido Günther + Eric Caruso Eric Shienbrood Elly Jones - Eric Caruso + Bob Ham + Giacinto Cifelli David McCullough Prathmesh Prabhu Thieu Le Thomas Tuttle + Maxim Anisimov Bjørn Mork Marius B. Kotsbak Michael Biebl @@ -33,7 +36,6 @@ Christian Persch Sven Schwermer Thomas Sailer - Bob Ham Colin Walters Franko Fang Jakub Sitnicki @@ -49,6 +51,7 @@ Martyn Russell Thomas Haller Tomas Jura + Amol Lad Colin Helliwell Graham Inggs Javier Viguera @@ -56,15 +59,17 @@ Maksim Salau Martin Pitt Matthew Stanger - Maxim Anisimov + Milo Casagrande Nick Stevens Norbert Frese Piotr Drąg Thomas Bechtold Yegor Yefremov + Yuri Chornoivan Adrian Bunk Alexander Couzens Amit Mendapara + Andika Triwidada Andrew Bird Anton Blanchard Arnd Hannemann @@ -72,6 +77,7 @@ Arun Raghavan Baruch Siach Beniamino Galvani + Brendan Peter Brian Norris Brian, Sam Bryan Duff @@ -80,6 +86,7 @@ David Castellanos David Herrmann David Härdeman + David Khouya Dmitry Ivanyushin Enrico Mioso Eugene Crosser @@ -99,6 +106,7 @@ Krzysztof Kotlenga Lech Perczak LiuQiFeng + Louis-Alexis Eyraud Luis A. Lozano M. I. Spozta Marc Murphy @@ -107,18 +115,20 @@ Mark-Jablonsky Michael Farrell Michał Sroczyński - Milo Casagrande Mohammed Sadiq Moo + Murithi Borona Nathan J. Williams Noel J. Bergman Oskar Enoksson Piotr Figiel Quentin.Li + Rafael Fontenelle Roshan Pius Sam Spilsbury Sławomir Bocheński Tabor Kelly + Teijo Kinnunen Thomas Grenman Thomas Voß Ting-Yuan Huang @@ -131,10 +141,13 @@ Ville Skyttä Vincent Untz Vitaly Gimly - Yuri Chornoivan Amol Lad + emintufan kuonirat + mozzwald + mstanger poma scootergrisen wi24rd yparitcher + Артемий Судаков diff -Nru modemmanager-1.12.8/ChangeLog modemmanager-1.16.6/ChangeLog --- modemmanager-1.12.8/ChangeLog 2020-03-14 17:05:12.000000000 +0800 +++ modemmanager-1.16.6/ChangeLog 2021-06-06 21:45:09.000000000 +0800 @@ -1,22 +1,10352 @@ -commit a0e4e73c79ee125f499e4aa433183d293c75ef13 +commit a7b37461441f66ca1f54c1e83473dbd6e4191852 Author: Aleksander Morgado -Date: Sat Mar 14 09:59:13 2020 +0100 +Date: Thu Jun 3 13:25:11 2021 +0200 - release: bump version to 1.12.8 + release: bump version to 1.16.6 configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit bfe831eda23fd439856bd9c6a01bef69cba66498 +commit e7a683b525f2908082e7926f8192e6811e9bea69 Author: Aleksander Morgado -Date: Sat Mar 14 09:58:46 2020 +0100 +Date: Thu Jun 3 13:24:42 2021 +0200 - NEWS: update for 1.12.8 + NEWS: update for 1.16.6 - NEWS | 25 +++++++++++++++++++++++++ + NEWS | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +commit 3762fb1737892b06ab435b5c70c394dca3f994b8 +Author: Aleksander Morgado +Date: Sun Jun 6 14:45:27 2021 +0200 + + udev: only flag as candidates the wwan ports, not the full device + + Explicitly ignore the "wwan_dev" device as it is not associated with + separate ports (which is what MM needs), but with the whole device + instead. + + See + https://lists.freedesktop.org/archives/modemmanager-devel/2021-May/008629.html + + (cherry picked from commit ac18b5ac5bf841cd3a619a9e07137c332558d6c4) + + src/80-mm-candidate.rules | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit 5e3babb3a12371cd0cb6578c97b2090db3b95d0b +Author: Loic Poulain +Date: Wed May 12 13:18:00 2021 +0200 + + udev: Do not consider USB WWAN ports as valid candidates + + For now WWAN subsystem support has only been validated for PCI/MHI + based devices and extra patches for USB based devices (qmi_wwan, + cdc-mbim...) may be required, so do not consider WWAN ports being + on USB bus. + + Signed-off-by: Loic Poulain + (cherry picked from commit c39d1d2fbc62dca759efcf8dc5b80c69a45269de) + + src/80-mm-candidate.rules | 4 ++++ + 1 file changed, 4 insertions(+) + +commit f62b4ec0f604710435da1e03d1324f8a0e9aba8f +Author: Aleksander Morgado +Date: Sun Jun 6 12:11:08 2021 +0200 + + core: skip suggesting FCC unlock may be needed + + This message is too specific, and there are a lot of cases where it + wouldn't apply. + + E.g. when a MBIM module is stuck in low power mode due to some other + reason (like hardware rfkill), this message would pop up to the users + and completely confuse them. + + (cherry picked from commit 464c0d464c758387ac3d35f4e148db2c4368edba) + + src/mm-broadband-modem-mbim.c | 3 +-- + src/mm-broadband-modem-qmi.c | 2 +- + 2 files changed, 2 insertions(+), 3 deletions(-) + +commit b610ea14019e4645a29a87b51be08d712b243f03 +Author: Aleksander Morgado +Date: Fri Jun 4 12:14:02 2021 +0200 + + Revert "foxconn: add new MBIM QDU firmware update method support" + + This reverts commit da23f9cd7a7642e8cf8245952a7403bb30fca1b8. + + The stable 1.16 branch does not build-depend on any libmbim git master + version, so we should not report the QDU firmware update method as + supported in MM at this point. + + It would not have been a big problem if we did expose the QDU firmware + update method, because the logic in fwupd checks the MM and libmbim + versions separately, but I think it's better to skip reporting QDU as + supported ourselves for consistency with the minimum libmbim version + we require. + + include/ModemManager-enums.h | 2 -- + plugins/foxconn/mm-broadband-modem-mbim-foxconn.c | 17 ++++------------- + 2 files changed, 4 insertions(+), 15 deletions(-) + +commit cc4e32610f7372a54fe150cfd8b19e62d269a7b0 +Author: Aleksander Morgado +Date: Fri Jun 4 12:13:33 2021 +0200 + + Revert "api: QDU update method defined in MM 1.16.6 already" + + This reverts commit 2cb38c568ff1fb26b23bad5e8a2851547448c30e. + + include/ModemManager-enums.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 374f80f5c37ddff2ea74781ca85da1e283f23035 +Author: Aleksander Morgado +Date: Wed May 19 15:37:47 2021 +0200 + + foxconn: setup FCC unlock step + + Use the new "DMS Foxconn Set FCC authentication" command to request + the modem unlock during a power up operation. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/373 + + (cherry picked from commit 9fdbbc6929cb61d4168e1696a94e5b2f07bc578e) + + plugins/foxconn/mm-broadband-modem-mbim-foxconn.c | 67 + ++++++++++++++++++++++- + 1 file changed, 65 insertions(+), 2 deletions(-) + +commit 2886b08522e7c29d5d9ffa9d186129bbe1fffbba +Author: Aleksander Morgado +Date: Thu Jun 3 13:04:53 2021 +0200 + + build: require libqmi 1.28.6 for Foxconn FCC unlock support + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit edaa6413f6585132fcc6d4851f96e1a54c1d1be1 +Author: Aleksander Morgado +Date: Fri May 21 15:48:31 2021 +0200 + + broadband-modem-mbim: setup FCC unlock step + + Use the new generic FCC unlock step instead of implementing it within + the power up setup logic. + + (cherry picked from commit 76f24256174039a75926cdc0ce3a6b1f03ea10ee) + + src/mm-broadband-modem-mbim.c | 219 + ++++++------------------------------------ + 1 file changed, 30 insertions(+), 189 deletions(-) + +commit 7b53ccbcf59160ac4f3590d460603c54a296dc97 +Author: Aleksander Morgado +Date: Wed May 19 15:12:17 2021 +0200 + + broadband-modem-qmi: setup FCC unlock step + + Use the new generic FCC unlock step instead of implementing it within + the operating mode setup logic. + + The operation is implemented in the MMSharedQmi interface as it will + also be used by the MBIM modem object. + + (cherry picked from commit b9596c81879b8eeae3f2e1bab5c31007e5824c1f) + + src/mm-broadband-modem-qmi.c | 240 + ++++++++++--------------------------------- + src/mm-shared-qmi.c | 50 +++++++++ + src/mm-shared-qmi.h | 6 ++ + 3 files changed, 112 insertions(+), 184 deletions(-) + +commit 148a6c6e46dedc5cd391e326f4c0a60ce39bea84 +Author: Aleksander Morgado +Date: Wed May 19 13:02:42 2021 +0200 + + iface-modem: new optional FCC unlock step in the power state update + + There are devices that come locked before they can be put online. + Until now we had a specific implementation for this in the generic QMI + modem, but we should have it in a more generic way for any kind of + modem. + + (cherry picked from commit 6ca75c76db277b89325e1888ac445cbfebe33039) + + src/mm-iface-modem.c | 352 + +++++++++++++++++++++++++-------------------------- + src/mm-iface-modem.h | 8 ++ + 2 files changed, 180 insertions(+), 180 deletions(-) + +commit 977452e155163983e4638c39a82dfad9d847904b +Author: Aleksander Morgado +Date: Tue May 25 15:42:11 2021 +0200 + + base-manager: ensure all GUdevDevices have subsystem and name set + + Under certain rare conditions (e.g. race between querying devices of a + given subsystem and the kernel tearing those devices down), the + subsystem reported for a GUdevDevice seems to be NULL. + + So, ensure both subsystem and name are set on the GUdevDevice + before we + process them. + + The issue has been observed on GUdevDevices listed by + g_udev_client_query_by_subsystem(), not on the ones asynchronously + reported via uevents, but we add the validity check on both places for + consistency. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/343 + + (cherry picked from commit 940063419a1c2eb9f6e197d60b4c7cb42702de8d) + + src/mm-base-manager.c | 30 +++++++++++++++++++++++++----- + 1 file changed, 25 insertions(+), 5 deletions(-) + +commit 812463c9a82c3e921a392bf06789194ccad42cc5 +Author: Aleksander Morgado +Date: Sat May 22 00:46:55 2021 +0200 + + shared-qmi: trivial coding style update + + (cherry picked from commit ec8bf7f0e39435f98d322d09a36b0d3e171a9ae7) + + src/mm-shared-qmi.h | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit 7fc8f67af9b5fe30e3b1f96b56ed781af2d44bc2 +Author: Aleksander Morgado +Date: Sun May 23 00:38:09 2021 +0200 + + broadband-modem: check if skeleton exists when creating device id + + The logic that creates the device identifier uses some fields that are + exposed in DBus (e.g. model, manufacturer...). + + We should not attempt to load any of that info if the DBus skeleton + for the Modem interface is no longer available, as e.g. the device may + have gone away already. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/374 + + (cherry picked from commit 3da3623e11f90e45951118119da6f842053fd133) + + src/mm-broadband-modem-mbim.c | 16 ++++++++++------ + src/mm-broadband-modem-qmi.c | 16 ++++++++++------ + src/mm-broadband-modem.c | 36 +++++++++++++++++++++++++----------- + src/mm-broadband-modem.h | 7 ++++--- + 4 files changed, 49 insertions(+), 26 deletions(-) + +commit a8f65a16c753eef05fbd4bd15372116f1a9343c5 +Author: Aleksander Morgado +Date: Wed Jun 2 09:56:00 2021 +0200 + + shared-qmi: add missing g_autoptr() NULL initializer + + (cherry picked from commit eefcf9204f2de801092b1d14d86c7012420e97af) + + src/mm-shared-qmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8c4708939e396c5e1aeeac99f5f197d4c7440cea +Author: Felipe Borges +Date: Thu May 27 15:05:55 2021 +0200 + + cinterion: avoid maybe-uninitialized warning by GCC 10 + + Reported at + https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/1371 + + (cherry picked from commit 0b8607bc5dc4cce16ebb7c6a7bd71dfb3032d978) + + plugins/cinterion/mm-modem-helpers-cinterion.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit e903a840ed87074a35581f5e5faf8fba3436c135 +Author: Aleksander Morgado +Date: Tue Jun 1 09:36:53 2021 +0200 + + broadband-modem-mbim: skip switch() when selecting MBIM services + + Having a switch() for the MBIM services when processing indications + forces us to update it on every new MBIM service added to libmbim, + because we build with -Wswitch-enum by default. + + This warning type is extremely useful, and we should not stop using + it, so let's simplify a bit the indication handling code and skip + using a switch(). + + There are right now only 4 different service indications expected, so + it shouldn't be a big deal. + + (cherry picked from commit e25a585c9fd8c3f58ec01723843fe3c08c30c1ad) + + src/mm-broadband-modem-mbim.c | 34 ++++------------------------------ + 1 file changed, 4 insertions(+), 30 deletions(-) + +commit 8308b24347d8bc88cddfcb13cbbf624d6577b3fa +Author: Dylan Van Assche +Date: Mon May 31 16:56:30 2021 +0200 + + quectel: ignore QLWURC + + QLWURCs are not ignored and causes calls to be rejected in some cases + + (cherry picked from commit c00eff43ac6eda070645d77edc8da71facd972a3) + + plugins/quectel/mm-shared-quectel.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +commit 2cb38c568ff1fb26b23bad5e8a2851547448c30e +Author: Aleksander Morgado +Date: Fri May 21 23:46:28 2021 +0200 + + api: QDU update method defined in MM 1.16.6 already + + include/ModemManager-enums.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit da23f9cd7a7642e8cf8245952a7403bb30fca1b8 +Author: Freedom Liu +Date: Fri Apr 30 01:52:12 2021 +0000 + + foxconn: add new MBIM QDU firmware update method support + + Based on the QDU service newly added in libmbim, + T99W175 module (vid: 0x105b) supports MBIM QDU based update. + + (cherry picked from commit 35b1672b85d23e0961c33fc7aebc17d0e2d26c81) + + include/ModemManager-enums.h | 2 ++ + plugins/foxconn/mm-broadband-modem-mbim-foxconn.c | 17 +++++++++++++---- + 2 files changed, 15 insertions(+), 4 deletions(-) + +commit 8904436e126d0c408003b0f6b5b78b2c0c3c1977 +Author: Freedom Liu +Date: Mon Apr 26 15:29:36 2021 +0800 + + foxconn: add support for the T99W175 module + + 0x0489 is the vendor ID of T77W968, 0x105b is the vendor ID of + T99W175. + {0x105b, 0xe0b0},{0x105b, 0xe0b1} is T99W175 PCI device, used by Dell. + {0x105b, 0xe0ab} is T99W175 PCI device, used by Lenovo. + + If the modem has an mbim port, create a MbimFoxconn object, regardless + of what the product ID is. + + The firmware version format in the T99W175 was selected to have + firmware version + carrier config version + apps version. + + (cherry picked from commit 47ea5c98f4d05a2113b7533fec86ac6003171c85) + + plugins/foxconn/mm-broadband-modem-mbim-foxconn.c | 15 ++++++++---- + plugins/foxconn/mm-plugin-foxconn.c | 29 + +++++++++-------------- + 2 files changed, 22 insertions(+), 22 deletions(-) + +commit 3fb5f80283bd2013073fb71c592e5d63efca39e2 +Author: Freedom Liu +Date: Mon Apr 26 15:19:37 2021 +0800 + + foxconn: change modem-foxconn-t77w968 to modem-mbim-foxconn + + Named the object in a more generic way. + + (cherry picked from commit c31488608a331f4d16dacb923a5611c52f57f1cb) + + plugins/Makefile.am | 8 ++-- + plugins/dell/mm-plugin-dell.c | 12 +++--- + .../foxconn/mm-broadband-modem-foxconn-t77w968.h | 49 + ---------------------- + ...t77w968.c => mm-broadband-modem-mbim-foxconn.c} | 44 + +++++++++---------- + plugins/foxconn/mm-broadband-modem-mbim-foxconn.h | 49 + ++++++++++++++++++++++ + ...apping.conf => mm-foxconn-carrier-mapping.conf} | 0 + plugins/foxconn/mm-plugin-foxconn.c | 12 +++--- + plugins/tests/test-keyfiles.c | 6 +-- + 8 files changed, 90 insertions(+), 90 deletions(-) + +commit b7f0f2ca7c6e61fcf08786909ba0992d0de36ce6 +Author: Loic Poulain +Date: Tue Apr 20 15:04:11 2021 +0200 + + qmi: Increase qmi_device_open timeout + + SDX55 modem can take slighlty more than 25 seconds to start all + its services from cold boot/reset (including QMI services), causing + QMI port opening timeout error. This patch increases the + qmi_device_open + timeout from 25 seconds to 45 seconds to prevent such issue. + + Signed-off-by: Loic Poulain + (cherry picked from commit e57c59bf88615129efc0241957749102ea8af90d) + + src/mm-port-qmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit ba18704cc63c0be201b79eedb9561e2dc1fe0d67 +Author: Loic Poulain +Date: Wed Dec 16 17:07:31 2020 +0100 + + plugins: generic: Add 'wwan' subsystem support + + wwan is a new subsystem for WWAN devices, allowing to expose the + WWAN device and its ports in a generic way. + + The sysfs hierarchy for such device is + + /sys/class/wwanX + /sys/class/wwanX/wwanXpYP + + Where X is the WWAN device index, Y the port index and P the + control protocol name (QMI, MBIM...). A control port is also + exposed as character device in /dev. + + Signed-off-by: Loic Poulain + (cherry picked from commit fefbf4d3029ce8e1f2ed9db2bc8288e13989b05a) + + plugins/generic/mm-plugin-generic.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 60606f1231ade45fffe02b3c72238af7ba024195 +Author: Loic Poulain +Date: Wed Dec 16 15:49:42 2020 +0100 + + broadband-modem-qmi: Add MHI QMI port peek support + + For MHI data port (mhi-net), simply return the primary QMI port. + + Signed-off-by: Loic Poulain + (cherry picked from commit 6895ca836b29dba55f5afd46925967e7795fd43b) + + src/mm-broadband-modem-qmi.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit f27ce401d173eb3f3574e34818f296f3f6fa6634 +Author: Loic Poulain +Date: Wed Dec 16 15:11:48 2020 +0100 + + base: Add support for wwan subsystem + + Add support for the Linux wwan subsystem that started to expose + control channel as character devices (e.g. /dev/wwan0p1MBIM...). + + Signed-off-by: Loic Poulain + (cherry picked from commit 6db2e8f04da458488c374f1a6f6979ce7fe9b67d) + + src/mm-base-modem.c | 26 ++++++++++++++++++++++++++ + src/mm-plugin.c | 9 +++++++++ + src/mm-port-probe.c | 9 ++++++++- + src/mm-port.h | 3 ++- + 4 files changed, 45 insertions(+), 2 deletions(-) + +commit 33cbe975acc78e0b08c70553875c292b2d26fef2 +Author: Loic Poulain +Date: Wed Dec 16 14:01:53 2020 +0100 + + filter: Add wwan port devices + + Allow WWAN control ports. + + Signed-off-by: Loic Poulain + (cherry picked from commit b1db6527cf9d4801e48dfe6e9fe8124532269159) + + src/mm-filter.c | 8 ++++++++ + src/mm-filter.h | 13 +++++++++---- + 2 files changed, 17 insertions(+), 4 deletions(-) + +commit 7b77bedae49457718bece5cf1a262ab561b6af5a +Author: Loic Poulain +Date: Wed Dec 16 13:59:27 2020 +0100 + + udev: add wwan port devices as valid candidates + + The new Linux WWAN subsystem exposes the various WWAN control ports + as character devices. WWAN port device naming follows the following + convention: wwanXpYP, where X is the wwan device index, Y the port + index and P the port type/protocol. + + Signed-off-by: Loic Poulain + (cherry picked from commit aaf8c17e3592cf401913543452002e1e227a8d05) + + src/80-mm-candidate.rules | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit f59095a3bef82cc066788c1c8df0947bca7d1408 +Author: Aleksander Morgado +Date: Tue May 18 14:29:41 2021 +0200 + + libmm-glib,common-helpers: avoid signed vs unsigned comparisons + + mm-common-helpers.c: In function 'mm_get_int_from_str': + mm-common-helpers.c:1349:13: warning: comparison between signed + and unsigned integer expressions [-Wsign-compare] + if (eol == num) + ^~ + mm-common-helpers.c: In function 'mm_utils_hexstr2bin': + mm-common-helpers.c:1718:19: warning: comparison between signed + and unsigned integer expressions [-Wsign-compare] + for (i = 0; i < len; i += 2) { + ^ + + (cherry picked from commit d661d822f7fc2b31884eb10a586501765250ec2e) + + libmm-glib/mm-common-helpers.c | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +commit 6005b93902a40a27648101933fe2c2cbbe80aac1 +Author: Aleksander Morgado +Date: Tue May 18 12:24:39 2021 +0200 + + libmm-glib: drop default timeout checks in Command() + + The g_dbus_proxy_get_default_timeout() is by default -1 unless + explicitly updated, so the check doesn't make any sense really. We + didn't see any warning produced because mmcli provides an explicit + timeout of 30s, so it was never the default -1. + + (cherry picked from commit 21ff48ed7d56837567aff3e396acf3bfd24cbc02) + + libmm-glib/mm-modem.c | 5 ----- + 1 file changed, 5 deletions(-) + +commit a746c58e30dc8a44885294b382f8c6e7390d0998 +Author: Aleksander Morgado +Date: Tue May 18 12:07:45 2021 +0200 + + libmm-glib: remove unused cmp_allow_roaming() method + + mm-bearer-properties.c:725:1: warning: 'cmp_allow_roaming' defined + but not used [-Wunused-function] + cmp_allow_roaming (gboolean a, + ^~~~~~~~~~~~~~~~~ + + (cherry picked from commit a325acd6b1ae3376bb0f9f3eb83ce44617115a55) + + libmm-glib/mm-bearer-properties.c | 19 ------------------- + 1 file changed, 19 deletions(-) + +commit 84388c162dd08677fc98a54c011c2ef4aa6639c6 +Author: Aleksander Morgado +Date: Tue May 18 11:28:18 2021 +0200 + + core: drop "volatile" for g_once_init_enter locations + + This fixes a few (fatal in gcc 11) warnings. + + See https://gitlab.gnome.org/GNOME/glib/-/issues/600 + + (cherry picked from commit 268cab885b62526bb97794cb6b9e8b0f97084841) + + build-aux/mm-enums-template.c | 8 +++---- + build-aux/mm-errors-template.c | 8 +++---- + src/mm-log.c | 2 +- + src/mm-private-boxed-types.c | 48 + +++++++++++++++++++++--------------------- + 4 files changed, 33 insertions(+), 33 deletions(-) + +commit 2b0e0ed48566c7b94e1d3520af1707d0f958c6b8 +Author: Clayton Craft +Date: Fri Apr 16 20:42:15 2021 -0700 + + sms-part-3gpp: add flag for indicating PDU is transfer-route message + + When the message is a transfer-route MT, there is no SMSC address to + parse out. This flag allows indicating when the PDU is one such + message. + + (cherry picked from commit 43c39d5226484eba99211b2fa1add2ae5b398ebf) + + src/mm-broadband-modem-mbim.c | 1 + + src/mm-broadband-modem-qmi.c | 5 +++++ + src/mm-sms-part-3gpp.c | 42 + +++++++++++++++++++++++------------------- + src/mm-sms-part-3gpp.h | 1 + + 4 files changed, 30 insertions(+), 19 deletions(-) + +commit 78d294da18eb11ba44bc2ccd189a522c3721e3bb +Author: Clayton Craft +Date: Sat Apr 17 00:53:27 2021 -0700 + + broadband-modem-qmi: Handle transfer-route MT messages + + This handles transfer-route MT messages, automatically ACKing any that + need to be ACKed. + + Based on work by Angus Ainslie and Elias Rudberg + + (cherry picked from commit 205e9edf3edddfa73b1a9b8ddaff4e3779a20e61) + + src/mm-broadband-modem-qmi.c | 74 + +++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 73 insertions(+), 1 deletion(-) + +commit 17a09e23f96c5ea7dbd8605aa4211ea161ba7dd4 +Author: Aleksander Morgado +Date: Sat May 15 00:34:44 2021 +0200 + + build: require libqmi 1.28.4 + + We're going to use add support for the transfer-route MT messages in + the stable MM 1.16 branch, so we should make sure the related QMI + messages have been added to the basic collection, as already done in + libqmi 1.28.4. + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit fead7038b963efd16fcf7df62064d0983bf9cd2e +Author: Aleksander Morgado +Date: Tue May 4 00:30:11 2021 +0200 + + ci: stable 1.16 branch relies on libqmi 1.28 and libmbim 1.24 + + So make all CI pipelines on the stable branch run with those specific + libqmi and libmbim branches. + + .gitlab-ci.yml | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +commit 3cec1a0104cbae3406bca9198f552f303efd6c12 +Author: Aleksander Morgado +Date: Wed Apr 28 22:41:06 2021 +0200 + + tools: disable stub tester if no introspection enabled + + TEST: test-stub... + /MM/stub/modem/interface: dbus-daemon[48020]: [session uid=0 + pid=48020] Activating service name='org.freedesktop.ModemManager1' + requested by ':1.0' (uid=0 pid=48005 + comm="/builds/mobile-broadband/ModemManager/tools/tests/") + Traceback (most recent call last): + File + "/builds/mobile-broadband/ModemManager/tools/test-modemmanager-service.py", + line 7, in + gi.require_version('ModemManager', '1.0') + File "/usr/lib/python3/dist-packages/gi/__init__.py", line 129, + in require_version + raise ValueError('Namespace %s not available' % namespace) + ValueError: Namespace ModemManager not available + dbus-daemon[48020]: [session uid=0 pid=48020] Activated + service 'org.freedesktop.ModemManager1' failed: Process + org.freedesktop.ModemManager1 exited with status 1 + + (cherry picked from commit 7b7bbdd999d00446966f100212bc469970e769a3) + + tools/tests/Makefile.am | 3 +++ + 1 file changed, 3 insertions(+) + +commit 021c3dd6f11dc86103493ea08c9a60fc584d8c2a +Author: Aleksander Morgado +Date: Wed Apr 28 21:27:22 2021 +0200 + + ci: disable introspection and gtk-doc in all tests that don't need it + + The template image we're using already contains all the necessary + build deps to enable introspection and gtk-doc, so we need to + explicitly disable them where we don't need them, or otherwise they'll + be automatically enabled as the deps are found. + + (cherry picked from commit 4593eec17385c190747df48155f95d71c591102e) + + .gitlab-ci.yml | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +commit b877baaa4baae077e54260c3b705ec89a4a35acf +Author: Aleksander Morgado +Date: Wed Apr 28 21:21:34 2021 +0200 + + ci: use latest ubuntu LTS by default + + (cherry picked from commit d9072562cd8d03dc72f072a78e73c24fe4193b8a) + + .gitlab-ci.yml | 28 ++++++++++++++++------------ + 1 file changed, 16 insertions(+), 12 deletions(-) + +commit 0dbaacf04e52cc2e4b8351e1c325e136ba2541cf +Author: Benjamin Tissoires +Date: Thu Apr 8 10:07:45 2021 +0200 + + CI: make use of ci-templates + + full list of benefits at: + https://freedesktop.pages.freedesktop.org/ci-templates/templates.html#why-use-the-ci-templates + + But the main ones are: + - reproducible (just download the container and run the `script` part + to be in the same environment the CI was running) + - no more before script that pulls hundreds of MB and spend useless + time. + + Signed-off-by: Benjamin Tissoires + (cherry picked from commit 01f2109ae0bb8ac9a966f69f88ec2b526b68269b) + + .gitlab-ci.yml | 48 +++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 43 insertions(+), 5 deletions(-) + +commit 722ae98ba6f920815cf534869bc9b1a8ebdd80f5 +Author: Aleksander Morgado +Date: Mon May 3 22:09:41 2021 +0200 + + foxconn: don't assume parent location is available + + If ModemManager is not built with QMI support, the generic MBIM modem + object will not have any location support, so we cannot assume that + iface_modem_location_parent will be valid and that it will have all + load_location_capabilities(), enable_location_gathering() and + disable_location_gathering() implemented. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/362 + + (cherry picked from commit e1567c30df5a0bf320b654cd85942bdff5db6144) + + .../foxconn/mm-broadband-modem-foxconn-t77w968.c | 113 + ++++++++++++++------- + 1 file changed, 79 insertions(+), 34 deletions(-) + +commit b593df29bc8165d3afc771d2c9c4587a3bdf0a11 +Author: Aleksander Morgado +Date: Wed Apr 28 21:58:36 2021 +0200 + + broadband-modem-mbim: fix build with libmbim >= 1.25.3 + + src/mm-broadband-modem-mbim.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit 7a3d9ab290f1ea916248163ac55746caf0a04f53 +Author: Aleksander Morgado +Date: Wed Apr 21 11:53:17 2021 +0200 + + build: post-release version bump to 1.16.5 + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit e0048b690cfd93da4fa47be110008bac260462a8 +Author: Aleksander Morgado +Date: Wed Apr 21 11:21:08 2021 +0200 + + release: bump version to 1.16.4 + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 0325cd530c35e0854b3f2a6624c7fdc4cad69995 +Author: Aleksander Morgado +Date: Wed Apr 21 11:20:53 2021 +0200 + + NEWS: update for 1.16.4 + + NEWS | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 50 insertions(+) + +commit 1cd612aab46e442075defeab7f0ce8ba97ba11d1 +Author: Aleksander Morgado +Date: Wed Apr 21 11:33:53 2021 +0200 + + build: disable gtkdocize in autoreconf + + We have a custom modified gtk-doc.make file in our sources, which + disables the gtkdoc-rebase on local install step, so we don't want + autoreconf to copy a different one when we're bootstrapping. + + (cherry picked from commit 4ae623c37b5eb395c79b49a044958c09fd6d23a7) + + autogen.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 5a3dd6d4da2afa4df83781465cd5975ba337d6f5 +Author: Aleksander Morgado +Date: Mon Apr 12 23:37:19 2021 +0200 + + cli: avoid attempting to setup timeout on NULL proxy + + mm_manager_get_proxy() may actually return NULL if creating the + internal GDBusProxy for the Manager interface fails. + + (cherry picked from commit 5a735317f7c0c42b2ddce52dbf1fa1edfc1c41f4) + + cli/mmcli.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 2ed8ee5257e6479f12008b84cf93a196a75ba273 +Author: Aleksander Morgado +Date: Mon Apr 12 23:06:22 2021 +0200 + + kerneldevice: fix segfault when processing event for non-existing port + + ModemManager[6954]: [1618260091.319919] [br0] invalid + sysfs path read for net/br0 + ** + ERROR:kerneldevice/mm-kernel-device-generic.c:235:ptr_array_add_sysfs_attribute_link_basename: + assertion failed: (array && sysfs_path && attribute) + Bail out! + ERROR:kerneldevice/mm-kernel-device-generic.c:235:ptr_array_add_sysfs_attribute_link_basename: + assertion failed: (array && sysfs_path && attribute) + + Thread 1 "ModemManager" received signal SIGABRT, Aborted. + (gdb) bt + #0 0x00007ffff7438ef5 in raise () at /usr/lib/libc.so.6 + #1 0x00007ffff7422862 in abort () at /usr/lib/libc.so.6 + #2 0x00007ffff76c2084 in () at /usr/lib/libglib-2.0.so.0 + #3 0x00007ffff771d85d in g_assertion_message_expr () at + /usr/lib/libglib-2.0.so.0 + #4 0x00005555556a5337 in + ptr_array_add_sysfs_attribute_link_basename (array=0x5555557de520, + sysfs_path=0x0, attribute=0x555555703bd8 "driver", out_value=0x0) + at kerneldevice/mm-kernel-device-generic.c:235 + #5 0x00005555556a542b in + preload_contents_other (self=0x5555557a6c60) at + kerneldevice/mm-kernel-device-generic.c:255 + #6 0x00005555556a6485 in preload_contents (self=0x5555557a6c60) + at kerneldevice/mm-kernel-device-generic.c:517 + #7 0x00005555556a7fb6 in check_preload (self=0x5555557a6c60) + at kerneldevice/mm-kernel-device-generic.c:980 + #8 0x00005555556a855f in initable_init (initable=0x5555557a6c60, + cancellable=0x0, error=0x7fffffffe5c8) at + kerneldevice/mm-kernel-device-generic.c:1127 + #9 0x00007ffff78a2f41 in g_initable_new_valist () at + /usr/lib/libgio-2.0.so.0 + #10 0x00007ffff78a2ffa in g_initable_new () at + /usr/lib/libgio-2.0.so.0 + #11 0x00005555556a8205 in mm_kernel_device_generic_new_with_rules + (props=0x5555557a5fa0, rules=0x7fffec001e30, error=0x7fffffffe5c8) + at kerneldevice/mm-kernel-device-generic.c:1042 + #12 0x00005555556a827d in mm_kernel_device_generic_new + (props=0x5555557a5fa0, error=0x7fffffffe5c8) at + kerneldevice/mm-kernel-device-generic.c:1063 + #13 0x00005555555aba9c in handle_kernel_event + (self=0x555555793220, properties=0x5555557a5fa0, + error=0x7fffffffe5c8) at mm-base-manager.c:414 + + (cherry picked from commit 3d5a994ca8d8e766fd87a85d346c5b21f5e6c53e) + + src/kerneldevice/mm-kernel-device-generic.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit b793fdc1c7a8a57a8e229f12861de0375174b152 +Author: Aleksander Morgado +Date: Thu Apr 8 22:24:04 2021 +0200 + + iface-modem-time: fix invalid read when loading network timezone fails + + ==226546== Invalid read of size 4 + ==226546== at 0x5068CB7: g_error_matches (in + /usr/lib/libglib-2.0.so.0.6600.7) + ==226546== by 0x1BAC86: load_network_timezone_ready + (mm-iface-modem-time.c:218) + ==226546== by 0x4EA827E: g_simple_async_result_complete (in + /usr/lib/libgio-2.0.so.0.6600.7) + ==226546== by 0x17AE2C: at_command_ready (mm-base-modem-at.c:538) + ==226546== by 0x4EA827E: g_simple_async_result_complete (in + /usr/lib/libgio-2.0.so.0.6600.7) + ==226546== by 0x24B475: serial_command_ready + (mm-port-serial-at.c:378) + ==226546== by 0x4EA827E: g_simple_async_result_complete (in + /usr/lib/libgio-2.0.so.0.6600.7) + ==226546== by 0x244F94: command_context_complete_and_free + (mm-port-serial.c:141) + ==226546== by 0x246861: port_serial_got_response + (mm-port-serial.c:755) + ==226546== by 0x246923: port_serial_timed_out + (mm-port-serial.c:785) + ==226546== by 0x50863C3: ??? (in + /usr/lib/libglib-2.0.so.0.6600.7) + ==226546== by 0x5085B83: g_main_context_dispatch (in + /usr/lib/libglib-2.0.so.0.6600.7) + + (cherry picked from commit b766ded3ca58cee202bd4567dd5530f04dc2290d) + + src/mm-iface-modem-time.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit ab6033e9582ec79a8e0c0a7735a4dbad0e3f8a6b +Author: Aleksander Morgado +Date: Thu Apr 8 22:40:20 2021 +0200 + + libmm-glib,bearer-properties: fix usage of CMP_FLAGS_NO_RM_PROTOCOL + + (cherry picked from commit 3d665d22093b985f6860170bca8d33a5562056d1) + + libmm-glib/mm-bearer-properties.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 124c2c672b773a366decec223aa8bec33f8bbd80 +Author: Aleksander Morgado +Date: Wed Mar 24 21:50:42 2021 +0100 + + iface-modem: avoid check for SIM swap if no interface skeleton + available + + (cherry picked from commit 9f7bbf28d210a4986f2d0d353e4e37024bc91c4a) + + src/mm-iface-modem.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +commit b0021c3e8c02ed595e651dd4a7561cdeaef647c0 +Author: Aleksander Morgado +Date: Wed Mar 24 21:47:54 2021 +0100 + + iface-modem: avoid lock info update if no interface skeleton available + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/351 + + (cherry picked from commit 96d83392a850b84888661f68cb170dd87fcd3c85) + + src/mm-iface-modem.c | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) + +commit 15cd1d7003c6a4942e31c57a658029ba36c27c2f +Author: Dylan Van Assche +Date: Tue Mar 16 19:28:09 2021 +0100 + + quectel: ignore QGPSURC + + QGPSURCs are not ignored and causes calls to be rejected in some cases + + (cherry picked from commit 192e067f97153125fe9d3362c750146a5a7215cf) + + plugins/quectel/mm-broadband-modem-qmi-quectel.c | 10 +++++ + plugins/quectel/mm-broadband-modem-quectel.c | 10 +++++ + plugins/quectel/mm-shared-quectel.c | 48 + +++++++++++++++++++++++- + plugins/quectel/mm-shared-quectel.h | 7 +++- + 4 files changed, 72 insertions(+), 3 deletions(-) + +commit 99bffc03cff060a752c0c9a4af0e7d06847c0c00 +Author: Aleksander Morgado +Date: Wed Mar 24 11:00:22 2021 +0100 + + libmm-glib,bearer-properties: fix 'allowed-auth' comparison + + (cherry picked from commit 4b19b9693f03ab48c6707508d27b24e38294e022) + + libmm-glib/mm-bearer-properties.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit eed71a6048de040816f81dcf2031ece6fd7eb679 +Author: Aleksander Morgado +Date: Fri Mar 12 17:44:44 2021 +0100 + + base-bearer: ignore forced disconnections + + If using PPP, ModemManager is never in charge of deciding when the + connection is finished, because that would end up making ModemManager + try to use the TTY port while pppd is still using it. + + When the modem goes unregistered for some time, we should not force + the disconnection of the bearer object, we still need to wait for pppd + to tell us the modem is disconnected. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/331 + + (cherry picked from commit 3e58fbe547115bd875754806340b3bb39cc7b053) + + src/mm-base-bearer.c | 5 +++++ + 1 file changed, 5 insertions(+) + +commit c5a86261cc1352d040313efa47247821a8d792cf +Author: Aleksander Morgado +Date: Sun Mar 21 13:44:16 2021 +0100 + + cinterion: make sure FALSE sets GError in parse_smong_response() + + The g_regex_match_full() method may return FALSE without setting the + GError, so that case needs to be considered. + + In addition to that, the following g_assert() was not doing what it + should have been, as it was comparing the address of the variable and + not the variable itself; rework the code to avoid that as well: + g_assert (access_tech != MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN); + + (cherry picked from commit 634682b602dd51efbda42a8b2e8764b9bb0024e2) + + plugins/cinterion/mm-modem-helpers-cinterion.c | 48 + +++++++++++----------- + .../cinterion/tests/test-modem-helpers-cinterion.c | 29 ++++++++++--- + 2 files changed, 48 insertions(+), 29 deletions(-) + +commit efef1132101345f48bfe9102ddebed194b3c6cd6 +Author: Aleksander Morgado +Date: Sun Mar 21 13:05:27 2021 +0100 + + cinterion: make sure FALSE sets GError in provcfg_response_to_cid() + + The g_regex_match_full() method may return FALSE without setting the + GError, so that case needs to be considered. + + Reported by Jan Mazura. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/347 + + (cherry picked from commit d01bca493dad933b9df51bec1254c79089ffa1c7) + + plugins/cinterion/mm-modem-helpers-cinterion.c | 14 ++++++++++- + .../cinterion/tests/test-modem-helpers-cinterion.c | 27 + ++++++++++++++++++---- + 2 files changed, 35 insertions(+), 6 deletions(-) + +commit 70f4677c211ccbb278eff65dc56a5ea9b0b34085 +Author: Aleksander Morgado +Date: Sun Mar 21 11:24:18 2021 +0100 + + cinterion: allow '*' in Prov/Cfg response + + E.g. in a Cinterion PLS8-E (REVISION 04.004) to match the following + line: + + ^SCFG: "MEopMode/Prov/Cfg","fallback*" + + Fix suggested by Jan Mazura. + + See + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/347 + + (cherry picked from commit 5285e958abcd734de73a13011b5243bcfdf4d20c) + + plugins/cinterion/mm-modem-helpers-cinterion.c | 2 +- + plugins/cinterion/tests/test-modem-helpers-cinterion.c | 5 +++++ + 2 files changed, 6 insertions(+), 1 deletion(-) + +commit 6c0d96129702e4babdd98255dacaa278633ecd0a +Author: Aleksander Morgado +Date: Tue Mar 23 15:36:58 2021 +0100 + + kerneldevice,udev: don't use autoptr in GUdev types + + The autoptr support in all GUdev types was introduced in + commit 272533131c6ed38479a88805, included in libgudev 232. + + In the MM 1.16 branch we depend on libgudev 147, so avoid + implicitly bumping the required version. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/349 + + src/kerneldevice/mm-kernel-device-udev.c | 30 + +++++++++++++++++++++--------- + 1 file changed, 21 insertions(+), 9 deletions(-) + +commit b69da9d037d4857ad22a5efdb3bb9d1f494e4f21 +Author: Aleksander Morgado +Date: Thu Mar 18 11:20:02 2021 +0100 + + base-modem: plug leaks when organizing ports + + The GLists maintained in the logic need to be explicitly freed (just + the lists, not the list contents) if we exit early on error or if we + end up deciding that the specific ports are available but unsupported + by the plugin (e.g. if a plugin that doesn't support net ports finds + net ports in the modem). + + ==225333== 24 bytes in 1 blocks are definitely lost in loss record + 2,024 of 5,525 + ==225333== at 0x483E77F: malloc (vg_replace_malloc.c:307) + ==225333== by 0x506C539: g_malloc (in + /usr/lib/libglib-2.0.so.0.6600.7) + ==225333== by 0x508DC8F: g_slice_alloc (in + /usr/lib/libglib-2.0.so.0.6600.7) + ==225333== by 0x50636B4: g_list_append (in + /usr/lib/libglib-2.0.so.0.6600.7) + ==225333== by 0x17E671: mm_base_modem_organize_ports + (mm-base-modem.c:1298) + ==225333== by 0x1E4409: mm_plugin_create_modem (mm-plugin.c:1094) + ==225333== by 0x162C81: mm_device_create_modem (mm-device.c:481) + ==225333== by 0x15DE60: device_support_check_ready + (mm-base-manager.c:218) + ==225333== by 0x4EA8173: ??? (in /usr/lib/libgio-2.0.so.0.6600.7) + ==225333== by 0x4EAC6E8: ??? (in /usr/lib/libgio-2.0.so.0.6600.7) + ==225333== by 0x16730F: device_context_run_ready + (mm-plugin-manager.c:1533) + ==225333== by 0x4EA8173: ??? (in /usr/lib/libgio-2.0.so.0.6600.7) + + (cherry picked from commit ab007a449638eeacaf6f626b707842af5274db95) + + src/mm-base-modem.c | 21 ++++++++++++--------- + 1 file changed, 12 insertions(+), 9 deletions(-) + +commit 8a1f79bd5d5e2e0f1aa1b00901cbd84aa8e8729f +Author: Aleksander Morgado +Date: Sun Feb 14 22:23:07 2021 +0100 + + charsets: define common translit fallback character + + (cherry picked from commit 8a8e00168b02c5064f01d5da20a97c7268ba1e2b) + + src/mm-charsets.c | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +commit 2e51229c6fb0e235ea0bc41997abb3220d54f974 +Author: Aleksander Morgado +Date: Sun Feb 14 09:14:21 2021 +0100 + + charsets: remove charset_hex_to_utf8() + + No longer used, replaced by the new common conversion methods. + + (cherry picked from commit c84454c1b00da7d33cc4fd917be4be6756317488) + + src/mm-charsets.c | 41 ----------------------------------------- + src/mm-charsets.h | 6 ------ + 2 files changed, 47 deletions(-) + +commit abd41673a2f3ed9178c08975d223ba744970ac40 +Author: Aleksander Morgado +Date: Sun Feb 14 09:09:45 2021 +0100 + + charsets: remove take_and_convert methods + + These methods worked in a very strict way for some encodings, and in a + very very loose way for others. E.g. when converting from hex-encoded + UCS-2, we would attempt to convert as much text as we could even if + the input string was truly not even close to UCS-2. This kind of "do + our best" could make sense when processing e.g. the operator name + reported by the modem, as that is some string to show to the user and + there may be no strict requirement to have it perfectly fine. But the + kind of loose comparison done for UCS-2 doesn't make sense e.g. when + converting USSD responses or SMS messages. + + (cherry picked from commit 0ff3eb7ee0106423519152a68de1621cedf567c8) + + src/mm-charsets.c | 208 + ------------------------------------------------------ + src/mm-charsets.h | 5 -- + 2 files changed, 213 deletions(-) + +commit a030ea61498e736b3ba8405ce8d6e5ea37045fa7 +Author: Aleksander Morgado +Date: Sun Feb 14 09:07:21 2021 +0100 + + cinterion: rework mno decoding to use str_to_utf8() + + (cherry picked from commit ab4c31ec0b2c79285e24b9a117ff5e5c21f8fd71) + + plugins/cinterion/mm-modem-helpers-cinterion.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +commit b42a60e4803916352143a0fc14032fd7bd50a379 +Author: Aleksander Morgado +Date: Sun Feb 14 09:01:49 2021 +0100 + + cinterion: rework band encoding to use str_to_utf8() + + Also providing support to report errors when attempting to decode the + strings. + + (cherry picked from commit 6bc07b4b1487cfc6e171ec1f2c34958f17202a8b) + + plugins/cinterion/mm-modem-helpers-cinterion.c | 88 + ++++++++++++++++++++------ + 1 file changed, 67 insertions(+), 21 deletions(-) + +commit 251d2096f6a8748b031e8434ccea9a17ea7bcd59 +Author: Aleksander Morgado +Date: Sat Feb 13 16:04:56 2021 +0100 + + helpers: rework normalize_operator() to use str_to_utf8() + + Instead of blindly assuming that we can take whatever string given as + valid UTF-8, we'll always attempt to convert from the current modem + charset into UTF-8. Before we were doing this for hex-encoded UCS2, + but not for example for GSM-7. + + And due to the now applied GSM-7 conversion, the mf627a/mf627b +COPS + parsing unit tests are updated accordingly, because when converting + from an input string that contains byte 0x40 ('@' in UTF-8) as if it + were GSM-7, the 0x40 is taken as character '¡', encoded as 0xc2,0xa1 + in UTF-8). + + (cherry picked from commit 16df1e17e6e96f8dd0ba67003c6abb7083b9d7ec) + + plugins/altair/mm-broadband-modem-altair-lte.c | 2 +- + src/mm-broadband-modem.c | 4 +-- + src/mm-modem-helpers.c | 42 + ++++++++++++++++---------- + src/mm-modem-helpers.h | 3 +- + src/tests/test-modem-helpers.c | 8 +++-- + 5 files changed, 36 insertions(+), 23 deletions(-) + +commit bba502c4be260e46c97f266957b3cb1bc67af7eb +Author: Aleksander Morgado +Date: Sat Feb 13 15:45:52 2021 +0100 + + charsets,tests: update take_and_convert tests to str_from/to + + (cherry picked from commit 63fa9eee462de9270e3ab44eab43050877982cf1) + + src/tests/test-charsets.c | 98 + ++++++++++++++++++++++++++--------------------- + 1 file changed, 55 insertions(+), 43 deletions(-) + +commit ada8ec6786cc9aff9b1c93caa62c16292681bdf6 +Author: Aleksander Morgado +Date: Sat Feb 13 14:54:54 2021 +0100 + + cinterion: move sequence to set bands to private ctx + + The sequence of commands is exclusively used during the set current + bands operation, so there is no point in storing it in the private + object data. + + (cherry picked from commit 3ac248a7a6a4ad03d10dc691905e43be8722ab31) + + plugins/cinterion/mm-broadband-modem-cinterion.c | 65 + ++++++++++++++---------- + 1 file changed, 39 insertions(+), 26 deletions(-) + +commit e7a949de935dc09e7012d9bedbf6bd6f0b80f3d4 +Author: Aleksander Morgado +Date: Sat Feb 13 14:44:27 2021 +0100 + + charsets: use new str_from_utf8() instead of + take_and_convert_to_current_charset() + + (cherry picked from commit e5363b546b72403451f14f24502f6c9a90728616) + + plugins/cinterion/mm-broadband-modem-cinterion.c | 77 ++++++++++---- + plugins/mbm/mm-broadband-bearer-mbm.c | 40 ++++--- + src/mm-broadband-modem.c | 126 + +++++++++++------------ + src/mm-broadband-modem.h | 12 --- + 4 files changed, 142 insertions(+), 113 deletions(-) + +commit ee08721984b93303fac2e00ba456b79826a83f4a +Author: Aleksander Morgado +Date: Tue Dec 22 15:10:55 2020 +0100 + + charsets: use new bytearray_to_utf8() instead of hex_to_utf8() + + (cherry picked from commit 395ab06c03086bf127970d14a97102e21222126f) + + src/mm-broadband-modem.c | 20 +++++++++++++++----- + 1 file changed, 15 insertions(+), 5 deletions(-) + +commit c87f85d4709284e2059da9214df1cb9e36cfdb62 +Author: Aleksander Morgado +Date: Mon Dec 21 14:28:08 2020 +0100 + + charsets: use new bytearray_to_utf8() instead of byte_array_to_utf8() + + (cherry picked from commit 5ea4a591a40748c5be5f9f4b14ac4f7a09fe2857) + + src/mm-broadband-modem-mbim.c | 6 ++---- + src/mm-broadband-modem-qmi.c | 6 ++---- + src/mm-charsets.c | 23 ----------------------- + src/mm-charsets.h | 5 ----- + src/mm-sms-part-3gpp.c | 9 +++------ + 5 files changed, 7 insertions(+), 42 deletions(-) + +commit aa67dd24c3853362d385686b6f1acbbc7f94cccf +Author: Aleksander Morgado +Date: Mon Dec 21 14:20:13 2020 +0100 + + charsets: make charset_gsm_unpacked_to_utf8() private + + Use the generic mm_modem_charset_bytearray_to_utf8() instead. + + (cherry picked from commit 033e174e445ff7606ea43191a4a5c141413e10e2) + + plugins/huawei/mm-broadband-modem-huawei.c | 15 ++++++++++----- + src/mm-base-sim.c | 23 ++++++++++++++++------- + src/mm-broadband-modem-mbim.c | 9 ++++++--- + src/mm-charsets.c | 21 +++++++++++---------- + src/mm-charsets.h | 5 ----- + src/mm-sms-part-3gpp.c | 18 +++++++++++------- + src/tests/test-charsets.c | 6 ++++-- + 7 files changed, 58 insertions(+), 39 deletions(-) + +commit 2b05740820c63d4b977b148eda3e1ca2198669b7 +Author: Aleksander Morgado +Date: Mon Dec 21 13:37:13 2020 +0100 + + charsets: use new bytearray_from_utf8() instead of byte_array_append() + + (cherry picked from commit 8bfdfb187b9c911366376f1574dc7e45fe4f0767) + + src/mm-broadband-modem-mbim.c | 9 ++--- + src/mm-broadband-modem-qmi.c | 4 +-- + src/mm-broadband-modem.c | 34 +++++++++---------- + src/mm-charsets.c | 34 ------------------- + src/mm-charsets.h | 9 ----- + src/mm-sms-part-3gpp.c | 5 ++- + src/mm-sms-part-cdma.c | 76 + ++++++++++++++++++++----------------------- + 7 files changed, 59 insertions(+), 112 deletions(-) + +commit cafdcb1311bbe4afbce56f97148b1794cf59621f +Author: Aleksander Morgado +Date: Sun Feb 14 15:23:43 2021 +0100 + + charsets: make charset_utf8_to_unpacked_gsm() private + + Use the generic mm_modem_charset_bytearray_from_utf8() instead. + + (cherry picked from commit 75b37e16b12ca3807852804fed668ba2fd7ca317) + + plugins/huawei/mm-broadband-modem-huawei.c | 24 ++++++--------- + src/mm-broadband-modem-mbim.c | 13 +++----- + src/mm-charsets.c | 49 + +++++++++++++++--------------- + src/mm-charsets.h | 4 --- + src/mm-sms-part-3gpp.c | 17 +++++------ + src/tests/test-charsets.c | 15 +++++---- + 6 files changed, 55 insertions(+), 67 deletions(-) + +commit 061da8e4921862b5de514f4ca82d142debe28be1 +Author: Aleksander Morgado +Date: Fri Nov 27 00:41:40 2020 +0100 + + charsets: new common APIs to convert from/to charsets and UTF-8 + + (cherry picked from commit 9c613d33e1f60501cc8406f6429097d8bda87c59) + + src/mm-charsets.c | 298 + ++++++++++++++++++++++++++++++++++++++++++++++++++++-- + src/mm-charsets.h | 61 +++++++++++ + 2 files changed, 352 insertions(+), 7 deletions(-) + +commit 6e0a686228ac5a2da1b5a97d57c8d60082f24ffa +Author: Aleksander Morgado +Date: Sun Feb 14 13:47:21 2021 +0100 + + charsets: avoid //TRANSLIT when converting to/from charsets + + The //TRANSLIT extension is not always supported by the different + iconv() implementations that we may find out there, so let's + completely avoid using it. + + For some of the charsets it actually didn't make much sense anyway, + e.g. as converting to UTF-16 or UTF-8 would always be possible without + requiring //TRANSLIT to take effect. + + The //TRANSLIT extension was also being used sometimes in the source + charset identification, which was also not fully correct, as we would + only expect it in the target charset identification. + + (cherry picked from commit 6f32c8d38f2c7ad269c4ccf84190ad6e917293a9) + + src/mm-charsets.c | 81 + +++++++++++++++++++++++++++---------------------------- + 1 file changed, 40 insertions(+), 41 deletions(-) + +commit c23b4cd78a38e860130b6673a926272e8f3930a1 +Author: Aleksander Morgado +Date: Thu Nov 26 23:22:57 2020 +0100 + + charsets: make translit optional in utf8_to_unpacked_gsm() + + If the conversion is not fully compatible, the user of the method + needs to request transliteration enabled explicitly in order to avoid + returning errors in this method. + + (cherry picked from commit bc449cbe87ccebccbe35f926e88a2dd110832ddf) + + plugins/huawei/mm-broadband-modem-huawei.c | 5 +++- + src/mm-broadband-modem-mbim.c | 5 ++-- + src/mm-charsets.c | 39 + ++++++++++++++++++++---------- + src/mm-charsets.h | 4 ++- + src/mm-sms-part-3gpp.c | 7 ++++-- + src/tests/test-charsets.c | 3 ++- + 6 files changed, 42 insertions(+), 21 deletions(-) + +commit 5aa572d7f8604e68d08dc678dcc7f9ccc5240530 +Author: Aleksander Morgado +Date: Thu Nov 26 23:07:11 2020 +0100 + + charsets: make translit optional in gsm_unpacked_to_utf8() + + Until now, this method would automatically apply transliteration; + i.e. replacing characters with '?' when no direct translation was + available. + + We can attempt to do that transliteration on strings that are not + critical, e.g. the operator name reported by the network. But we + should not do that on other types of strings, e.g. on SMS contents + that may really have additional purposes than just being + human-readable. + + This commit makes the transliteration option to be explicitly + requested by the caller. + + (cherry picked from commit 5ce97abd73da12b64393be798f2c294d29be2705) + + plugins/huawei/mm-broadband-modem-huawei.c | 2 +- + src/mm-base-sim.c | 2 +- + src/mm-broadband-modem-mbim.c | 6 +- + src/mm-charsets.c | 21 ++++-- + src/mm-charsets.h | 10 ++- + src/mm-sms-part-3gpp.c | 116 + +++++++++++++++++------------ + src/tests/test-charsets.c | 4 +- + 7 files changed, 96 insertions(+), 65 deletions(-) + +commit 64296ce39744c959aca690d0ab9b2b69820240b4 +Author: Aleksander Morgado +Date: Sun Feb 14 10:20:44 2021 +0100 + + libmm-glib,tests: add ishexstr/hexstr2bin/bin2hexstr unit tests + + (cherry picked from commit 5480cb67b283c078770b02766c37768cb0930d7b) + + libmm-glib/tests/test-common-helpers.c | 104 + +++++++++++++++++++++++++++++++++ + 1 file changed, 104 insertions(+) + +commit da57feee719f234f619567eb7df2a9c69817a7bd +Author: Aleksander Morgado +Date: Sun Feb 14 11:06:50 2021 +0100 + + libmm-glib,common-helpers: make hexstr2bin() return a guint8 array + + It makes much more sense than returning a gchar array, as gchar is + signed. + + (cherry picked from commit 34de613deab1c8728118fce389963ecb29ca51e7) + + libmm-glib/mm-common-helpers.c | 10 +++++----- + libmm-glib/mm-common-helpers.h | 2 +- + plugins/altair/mm-modem-helpers-altair-lte.c | 18 ++++++++--------- + plugins/huawei/mm-broadband-modem-huawei.c | 4 ++-- + plugins/huawei/mm-modem-helpers-huawei.c | 30 + ++++++++++++---------------- + src/mm-base-sim.c | 16 +++++++-------- + src/mm-charsets.c | 12 +++++------ + src/mm-modem-helpers-qmi.c | 2 +- + src/mm-modem-helpers.c | 2 +- + src/mm-sms-part-3gpp.c | 2 +- + src/mm-sms-part-cdma.c | 2 +- + 11 files changed, 48 insertions(+), 52 deletions(-) + +commit 7f272cc84e89137b3dcf1a225882a6d5906dc3f6 +Author: Aleksander Morgado +Date: Sun Feb 14 10:46:49 2021 +0100 + + libmm-glib,common-helpers: ishexstr() fails on empty input string + + (cherry picked from commit 6d8610d63ecb8e53e14486533a580ea4f37c644c) + + libmm-glib/mm-common-helpers.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit c1c0319f3e9110155ab19c4838b3372faaa64c53 +Author: Aleksander Morgado +Date: Sun Feb 14 10:43:35 2021 +0100 + + libmm-glib,common-helpers: hexstr2bin fails on empty input string + + Also, remove the trailing NUL byte that was appended to the output + binary stream, as it's not needed in any case. + + (cherry picked from commit 8c30a6b6f813114d0cdc6b8a04ae4336c8393d48) + + libmm-glib/mm-common-helpers.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +commit ce36979813cdc31692e5ffddd57136aa3165e740 +Author: Aleksander Morgado +Date: Mon Dec 21 13:52:54 2020 +0100 + + libmm-glib,common-helpers: make hexstr2bin() accept input string + length + + Optionally given explicitly, and -1 can be used to assume it's + NUL-terminated. + + (cherry picked from commit a211981d4a12b0ef6cab48b7a04ae9e5674cac01) + + libmm-glib/mm-common-helpers.c | 9 +++++---- + libmm-glib/mm-common-helpers.h | 2 +- + plugins/altair/mm-modem-helpers-altair-lte.c | 2 +- + plugins/huawei/mm-broadband-modem-huawei.c | 2 +- + plugins/huawei/mm-modem-helpers-huawei.c | 2 +- + src/mm-base-sim.c | 4 ++-- + src/mm-charsets.c | 2 +- + src/mm-modem-helpers-qmi.c | 2 +- + src/mm-modem-helpers.c | 2 +- + src/mm-sms-part-3gpp.c | 2 +- + src/mm-sms-part-cdma.c | 2 +- + 11 files changed, 16 insertions(+), 15 deletions(-) + +commit d126fa58069e794fe59b9e48d1b86053522ca9c9 +Author: Aleksander Morgado +Date: Sun Nov 22 17:01:19 2020 +0100 + + libmm-glib,common-helpers: make hexstr2bin() return a GError + + This util method checks whether the input string is a valid hex + string, so make sure we return a GError on failure. + + (cherry picked from commit 657cabcfce6794d2a2f629d63dbd56fc149dab2e) + + libmm-glib/mm-common-helpers.c | 18 ++++-- + libmm-glib/mm-common-helpers.h | 2 +- + plugins/altair/mm-modem-helpers-altair-lte.c | 56 ++++++------------ + plugins/huawei/mm-broadband-modem-huawei.c | 19 +++---- + plugins/huawei/mm-modem-helpers-huawei.c | 2 +- + src/mm-base-sim.c | 85 + ++++++++++------------------ + src/mm-charsets.c | 2 +- + src/mm-modem-helpers-qmi.c | 20 +++---- + src/mm-modem-helpers.c | 5 +- + src/mm-sms-part-3gpp.c | 17 ++---- + src/mm-sms-part-cdma.c | 17 ++---- + 11 files changed, 90 insertions(+), 153 deletions(-) + +commit 24b276a5cbe70b8b283142be6cda251274c7c5af +Author: Aleksander Morgado +Date: Sun Nov 22 16:10:06 2020 +0100 + + charsets: remove unused charset_utf8_to_hex() method + + (cherry picked from commit dbdf67e9f7c55d7f70ed94449160a7ff254359a2) + + src/mm-charsets.c | 28 ---------------------------- + src/mm-charsets.h | 6 ------ + 2 files changed, 34 deletions(-) + +commit 69fcaf3b5c154712bac705f8326210e25b72ca4d +Author: Aleksander Morgado +Date: Sun Nov 22 15:05:56 2020 +0100 + + charsets: don't allow quoting in byte_array_append() + + There's no point in adding a quoting option to this method; if the + caller needs the appended string quoted, it should quote it before + passing it to this method. + + It was nowhere used anyway. + + (cherry picked from commit 8b590721dfdff5c4382dbc3498d92035b2d4ad64) + + src/mm-broadband-modem-mbim.c | 2 +- + src/mm-broadband-modem-qmi.c | 2 +- + src/mm-broadband-modem.c | 6 +----- + src/mm-charsets.c | 5 ----- + src/mm-charsets.h | 1 - + src/mm-sms-part-3gpp.c | 2 +- + src/mm-sms-part-cdma.c | 12 ++---------- + 7 files changed, 6 insertions(+), 24 deletions(-) + +commit 021093232dc1b8f8257ef10e667fceb3f1383ab9 +Author: Aleksander Morgado +Date: Sun Nov 22 15:02:07 2020 +0100 + + charsets: remove HEX charset type + + This is no real charset, it is the fake one we used to represent a + UCS2 hex-encoded string. + + (cherry picked from commit 38a4a9c842bcb0c87bca7b1a5595556fe2c144fc) + + src/mm-charsets.c | 10 ---------- + src/mm-charsets.h | 3 +-- + 2 files changed, 1 insertion(+), 12 deletions(-) + +commit 2122de4a1db0f215b75e20c505a8ada5ff07a195 +Author: Aleksander Morgado +Date: Sun Nov 22 15:00:23 2020 +0100 + + charsets: define charset enum explicitly as flags + + (cherry picked from commit a025e83e5ab10147861334fd94682fdd20fb69d2) + + src/mm-charsets.h | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +commit 36974af255ad5a96824de21400d935a6d2ee0ab2 +Author: Aleksander Morgado +Date: Mon Mar 15 17:46:49 2021 +0100 + + shared-qmi: acquisition order preference TLV always same items + + The acquisition order preference TLV must always have the same number + of elements, just the order of the elements should be different. + + Also, always prefer the acquisition order preference TLV to the + GSM+WCDMA specific one, which is the same logic the modem applies. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/340 + + (cherry picked from commit fdfd4b270aa3bb31185feb833691f134c887f869) + + src/mm-modem-helpers-qmi.c | 108 + ++++++++++++++++++++++++--------------------- + src/mm-modem-helpers-qmi.h | 9 ++-- + src/mm-shared-qmi.c | 64 ++++++++++++++++----------- + 3 files changed, 100 insertions(+), 81 deletions(-) + +commit aae5fe5f5bc49fa0ecb87b2b714611ce16744d66 +Author: Aleksander Morgado +Date: Mon Mar 15 15:19:38 2021 +0100 + + shared-qmi: process all feature checks in SSP response together + + Loading capabilities is the very first step of the state machines, and + so we can rely on the "NAS Get SSP" method performed there to process + all feature checks of the SSP response. + + (cherry picked from commit bb5bc9c8c560a24ef2951bdb9e1da18dedd7c5b0) + + src/mm-shared-qmi.c | 21 ++++++++++++++------- + 1 file changed, 14 insertions(+), 7 deletions(-) + +commit 6f68efc862ca92fcc5d28103224dfdcd31ae10e0 +Author: Aleksander Morgado +Date: Mon Mar 15 15:11:41 2021 +0100 + + shared-qmi: if getting TP/SSP fails, assume unsupported + + Until now we were only considering TP/SSP unsupported if we received + a QMI protocol error (e.g. reporting unknown command). + + We now also consider TP/SSP unsupported if the actual request + succeeds, but an error is reported in the response. There is no point + in considering TP/SSP supported if the plain get request without input + TLVs given fails. + + (cherry picked from commit 65a7624ffdd39b015d5013743913af8361e83513) + + src/mm-shared-qmi.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit c96524ca7b822341f227bf7b4b8bc9a5c4c2392a +Author: Aleksander Morgado +Date: Mon Mar 15 17:20:30 2021 +0100 + + shared-qmi: add missing feature check flag initialization to UNKNOWN + + (cherry picked from commit 1a5f90f15bda7b939c75c6b8c7d0022c8f919b42) + + src/mm-shared-qmi.c | 1 + + 1 file changed, 1 insertion(+) + +commit 2f42f208ba9dc2a29548e8f7010d08fd45b3bee0 +Author: Aleksander Morgado +Date: Mon Mar 15 14:58:12 2021 +0100 + + shared-qmi: rename feature check variables + + We want the "extended_lte_band_preference" with the "nas_ssp" prefix, + as we're going to add more checks for SSP features. + + (cherry picked from commit 67b64eb7eeab5c50381014945cfbd73ebc4cbe11) + + src/mm-shared-qmi.c | 68 + ++++++++++++++++++++++++++--------------------------- + 1 file changed, 34 insertions(+), 34 deletions(-) + +commit fb0670637687d77cd8de584dcf7961d76c17e9b1 +Author: Aleksander Morgado +Date: Thu Mar 11 10:33:00 2021 +0100 + + bearer-mbim: plug MbimDevice leak in disconnection context + + (cherry picked from commit a772b70632008d6c375487a8e711b80bb343a931) + + src/mm-bearer-mbim.c | 1 + + 1 file changed, 1 insertion(+) + +commit 00ee27b075562814f0a9eee386d033245abf981d +Author: Aleksander Morgado +Date: Tue Mar 2 17:18:39 2021 +0100 + + broadband-modem-qmi: use updated system info API if libqmi >= 1.29.2 + + (cherry picked from commit b509229d5747434be06e17af26c33fd8072a55f9) + + src/mm-broadband-modem-qmi.c | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +commit f776e6ba27f4ffa4d722a48ec1c86ea3e0566dea +Author: Aleksander Morgado +Date: Tue Mar 2 15:02:37 2021 +0100 + + build: post-release version bump to 1.16.3 + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 52df1aa4b938e0dbbdfd780befa54fce3bfdf875 +Author: Aleksander Morgado +Date: Tue Mar 2 14:45:57 2021 +0100 + + release: bump version to 1.16.2 + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 35962825c035651df39f698c2bef0e5049deab00 +Author: Aleksander Morgado +Date: Tue Mar 2 14:45:33 2021 +0100 + + NEWS: update for 1.16.2 + + NEWS | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit 64ea5d1e8170ad8de8432024f5137d63d2395663 +Author: Aleksander Morgado +Date: Mon Mar 1 16:02:33 2021 +0100 + + libmm-glib,tests: include string.h explicitly + + For strlen() + + (cherry picked from commit 438ff54d0308427dd629e2dbb43b12dc7295873b) + + libmm-glib/tests/test-common-helpers.c | 1 + + 1 file changed, 1 insertion(+) + +commit d8539adbe211ad6b20749df24bb5be403b25a0f7 +Author: Aleksander Morgado +Date: Mon Mar 1 15:56:14 2021 +0100 + + modem-helpers-mbim: include string.h explicitly + + For strstr() + + (cherry picked from commit da0e610f5f020775e32f43b3343a02d864492224) + + src/mm-modem-helpers-mbim.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit ef6e6c5303efe613479dae655962c6395321aed3 +Author: Aleksander Morgado +Date: Mon Mar 1 15:55:22 2021 +0100 + + utils: import ptr array lookup with GEqualFunc from GLib 2.54 + + This fixes the build when using GLib < 2.54. + + (cherry picked from commit a9611c62793377d8da08e4cb5e9cb71f5afda22e) + + src/Makefile.am | 2 +- + src/kerneldevice/mm-kernel-device-generic.c | 1 + + src/mm-plugin-manager.c | 1 + + src/mm-utils.c | 47 + +++++++++++++++++++++++++++++ + src/mm-utils.h | 14 +++++++++ + 5 files changed, 64 insertions(+), 1 deletion(-) + +commit f1f1a7e25e007116a1eeb6284d7989218c80289c +Author: Aleksander Morgado +Date: Fri Feb 26 11:16:59 2021 +0100 + + shared-qmi: network registration cancellation logic with asserts + disabled + + g_assert() calls may be disabled, and if so, the network registration + task would never get completed. + + (cherry picked from commit c7d366671f749689c143f7effe2a183eb710def9) + + src/mm-shared-qmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 4f7ee18d1cf1ce21bba3f2701e408ae83108b3de +Author: Aleksander Morgado +Date: Thu Feb 25 15:17:45 2021 +0100 + + libmm-glib,bearer-properties: fix 'allow roaming' comparison + + Fix the 'allow roaming' setting comparison, which was breaking the + whole bearer properties comparison logic, and therefore making + Simple.Connect() recreate over and over the bearer with the same + settings. + + Fixes 5629f47a59b48f2604fd8e9e4af7209b138aef21 + + (cherry picked from commit f10e4af919df8b92b5680e646a16a490fa80d9c3) + + libmm-glib/mm-bearer-properties.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit bf8a6c41754046b12b4f65d1c0c3569e3f26c793 +Author: Aleksander Morgado +Date: Tue Feb 23 12:19:52 2021 +0100 + + build: post-release version bump to 1.16.1 + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 7a5a49b75301b38c2bac6a94de5afb2f9930cf4e +Author: Aleksander Morgado +Date: Tue Feb 23 11:35:50 2021 +0100 + + release: bump version to 1.16.0 + + configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 7a5eae2a36e9a544bfdffdfa57af76cf60b97bae +Author: Aleksander Morgado +Date: Tue Feb 23 11:11:57 2021 +0100 + + NEWS: update for 1.16.0 + + NEWS | 145 + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 145 insertions(+) + +commit bbd3638d1233efbe05993bf79aa48ada97589724 +Author: Aleksander Morgado +Date: Tue Feb 23 11:22:18 2021 +0100 + + build: require libqmi 1.28.0 + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit a546201470ee1067be5494ab5f678016bb2bc2ec +Author: Aleksander Morgado +Date: Mon Feb 22 15:04:43 2021 +0100 + + bearer-mbim: IP type may be reported as deactivated and still have + IP settings + + If we were requesting for IPv4v6 and we only got IPv4 reported as + activated, we would right away ignore the IPv6 bits, even if we + received IPv6 settings later on when querying for them. Change that, + so that if an IP address of a given type is received, we assume the + corresponding context was really activated even if the modem didn't + report it in the connect set response. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/320 + + src/mm-bearer-mbim.c | 61 + +++++++++++++++++++++++++++++++++++----------------- + 1 file changed, 41 insertions(+), 20 deletions(-) + +commit 29d9dc7e0cd9b80e0b75f9833b6bb896c78eda33 +Author: Aleksander Morgado +Date: Wed Feb 17 15:38:50 2021 +0100 + + api,introspection: flag as DEPRECATED the 'number' bearer setting + + This setting is unused since some releases ago, and the corresponding + libmm-glib methods were already flagged as deprecated. Let's add an + explicit mention to this deprecation on the DBus API itself. + + introspection/org.freedesktop.ModemManager1.Modem.Simple.xml | 3 ++- + introspection/org.freedesktop.ModemManager1.Modem.xml | 2 +- + 2 files changed, 3 insertions(+), 2 deletions(-) + +commit 6dd5ced86d80c695be9898b9ac4ea3e50ff64f32 +Author: Aleksander Morgado +Date: Wed Feb 17 15:31:08 2021 +0100 + + libmm-glib,simple-connect-properties: add missing APIs to get/set + RM protocol + + Probably not a big deal, since no one has asked for these in the past + years, but let's add them for completeness with the DBus API. + + docs/reference/libmm-glib/libmm-glib-sections.txt | 2 ++ + libmm-glib/mm-simple-connect-properties.c | 37 + +++++++++++++++++++++++ + libmm-glib/mm-simple-connect-properties.h | 21 +++++++------ + 3 files changed, 51 insertions(+), 9 deletions(-) + +commit c4f215c9cb2d8497e7ebfea2904563526bb08d90 +Author: Aleksander Morgado +Date: Wed Feb 17 15:21:49 2021 +0100 + + libmm-glib,bearer-properties: consume 'rm-protocol' setting + + libmm-glib/mm-bearer-properties.c | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 69926d93357cc0ed7280586abee1e6871e0894cc +Author: Yegor Yefremov +Date: Mon Feb 15 17:53:39 2021 +0100 + + examples: modem-watcher: get rid of global variables + + Move the code into the main() routine and pass main_loop as + a parameter to the signal handler. + + examples/modem-watcher-python/modem-watcher-python | 25 + ++++++++++++++-------- + 1 file changed, 16 insertions(+), 9 deletions(-) + +commit e685ce9ce51f5f1e18ab3f42106715fd659ed2c6 +Author: Yegor Yefremov +Date: Mon Feb 15 17:53:38 2021 +0100 + + examples: ModemWatcher: convert comments in the doc strings + + Move comments under the class and method definitions. + + Also rework boolean handling. + + examples/modem-watcher-python/ModemWatcher.py | 52 + +++++++++++++-------------- + 1 file changed, 25 insertions(+), 27 deletions(-) + +commit 8bf1869f3c5b69e90b1cef21a04c77ff67f717cc +Author: Yaron Shahrabani +Date: Mon Feb 8 16:37:47 2021 +0000 + + po: add Hebrew translation + + po/LINGUAS | 1 + + po/he.po | 105 + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 106 insertions(+) + +commit b2f9771b8559c9cb877d1f44189b390b9704bc1e +Author: Aleksander Morgado +Date: Mon Feb 15 00:43:15 2021 +0100 + + broadband-modem-mbim: detect 5G support in custom data class + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/301 + + src/mm-broadband-modem-mbim.c | 11 ++++++++--- + src/mm-modem-helpers-mbim.c | 11 +++++++++-- + src/mm-modem-helpers-mbim.h | 5 +++-- + 3 files changed, 20 insertions(+), 7 deletions(-) + +commit 3a32409000ad584ec67b0ddd43b312a37ea5a369 +Author: Yegor Yefremov +Date: Sat Feb 13 17:19:13 2021 +0100 + + examples: network-scan: enable modem before the network scan + + Otherwise we get the following exception: + + Traceback (most recent call last): + File "/root/network-scan-python", line 57, in + networks = modem3gpp.scan_sync() + gi.repository.GLib.Error: mm_core_error_quark: + GDBus.Error:org.freedesktop.ModemManager1.Error.Core.WrongState: + Cannot scan networks: not enabled yet (8) + + examples/network-scan-python/network-scan-python | 4 ++++ + 1 file changed, 4 insertions(+) + +commit c7d0defddeb03a372fb885eab3480cc56f10115b +Author: Yegor Yefremov +Date: Sat Feb 13 17:19:12 2021 +0100 + + examples: network-scan: resolve PEP8 issues + + Use autopep8 utility to resolve issues like spaces before brackets + and wrong hanging indentation. + + Also treat objects like boolean variables to check whether they are + None or not. + + examples/network-scan-python/network-scan-python | 24 + ++++++++++++++---------- + 1 file changed, 14 insertions(+), 10 deletions(-) + +commit f3f05f397a7f08272718ee9a2ee75799a44e7bfb +Author: Aleksander Morgado +Date: Sun Feb 14 23:31:35 2021 +0100 + + device: avoid trying to remove source multiple times + + ModemManager[115879]: [1613341789.760031] [modem3] + completely disposed + + (ModemManager:115879): GLib-CRITICAL **: 23:29:49.760: Source ID + 2379 was not found when attempting to remove it + + Thread 1 "ModemManager" received signal SIGTRAP, Trace/breakpoint + trap. + 0x00007ffff774b343 in g_logv () from /usr/lib/libglib-2.0.so.0 + (gdb) + (gdb) bt + #0 0x00007ffff774b343 in g_logv () at /usr/lib/libglib-2.0.so.0 + #1 0x00007ffff774b5c0 in g_log () at /usr/lib/libglib-2.0.so.0 + #2 0x00007ffff7741c9e in g_source_remove () at + /usr/lib/libglib-2.0.so.0 + #3 0x00005555555aad02 in dispose (object=0x555555831260) + at mm-device.c:802 + #4 0x00007ffff7843755 in g_object_unref () at + /usr/lib/libgobject-2.0.so.0 + #5 0x00005555555a5107 in glib_autoptr_clear_MMDevice + (_ptr=0x555555831260) at mm-device.h:63 + #6 0x00005555555a5125 in glib_autoptr_cleanup_MMDevice + (_ptr=0x7fffffffe090) at mm-device.h:63 + #7 0x00005555555a59ab in device_removed (self=0x555555769220, + subsystem=0x55555577dc50 "tty", name=0x555555869a40 "ttyUSB3") + at mm-base-manager.c:237 + #8 0x00005555555a620d in handle_uevent (self=0x555555769220, + action=0x5555558987b0 "remove", device=0x555555893840) at + mm-base-manager.c:445 + #9 0x00007ffff7381acd in () at /usr/lib/libffi.so.7 + #10 0x00007ffff738103a in () at /usr/lib/libffi.so.7 + #11 0x00007ffff783c8fe in g_cclosure_marshal_generic () at + /usr/lib/libgobject-2.0.so.0 + #12 0x00007ffff7837072 in g_closure_invoke () at + /usr/lib/libgobject-2.0.so.0 + #13 0x00007ffff785fa85 in () at /usr/lib/libgobject-2.0.so.0 + #14 0x00007ffff78535dd in g_signal_emit_valist () at + /usr/lib/libgobject-2.0.so.0 + #15 0x00007ffff7853b40 in g_signal_emit () at + /usr/lib/libgobject-2.0.so.0 + #16 0x00007ffff7e792aa in () at /usr/lib/libgudev-1.0.so.0 + #17 0x00007ffff7742b84 in g_main_context_dispatch () at + /usr/lib/libglib-2.0.so.0 + #18 0x00007ffff7796c21 in () at /usr/lib/libglib-2.0.so.0 + #19 0x00007ffff77420d3 in g_main_loop_run () at + /usr/lib/libglib-2.0.so.0 + #20 0x00005555555a1df4 in main (argc=2, argv=0x7fffffffea88) + at main.c:213 + + src/mm-device.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit 7159b8e27ac47af706e0c2e4d4f77460dce7881e +Author: Dylan Van Assche +Date: Sun Jan 31 15:38:31 2021 +0100 + + context: add test-no-suspend-resume cli parameter + + Disables suspend/resume support at runtime. + This is useful for modems which are never turned off + or suspended when the host suspends. + + src/main.c | 10 +++++++--- + src/mm-context.c | 18 ++++++++++++++++++ + src/mm-context.h | 11 +++++++---- + 3 files changed, 32 insertions(+), 7 deletions(-) + +commit 12329ac7880b5a43eed8b7b2c4b932c544f43898 +Author: Aleksander Morgado +Date: Sat Feb 13 11:24:24 2021 +0100 + + examples,python: ignore scan operation in modems without 3GPP + interface + + Traceback (most recent call last): + File + "/home/aleksander/Development/foss/ModemManager/examples/network-scan-python/./network-scan-python", + line 46, in + modem3gpp.set_default_timeout(300000) + AttributeError: 'NoneType' object has no attribute + 'set_default_timeout' + + examples/network-scan-python/network-scan-python | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit dd3310132f135e57c4d45827c8750920f7dbe5ee +Author: Aleksander Morgado +Date: Sat Feb 13 11:12:49 2021 +0100 + + examples,python: fix undefined NameError in modem watcher example + + $ ./modem-watcher-python + [ModemWatcher] ModemManager 1.15.0 service is available in bus + [ModemWatcher] QUALCOMM INCORPORATED (0) modem + managed by ModemManager [863974040050058]: + /org/freedesktop/ModemManager1/Modem/0 + [ModemWatcher] Sierra Wireless Inc. (Sierra Wireless EM7345 + 4G LTE) modem managed by ModemManager [013937003110648]: + /org/freedesktop/ModemManager1/Modem/1 + Traceback (most recent call last): + File + "/home/aleksander/Development/foss/ModemManager/examples/modem-watcher-python/./modem-watcher-python", + line 35, in + watcher = ModemWatcher.ModemWatcher() + File + "/home/aleksander/Development/foss/ModemManager/examples/modem-watcher-python/ModemWatcher.py", + line 48, in __init__ + self.on_name_owner(self.manager, None) + File + "/home/aleksander/Development/foss/ModemManager/examples/modem-watcher-python/ModemWatcher.py", + line 85, in on_name_owner + self.set_available() + File + "/home/aleksander/Development/foss/ModemManager/examples/modem-watcher-python/ModemWatcher.py", + line 64, in set_available + self.on_object_added(self.manager, obj) + File + "/home/aleksander/Development/foss/ModemManager/examples/modem-watcher-python/ModemWatcher.py", + line 101, in on_object_added + modem_index(obj.get_object_path())) + NameError: name 'modem_index' is not defined + + examples/modem-watcher-python/ModemWatcher.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 16d1cf33183d376fa6cb8925e42c77b2e86be2d9 +Author: Yegor Yefremov +Date: Sat Feb 13 09:40:05 2021 +0100 + + examples: rework imports + + Remove unused imports and fix import sorting using isort utility. + + examples/modem-watcher-python/ModemWatcher.py | 6 +++--- + examples/modem-watcher-python/modem-watcher-python | 6 ++++-- + examples/network-scan-python/network-scan-python | 6 ++++-- + examples/sms-python/sms-python | 6 ++++-- + 4 files changed, 15 insertions(+), 9 deletions(-) + +commit 6107774bb21e55028b87a7d3f23762324410543b +Author: Aleksander Morgado +Date: Sun Jan 17 14:13:40 2021 +0100 + + filter: add missing reference to rpmsg filter + + src/mm-filter.c | 1 + + 1 file changed, 1 insertion(+) + +commit 8838546631958d88ecd0c72c557102876f5b87e4 +Author: Aleksander Morgado +Date: Fri Feb 5 14:56:59 2021 +0100 + + README: add CoC info + + README | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit e732a9afcc8e662df14a7fb5c78a1023705d5ff1 +Author: Andrew Lassalle +Date: Tue Feb 2 13:50:51 2021 -0800 + + broadband-modem-qmi: remove unused variables + + src/mm-broadband-modem-qmi.c | 1 - + 1 file changed, 1 deletion(-) + +commit 52b44aeb4956a223ce9edcb596a896413b4d69fc +Author: Andrew Lassalle +Date: Tue Feb 2 13:43:16 2021 -0800 + + cinterion: remove unused variables + + plugins/cinterion/mm-broadband-modem-cinterion.c | 2 -- + plugins/cinterion/mm-modem-helpers-cinterion.c | 1 - + 2 files changed, 3 deletions(-) + +commit 66010ed17e71714f35bb34a66cc53e1102a28651 +Author: Lukas Senger +Date: Thu Jan 14 15:22:19 2021 +0100 + + simtech: fix updating bitmask during gps disabling + + During disabling of gps sources the bitmask that keeps track of + them is + updated incorrectly. Instead of removing the current source, all other + sources are removed from the mask. + + One problem that arises from this is, that when you enable GPS + after it + has been disabled completely (e.g. by disabling all GPS sources), the + code will not send a "+CGPS=1,1" command because it incorrectly + assumes + that GPS is still enabled on the device. + + plugins/simtech/mm-shared-simtech.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 268bf4f98af0adeef703f02469e47259c73be91e +Author: Aleksander Morgado +Date: Sun Jan 17 10:33:45 2021 +0100 + + core: update copyright years to 2021 + + cli/mmcli.c | 2 +- + docs/reference/api/ModemManager-docs.xml | 1 + + docs/reference/libmm-glib/libmm-glib-docs.xml | 1 + + src/mm-context.c | 2 +- + 4 files changed, 4 insertions(+), 2 deletions(-) + +commit 6c0c67d6f0a65af416448236f07cdccfd1993dd8 +Author: Aleksander Morgado +Date: Sat Jan 16 17:44:42 2021 +0100 + + doc: skip running gtkdoc-rebase on local install step + + We can leave the relative paths to other books (e.g. '../glib' or + '../ModemManager') because running gtkdoc-rebase seems to be broken + since the 1.29 release, see: + + https://gitlab.gnome.org/GNOME/gtk-doc/-/issues/138 + + gtk-doc.make | 1 - + 1 file changed, 1 deletion(-) + +commit 38267952284ded86bb0ea7ca9139236bc80556a3 +Author: Aleksander Morgado +Date: Sat Jan 16 17:42:36 2021 +0100 + + docs: add 'online-location' references + + So that the gtkdoc-rebase step fixes the URLs to contain the correct + links; e.g.: + + $ make dist V=s + make[8]: Entering directory + '/home/aleksander/Development/foss/ModemManager/docs/reference/libmm-glib' + make \ + top_distdir="../../../ModemManager-1.15.0" + distdir="../../../ModemManager-1.15.0/docs/reference/libmm-glib" + \ + dist-hook + ../ModemManager/ -> + https://www.freedesktop.org/software/ModemManager/doc/latest/ModemManager/ + (914) + ../gio/ -> https://developer.gnome.org/gio/unstable/ (2564) + ../glib/ -> https://developer.gnome.org/glib/unstable/ (5534) + ../gobject/ -> https://developer.gnome.org/gobject/unstable/ (499) + make[8]: Leaving directory + '/home/aleksander/Development/foss/ModemManager/docs/reference/libmm-glib' + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/298 + + docs/reference/api/ModemManager-docs.xml | 2 ++ + docs/reference/libmm-glib/libmm-glib-docs.xml | 2 ++ + 2 files changed, 4 insertions(+) + +commit d1bc67936539b1cf59f07f8f168486263b0005f5 +Author: Aleksander Morgado +Date: Sat Jan 16 15:37:35 2021 +0100 + + build: add new RELEASING doc explaining how releases are made + + RELEASING | 37 +++++++++++++++++++++++++++++++++++++ + 1 file changed, 37 insertions(+) + +commit 9c353cf6f0a7650cfe1b914d6881890de9dff0b0 +Author: Louis-Alexis Eyraud +Date: Fri Jan 15 15:14:58 2021 +0100 + + zte: add 1 second delay after sim unlock to avoid IMSI reading issue + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/306 + + Signed-off-by: Louis-Alexis Eyraud + + plugins/zte/mm-broadband-modem-zte.c | 20 ++++++++++++++------ + 1 file changed, 14 insertions(+), 6 deletions(-) + +commit 89cd1696c3a105f314b1a7e275c68377ed6df5e4 +Author: Frederic Martinsons +Date: Thu Nov 12 10:48:11 2020 +0100 + + tools: add unit test for test-modemmanager-service.py + + The tests spawn the service via GTestDBus framework and make + some test API call while checking libmm interface to verify + that informations are well propagated. + + To be able to use the fresh built libmm typelib, I used a + wrapper script to set GI_TYPELIB_PATH (because DBus activation + process clean the environment so it is not possible to set + it directly in the file). + + This requires also the install of libgirepository-dev and python3-gi + in the CI docker. + + Signed-off-by: Frederic Martinsons + + .gitignore | 4 + + .gitlab-ci.yml | 4 +- + configure.ac | 2 + + tools/Makefile.am | 2 + + tools/tests/Makefile.am | 46 +++ + .../org.freedesktop.ModemManager1.service.in | 3 + + tools/tests/test-stub.c | 459 + +++++++++++++++++++++ + tools/tests/test-wrapper.sh.in | 5 + + 8 files changed, 523 insertions(+), 2 deletions(-) + +commit 17ea1dfa130001599b7dff421a1b7d71c25faa34 +Author: Aleksander Morgado +Date: Sun Jan 10 15:13:45 2021 +0100 + + docs: add MMBearerPropertiesCmpFlags to ignored list + + docs/reference/libmm-glib/libmm-glib-sections.txt | 1 + + 1 file changed, 1 insertion(+) + +commit d12ab8a25a60323a753e3437c81a984a503deb40 +Author: Aleksander Morgado +Date: Mon Jan 11 14:18:36 2021 +0100 + + iface-modem: avoid leaking the MmGdbusModem when bearers are updated + + See See + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/302 + + src/mm-iface-modem.c | 1 + + 1 file changed, 1 insertion(+) + +commit 102de14c15b1c278988de376d03262bcb078211d +Author: Aleksander Morgado +Date: Mon Jan 11 14:13:28 2021 +0100 + + telit: plug GPS data port leak + + The _get_port_gps() returns a full reference, use _peek_port_gps() + instead. + + See + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/302 + + plugins/telit/mm-broadband-modem-telit.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8f465d44a5f40e1594db4f06b98b2436539a47bf +Author: Timo Jyrinki +Date: Fri Jan 8 15:34:57 2021 +0200 + + po: add Finnish translation + + Translation by JRfi: + https://l10n.gnome.org/vertimus/ModemManager/master/po/fi/ + + po/LINGUAS | 1 + + po/fi.po | 116 + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 117 insertions(+) + +commit 8ccd63ef64d8bcc39ac67457674b85c8fe42c265 +Author: Andrew Lassalle +Date: Fri Jan 8 10:49:34 2021 -0800 + + test-sms-part-cdma: fix memory leak + + src/tests/test-sms-part-cdma.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit 18b72a046e89d00d7e7b9f2d718c43d64e595de0 +Author: Frederic Martinsons +Date: Sun Dec 20 18:11:06 2020 +0100 + + mmcli: don't assume that mm_object_peek_modem or mm_object_get_modem + return non null + + This very peculiar case can happen when an intermediate initiliazition + step + of a modem fails. + + The ModemManager daemon should always expose the modem interface + but let not + assume that in mmcli and protect these calls. + + Signed-off-by: Frederic Martinsons + + cli/mmcli-common.c | 4 +++- + cli/mmcli-manager.c | 9 +++++++-- + 2 files changed, 10 insertions(+), 3 deletions(-) + +commit 2f53a08e5f1eef8c1892dc55f32fbacba85565a0 +Author: Frederic Martinsons +Date: Sun Dec 20 18:07:44 2020 +0100 + + iface-modem: don't consider charset setup failure as fatal. + + On some modem (for example SORACOM SC-QGLC4-C1) , the character + set setup + step fails with "Unknown error" when the SIM card is missing or + locked. + This leads to not expose Modem interface and not being able to + unlocked + the SIM. + We should not consider this step as fatal but just issue a warning + to let + other steps continue (which will let modem in failed state anyway). + + Closes #289 + + Signed-off-by: Frederic Martinsons + + src/mm-iface-modem.c | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +commit 3d4dd64dd03622ae5d335f0111c54e184de120c7 +Author: Aleksander Morgado +Date: Tue Dec 1 23:26:42 2020 +0100 + + broadband-modem-qmi: disable signal/access-tech polling if indications + enabled + + We can rely on QMI indications when the signal quality and access tech + changes happen, instead of doing explicit polling. + + The modem will run the signal quality retrieval once, and then just + rely on indications, with polling disabled: + + ModemManager[278759]: [1606862198.230492] [modem1] signal + strength (lte): -79 dBm + ModemManager[278759]: [1606862198.230520] [modem1] signal + strength: -79 dBm --> 55% + ModemManager[278759]: [1606862198.230583] [modem1] access + technology changed (unknown -> lte) + ModemManager[278759]: [1606862198.230654] [modem1] signal + quality updated (55) + ModemManager[278759]: [1606862198.230675] [modem1] periodic + signal quality and access technology checks not rescheduled: + unneeded or unsupported + ModemManager[278759]: [1606862198.230692] [modem1] periodic + signal checks disabled + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/231 + + src/mm-broadband-modem-qmi.c | 20 ++++++++++++++++++-- + 1 file changed, 18 insertions(+), 2 deletions(-) + +commit 47f39c9e1a9f37758027dd5072caafe224351089 +Author: Aleksander Morgado +Date: Tue Dec 1 22:55:56 2020 +0100 + + broadband-modem-qmi: fix disabling of signal strength events + + Attempting to disable the signal strength events was failing because + the protocol handler expects a valid set of thresholds also during the + disabling. So, just pass always the thresholds. + + ModemManager[274522]: [/dev/cdc-wdm1] sent generic request + (translated)... + <<<<<< QMUX: + <<<<<< length = 17 + <<<<<< flags = 0x00 + <<<<<< service = "nas" + <<<<<< client = 3 + <<<<<< QMI: + <<<<<< flags = "none" + <<<<<< transaction = 7 + <<<<<< tlv_length = 5 + <<<<<< message = "Set Event Report" (0x0002) + <<<<<< TLV: + <<<<<< type = "Signal Strength Indicator" (0x10) + <<<<<< length = 2 + <<<<<< value = 00:00 + <<<<<< translated = [ report = 'no' thresholds = '{}' ] + + ModemManager[274522]: [/dev/cdc-wdm1] received generic response + (translated)... + <<<<<< QMUX: + <<<<<< length = 19 + <<<<<< flags = 0x80 + <<<<<< service = "nas" + <<<<<< client = 3 + <<<<<< QMI: + <<<<<< flags = "response" + <<<<<< transaction = 7 + <<<<<< tlv_length = 7 + <<<<<< message = "Set Event Report" (0x0002) + <<<<<< TLV: + <<<<<< type = "Result" (0x02) + <<<<<< length = 4 + <<<<<< value = 01:00:08:00 + <<<<<< translated = FAILURE: NoThresholdsProvided + + src/mm-broadband-modem-qmi.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +commit da159587992d91d61040544fe961a60ef756cf89 +Author: Aleksander Morgado +Date: Tue Dec 1 22:43:35 2020 +0100 + + broadband-modem-qmi: reload initial EPS bearer on data system updates + + src/mm-broadband-modem-qmi.c | 225 + +++++++++++++++++++++++++++++++------------ + 1 file changed, 162 insertions(+), 63 deletions(-) + +commit 2d9b62d23b6abbeea4833bbcb431d0e2adaf04aa +Author: Aleksander Morgado +Date: Tue Dec 1 22:43:16 2020 +0100 + + iface-modem-3gpp: allow requesting the reload of the initial EPS + bearer + + src/mm-iface-modem-3gpp.c | 35 +++++++++++++++++++++++++++++++++++ + src/mm-iface-modem-3gpp.h | 1 + + 2 files changed, 36 insertions(+) + +commit 5629f47a59b48f2604fd8e9e4af7209b138aef21 +Author: Aleksander Morgado +Date: Mon Nov 30 21:51:32 2020 +0100 + + libmm-glib,bearer-properties: allow loose comparisons + + When comparing bearer properties provided by the user versus loaded + from the modem, we shouldn't be very strict, e.g.: + * Password or other fields may not be readable from the device. + * Some fields may not apply at all (e.g. RM protocol for EPS bearers) + * NULL strings could be assumed equal to empty strings. + * If no explicit IP type specified, an IPv4 default may be assumed. + * If no explicit allowed auth specified, 'none' default may be + assumed. + + These loose comparisons are applied when managing the initial EPS + bearer settings and status, and we keep the strict comparison only + during the connection attempt lookup of a bearer with certain + settings, as those bearer objects are all created in the same place + with the same rules. + + libmm-glib/mm-bearer-properties.c | 101 + ++++++++++++++++++++++++++++++++++---- + libmm-glib/mm-bearer-properties.h | 13 ++++- + src/mm-bearer-list.c | 6 ++- + src/mm-iface-modem-3gpp.c | 23 ++++++--- + 4 files changed, 123 insertions(+), 20 deletions(-) + +commit c99cc9210e7a93be1b572d686f5acdeb0160dd3f +Author: Aleksander Morgado +Date: Mon Nov 30 16:05:52 2020 +0100 + + iface-modem-3gpp: log requested/updates initial EPS bearer settings + + src/mm-iface-modem-3gpp.c | 44 + ++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 44 insertions(+) + +commit 5613215db8e5b3d4bbd7d3e6ad937b342ccd4c76 +Author: Aleksander Morgado +Date: Sun Nov 29 22:41:08 2020 +0100 + + broadband-modem-qmi: implement initial EPS bearer settings loading + and setting + + src/mm-broadband-modem-qmi.c | 469 + +++++++++++++++++++++++++++++++++++++++++++ + src/mm-modem-helpers-qmi.c | 51 +++++ + src/mm-modem-helpers-qmi.h | 8 +- + 3 files changed, 526 insertions(+), 2 deletions(-) + +commit 527b4e3232a611bde1cab6e6302924fb65f453a7 +Author: Aleksander Morgado +Date: Sun Nov 29 22:08:04 2020 +0100 + + broadband-modem-qmi: implement initial EPS bearer info loading + + src/mm-broadband-modem-qmi.c | 75 + ++++++++++++++++++++++++++++++++++++++++++++ + src/mm-modem-helpers-qmi.c | 15 +++++++++ + src/mm-modem-helpers-qmi.h | 1 + + 3 files changed, 91 insertions(+) + +commit 295400688acc4d670a1f7c58d45359bb891bf44d +Author: Aleksander Morgado +Date: Sun Nov 29 21:55:48 2020 +0100 + + broadband-modem-qmi: allocate a generic WDS client + + For generic WDS operations not tied to any connection attempt. + + src/mm-broadband-modem-qmi.c | 79 + +++++++++----------------------------------- + 1 file changed, 15 insertions(+), 64 deletions(-) + +commit 7b52efda3421f09ddb5dd4ae65d3d03b7e952490 +Author: Aleksander Morgado +Date: Mon Nov 30 10:35:32 2020 +0100 + + build: require libqmi 1.27.3 to support initial EPS management + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 0729ba5c88eb038e60ffbe3faf9431e9650f7ca1 +Author: Aleksander Morgado +Date: Thu Nov 26 23:30:56 2020 +0100 + + broadband-modem-mbim: plug memleak when processing USSD in GSM7 + + src/mm-broadband-modem-mbim.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 7f88280929c350b087751e71e56e81b9b88d3495 +Author: Aleksander Morgado +Date: Sun Nov 22 16:55:22 2020 +0100 + + altair: make sure parse_vendor_pco_info() always returns an error + + The parse_vendor_pco_info() method was returning NULL without error if + the pco info string was empty. + + Under this situation, the code would have tried to add a NULL MMPco + into the pco_list list, which is not desired. + + Avoid this, by making sure a NULL return always sets an error. + + plugins/altair/mm-broadband-modem-altair-lte.c | 6 +++++- + plugins/altair/mm-modem-helpers-altair-lte.c | 6 ++++-- + 2 files changed, 9 insertions(+), 3 deletions(-) + +commit 243272c11178e68914d7cc2dcfdc28248edb2aa7 +Author: Aleksander Morgado +Date: Mon Dec 14 09:58:59 2020 +0100 + + cinterion: add AT primary/secondary port type hints for PLS8 + + plugins/cinterion/77-mm-cinterion-port-types.rules | 2 ++ + 1 file changed, 2 insertions(+) + +commit ba4b3f60b7605441bb127be231eab49450c29404 +Author: Aleksander Morgado +Date: Mon Dec 14 09:58:15 2020 +0100 + + cinterion: add QCDM and GPS port type hints for PLS62 + + plugins/cinterion/77-mm-cinterion-port-types.rules | 20 + ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +commit 067b09c8358ad92ff0ca3c266d0229e9518069d0 +Author: Aleksander Morgado +Date: Mon Dec 14 09:35:02 2020 +0100 + + cinterion: add PLS83 port type hints + + plugins/cinterion/77-mm-cinterion-port-types.rules | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit bee8a391bf46e33f8378504f71c4e087d7a82fb5 +Author: Aleksander Morgado +Date: Sun Dec 13 17:33:11 2020 +0100 + + broadband-modem-mbim: ignore MS SAR notifications explicitly + + SAR service will be introduced in the stable libmbim 1.26.0, but it's + been flagged in the dev 1.25.1 version already. + + src/mm-broadband-modem-mbim.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit 8072ed2d6f4240ceb7b66f5e618192fd54ea94b2 +Author: Torsten Hilbrich +Date: Wed Dec 2 12:46:32 2020 +0100 + + broadband-modem-mbim: Add MM_BROADBAND_MODEM_MBIM_QMI_UNSUPPORTED + + This property (initially set to FALSE) controls whether QMI over MBIM + should never be considered. This property is set to TRUE for XMM-based + MBIM devices as they don't support QMI. + + This fixes a probing delay of 15s on a Fibocom L850-GL device + (2cb7:0007) found in the Lenovo T14 Gen 1. + + The establishing of a QMI connection was refused multiple time with + MBIM error OperationNotAllowed. Only the timeout of 15s for this + connection resumed the probing. + + The properties in the MMBroadbandModemMbim are only installed when + WITH_QMI and QMI_MBIM_QMUX_SUPPORTED are set. Actually, this + should only + disable the PROP_QMI_UNSUPPORTED but as this is the only property this + avoids the "unused variable 'self'" warnings/errors when trying to + compile set_property and get_property without QMI support. This can be + changed once other properties are needed. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/284 + + plugins/xmm/mm-broadband-modem-mbim-xmm.c | 3 ++ + src/mm-broadband-modem-mbim.c | 71 + ++++++++++++++++++++++++++++++- + src/mm-broadband-modem-mbim.h | 2 + + 3 files changed, 75 insertions(+), 1 deletion(-) + +commit f80c8d8be6a22accb71f06b33f53daed3d255bec +Author: Aleksander Morgado +Date: Tue Dec 1 22:59:32 2020 +0100 + + broadband-modem-qmi: fix reporting of signal strength indications + + We had all the logic in place... but we were never actually enabling + the signal strength indications because the `enable` flag in the + context was never set. + + The bug was introduced back in May 2018, and released with 1.10.0. + + Fixes baefe53ab9c0ea0612d2bf7da64b6f6cf9753bcd + + src/mm-broadband-modem-qmi.c | 1 + + 1 file changed, 1 insertion(+) + +commit d531992897fe4a99005da03e83c818dd138a06d5 +Author: Dylan Van Assche +Date: Sun Nov 29 15:59:49 2020 +0100 + + tests: added parse ERROR response test + + src/tests/test-at-serial-port.c | 75 + ++++++++++++++++++++++++++++++++--------- + 1 file changed, 60 insertions(+), 15 deletions(-) + +commit c15d103ca62cec7287764f1b5d0d3316ac891ce5 +Author: Dylan Van Assche +Date: Sun Nov 29 15:59:21 2020 +0100 + + serial-parsers: also match ERROR responses that are not at end of line + + Do not fail to detect an error response with a call or text + incoming. This happens during port probing when there's no URC + parsers installed in the serial port. This probably will not happen + when the serial port was managed by the modem object.w + + src/mm-serial-parsers.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +commit c05580ca9a69b491042921d2fe40383fde1657ea +Author: Dylan Van Assche +Date: Fri Nov 27 18:46:42 2020 +0100 + + tests: added parse OK response test + + src/tests/test-at-serial-port.c | 42 + +++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 42 insertions(+) + +commit 750fb2bc4ab9bdc779a9e3919d74c64059b9e963 +Author: Dylan Van Assche +Date: Wed Nov 25 19:58:25 2020 +0100 + + serial-parsers: also match OK responses that are not at end of line + + Do not fail to detect a valid response with a call or text incoming. + This happens also during port probing when there's no URC parsers + installed in the serial port. This probably will not happen when the + serial port was managed by the modem object. + + src/mm-serial-parsers.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 446d497040f5e71a1d6a842b82cdab07ef54a0fa +Author: Eric Caruso +Date: Mon Nov 30 09:25:10 2020 -0800 + + introspection: fix Bearer documentation + + If e.g. a bearer with IPv6 configuration has DNS servers but exports + its link-local address, MM will avoid giving it the "static" method + type, and instead fall back to the "dhcp" type. However, it may + still have DNS information. Therefore, the comment that "method" is + the only property on configuration with type DHCP is misleading. + + introspection/org.freedesktop.ModemManager1.Bearer.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 756894bc7682250821c3b80e96fea66d73a3e837 +Author: Dylan Van Assche +Date: Fri Nov 27 18:07:02 2020 +0100 + + build: Allow elogind for suspend/resume support + + configure.ac | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +commit 1f0c04644dd48b086bc00f9765f94342f3badc3f +Author: Pavan Holla +Date: Mon Nov 23 20:24:05 2020 +0000 + + base-sim: Reprobe modem if puk lock is discovered after sending pin1 + + Enabling/Disabling/Changing/Sending the PIN1 lock is usually + limited to + 3 retries. If these attempts are exhausted, the modem is puk_locked. + We reprobe the modem to get rid of any unwanted interfaces and move + to a locked state. + + src/mm-base-sim.c | 33 ++++++++++++++++++++++++++------- + 1 file changed, 26 insertions(+), 7 deletions(-) + +commit 38f6704fa1d6f602be84bcbf016b3386ac82c426 +Author: Pavan Holla +Date: Mon Nov 23 17:52:17 2020 +0000 + + base-sim: Reprobe modem if lock status cannot be read after sending + puk + + If the lock status cannot be read during a puk unblock attempt, + reprobe + the modem. It is likely that the SIM was permanently blocked if + the lock + status cannot be read. + + src/mm-base-modem.c | 2 +- + src/mm-base-modem.h | 2 +- + src/mm-base-sim.c | 37 ++++++++++++++++++++++++++----------- + src/mm-broadband-modem.c | 2 +- + src/mm-device.c | 1 + + src/mm-iface-modem.c | 5 ++++- + 6 files changed, 34 insertions(+), 15 deletions(-) + +commit 92c86e2b1bcdaab991d89bdd8f670b248c246bae +Author: Thomas Dendale +Date: Mon Nov 23 09:04:50 2020 +0000 + + huawei: add GPS port type hints for Huawei ME906e + + plugins/huawei/77-mm-huawei-net-port-types.rules | 2 ++ + 1 file changed, 2 insertions(+) + +commit 935e73c8dfc8ad557100005baa506439526a702e +Author: Aleksander Morgado +Date: Sun Nov 22 14:34:07 2020 +0100 + + build: fix build with single plugins + + We need to quote arguments with [] so that lists are not expanded as + different arguments. + + Fixes 65560dd8854f01eec1b28587c37d544bfff360d3 + + m4/mm-enable-plugin.m4 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 6e0380c165cb7ab2a464ee4cf117e8e6caa4fe25 +Author: Aleksander Morgado +Date: Thu Nov 19 12:51:58 2020 +0100 + + base-modem: order ports by name by default + + When there are multiple ports with the same purpose (e.g. multiple net + data ports, or multiple QMI control ports), sort them by name by + default. + + The port order does not make any difference for ports that have + flagged with a specific purpose (e.g. AT primary). + + The sorting is done both in the internal lists and when looking up + ports with find_ports(). + + src/mm-base-modem.c | 141 + ++++++++++++++++++++++++++-------------------------- + 1 file changed, 71 insertions(+), 70 deletions(-) + +commit 65560dd8854f01eec1b28587c37d544bfff360d3 +Author: Aleksander Morgado +Date: Thu Nov 19 12:00:34 2020 +0100 + + build: qcom-soc plugin by default disabled + + It will not be automatically enabled by the implicit + --enable-all-plugins; instead, it must be explicitly enabled with + --enable-plugin-qcom-soc. + + This plugin only makes sense under very specific SoC builds, so there + is no point in always building it by default. It should be explicitly + requested only in those SoC builds that are really going to make use + of it (e.g. postmarketOS). + + configure.ac | 2 +- + m4/mm-enable-plugin.m4 | 22 ++++++++++++++++++---- + 2 files changed, 19 insertions(+), 5 deletions(-) + +commit 9065e3b22777c5c811a2239de6353ecd3baade5d +Author: Stephan Gerhold +Date: Wed Nov 4 18:20:39 2020 +0100 + + qcom-soc: simplify port type hint rules + + plugins/qcom-soc/77-mm-qcom-soc.rules | 19 ++++--------------- + 1 file changed, 4 insertions(+), 15 deletions(-) + +commit 8fc60754dd1df91560a3123454df1ad0ecf0ac92 +Author: Aleksander Morgado +Date: Thu Oct 22 12:48:35 2020 +0200 + + qcom-soc: new plugin for Qualcomm SoCs + + This plugin implements support for old Qualcomm SoCs like the MSM8916 + or the MSM8974, where: + * control ports are available via RPMSG channels exported as devices + e.g. with rpmsgexport: + https://github.com/andersson/rpmsgexport + * network ports are exposed by the bam-dmux kernel driver: + https://github.com/msm8916-mainline/linux/commits/bam-dmux + + Adding support for newer Qualcomm SoCs (e.g. QRTR+IPA) could be done + in a similar way on this very same plugin. + + This plugin is the first and only one that implements support for a + modem device that is "built in" the system, as opposed to external + modems that may be available via USB or PCI. + + The ID_MM_PHYSDEV_UID based udev tags provided by the plugin provide + the logic to bind all the SoC ports together in the same modem object, + and therefore ID_MM_PHYSDEV_UID should not be used by users to + override the ones set by the plugin. + + All "rpmsg[0-9]*" ports that are considered part of the modem are + flagged as candidate, ignoring the parent "rpmsg_ctrl[0-9]*" ports on + purpose. This setup therefore assumes that the channels have been + exported already as devices (e.g. using rpmsgexport). + + libqmi 1.27.2 is required to support the "WDS Bind Data Port" message. + + .gitlab-ci.yml | 2 +- + configure.ac | 4 +- + plugins/Makefile.am | 25 ++++ + plugins/qcom-soc/77-mm-qcom-soc.rules | 46 +++++++ + plugins/qcom-soc/mm-broadband-modem-qmi-qcom-soc.c | 133 + +++++++++++++++++++++ + plugins/qcom-soc/mm-broadband-modem-qmi-qcom-soc.h | 49 ++++++++ + plugins/qcom-soc/mm-plugin-qcom-soc.c | 92 ++++++++++++++ + plugins/qcom-soc/mm-plugin-qcom-soc.h | 40 +++++++ + plugins/tests/test-udev-rules.c | 11 ++ + 9 files changed, 400 insertions(+), 2 deletions(-) + +commit cab4b54ad106caadb7f70025348f0aab5522bde4 +Author: Aleksander Morgado +Date: Sun Oct 25 14:23:29 2020 +0100 + + core: new 'rpmsg' subsystem + + Most older Qualcomm SoCs (e.g. MSM8916, MSM8974, ...) communicate with + the integrated modem via shared memory (SMD channels). This is similar + to QRTR on newer SoCs, but without the "network" layer. In fact, the + older SoCs also have QRTR, but the modem QMI services are not exposed + there. + + The mainline Linux kernel exposes SMD channels via the "remote + processor + messaging bus" (rpmsg). Through special IOCTL calls it is possible to + create a char device for a rpmsg/SMD channel. We can then use these to + send QMI/AT messages to the modem, much like the ordinary serial char + devices when using a Qualcomm modem through USB. + + This commit introduces support for the new 'rpmsg' subsystem, which + allows exporting QMI-capable and AT-capable ports. + + By default NO rpmsg port is flagged as candidate, it is assumed that + the plugin adding support for the rpmsg subsystem will add specific + rules to do so (e.g. so that non-modem ports are explicitly not + flagged as candidate). + + All rpmsg ports will be probed for AT or QMI capabilities, unless + explicit port type hints (e.g. ID_MM_PORT_TYPE_QMI or + ID_MM_PORT_TYPE_AT_PRIMARY) are set. + + These changes are highly based on the initial integration work done by + Stephan Gerhold in postmarketOS, see: + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/merge_requests/363 + + cli/mmcli-manager.c | 2 +- + src/mm-base-modem.c | 18 ++++++++++++++++-- + src/mm-filter.c | 7 +++++++ + src/mm-filter.h | 23 ++++++++++++++--------- + src/mm-plugin.c | 5 +++++ + src/mm-port-probe.c | 26 +++++++++++++++++--------- + src/mm-port.h | 4 ++-- + 7 files changed, 62 insertions(+), 23 deletions(-) + +commit 3d12272d183061c11cd80bfe96ae89898f4c081c +Author: Aleksander Morgado +Date: Fri Oct 30 10:05:24 2020 +0100 + + kerneldevice: allow loading port attributes + + In addition to loading port and device properties, we now also allow + loading sysfs properties that are assumed to be static (i.e. their + values won't change since loaded the first time). + + src/kerneldevice/mm-kernel-device-generic.c | 37 ++++++++++++++++++++ + src/kerneldevice/mm-kernel-device-udev.c | 30 ++++++++++++++++ + src/kerneldevice/mm-kernel-device.c | 54 + +++++++++++++++++++++++++++++ + src/kerneldevice/mm-kernel-device.h | 9 +++++ + 4 files changed, 130 insertions(+) + +commit 399a042dad2e2c5cca9e0cfe0af6d41ae1fb0c35 +Author: Aleksander Morgado +Date: Sun Oct 25 15:11:02 2020 +0100 + + bearer-qmi: support binding to data port + + Allow plugins to specify a QmiSioPort value to bind to. This is used + e.g. in the RPMSG+BAM-DMUX setup in order to allow any RPMSG port to + control all the available net ports. + + src/mm-bearer-qmi.c | 73 + +++++++++++++++++++++++++++++++++++++++++++- + src/mm-broadband-modem-qmi.c | 9 ++++-- + src/mm-broadband-modem-qmi.h | 3 ++ + 3 files changed, 82 insertions(+), 3 deletions(-) + +commit 3be07bb38db2f1295d5ef240232ac046a579808b +Author: Aleksander Morgado +Date: Fri Nov 20 00:36:04 2020 +0100 + + tests,cdma: test CDMA SMS with different text lengths + + src/tests/test-sms-part-cdma.c | 38 + ++++++++++++++++++++++++++++++++++++++ + 1 file changed, 38 insertions(+) + +commit 7ac42e76482acd687464f9dca2ef3ac7b67825a1 +Author: David Leonard +Date: Wed Aug 26 14:19:28 2020 +1000 + + sms: fix 7-bit ASCII SMS decoding + + Fixes an issue where (5+8n)-character long SMS messages received on a + CDMA network would be dropped with a "cannot read user data" error, + while other length SMS messages would be delivered fine. + + Fix thanks to Peter Hunt + + src/mm-sms-part-cdma.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit c3bc515b8a8eb77b3517cc96827fa48573459dd8 +Author: Aleksander Morgado +Date: Thu Nov 19 15:52:20 2020 +0100 + + base-manager: never create kernel device objects for remove events + + There is no point in creating a new kernel device object just to + process a remove event; instead, do any matching with existing + kernel device objects by subsystem and name, which is what the generic + backend already did anyway. + + This avoids unnecessary lookup of information in sysfs during removal + events, because the port is anyway already gone when we try to look + those up. + + src/mm-base-manager.c | 104 + +++++++++++++++++++++++++++++++------------------- + src/mm-device.c | 73 ++++++++++++++++++++++++++++------- + src/mm-device.h | 21 ++++++---- + 3 files changed, 138 insertions(+), 60 deletions(-) + +commit 047805348db1fdaac4c24b6ea4f4d382e6bc03c8 +Author: Aleksander Morgado +Date: Sat Nov 14 23:17:00 2020 +0100 + + iface-modem-firmware: allow plugins to ignore carrier info + + Skip building the firmware version information with carrier config + information if the plugin already knows that the firmware upgrade + method doesn't implement carrier-specific upgrade paths. + + src/mm-broadband-modem.c | 14 +++++++++++++- + src/mm-iface-modem-firmware.c | 43 + ++++++++++++++++++++++++++++++------------- + src/mm-iface-modem-firmware.h | 3 ++- + 3 files changed, 45 insertions(+), 15 deletions(-) + +commit c7016f8933a265d9cb325b9d65eab4eecaffd0e4 +Author: Aleksander Morgado +Date: Sat Nov 14 22:37:16 2020 +0100 + + iface-modem-firmware: report generic IDs for both USB and PCI devices + + Instead of assuming that all modules supporting firmware upgrade are + USB based. + + src/mm-iface-modem-firmware.c | 42 + +++++++++++++++++++++++++++++------------- + 1 file changed, 29 insertions(+), 13 deletions(-) + +commit 9533ee2f22a6795d5eea6c88038fef7f02b631e3 +Author: Andrew Lassalle +Date: Sun Nov 15 06:49:42 2020 -0800 + + mm-plugin-manager: Fix typos + + Change-Id: I662061384cf48abd0975e15a91b090aa6b33ac34 + + src/mm-plugin-manager.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit e112896994454d357861619c7db87fcea8b2d2fb +Author: Aleksander Morgado +Date: Mon Nov 9 00:36:13 2020 +0100 + + base-manager: allow forcing the testing without udev + + Even if udev support is really built and available. + + This is extremely useful to test the udev-less setup without fully + recompiling the whole daemon. + + E.g.: the daemon can be run like this: + $ sudo /usr/sbin/ModemManager --debug --test-no-udev + + And then, the kernel events may be reported using mmcli like this: + $ sudo mmcli --report-kernel-event-auto-scan + + src/mm-base-manager.c | 52 + +++++++++++++++++++++++++++------------------------ + src/mm-context.c | 21 +++++++++++++++++++++ + src/mm-context.h | 3 +++ + 3 files changed, 52 insertions(+), 24 deletions(-) + +commit 6e642418bb36c627b9ad6185b36f78216ecaccfe +Author: Aleksander Morgado +Date: Mon Nov 9 21:30:36 2020 +0100 + + kerneldevice,generic: use regex to implement string matching + + Instead of the custom simple implementation which only supported the + '*' modifier in the pattern. This allows us to support e.g. attribute + value matches like e.g. 'DATA[0-9]*_CNTL'. + + src/kerneldevice/mm-kernel-device-generic.c | 57 + ++++++++++++----------------- + 1 file changed, 24 insertions(+), 33 deletions(-) + +commit cca83392f09a2a67178203d493656c4355863106 +Author: Aleksander Morgado +Date: Mon Nov 9 12:11:43 2020 +0100 + + kerneldevice,generic: implement ATTRS matching for any attribute + + Until now we did not support ATTRS{} matches against attributes we + don't support in the core codebase. Implement now a simple lookup + mechanism which traverses the tree of sysfs path from the port sysfs + path to the physical device sysfs path, looking up the attribute + requested. + + This is not completely equivalent to what udev does, because the udev + rules matching ATTRS would usually also include an additional previous + matching e.g. SUBSYSTEMS and such, so that the ATTRS is looked up + exactly in the device that also matches the additional previous + rules. In our case, we just simplify the logic and return the first + one found. + + src/kerneldevice/mm-kernel-device-generic.c | 38 + +++++++++++++++++++++++++++-- + 1 file changed, 36 insertions(+), 2 deletions(-) + +commit 769ba3cee6fa7c985069165ee4ace99c356df949 +Author: Aleksander Morgado +Date: Mon Nov 9 11:39:11 2020 +0100 + + kerneldevice,generic: fix DRIVERS and SUBSYSTEMS checks + + We were applying the DRIVERS check looking only at the single port + driver. Instead, we now lookup and cache all drivers found in the + device tree, and apply the loose DRIVERS check properly looking at all + of them. + + We were applying the SUBSYSTEMS and SUBSYSTEM check looking at the + sysfs path and just hoping the subsystem we're looking for is included + in the path itself. Instead, we now lookup and cache all susystems + found in the device tree, and apply the loose SUBSYSTEMS check + properly looking at all of them. + + E.g. we can now match SUBSYSTEMS="mhi_q" in the following device tree, + without needing it to be found in the sysfs path: + + looking at device + '/devices/pci0000:00/0000:00:1b.0/0000:01:00.0/1001_00.01.00_MBIM/mhi_uci_q/mhi_MBIM': + SUBSYSTEM=="mhi_uci_q" + looking at parent device + '/devices/pci0000:00/0000:00:1b.0/0000:01:00.0/1001_00.01.00_MBIM': + SUBSYSTEMS=="mhi_q" + looking at parent device + '/devices/pci0000:00/0000:00:1b.0/0000:01:00.0': + SUBSYSTEMS=="pci" + + src/kerneldevice/mm-kernel-device-generic.c | 176 + ++++++++++++++++++++-------- + 1 file changed, 127 insertions(+), 49 deletions(-) + +commit ba361f41c497acc81e03d66455db002045db623f +Author: Aleksander Morgado +Date: Mon Nov 9 11:03:48 2020 +0100 + + kerneldevice,generic: support PCI device common attribute names + + The vendor and product IDs stored for the MMKernelDevice object in the + PCI subsystem are mapped to the "vendor" and "device" attributes. + + src/kerneldevice/mm-kernel-device-generic.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit d3a7f701350fc45d590bbc25b84c29549ebd7afd +Author: Aleksander Morgado +Date: Mon Nov 9 00:14:19 2020 +0100 + + kerneldevice,generic: preload port info based on the system bus + + The generic backend implementation was really based on detecting USB + devices, not so much devices in other subsystems. This patch puts the + generic backend at the same level as the udev backend to support + non-USB modems. + + src/kerneldevice/mm-kernel-device-generic.c | 497 + +++++++++++++++------------- + 1 file changed, 262 insertions(+), 235 deletions(-) + +commit bc895067ec5b4acfb71693bfbf73bae9c55a7552 +Author: Aleksander Morgado +Date: Sun Nov 8 21:57:49 2020 +0100 + + kerneldevice,udev: preload port info based on the system bus + + USB, PCI, PCMCIA... all these different system buses expose modems in + different ways. Instead of having single methods to attempt to load + different things for all these device types, detect first which is the + system bus in use, and then perform a bus-specific operation to + preload the different things. + + src/kerneldevice/mm-kernel-device-udev.c | 542 + +++++++++++++------------------ + 1 file changed, 220 insertions(+), 322 deletions(-) + +commit 4550dcfbdf2e1c8c4db0d7b7260144fb653c095d +Author: Aleksander Morgado +Date: Tue Nov 3 10:29:50 2020 +0100 + + kerneldevice: no need to subclass the type getters + + We can just subclass the methods to check whether a given property + exists and to get it as a string, and then implement in the generic + class the actual boolean/int/hex type getters common for all. + + src/kerneldevice/mm-kernel-device-generic.c | 42 +------- + src/kerneldevice/mm-kernel-device-udev.c | 148 + +++++----------------------- + src/kerneldevice/mm-kernel-device.c | 49 +++++---- + src/kerneldevice/mm-kernel-device.h | 15 +-- + 4 files changed, 59 insertions(+), 195 deletions(-) + +commit 1e1fe8fb9c9b02de5f29f33bd46575d4d88f1464 +Author: Aleksander Morgado +Date: Tue Nov 3 10:16:11 2020 +0100 + + kerneldevice: remove all unneeded g_return_if_fail() checks + + These kind of checks are only useful on public APIs really, there + should be no need to have them in internal code. + + src/kerneldevice/mm-kernel-device-generic.c | 51 -------------------- + src/kerneldevice/mm-kernel-device-udev.c | 72 + ++++------------------------- + src/kerneldevice/mm-kernel-device.c | 57 ----------------------- + 3 files changed, 8 insertions(+), 172 deletions(-) + +commit 5d150ed23e122c06e1a4add0ca9c6f7e07502a17 +Author: Aleksander Morgado +Date: Tue Nov 10 23:01:10 2020 +0100 + + core,plugins: consolidate connection/disconnection timeout values + + Each different plugin or protocol had a different connection attempt + value. E.g. QMI and MBIM both used 60s max for the connection attempt, + while the u-blox plugin had up to 180s for ECM based connection + setups. + + This commit consolidates all plugins and protocols to use the same + timeout values for commands that may take long to respond, e.g. a + connection atempt under low signal quality conditions. + + A value of 180s for the connection attempt steps and 120s for a + disconnection attempt step is considered. Note, though, that in some + cases (like a IPv4v6 setup attempt using QMI) we may have more than + one such long step, so this doesn't mean that a connection attempt + will always take less than 180s. + + Users of the connection/disconnection APIs should be able to handle + the case where the attempt times out in their side (e.g. with a lower + DBus request timeout), and which would not mean the actual request + they did really failed. E.g. a connection attempt with a DBus timeout + of 30s may fail in the user with a timeout error, but the attempt + would still go on for as much as the plugin/protocol needs. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/270 + + plugins/altair/mm-broadband-bearer-altair-lte.c | 4 ++-- + plugins/cinterion/mm-broadband-bearer-cinterion.c | 4 ++-- + plugins/huawei/mm-broadband-bearer-huawei.c | 10 +++++----- + plugins/icera/mm-broadband-bearer-icera.c | 10 +++++----- + plugins/iridium/mm-bearer-iridium.c | 2 +- + plugins/mbm/mm-broadband-bearer-mbm.c | 6 +++--- + plugins/novatel/mm-broadband-bearer-novatel-lte.c | 4 ++-- + plugins/option/mm-broadband-bearer-hso.c | 4 ++-- + plugins/sierra/mm-broadband-bearer-sierra.c | 4 ++-- + plugins/ublox/mm-broadband-bearer-ublox.c | 6 +++--- + src/mm-base-bearer.h | 11 +++++++++++ + src/mm-bearer-mbim.c | 6 +++--- + src/mm-bearer-qmi.c | 12 ++++++------ + src/mm-broadband-bearer.c | 4 ++-- + 14 files changed, 49 insertions(+), 38 deletions(-) + +commit da77dc7152b76728de0ce63cedf96ceb30f37046 +Author: Aleksander Morgado +Date: Sun Oct 25 07:20:30 2020 +0100 + + plugin: build probing needs based on subsystem + + Don't rely on the QMI or MBIM ports named cdc-wdm, use the device + subsystem instead. + + src/mm-plugin.c | 20 ++++++-------------- + 1 file changed, 6 insertions(+), 14 deletions(-) + +commit 71f5c975430b0455e7ca81b2d2d1bef0174d0be2 +Author: Aleksander Morgado +Date: Sat Oct 24 15:40:57 2020 +0200 + + base-manager: automatic required subsystem detection + + Instead of assuming we require a fixed set of subsystems to monitor, + compile the full list based on what the plugins have requested + themselves. + + src/mm-base-manager.c | 62 +++++++++++++------------------ + src/mm-plugin-manager.c | 98 + ++++++++++++++++++++++++++++++++++--------------- + src/mm-plugin-manager.h | 1 + + src/mm-plugin.c | 6 +++ + src/mm-plugin.h | 1 + + 5 files changed, 103 insertions(+), 65 deletions(-) + +commit 950abbf8ee8624827d63a0d0186beac81232e8f6 +Author: Aleksander Morgado +Date: Fri Nov 6 12:27:40 2020 +0100 + + core: stop monitoring the 'usb' subsystem + + Back in Linux < 3.6 days, the cdc-wdm ports exposed by the QMI driver + were flagged as owned by the 'usb' subsystem. That changed in 3.6 when + the subsystem was renamed to 'usbmisc': + + https://mail.gnome.org/archives/networkmanager-list/2012-June/msg00125.html + + This patch removes all monitoring of the 'usb' subsystem completely, + which is anyway a valid subsystem but for which we shouldn't need any + special handling. Right now, with newer kernels, we were using that + monitoring exclusively to get notified of full USB device remove + events, which is really not required as we already process the port + removals one by one. + + We simplify the logic everywhere that attempted to match either the + 'usb' or 'usbmisc' subsystems, and we no longer require the explicit + checks for the port name being named 'cdc-wdm[0-9]*' in the code, as + that is already taken care of by the ID_MM_CANDIDATE udev tag rule. + + plugins/anydata/mm-plugin-anydata.c | 2 +- + plugins/broadmobi/mm-plugin-broadmobi.c | 2 +- + plugins/cinterion/mm-plugin-cinterion.c | 2 +- + plugins/dell/mm-plugin-dell.c | 2 +- + plugins/dlink/mm-plugin-dlink.c | 2 +- + plugins/fibocom/mm-plugin-fibocom.c | 2 +- + plugins/foxconn/mm-plugin-foxconn.c | 2 +- + plugins/generic/mm-plugin-generic.c | 2 +- + plugins/gosuncn/mm-plugin-gosuncn.c | 2 +- + plugins/huawei/mm-plugin-huawei.c | 5 +- + plugins/mbm/mm-plugin-mbm.c | 2 +- + plugins/novatel/mm-plugin-novatel.c | 2 +- + plugins/pantech/mm-plugin-pantech.c | 2 +- + plugins/quectel/mm-plugin-quectel.c | 2 +- + plugins/sierra/mm-plugin-sierra.c | 2 +- + plugins/simtech/mm-plugin-simtech.c | 2 +- + plugins/telit/mm-plugin-telit.c | 2 +- + plugins/tplink/mm-plugin-tplink.c | 2 +- + plugins/x22x/mm-plugin-x22x.c | 2 +- + plugins/zte/mm-plugin-zte.c | 2 +- + src/80-mm-candidate.rules | 3 +- + src/mm-base-manager.c | 142 + +++++++------------------------- + src/mm-base-modem.c | 2 +- + src/mm-filter.c | 2 +- + src/mm-plugin.c | 4 - + src/mm-port-probe.c | 2 +- + 26 files changed, 55 insertions(+), 143 deletions(-) + +commit 519df2544b04ccbc9cf87fbfbdbbaf44edeef75b +Author: Frederic Martinsons +Date: Tue Nov 10 16:48:22 2020 +0100 + + tools: add new system daemon stub tester application + + This script mock some of ModemManager DBus interfaces (main object, + Modem, Sim), + it also adds a test interface + "org.freedesktop.ModemManager1.LibmmGlibTest" + which allow to inject some errors and simulate behavior: + - Add a modem object + - Emit modem state changed + - Set modem error + + This script also add the possibility to log in a file for debugging + purpose. + Because the stdout/stderr are not shown when the program is spawned + by DBus + auto activation. + + Note: Script is heavily inspired from test-networkmanager-service.py + from + NetworkManager project + + Signed-off-by: Frederic Martinsons + + Makefile.am | 1 + + configure.ac | 1 + + tools/Makefile.am | 1 + + tools/test-modemmanager-service.py | 490 + +++++++++++++++++++++++++++++++++++++ + 4 files changed, 493 insertions(+) + +commit 06f75500dbc3f471bf0c40221bbfb5f970f65f32 +Author: Aleksander Morgado +Date: Mon Nov 9 00:43:33 2020 +0100 + + base-manager: log kernel event handling failures + + Don't just return the error to the client, we want this info in the + daemon log as well. + + src/mm-base-manager.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 37b3771ef5003adb1797c29deceb6500ebe60e6d +Author: Aleksander Morgado +Date: Mon Nov 9 11:54:58 2020 +0100 + + kerneldevice,generic: plug cached string leaks + + Both 'physdev_subsystem' and 'interface_description' were leaking. + + src/kerneldevice/mm-kernel-device-generic.c | 16 +++++++++------- + 1 file changed, 9 insertions(+), 7 deletions(-) + +commit 5b91e489ebc2a19fda20b07583f494041331d047 +Author: Aleksander Morgado +Date: Wed Oct 21 18:22:15 2020 +0200 + + port-qmi: expected kernel data format is qmi_wwan specific + + The qmi_wwan driver is the only one that allows switching between + 802.3 and raw-ip during runtime, and therefore we must not assume that + every QMI port managed allows to do so, we'll limit that feature only + to QMI ports in the 'usbmisc' subsystem. + + For every other port, we assume the kernel expects raw-ip by default, + and so we include logic to switch the modem to raw-ip both using WDA + and CTL (WDA preferred over CTL). This assumption may not be perfect, + but it's probably a good guess, as raw-ip is the preferred and + sometimes the only format supported by new devices. + + src/mm-port-qmi.c | 172 + +++++++++++++++++++++++++++++++++++++----------------- + 1 file changed, 120 insertions(+), 52 deletions(-) + +commit 799c4c72ce1494c8e094c091aa2d20ab62e4a569 +Author: Aleksander Morgado +Date: Sun Oct 25 14:10:45 2020 +0100 + + port-qmi: allow specifying input subsystem + + We have assumed until now that all QMI ports are based on the + qmi_wwan driver, exposed in the 'usbmisc' subsystem by the cdc-wdm + driver. + + This may no longer be true, so allow creating QMI ports with + an explicit subsystem instead of defaulting always to USBMISC. + + src/mm-base-modem.c | 2 +- + src/mm-port-probe.c | 3 ++- + src/mm-port-qmi.c | 5 +++-- + src/mm-port-qmi.h | 34 +++++++++++++++++----------------- + 4 files changed, 23 insertions(+), 21 deletions(-) + +commit 7faa3a5e2518765bb3683c26ecdf3155046424b0 +Author: Aleksander Morgado +Date: Sun Oct 25 14:05:50 2020 +0100 + + port-mbim: allow specifying input subsystem + + We have assumed until now that all MBIM ports are based on the + cdc_mbim driver, exposed in the 'usbmisc' subsystem by the cdc-wdm + driver. + + This may no longer be true, so allow creating MBIM ports with + an explicit subsystem instead of defaulting always to USBMISC. + + src/mm-base-modem.c | 2 +- + src/mm-port-mbim.c | 5 +++-- + src/mm-port-mbim.h | 3 ++- + src/mm-port-probe.c | 3 ++- + 4 files changed, 8 insertions(+), 5 deletions(-) + +commit 4ec2db75b8fc1175c12d007ca64d2edcf630e3cc +Author: Aleksander Morgado +Date: Mon Nov 9 12:31:03 2020 +0100 + + port-serial-qcdm: allow specifying input subsystem + + We have assumed until now that all QCDM ports are based on TTY + drivers, e.g. exposed via USB. + + This may no longer be true, so allow creating QCDM ports with + an explicit subsystem instead of defaulting always to TTY. + + src/mm-base-modem.c | 2 +- + src/mm-port-probe.c | 2 +- + src/mm-port-serial-qcdm.c | 5 +++-- + src/mm-port-serial-qcdm.h | 3 ++- + 4 files changed, 7 insertions(+), 5 deletions(-) + +commit 56fca1447324f6ac47f2c7e7c9534c49f1bf1da3 +Author: Aleksander Morgado +Date: Sun Oct 25 09:06:41 2020 +0100 + + base-modem: refactor port grabbing logic + + Split in its own method the per-subsystem port creation mechanism, and + apply all common AT port settings (e.g. response parser, flags) in a + single place. + + src/mm-base-modem.c | 344 + +++++++++++++++++++++++----------------------------- + 1 file changed, 152 insertions(+), 192 deletions(-) + +commit 2a6b596bcfa83a91d93c07046dc067f1e1d08a6c +Author: Aleksander Morgado +Date: Sun Oct 25 13:53:26 2020 +0100 + + port-serial-at: skip validating input subsystem argument + + This check is pointless given that we're not implementing API, if + anything it should be an assert. Anyway, just get rid of it, so that + we don't need to update it on every new subsystem we add as supported. + + src/mm-port-serial-at.c | 10 +++------- + 1 file changed, 3 insertions(+), 7 deletions(-) + +commit f052e914c84ef3a60d0cb9ddce3f77006e59a586 +Author: Aleksander Morgado +Date: Fri Nov 6 12:01:53 2020 +0100 + + port: rename subsystem from 'usb' to 'usbmisc' + + Back in Linux < 3.6 days, the cdc-wdm ports exposed by the QMI driver + were flagged as owned by the 'usb' subsystem. That changed in 3.6 when + the subsystem was renamed to 'usbmisc': + + https://mail.gnome.org/archives/networkmanager-list/2012-June/msg00125.html + + So, rename the port subsystem type enumn to 'usbmisc'. + + plugins/huawei/mm-broadband-modem-huawei.c | 4 ++-- + src/mm-base-modem.c | 2 +- + src/mm-broadband-modem-mbim.c | 2 +- + src/mm-broadband-modem-qmi.c | 2 +- + src/mm-port-mbim.c | 2 +- + src/mm-port-probe.c | 2 +- + src/mm-port-qmi.c | 2 +- + src/mm-port-serial-at.c | 2 +- + src/mm-port.h | 2 +- + 9 files changed, 10 insertions(+), 10 deletions(-) + +commit c92dc21a18e6e79de2195bf6d2ec821c7f6195ef +Author: Aleksander Morgado +Date: Sat Oct 24 09:29:39 2020 +0200 + + api: new ID_MM_PORT_TYPE_QMI and ID_MM_PORT_TYPE_MBIM udev hints + + It is no longer true that all QMI ports are exposed by the qmi_wwan + driver and that all MBIM ports are exposed by the cdc_mbim driver. + There are other generic setups that allow exposing these types of + ports using different drivers, and usually we can also know the type + of port in advance via other means. Therefore, allow adding udev port + type hints for QMI and MBIM ports as well. + + docs/reference/api/ModemManager-docs.xml | 4 +++ + docs/reference/api/ModemManager-sections.txt | 2 ++ + include/ModemManager-tags.h | 30 ++++++++++++++++++ + src/mm-port-probe.c | 46 + ++++++++++++++++++++++------ + 4 files changed, 73 insertions(+), 9 deletions(-) + +commit e01c8b379cbd77b7085e40f9448df68b368faae2 +Author: Aleksander Morgado +Date: Sat Oct 24 10:38:40 2020 +0200 + + broadband-modem-qmi: peek QMI port from any subsystem + + No longer has to be bound to the USB subsystem. + + src/mm-broadband-modem-qmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit b8cbc87249b3f85cd5b2ce5ca7d75e9a4739b4c6 +Author: Aleksander Morgado +Date: Thu Oct 22 12:28:26 2020 +0200 + + broadband-modem-qmi: allow subclassing the match of control vs + net ports + + By default we provide the implementation for the qmi_wwan driver, + where both control and net ports share the same USB interface. + + src/mm-broadband-modem-qmi.c | 32 ++++++++++++++++++++++++++++---- + src/mm-broadband-modem-qmi.h | 4 ++++ + 2 files changed, 32 insertions(+), 4 deletions(-) + +commit b8f6fb59ed3f9c314c6b13b0830c0930c718902d +Author: Aleksander Morgado +Date: Thu Oct 22 12:07:09 2020 +0200 + + broadband-modem-qmi: peeking QMI port only in QMI modems + + Move the logic out of the base modem, and make it applicable only for + QMI modems. + + src/mm-base-modem.c | 79 ------------------------------ + src/mm-base-modem.h | 8 ---- + src/mm-bearer-qmi.c | 2 +- + src/mm-broadband-modem-qmi.c | 109 + ++++++++++++++++++++++++++++++++++++++++-- + src/mm-broadband-modem-qmi.h | 17 +++++-- + src/mm-iface-modem-firmware.c | 6 ++- + src/mm-iface-modem.c | 6 ++- + src/mm-sim-qmi.c | 3 +- + src/mm-sms-qmi.c | 3 +- + 9 files changed, 133 insertions(+), 100 deletions(-) + +commit 0dbb8d03f59d0db8cf6be63020b78289c3168154 +Author: Aleksander Morgado +Date: Sat Oct 24 10:39:29 2020 +0200 + + broadband-modem-mbim: peek MBIM port from any subsystem + + No longer has to be bound to the USB subsystem. + + src/mm-broadband-modem-mbim.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 85d549ef0066f1a47d15c40e4857033bea82e4c2 +Author: Aleksander Morgado +Date: Thu Oct 22 12:32:06 2020 +0200 + + broadband-modem-mbim: allow subclassing the match of control vs + net ports + + By default we provide the implementation for the cdc_mbim driver, + where both control and net ports share the same USB interface. + + src/mm-broadband-modem-mbim.c | 32 ++++++++++++++++++++++++++++---- + src/mm-broadband-modem-mbim.h | 4 ++++ + 2 files changed, 32 insertions(+), 4 deletions(-) + +commit 6defec2faed9e796584dd9b519ab777f9019d31b +Author: Aleksander Morgado +Date: Thu Oct 22 11:52:46 2020 +0200 + + broadband-modem-mbim: peeking MBIM port only in MBIM modems + + Move the logic out of the base modem, and make it applicable only for + MBIM modems. + + src/mm-base-modem.c | 80 ----------------------------- + src/mm-base-modem.h | 8 --- + src/mm-bearer-mbim.c | 2 +- + src/mm-broadband-modem-mbim.c | 116 + +++++++++++++++++++++++++++++++++++++++--- + src/mm-broadband-modem-mbim.h | 17 +++++-- + src/mm-iface-modem-firmware.c | 8 ++- + src/mm-iface-modem.c | 7 ++- + src/mm-sim-mbim.c | 3 +- + src/mm-sms-mbim.c | 3 +- + 9 files changed, 138 insertions(+), 106 deletions(-) + +commit ca0dbd07288d67c91e7018819cdd4aa36d57cf2a +Author: Aleksander Morgado +Date: Thu Oct 22 11:09:00 2020 +0200 + + plugin: network interface force ignore rules for certain drivers only + + The rules to force ignoring certain network ports because the modem is + using some specific drivers should definitely only be applied for the + very known qmi_wwan and cdc_mbim drivers. + + If network ports for QMI or MBIM modems are exposed using different + network drivers, don't ignore them. + + src/mm-plugin.c | 107 + ++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 58 insertions(+), 49 deletions(-) + +commit 5aa7632e88f70f678b4d88d3bab6d4b1b2def1d1 +Author: Aleksander Morgado +Date: Wed Oct 21 13:02:50 2020 +0200 + + port-probe: avoid subsystem based checks when reading probe results + + There should be no need to do an early check to filter out ports of + the wrong subsystem. + + For the user of these methods it is irrelevant if the FALSE is + returned because the port is of the wrong subsystem, or because the + test wasn't added to be probed, or because the test actually failed. + + In other words, the ports where the test succeeded will only have + succeeded if they are of the correct subsystem and if the test was + actually executed successfully. + + src/mm-port-probe.c | 82 + +++++++++-------------------------------------------- + 1 file changed, 13 insertions(+), 69 deletions(-) + +commit 50c69d540341733dfee031282e5d8e18ebc814cb +Author: Aleksander Morgado +Date: Sun Nov 8 09:22:09 2020 +0100 + + build: fix distcheck with new gtk-doc + + The .actions file is generated by newer gtk-doc releases, we just + treat it as e.g. the .signals or .types files. + + This is also already fixed in upstream gtk-doc: + https://gitlab.gnome.org/GNOME/gtk-doc/-/merge_requests/61 + + .gitignore | 1 + + docs/reference/libmm-glib/Makefile.am | 1 + + 2 files changed, 2 insertions(+) + +commit f874b0f6b701acccdc93991c0f857bc78e67d045 +Author: Aleksander Morgado +Date: Sun Nov 8 09:10:39 2020 +0100 + + build: update builtin gtk-doc support + + From gtkdocize (gtk-doc) 1.33.0. + + gtk-doc.make | 103 + ++++++++++++++++++++++++++++++++++------------------------ + m4/gtk-doc.m4 | 27 ++++++++++++++- + 2 files changed, 86 insertions(+), 44 deletions(-) + +commit 904adbfb5e07e538516c26b8467c2238fc2718e9 +Author: Aleksander Morgado +Date: Sun Nov 8 08:10:45 2020 +0100 + + build: do not require xsltproc when building from a release tarball + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/276 + + configure.ac | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +commit 3bda0562b94aa56177f0e481cd29e4149f5a531d +Author: Aleksander Morgado +Date: Sun Nov 8 09:29:20 2020 +0100 + + build: don't remove ModemManager-names.h on 'clean' + + The ModemManager-names.h header file is generated on git builds, and + shipped within the release tarball, so treat it as a maintainer + managed file that should only be removed on 'maintainer-clean'. + + This allows us to avoid requiring xsltproc to build release tarballs. + + include/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 5df9ddac183d52d71ee5b0c079a32560aa07eb04 +Author: Aleksander Morgado +Date: Fri Nov 6 12:14:49 2020 +0100 + + filter: simplify CDC_WDM rule to a subsystem-only USBMISC check + + This is not just a rename of the rule, we also now avoid doing an + explicit check on the port name as well, and we rely on subsystem + checks only; i.e. the same logic applied for net ports. + + The port candidate rules already do a 'cdc-wdm*' device name check + so it shouldn't be a big deal. + + docs/reference/api/ModemManager-overview.xml | 16 ++++++++-------- + src/mm-filter.c | 9 ++++----- + src/mm-filter.h | 10 +++++----- + 3 files changed, 17 insertions(+), 18 deletions(-) + +commit 5265c0bd7c3bc28a0d77c836f691d0b0fca2fa0f +Author: Aleksander Morgado +Date: Thu Oct 29 23:41:28 2020 +0100 + + modem-helpers-qmi: don't check result when parsing UIM Get Card + Status Output + + Do it earlier, before running the parser. + + src/mm-broadband-modem-qmi.c | 7 +++---- + src/mm-modem-helpers-qmi.c | 5 ----- + 2 files changed, 3 insertions(+), 9 deletions(-) + +commit d7288861a595db7f07b8ecf6bdc30d957b8b6843 +Author: Andrew Lassalle +Date: Tue Nov 3 12:36:31 2020 -0800 + + mm-kernel-device: Fix cmp to exclude subtypes + + If multiple kernel device types inherit from MMKernerDevice, and those + are compared against each other, the current logic returns TRUE if the + G_OBJECT_TYPE of one of them is smaller than the other. This + function is + checking for equality, so returning FALSE is enough. + + src/kerneldevice/mm-kernel-device.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 30f0824ea1473f5d63a27fa4c8095a5b2858ee2d +Author: Aleksander Morgado +Date: Wed Aug 12 13:11:27 2020 +0200 + + huawei: apply GETPORTMODE hints to serial ports in order + + The numbers associated to each port mode given by the AT^GETPORTMODE + response are not USB interface numbers, they are 'port numbers'. + Moreover, these numbers may start either at 0 or at 1, depending on + the firmware. + + The only reasonable way to parse this response is to just gather the + order of all the port modes reported, and apply the modes to each + serial port found in the system in the same order. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/239 + + plugins/huawei/mm-plugin-huawei.c | 139 + +++++++++++++++++--------------------- + 1 file changed, 63 insertions(+), 76 deletions(-) + +commit 4fdf28bb56ec30c73de35cef270b787afa7ceaa7 +Author: Aleksander Morgado +Date: Wed Aug 12 09:47:17 2020 +0200 + + huawei: new ^GETPORTMODE response parser + + .gitignore | 2 +- + plugins/Makefile.am | 35 ++++++ + plugins/huawei/mm-modem-helpers-huawei.c | 98 +++++++++++++++ + plugins/huawei/mm-modem-helpers-huawei.h | 31 ++++- + plugins/huawei/tests/test-modem-helpers-huawei.c | 147 + +++++++++++++++++++++++ + 5 files changed, 311 insertions(+), 2 deletions(-) + +commit b2621b4336b5fffd03ce34a85b568910bc373bb2 +Author: Aleksander Morgado +Date: Tue Aug 11 11:41:43 2020 +0200 + + huawei: plugin already processes generic tags + + So don't re-process them in the generic modem when grabbing the port. + + plugins/huawei/mm-plugin-huawei.c | 4 ++++ + src/mm-base-modem.c | 8 ++++++++ + src/mm-port-serial-at.c | 2 ++ + src/mm-port-serial-at.h | 13 ++++++++----- + 4 files changed, 22 insertions(+), 5 deletions(-) + +commit 824ad11356f82b5b91d557fa22b88c445ccc777c +Author: Aleksander Morgado +Date: Tue Aug 11 11:16:05 2020 +0200 + + huawei: don't apply multiple port type hints methods + + We will use one single method to apply port type hints, not a mix of + them: + * If AT^GETPORTMODE is supported, prefer its hints over any other + method. + * Otherwise, try to guess hints from USB interface descriptions. + * And if none of the plugin-specific hints are supported, we'll + default to applying generic port type hints from udev tags. + + Once the hints have been applied by one of the methods above, the + fallback hint sequences are run: + * Flag the first cdc-wdm port as primary if no other port has been + flagged as primary. + * Flag the USB interface 0 as PPP if no other port type hint has + been set in any other port. + + The logic applying all these procedures has been refactored so that we + have separate functions for each, which is much easier to read and + follow, even if it requires multiple iterations over the port probe + list. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/238 + + plugins/huawei/mm-plugin-huawei.c | 225 + +++++++++++++++++++++++++++++--------- + 1 file changed, 172 insertions(+), 53 deletions(-) + +commit f21fde38559141e382ad64f8ce048d73c7e197a4 +Author: Aleksander Morgado +Date: Wed Nov 4 09:45:29 2020 +0100 + + cinterion: fix port reference leaks + + The mm_base_modem_get_port_*() returns a full reference, we should use + the mm_base_modem_peek_port_*() methods instead. Also, refactor a bit + the logic because both ports are really configured in the same way, so + just apply the same setup to both. + + plugins/cinterion/mm-broadband-modem-cinterion.c | 27 + ++++++++---------------- + 1 file changed, 9 insertions(+), 18 deletions(-) + +commit 2d28969df74c687cfc4ea03dee6317874525e313 +Author: Aleksander Morgado +Date: Wed Sep 9 14:46:14 2020 +0200 + + cinterion: source reorder + + The class object definition should always be last in the file, + following the interface definitions. The actual method implementations + should be given before any other type system method (i.e. before even + the _new() method). + + plugins/cinterion/mm-broadband-modem-cinterion.c | 340 + +++++++++++------------ + 1 file changed, 170 insertions(+), 170 deletions(-) + +commit 35ecd45b66ff46e24ee99c199cbfc37702796cdd +Author: Aleksander Morgado +Date: Wed Sep 9 14:41:59 2020 +0200 + + cinterion: load initial EPS bearer cid only once + + There is no need to reload it on every settings update attempt; just + load it once when the 3GPP interface is initialized, and re-use the + loaded value on every new update attempt. + + plugins/cinterion/mm-broadband-modem-cinterion.c | 220 + ++++++++++++--------- + plugins/cinterion/mm-modem-helpers-cinterion.c | 63 +++--- + plugins/cinterion/mm-modem-helpers-cinterion.h | 11 +- + .../cinterion/tests/test-modem-helpers-cinterion.c | 27 ++- + 4 files changed, 176 insertions(+), 145 deletions(-) + +commit eb6ec1913f1403e7081f510d3e01e076fcfb9ddd +Author: Aleksander Morgado +Date: Wed Sep 9 11:35:23 2020 +0200 + + cinterion: fallback to RF on on error right away + + Don't go to next step and then check if we need to jump to the RF on + step, jump right away. + + plugins/cinterion/mm-broadband-modem-cinterion.c | 42 + ++++++++++-------------- + 1 file changed, 18 insertions(+), 24 deletions(-) + +commit 7e70911074fbe281ebd27b673666287bac0f222e +Author: Aleksander Morgado +Date: Wed Sep 9 11:00:10 2020 +0200 + + cinterion: failure to set low power in initial EPS setting is fatal + + Attempting to change the initial EPS bearer settings while in full + functionality mode shouldn't happen, so make sure we don't attempt to + do that if going into low power mode fails. + + plugins/cinterion/mm-broadband-modem-cinterion.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +commit f280573f6ded8da447f8f3bc934c4d3204a27f1c +Author: Aleksander Morgado +Date: Wed Sep 9 10:55:33 2020 +0200 + + cinterion: setup SGAUTH response parser as a helper method + + plugins/cinterion/mm-broadband-modem-cinterion.c | 44 + +++++-------------- + plugins/cinterion/mm-modem-helpers-cinterion.c | 45 + +++++++++++++++++++ + plugins/cinterion/mm-modem-helpers-cinterion.h | 9 ++++ + .../cinterion/tests/test-modem-helpers-cinterion.c | 51 + ++++++++++++++++++++++ + 4 files changed, 116 insertions(+), 33 deletions(-) + +commit eb338c967f613b4de8ef2933d496e1bc0936f037 +Author: Aleksander Morgado +Date: Wed Sep 9 10:44:45 2020 +0200 + + cinterion: move auth helpers to the helpers sources + + plugins/Makefile.am | 1 + + plugins/cinterion/mm-broadband-bearer-cinterion.c | 118 + +--------------------- + plugins/cinterion/mm-broadband-bearer-cinterion.h | 7 -- + plugins/cinterion/mm-broadband-modem-cinterion.c | 8 +- + plugins/cinterion/mm-modem-helpers-cinterion.c | 111 + ++++++++++++++++++++ + plugins/cinterion/mm-modem-helpers-cinterion.h | 10 ++ + 6 files changed, 130 insertions(+), 125 deletions(-) + +commit 9ce496613bada6001a0770f951cc197c2c89084d +Author: Aleksander Morgado +Date: Wed Sep 9 10:24:06 2020 +0200 + + cinterion: improve logging when loading initial EPS status or settings + + plugins/cinterion/mm-broadband-modem-cinterion.c | 30 + +++++++++++++++++------- + 1 file changed, 21 insertions(+), 9 deletions(-) + +commit 411cce677dd03905a771b6d7b3e6050acddd3053 +Author: Aleksander Morgado +Date: Tue Sep 8 12:00:45 2020 +0200 + + cinterion: refactor the initial EPS related logic + + Multiple changes that shouldn't affect behavior: + + * Avoid reusing the same context and state machine for the set and + the load operations, because they truly have different behaviors. + + * Setup the common load operation in a separate async method, and + reuse the common operation for both the runtime state loading and + the settings configuration loading. + + * Avoid having a "generic step ready" method, and instead provide + proper ready methods for each step, so that we can give + comprehensive warning logs when things fail. + + * Use the common CFUN? response parser instead of a custom + implementation. + + plugins/cinterion/mm-broadband-modem-cinterion.c | 596 + +++++++++++++---------- + 1 file changed, 340 insertions(+), 256 deletions(-) + +commit ff7c0794f488bc6efbd2e0b6c6fd35dd136517b5 +Author: Andrew Lassalle +Date: Thu Oct 29 16:41:43 2020 -0700 + + mm-broadband-modem: Allow hot SIM insertion + + If the QMI modem is initialized without a SIM card in it, and it goes + to failed state, allow the modem to be reprobed when a SIM card is + inserted. + + src/mm-broadband-modem.c | 21 +++++++++++++++++---- + 1 file changed, 17 insertions(+), 4 deletions(-) + +commit c385031941c9cd1ce07ae2d5b37ded26e4838dae +Author: Aleksander Morgado +Date: Sun Oct 25 22:10:28 2020 +0100 + + base-modem: sort port info array by port name + + So that the list of ports shown in the Ports DBus property is also + alphabetically sorted by port name, instead of having a mess like + this: + + ----------------------------- + System | device: qcom-soc + | drivers: bam-dmux + | plugin: qcom-soc + | primary port: rpmsg0 + | ports: rmnet5 (net), rmnet_usb0 (unknown), + rmnet4 (net), + | rpmsg1 (at), rmnet3 (net), rpmsg0 + (qmi), rmnet2 (net), rmnet1 (net), + | rmnet7 (net), rmnet0 (net), rmnet6 + (net) + + src/mm-base-modem.c | 46 ++++++++++++++++++++++++++++------------------ + 1 file changed, 28 insertions(+), 18 deletions(-) + +commit a174edb74dc81f63932c212483bc9546de12ff95 +Author: Stephan Gerhold +Date: Tue Oct 27 15:05:31 2020 +0100 + + api: expose ignored ports as MM_MODEM_PORT_TYPE_IGNORED + + At the moment, ignored ports show up as (unknown) in the ports list + in mmcli. This makes it look like something went wrong while probing. + + Actually ModemManager already tracks unknown and ignored ports + separately + (MM_PORT_TYPE_UNKNOWN vs MM_PORT_TYPE_IGNORED) but the API always + exposes + them as MM_MODEM_PORT_TYPE_UNKNOWN. + + Add MM_MODEM_PORT_TYPE_IGNORED and use this for ignored ports so they + show up as (ignored) instead in mmcli. + + include/ModemManager-enums.h | 2 ++ + src/mm-base-modem.c | 4 +++- + 2 files changed, 5 insertions(+), 1 deletion(-) + +commit fb14d0dbb24a81be95502e098b8ed23e45db8e1c +Author: Aleksander Morgado +Date: Thu Oct 29 23:04:08 2020 +0100 + + helpers-qmi: 'illegal' card application state is fatal + + No need to retry checking card status when the application state is + illegal, just treat the SIM card as unusable right away. + + https://forum.sierrawireless.com/t/uim-card-application-state-illegal/21842 + + src/mm-modem-helpers-qmi.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit 9c1843c38153ff022491d1a5a663d527f4d8ebc2 +Author: Aleksander Morgado +Date: Thu Oct 29 22:46:52 2020 +0100 + + shared-qmi: ignore NoEffect errors on slot switching + + When "UIM Switch Slot" returns a NoEffect error it's because we're + already in the desired slot, so just treat it as a successful + operation. + + src/mm-shared-qmi.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +commit a31d762250edba7bbad34adec051d9cff0279f66 +Author: Aleksander Morgado +Date: Sun Oct 25 16:32:23 2020 +0100 + + log: ignore fatal flag for logging purposes + + Running with G_DEBUG=fatal-warnings will end up reporting warning logs + with G_LOG_FLAG_FATAL, which breaks our own logging logic. + + src/mm-log.c | 5 +++++ + 1 file changed, 5 insertions(+) + +commit ba1d3f944b2a90bf75f0a5e6232dfe6cb34a8eb9 +Author: Aleksander Morgado +Date: Sun Oct 25 21:36:59 2020 +0100 + + libmm-glib,docs: add missing reference to mm_gdbus_sim_set_eid() + + It's a private method, so add it in the Private subsection. + + docs/reference/libmm-glib/libmm-glib-sections.txt | 1 + + 1 file changed, 1 insertion(+) + +commit 7d6647968d2ff4acf683375156a94258a55290e3 +Author: Aleksander Morgado +Date: Wed Oct 21 12:32:24 2020 +0200 + + broadband-modem-qmi: minor coding style fix + + src/mm-broadband-modem-qmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8a54baa346c7fe375b2683e2e333104acf648eff +Author: Aleksander Morgado +Date: Mon Oct 19 22:30:37 2020 +0200 + + broadband-modem-qmi: fix crash when device removed during init + + If the modem goes away (ports removed) during the initialization + phase (e.g. while QMI clients are being allocated), the MMPortQmi + object will be closed and it will lose its internal QmiDevice. + + We should therefore consider the lack of QmiDevice a valid usecase in + track_qmi_device_removed() and return a GError when that happens. + + #0 0x00007fb544618cc9 in raise () from /lib/libc.so.6 + #1 0x00007fb54461bd68 in abort () from /lib/libc.so.6 + #2 0x00007fb544e2213d in g_assertion_message () from + /usr/lib/libglib-2.0.so.0 + #3 0x00007fb544e221ba in g_assertion_message_expr () from + /usr/lib/libglib-2.0.so.0 + #4 0x00000000004be584 in track_qmi_device_removed () + #5 0x00000000004be5e3 in allocate_next_client () + #6 0x00000000004be7b1 in qmi_port_allocate_client_ready () + #7 0x00007fb5453690a3 in g_task_return_now () from + /usr/lib/libgio-2.0.so.0 + #8 0x00007fb54536967e in g_task_return () from + /usr/lib/libgio-2.0.so.0 + #9 0x00000000004dd8f8 in allocate_client_ready () + #10 0x00007fb5453690a3 in g_task_return_now () from + /usr/lib/libgio-2.0.so.0 + #11 0x00007fb54536967e in g_task_return () from + /usr/lib/libgio-2.0.so.0 + #12 0x00007fb54591d4de in allocate_cid_ready () from + /usr/lib/libqmi-glib.so.5 + ... + + src/mm-broadband-modem-qmi.c | 34 ++++++++++++++++++++++++++-------- + 1 file changed, 26 insertions(+), 8 deletions(-) + +commit 61739ab934e46c9693e964a20aced349e0f02d51 +Author: Eric Caruso +Date: Fri Oct 16 12:28:10 2020 -0700 + + libmm-glib,mmcli: add mm_sim_get_eid and add EID to mmcli output + + This exposes the new EID property of the SIM object on mmcli. + + cli/mmcli-output.c | 1 + + cli/mmcli-output.h | 1 + + cli/mmcli-sim.c | 1 + + docs/reference/libmm-glib/libmm-glib-sections.txt | 2 + + libmm-glib/mm-sim.c | 46 + +++++++++++++++++++++++ + libmm-glib/mm-sim.h | 3 ++ + 6 files changed, 54 insertions(+) + +commit e24a8240cb957c1875f2f3eab14aa5005c3b8f40 +Author: Eric Caruso +Date: Fri Jun 12 15:18:28 2020 -0700 + + mm-shared-qmi: load EID during SIM slot loading + + SIMs can be created with an EID fetched during load_sim_slots + while initializing the modem, if present. + + Since load_eid would be implemented with the same mechanism + we avoid using it here (if Get Slot Status fails once, it + probably doesn't make a lot of sense to try it again). + + src/mm-base-sim.c | 2 ++ + src/mm-base-sim.h | 1 + + src/mm-modem-helpers-qmi.c | 14 ++++++++++++++ + src/mm-modem-helpers-qmi.h | 4 ++++ + src/mm-shared-qmi.c | 43 + +++++++++++++++++++++++++++++++++++++------ + src/mm-sim-qmi.c | 2 ++ + src/mm-sim-qmi.h | 1 + + 7 files changed, 61 insertions(+), 6 deletions(-) + +commit 9fca0467801d41598666dd63e9394ed806c5a399 +Author: Eric Caruso +Date: Fri Jun 12 15:16:50 2020 -0700 + + mm-base-sim: add EID D-Bus property + + This provides a new D-Bus property on the Sim object that + exposes the EID of the SIM, if available. + + docs/reference/libmm-glib/libmm-glib-sections.txt | 2 ++ + introspection/org.freedesktop.ModemManager1.Sim.xml | 7 +++++++ + src/mm-base-sim.c | 19 + +++++++++++++++++++ + src/mm-base-sim.h | 8 ++++++++ + 4 files changed, 36 insertions(+) + +commit 1ed9f7e94e5948f408d1d09ad8c219a594669066 +Author: Aleksander Morgado +Date: Mon Oct 19 22:11:02 2020 +0200 + + broadband-modem-qmi: minor coding style fixes + + src/mm-broadband-modem-qmi.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 1800983b6c77b495a97eb4335541561456abfed5 +Author: Eric Caruso +Date: Fri Oct 16 11:22:37 2020 -0700 + + mm-modem-helpers: add low_nybble_first argument to mm_bcd_to_string + + All BCD-encoded strings used by MM currently have the low nybble + of each byte come before the high nybble, but some strings (such + as the EID string returned by QMI Get Slot Status) are meant to + be read in order with the high nybble before the low one. As such, + extend mm_bcd_to_string to decode both. + + src/mm-modem-helpers.c | 9 ++++++--- + src/mm-modem-helpers.h | 4 +++- + src/mm-shared-qmi.c | 9 ++++++--- + src/mm-sim-qmi.c | 6 ++++-- + src/tests/test-modem-helpers.c | 35 ++++++++++++++++++++++------------- + 5 files changed, 41 insertions(+), 22 deletions(-) + +commit f013e94ff89680d1acd7dba12ff4a6a0fa7b58bf +Author: Aleksander Morgado +Date: Wed Oct 14 14:40:00 2020 +0200 + + xmm: fix missing GError initialization + + plugins/xmm/mm-shared-xmm.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 3b6176cbe2bc64bbf19fa0378b1c65b646bb6d13 +Author: Aleksander Morgado +Date: Wed Oct 14 14:38:52 2020 +0200 + + simtech: fix missing GError initialization + + plugins/simtech/mm-shared-simtech.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 50c1550c9f808ddd080f7992bf2d7f4dfae6e0ec +Author: Aleksander Morgado +Date: Wed Oct 14 14:38:40 2020 +0200 + + cinterion: fix missing GError initialization + + plugins/cinterion/mm-shared-cinterion.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit df9cb4a8f6f0abaad8052e36c10874bfbea2ac76 +Author: Aleksander Morgado +Date: Sat Oct 10 14:38:24 2020 +0200 + + iface-modem-location: log old and new 3GPP location ids when updating + + src/mm-iface-modem-location.c | 74 + ++++++++++++++++++++++++++++--------------- + 1 file changed, 49 insertions(+), 25 deletions(-) + +commit 135d484501dbf641b51b02033377871100323049 +Author: Aleksander Morgado +Date: Fri Oct 9 12:50:49 2020 +0200 + + iface-modem-location: allow Cell ID only updates + + The "Serving System" indications reported via QMI when the device is + moving may contain LAC/TAC+CID updates or just CID updates. + + E.g. this one has "CID 3GPP" (0x1e): + + Mon Aug 3 11:22:42 2020 daemon.debug [1567]: [/dev/cdc-wdm0] + received + generic indication (translated)... <<<<<< QMUX: <<<<<< length + = 33 + <<<<<< flags = 0x80 <<<<<< service = "nas" <<<<<< client + = 3 + <<<<<< QMI: <<<<<< flags = "indication" <<<<<< + transaction = + 4512 <<<<<< tlv_length = 21 <<<<<< message = "Serving + System" + (0x0024) <<<<<< TLV: <<<<<< type = "Serving System" (0x01) + <<<<<< length = 6 <<<<<< value = 01:01:01:02:01:08 + <<<<<< + translated = [ registration_state = 'registered' cs_attach_state = + 'attached' ps_attach_state = 'attached' selected_network = '3gpp' + radio_interfaces = '{ [0] = 'lte '}' ] <<<<<< TLV: <<<<<< type + = "Data Service Capability" (0x11) <<<<<< length = 2 <<<<<< + value = 01:0B <<<<<< translated = { [0] = 'lte '} <<<<<< TLV: + <<<<<< type = "CID 3GPP" (0x1e) <<<<<< length = + 4 <<<<<< + value = 14:C2:A8:00 <<<<<< translated = 11059732 + + And this one has both "CID 3GPP" (0x1e) and "LTE TAC" (0x25): + + Mon Aug 3 11:23:05 2020 daemon.debug [1567]: [/dev/cdc-wdm0] + received + generic indication (translated)... <<<<<< QMUX: <<<<<< length + = 38 + <<<<<< flags = 0x80 <<<<<< service = "nas" <<<<<< client + = 3 + <<<<<< QMI: <<<<<< flags = "indication" <<<<<< + transaction = + 4513 <<<<<< tlv_length = 26 <<<<<< message = "Serving + System" + (0x0024) <<<<<< TLV: <<<<<< type = "Serving System" (0x01) + <<<<<< length = 6 <<<<<< value = 01:01:01:02:01:08 + <<<<<< + translated = [ registration_state = 'registered' cs_attach_state = + 'attached' ps_attach_state = 'attached' selected_network = '3gpp' + radio_interfaces = '{ [0] = 'lte '}' ] <<<<<< TLV: <<<<<< type + = "Data Service Capability" (0x11) <<<<<< length = 2 <<<<<< + value = 01:0B <<<<<< translated = { [0] = 'lte '} <<<<<< TLV: + <<<<<< type = "CID 3GPP" (0x1e) <<<<<< length = + 4 <<<<<< + value = 32:36:BC:00 <<<<<< translated = 12334642 <<<<<< + TLV: + <<<<<< type = "LTE TAC" (0x25) <<<<<< length = 2 <<< + + We should therefore allow changes only in the CID, maintaining + whatever LAC/TAC value we had before. + + src/mm-broadband-modem-qmi.c | 2 +- + src/mm-iface-modem-3gpp.c | 8 ++++---- + src/mm-iface-modem-location.c | 26 ++++++++++++++++++++------ + 3 files changed, 25 insertions(+), 11 deletions(-) + +commit c6f38ecac3ed2ac783dbab706c5e155ba7409747 +Author: Aleksander Morgado +Date: Sat Oct 10 15:08:29 2020 +0200 + + iface-modem-3gpp: print consolidated reg state info only when updating + + src/mm-iface-modem-3gpp.c | 86 + +++++++++++++++++++---------------------------- + 1 file changed, 34 insertions(+), 52 deletions(-) + +commit 408a3d58c2629fa197ddeadc65b5a5789195e810 +Author: Eric Caruso +Date: Thu Jun 25 11:31:18 2020 -0700 + + mm-bearer-qmi: remove default_ip_family_set check + + According to QC, we should set the IP family in both the + Set IP Family and Start Network messages. After removing this + check the member is never read, only written; this means it's + effectively dead and can be removed. + + src/mm-bearer-qmi.c | 15 ++------------- + 1 file changed, 2 insertions(+), 13 deletions(-) + +commit b0c212635d3fe4ec0bd4257d4554d6cf3767fb29 +Author: Pavan Holla +Date: Wed Oct 7 22:33:27 2020 +0000 + + broadband-modem: Disconnect bearers during disable + + Fixes a bug introduced in commit 7e386389, which caused user requested + disable operations to go to step + DISABLING_STEP_FIRST_AFTER_ENABLE_FAILED. For user requested disable, + the first step should be DISABLING_STEP_FIRST. + + src/mm-broadband-modem.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 075bcb74f30d18985e1ada82312fe58215f82040 +Author: Daniele Palmas +Date: Thu Oct 1 13:19:28 2020 +0200 + + port-qmi: increase qmi_device_open retries + + Telit FN980 requires more time for becoming responsive to + qmi requests after device appearance. + + src/mm-port-qmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit dcf188d2ef27a17afc0b3447c5c464286e7d250b +Author: Daniele Palmas +Date: Tue Sep 29 22:43:55 2020 +0200 + + telit: add tag ID_MM_TELIT_PORT_DELAY for initial delay mechanism + + plugins/telit/77-mm-telit-port-types.rules | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit f6c4e3369a29c1f1bf14325be5a362a3ba29a71c +Author: Daniele Palmas +Date: Tue Sep 29 16:03:55 2020 +0200 + + telit: add initial delay for AT ports to become responsive + + Add a polling mechanism for port responsiveness, since some modem + families require some time before being usable after the serial + ports have been exposed by the kernel. + + plugins/telit/mm-common-telit.c | 82 + ++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 81 insertions(+), 1 deletion(-) + +commit 71cd727425d66bb5f7854cde2d4c033e73cbba97 +Author: Daniele Palmas +Date: Tue Sep 29 22:37:00 2020 +0200 + + telit: add FN980 and LM9x0 MBIM compositions rules + + plugins/telit/77-mm-telit-port-types.rules | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) -commit 96414cc3b26d5af20024836e8336c5f10c192f3a +commit ed8cf8d04c38495526a2958ee9454adca2d2a67d +Author: Daniele Palmas +Date: Tue Sep 29 10:16:22 2020 +0200 + + telit: fix LM9x0 udev rules + + plugins/telit/77-mm-telit-port-types.rules | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit bab0f44e74031896b9fd4c3a0390285d838aaa07 +Author: Pavan Holla +Date: Wed Sep 30 20:44:48 2020 +0000 + + broadband-modem-qmi: Report FIXED_DIALING lock correctly + + Querying facility locks should return a FIXED_DIALING lock if + PIN2 lock + is enabled. + + src/mm-broadband-modem-qmi.c | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +commit 74ab15d3239b62c53a0eecfac5a0488b6731bb71 +Author: Pavan Holla +Date: Wed Sep 30 20:29:36 2020 +0000 + + broadband-modem-qmi: Return error if get_pin_status fails + + Prior to this CL, failure to get pin status while probing facility + locks + would not flag an error. Failure to read a pin lock is a critical + error + and we return it to higher layers. + + src/mm-broadband-modem-qmi.c | 51 + +++++++++++++++++++++++--------------------- + 1 file changed, 27 insertions(+), 24 deletions(-) + +commit aa4dce2afc804d6ba4670392919dd12dbc62a162 +Author: Pavan Holla +Date: Mon Sep 28 20:38:24 2020 +0000 + + broadband-modem-qmi: Use UIM service for querying facility locks + + DMS_UIM messages have been deprecated, and have been replaced by + equivalent UIM messages. Use UIM_GET_CARD_STATUS while querying + for facility + locks if dms_uim messages were found to be deprecated. + + src/mm-broadband-modem-qmi.c | 109 + ++++++++++++++++++++++++++++++++++++++----- + src/mm-modem-helpers-qmi.c | 8 +++- + src/mm-modem-helpers-qmi.h | 2 + + src/mm-sim-qmi.c | 2 +- + 4 files changed, 108 insertions(+), 13 deletions(-) + +commit 72d8bae65b74000c7c6f24e5a6ccb303e3c67b30 +Author: wicadmin +Date: Tue Sep 29 08:58:08 2020 +0000 + + ci: create release tarball and hash as build artifacts + + .gitlab-ci.yml | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit 2494645448a1bedc8c4d254a72f25447ee983cc3 +Author: Aleksander Morgado +Date: Fri Sep 18 12:37:06 2020 +0200 + + shared-qmi: cleanup UIM client if SIM hot swap setup fails + + The cleanup was missing in one of the steps. + + src/mm-shared-qmi.c | 1 + + 1 file changed, 1 insertion(+) + +commit f3619f99f5538056d186cbb5cd7182c2f95c519a +Author: Aleksander Morgado +Date: Fri Sep 18 12:36:07 2020 +0200 + + shared-qmi: minor style changes in SIM hot swap logic + + src/mm-shared-qmi.c | 198 + +++++++++++++++++++++++++--------------------------- + 1 file changed, 94 insertions(+), 104 deletions(-) + +commit e4308a529e1b05b772a0fbbf7296c7132e9e8a9e +Author: Aleksander Morgado +Date: Fri Sep 18 12:03:07 2020 +0200 + + quectel: setup parent SIM hot swap in addition to +QUSIM + + So that e.g. in QMI-based devices we have both things, not just one. + + plugins/quectel/mm-broadband-modem-qmi-quectel.c | 14 +++++++-- + plugins/quectel/mm-broadband-modem-quectel.c | 14 +++++++-- + plugins/quectel/mm-shared-quectel.c | 40 + ++++++++++++++++++++++-- + plugins/quectel/mm-shared-quectel.h | 3 +- + 4 files changed, 64 insertions(+), 7 deletions(-) + +commit a2eb80e1709766cb92024481d3ffc3533acd4ecf +Author: Aleksander Morgado +Date: Fri Sep 18 11:49:52 2020 +0200 + + broadband-modem-mbim: also setup SIM hot swap with QMI over MBIM + + On QMI-capable MBIM devices, also setup the SIM hot swap logic using + QMI over MBIM, so that profile changes are detected. + + src/mm-broadband-modem-mbim.c | 70 + ++++++++++++++++++++++++++++++++++++------- + 1 file changed, 59 insertions(+), 11 deletions(-) + +commit 18b33e2e4a971460a983d3680e69954baab3735e +Author: Aleksander Morgado +Date: Fri Sep 18 11:27:32 2020 +0200 + + broadband-modem-mbim: don't cleanup subscriber info on disable + + The SIM hot swap setup is run during initialization and if it succeeds + it must be available throughout the whole execution of this modem + object. + + So, do not cleanup the SUBSCRIBER_INFO flag on 3GPP interface disable, + which is completely unrelated to the SIM hot swap setup logic. + + src/mm-broadband-modem-mbim.c | 7 ------- + 1 file changed, 7 deletions(-) + +commit 20176767ad9224884790f0d5ad04a70a49731a9f +Author: Aleksander Morgado +Date: Fri Sep 18 11:26:03 2020 +0200 + + broadband-modem-mbim: cleanup the subscriber info setup if enabling + fails + + If enabling the subscriber info notifications fails, we should no + longer have the setup for those notifications, so make sure it's + cleaned up on error. + + src/mm-broadband-modem-mbim.c | 67 + ++++++++++++++++++++++++------------------- + 1 file changed, 38 insertions(+), 29 deletions(-) + +commit 5285720c486762ffb40e0c561bafc29ea3678f98 +Author: Teijo Kinnunen +Date: Tue Sep 8 13:46:48 2020 +0300 + + shared-qmi: implement SIM/profile change detection + + Implement eUICC change detection for QMI based modems using one of the + following mechanisms (in order of preference): + + 1. If the modem supports "get slot status" operation, we monitor + physical slot status indications from the modem for the active + slot to detect when ICCID changes. + 2. Use "refresh register all" to subscribe refresh indications when + the eUICC triggers REFRESH operation following the enablement of + a new profile. + 3. Use "refresh register" to subscribe refresh indications (file + path of EF_ICCID is used) in a similar way. This is used with + older modems that do not support "refresh register all". + + If ICCID change is detected, the already existing SIM hot swap + mechanism in MM is triggered. + + src/mm-broadband-modem-qmi.c | 2 + + src/mm-shared-qmi.c | 464 + +++++++++++++++++++++++++++++++++++++++++++ + src/mm-shared-qmi.h | 6 + + 3 files changed, 472 insertions(+) + +commit 0880bf3f9aa97ef6e2e4c5040f36d1d4411cb72b +Author: Aleksander Morgado +Date: Mon Sep 28 11:57:55 2020 +0200 + + Revert "shared-qmi: implement SIM/profile change detection" + + This reverts commit e91f2ef315526a1a8a1b451acb5a190686b05225. + + This was wrongly merged squashing multiple commits together. Reverting + to merge separate commits. + + plugins/quectel/mm-broadband-modem-qmi-quectel.c | 14 +- + plugins/quectel/mm-broadband-modem-quectel.c | 14 +- + plugins/quectel/mm-shared-quectel.c | 40 +- + plugins/quectel/mm-shared-quectel.h | 3 +- + src/mm-broadband-modem-mbim.c | 136 +++---- + src/mm-broadband-modem-qmi.c | 2 - + src/mm-shared-qmi.c | 455 + ----------------------- + src/mm-shared-qmi.h | 6 - + 8 files changed, 50 insertions(+), 620 deletions(-) + +commit e91f2ef315526a1a8a1b451acb5a190686b05225 +Author: Teijo Kinnunen +Date: Mon Sep 28 09:29:09 2020 +0000 + + shared-qmi: implement SIM/profile change detection + + Implement eUICC change detection for QMI based modems using one of the + following mechanisms (in order of preference): + + 1. If the modem supports "get slot status" operation, we monitor + physical slot status indications from the modem for the active + slot to detect when ICCID changes. + 2. Use "refresh register all" to subscribe refresh indications when + the eUICC triggers REFRESH operation following the enablement of + a new profile. + 3. Use "refresh register" to subscribe refresh indications (file + path of EF_ICCID is used) in a similar way. This is used with + older modems that do not support "refresh register all". + + If ICCID change is detected, the already existing SIM hot swap + mechanism in MM is triggered. + + plugins/quectel/mm-broadband-modem-qmi-quectel.c | 14 +- + plugins/quectel/mm-broadband-modem-quectel.c | 14 +- + plugins/quectel/mm-shared-quectel.c | 40 +- + plugins/quectel/mm-shared-quectel.h | 3 +- + src/mm-broadband-modem-mbim.c | 136 ++++--- + src/mm-broadband-modem-qmi.c | 2 + + src/mm-shared-qmi.c | 455 + +++++++++++++++++++++++ + src/mm-shared-qmi.h | 6 + + 8 files changed, 620 insertions(+), 50 deletions(-) + +commit 318b2b01e340936e3f3b8d443f89acc432b85190 +Author: Dušan Kazik +Date: Fri Sep 18 05:36:07 2020 +0000 + + po: slovak translation update + + po/sk.po | 17 +++++++---------- + 1 file changed, 7 insertions(+), 10 deletions(-) + +commit 9397ed420d8d3e9e16c1b04c9866063798f0a975 +Author: Aleksander Morgado +Date: Fri Sep 18 10:52:06 2020 +0200 + + gosuncn: new plugin + + For now, just with port type hints for the GM800 in MBIM mode. + + .gitlab-ci.yml | 2 +- + configure.ac | 2 + + plugins/Makefile.am | 23 +++++ + plugins/README.txt | 5 ++ + plugins/gosuncn/77-mm-gosuncn-port-types.rules | 17 ++++ + plugins/gosuncn/mm-plugin-gosuncn.c | 113 + +++++++++++++++++++++++++ + plugins/gosuncn/mm-plugin-gosuncn.h | 40 +++++++++ + plugins/tests/test-udev-rules.c | 11 +++ + 8 files changed, 212 insertions(+), 1 deletion(-) + +commit 8e8c794815fe1ef079101ce2eff5af43ee48b0f1 +Author: Aleksander Morgado +Date: Fri Sep 25 09:27:15 2020 +0200 + + samsung: fix typo in plugin name + + plugins/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 4e0f849bb98b535a9d48795ef85174727d9636da +Author: Aleksander Morgado +Date: Sat Sep 19 18:38:04 2020 +0200 + + iface-modem-messaging: if sms list doesn't exist, free part + + If the device goes away while we are listing SMS messages, it may + happen that we ask the messaging interface to take a part and the + sms list object has already been disposed. Make sure the part is freed + in that case, so that we avoid memory leaks. + + ==19138== 6,914 (1,232 direct, 5,682 indirect) bytes in 11 blocks + are definitely lost in loss record 5,282 of 5,287 + ==19138== at 0x483A77F: malloc (vg_replace_malloc.c:307) + ==19138== by 0x5023349: g_malloc (in + /usr/lib/libglib-2.0.so.0.6600.0) + ==19138== by 0x50446FF: g_slice_alloc (in + /usr/lib/libglib-2.0.so.0.6600.0) + ==19138== by 0x5044D6A: g_slice_alloc0 (in + /usr/lib/libglib-2.0.so.0.6600.0) + ==19138== by 0x2577FC: mm_sms_part_new (mm-sms-part.c:180) + ==19138== by 0x2504D0: mm_sms_part_3gpp_new_from_binary_pdu + (mm-sms-part-3gpp.c:385) + ==19138== by 0x21A15C: add_sms_part + (mm-broadband-modem-mbim.c:5169) + ==19138== by 0x21A31F: sms_read_query_ready + (mm-broadband-modem-mbim.c:5215) + ==19138== by 0x4E600F3: ??? (in /usr/lib/libgio-2.0.so.0.6600.0) + ==19138== by 0x4E64638: ??? (in /usr/lib/libgio-2.0.so.0.6600.0) + ==19138== by 0x4D3870D: transaction_task_complete_and_free + (mbim-device.c:236) + ==19138== by 0x4D396B9: process_message (mbim-device.c:616) + + src/mm-iface-modem-messaging.c | 28 +++++++++++++--------------- + 1 file changed, 13 insertions(+), 15 deletions(-) + +commit 00949c4ad34326722f6044a39aff8e1a33da6f18 +Author: Aleksander Morgado +Date: Sat Sep 19 20:26:43 2020 +0200 + + core: add autoptr cleanup methods to all internal types + + src/kerneldevice/mm-kernel-device-generic.h | 4 +++- + src/kerneldevice/mm-kernel-device-udev.h | 4 +++- + src/kerneldevice/mm-kernel-device.h | 1 + + src/mm-base-bearer.h | 1 + + src/mm-base-call.h | 1 + + src/mm-base-manager.h | 1 + + src/mm-base-modem.h | 1 + + src/mm-base-sim.h | 1 + + src/mm-base-sms.h | 1 + + src/mm-bearer-list.h | 1 + + src/mm-bearer-mbim.h | 1 + + src/mm-bearer-qmi.h | 1 + + src/mm-broadband-bearer.h | 1 + + src/mm-broadband-modem-mbim.h | 1 + + src/mm-broadband-modem-qmi.h | 1 + + src/mm-broadband-modem.h | 1 + + src/mm-call-list.h | 1 + + src/mm-device.h | 1 + + src/mm-filter.h | 1 + + src/mm-iface-modem-3gpp-ussd.h | 1 + + src/mm-iface-modem-3gpp.h | 1 + + src/mm-iface-modem-cdma.h | 1 + + src/mm-iface-modem-firmware.h | 1 + + src/mm-iface-modem-location.h | 1 + + src/mm-iface-modem-messaging.h | 1 + + src/mm-iface-modem-oma.h | 1 + + src/mm-iface-modem-signal.h | 1 + + src/mm-iface-modem-simple.h | 1 + + src/mm-iface-modem-time.h | 1 + + src/mm-iface-modem-voice.h | 1 + + src/mm-iface-modem.h | 1 + + src/mm-plugin-manager.h | 4 +++- + src/mm-plugin.h | 1 + + src/mm-port-mbim.h | 1 + + src/mm-port-probe.h | 1 + + src/mm-port-qmi.h | 1 + + src/mm-port-serial-at.h | 1 + + src/mm-port-serial-gps.h | 1 + + src/mm-port-serial-qcdm.h | 1 + + src/mm-port-serial.h | 1 + + src/mm-port.h | 1 + + src/mm-shared-qmi.h | 1 + + src/mm-sim-mbim.h | 1 + + src/mm-sim-qmi.h | 1 + + src/mm-sms-list.h | 1 + + src/mm-sms-mbim.h | 1 + + src/mm-sms-part.h | 2 ++ + src/mm-sms-qmi.h | 1 + + 48 files changed, 55 insertions(+), 3 deletions(-) + +commit 19ddfa18bbbce29315429436f461696d50b752b3 +Author: Anders Jonsson +Date: Sat Sep 19 00:05:53 2020 +0200 + + po: Update Swedish translation + + po/sv.po | 22 ++++++++++------------ + 1 file changed, 10 insertions(+), 12 deletions(-) + +commit 856ea932678e62ffccd9f1cf53e8671324efd569 +Author: Aleksander Morgado +Date: Fri Sep 18 10:32:02 2020 +0200 + + po: use package bugreport as MSGID_BUGS_ADDRESS + + po/Makevars | 2 +- + po/cs.po | 5 +++-- + po/da.po | 5 +++-- + po/de.po | 5 +++-- + po/fr.po | 5 +++-- + po/fur.po | 5 +++-- + po/hu.po | 5 +++-- + po/id.po | 5 +++-- + po/it.po | 5 +++-- + po/lt.po | 5 +++-- + po/pl.po | 5 +++-- + po/pt_BR.po | 5 +++-- + po/ru.po | 5 +++-- + po/sk.po | 5 +++-- + po/sv.po | 5 +++-- + po/tr.po | 5 +++-- + po/uk.po | 5 +++-- + po/zh_CN.po | 5 +++-- + 18 files changed, 52 insertions(+), 35 deletions(-) + +commit 6a3b7bdf95bbdb4b6bf75ea331abc1f885f802dc +Author: Aleksander Morgado +Date: Fri Sep 18 10:31:32 2020 +0200 + + build: set package bugreport to the gitlab issues URL + + configure.ac | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit 7f39c16c8c0c0e0597640deb3b6912bd8043e017 +Author: Jessy Diamond Exum +Date: Wed Aug 26 13:52:04 2020 -0700 + + cinterion: Add SIM hot swap to AT broadband modems (PLS8 & PLAS9). + + Enable the SCKS Unsolicited Result Code (URC) to detect SIM hot + swap, and trigger SIM redetection. + + plugins/cinterion/mm-broadband-modem-cinterion.c | 120 + +++++++++++++++++++++++ + 1 file changed, 120 insertions(+) + +commit b1679b58939fc2563b827d478ac0eea937fd16c8 +Author: Jessy Diamond Exum +Date: Wed Aug 26 13:52:04 2020 -0700 + + cinterion: Configure the PLAS9 to correctly send Unsolicited Result + Codes. + + The PLS8 and PLAS9 modems (and likely many others modems supported by + this driver) have two AT capable serial ports: The 'MODEM' AT port + (default for PPP) and the 'APPLICATION' AT port (used for general + control). + + The PLS8 modem sends URCs to the APPLICATION port by default, while he + PLAS9 defaults sending URCs to the MODEM port. To get URCs to behave + on both modems, it is necessary to explicitly set the URC reporting + port to APPLICATION. + + plugins/cinterion/mm-broadband-modem-cinterion.c | 29 + ++++++++++++++++++++---- + 1 file changed, 24 insertions(+), 5 deletions(-) + +commit af5c242e9234a7061ec0d6624e3712153c7c2c6b +Author: Aleksander Morgado +Date: Fri Sep 11 10:21:03 2020 +0200 + + iface-modem: don't reconfigure sim hot swap context on SIM PIN unlock + + If we had already successfully run the sim hot swap context setup + during the initial initialization, make sure we don't re-run on SIM + PIN unlock, because we may be re-creating signal handlers and such. + + src/mm-iface-modem.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +commit ab4160afa676404859d4e9fdb751217cbff8a0bb +Author: Aleksander Morgado +Date: Fri Sep 11 10:15:50 2020 +0200 + + quectel: minor refactor in the sim hot swap setup logic + + plugins/quectel/mm-shared-quectel.c | 81 + ++++++++++++++++++------------------- + 1 file changed, 39 insertions(+), 42 deletions(-) + +commit 06148aba480a3a336092b5675483e9d6268c50d6 +Author: Teijo Kinnunen +Date: Tue Sep 8 09:52:31 2020 +0000 + + iface-modem: add mm_iface_modem_check_for_sim_swap function + + The function shall be needed for profile switch checking. + + src/mm-iface-modem.c | 76 + ++++++++++++++++++++++++++++++++++++++++++++++++++++ + src/mm-iface-modem.h | 10 +++++++ + 2 files changed, 86 insertions(+) + +commit 958ca74391481616db41cd412a9e12556dd21971 +Author: Aleksander Morgado +Date: Mon Sep 7 10:55:02 2020 +0200 + + bearer-mbim: avoid attempting to load deactivated IP types + + If we're asking for IPv4v6 and we get IPv4-only connected, we + shouldn't attempt to provide IPv6 addressing details in the bearer + object, because we would fallback to say DHCP is needed if we were not + able to load any IPv6 details from the modem. + + This is, instead of provinding both IPv4 and IPv6 details: + ------------------------------------ + Properties | apn: internet + | roaming: allowed + | ip type: ipv4v6 + | allowed-auth: none, pap, chap, mschap, + mschapv2, eap + ------------------------------------ + IPv4 configuration | method: static + | address: 10.182.100.233 + | prefix: 24 + | gateway: 10.182.100.1 + | dns: 80.58.61.250, 80.58.61.254 + ------------------------------------ + IPv6 configuration | method: dhcp + | prefix: 0 + + We should report only IPv4 details: + ---------------------------------- + Properties | apn: internet + | roaming: allowed + | ip type: ipv4v6 + | allowed-auth: none, pap, chap, mschap, + mschapv2, eap + ---------------------------------- + IPv4 configuration | method: static + | address: 10.182.100.233 + | prefix: 24 + | gateway: 10.182.100.1 + | dns: 80.58.61.250, 80.58.61.254 + + src/mm-bearer-mbim.c | 5 +++++ + 1 file changed, 5 insertions(+) + +commit f8eeab21213e4ec487ce3f91b0ca09f11e52cec0 +Author: Aleksander Morgado +Date: Mon Sep 7 10:46:38 2020 +0200 + + bearer-mbim: don't fail IPv4 connection if IPv4v6 was requested + + If we ask for IPv4v6 is requested but the network only grants IPv4, we + end up receiving the 'Connect Set' response with nw_error set to + 'pdp-type-ipv4-only-allowed'. In this case, we should still succeed + the connection attempt and only report the IPv4 info. + + We therefore change the logic to skip processing the nw_error unless + the activation state is reported as ACTIVATED or ACTIVATING. + + src/mm-bearer-mbim.c | 37 ++++++++++++++++++++++--------------- + 1 file changed, 22 insertions(+), 15 deletions(-) + +commit e52ad1cc88601b2da1946678a2743465362d88c6 +Author: Teijo Kinnunen +Date: Mon Sep 7 15:18:52 2020 +0300 + + iface-modem: add an optional iccid parameter to check_for_sim_swap + + If the new iccid is already available, reading the iccid from the + card can be skipped. + + plugins/quectel/mm-shared-quectel.c | 1 + + src/mm-broadband-modem.c | 23 ++++++++++++++++++++++- + src/mm-iface-modem.c | 1 + + src/mm-iface-modem.h | 1 + + 4 files changed, 25 insertions(+), 1 deletion(-) + +commit 49b4e6a6ff1104393edb53a812f4a23d32f04ff1 +Author: Aleksander Morgado +Date: Sun Aug 16 14:07:58 2020 +0200 + + quectel: prefer +CTZU=3 to +CTZU=1 if supported + + Some quectel modems, like the EC25, require +CTZU=3 in order to have + CCLK? report localtime instead of UTC time. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/233 + + plugins/quectel/mm-shared-quectel.c | 116 + +++++++++++++++++++++++++++++++----- + 1 file changed, 101 insertions(+), 15 deletions(-) + +commit e65175234b769cbf68f04e989948a428552c6740 +Author: Aleksander Morgado +Date: Sun Aug 16 11:07:20 2020 +0200 + + quectel: new custom +CTZU=? parser + + Some quectel devices, like the EC25 have a non-standard additional '3' + mode value: + + 0: Disable automatic time zone update via NITZ + 1: Enable automatic time zone update via NITZ + 3: Enable automatic time zone update via NITZ and update LOCAL + time to RTC + + plugins/Makefile.am | 23 ++++++ + plugins/quectel/mm-modem-helpers-quectel.c | 91 + +++++++++++++++++++++ + plugins/quectel/mm-modem-helpers-quectel.h | 32 ++++++++ + plugins/quectel/tests/test-modem-helpers-quectel.c | 93 + ++++++++++++++++++++++ + 4 files changed, 239 insertions(+) + +commit 42288fc2a10b5e1740d86ebe6249e21a2337d3bc +Author: Aleksander Morgado +Date: Fri Aug 28 18:45:59 2020 +0200 + + simtech: add SIM7070/SIM7080/SIM7090 port type hints + + These modules have 2 different USB layouts: + + The default layout with PID 0x9205 (AT+CUSBSELNV=1) exposes 4 TTYs and + an ECM interface: + + T: Bus=02 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 6 Spd=480 MxCh= 0 + D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 + P: Vendor=1e0e ProdID=9205 Rev=00.00 + S: Manufacturer=SimTech, Incorporated + S: Product=SimTech SIM7080 + S: SerialNumber=1234567890ABCDEF + C: #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=500mA + I: If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff + Driver=option + I: If#=0x1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff + Driver=option + I: If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff + Driver=option + I: If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff + Driver=option + I: If#=0x4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=06 Prot=00 + Driver=cdc_ether + I: If#=0x5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 + Driver=cdc_ether + + The purpose of each TTY is as follows: + * ttyUSB0: DIAG/QCDM port. + * ttyUSB1: GNSS data. + * ttyUSB2: AT-capable port (control). + * ttyUSB3: AT-capable port (data). + + In the secondary layout with PID=0x9206 (AT+CUSBSELNV=86) the module + exposes 6 TTY ports: + + T: Bus=02 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 8 Spd=480 MxCh= 0 + D: Ver= 2.00 Cls=02(commc) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 + P: Vendor=1e0e ProdID=9206 Rev=00.00 + S: Manufacturer=SimTech, Incorporated + S: Product=SimTech SIM7080 + S: SerialNumber=1234567890ABCDEF + C: #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=500mA + I: If#=0x0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff + Driver=option + I: If#=0x1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff + Driver=option + I: If#=0x2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff + Driver=option + I: If#=0x3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff + Driver=option + I: If#=0x4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff + Driver=option + I: If#=0x5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff + Driver=option + + The purpose of each TTY is as follows: + * ttyUSB0: DIAG/QCDM port. + * ttyUSB1: GNSS data. + * ttyUSB2: AT-capable port (control). + * ttyUSB3: QFLOG interface. + * ttyUSB4: DAM interface. + * ttyUSB5: AT-capable port (data). + + plugins/simtech/77-mm-simtech-port-types.rules | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +commit ddb5b0bb579ccd8783467afd0a569395bbb08a38 +Author: Aleksander Morgado +Date: Sat Aug 1 09:59:07 2020 +0200 + + libmm-glib,docs: add index for 1.16 + + docs/reference/libmm-glib/libmm-glib-docs.xml | 4 ++++ + 1 file changed, 4 insertions(+) + +commit e4fd17d8c30c5bacc5eedb8c48db7317089bbcef +Author: Aleksander Morgado +Date: Sat Aug 1 10:00:37 2020 +0200 + + shared-qmi: implement SIM slot switching + + Using the 'UIM switch slot' operation, this commit introduces the + ability to change which SIM slot to be active at any given time in a + Multi-SIM Single-Standby setup. + + There is no validation done on whether the selected SIM slot has a + valid SIM card inserted or not; if the user selects a slot without any + SIM card, the newly probed modem object will start in Failed state + right away. + + src/mm-broadband-modem-mbim.c | 2 + + src/mm-broadband-modem-qmi.c | 2 + + src/mm-shared-qmi.c | 127 + ++++++++++++++++++++++++++++++++++++++++++ + src/mm-shared-qmi.h | 8 +++ + 4 files changed, 139 insertions(+) + +commit 7c76450c15555204d14a8ce0550dc2c639d288b3 +Author: Aleksander Morgado +Date: Sat Aug 1 09:59:54 2020 +0200 + + shared-qmi: implement SIM slots loading during initialization + + This commit introduces Multi-SIM Single-Standby support in all QMI + capable devices that support multiple SIM slots. + + The 'UIM Get Slot Status' method is used to list all available + physical slots as well as the availability of SIM cards in the + different slots. This method also provides UICC already, so the SIM + objects are created early and exposed early in DBus. + + Once all slots are listed, the logic will briefly make each of the + available SIM cards active in order to read additional settings like + IMSI, MCCMNC or the Operator name. This brief switching is required + because in a Single-Standby setup only one SIM can be active at any + given time. + + The last slot to probe is always the one that was active originally, + making sure that the modem initialization logic can go on with the + correct SIM slot. + + src/mm-broadband-modem-mbim.c | 4 + + src/mm-broadband-modem-qmi.c | 2 + + src/mm-shared-qmi.c | 312 + ++++++++++++++++++++++++++++++++++++++++++ + src/mm-shared-qmi.h | 9 +- + 4 files changed, 326 insertions(+), 1 deletion(-) + +commit 48ca1aea3c12262307c2ce13fbdedb1d91c640c6 +Author: Aleksander Morgado +Date: Sat Aug 1 09:59:50 2020 +0200 + + sim-qmi: implement explicit wait for SIM readiness + + During the base SIM initialization process, where we ask the modem for + the properties of the currently primary active SIM, we need to make + sure that the SIM is ready before attempting to query this + information. + + This explicit wait is required when loading properties for non + active SIMs during the short period of time when they're made active. + + src/mm-sim-qmi.c | 128 + +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 128 insertions(+) + +commit b564d5f2e508537dc5b10fd5fe20497113226526 +Author: Aleksander Morgado +Date: Sat Aug 1 09:59:47 2020 +0200 + + sim-qmi: allow creating preinitialized SIM objects + + The default SIM creation method will attempt to initialize the SIM + properties during the object creation. + + This new method allows creating SIM objects with already known + property values, and therefore not explicitly running the + asynchronous initialization process. + + Completely equivalent to mm_base_sim_new_initialized() but creating a + subclassed MMSimQmi instead of the generic MMBaseSim. + + src/mm-sim-qmi.c | 31 +++++++++++++++++++++++++++++++ + src/mm-sim-qmi.h | 10 ++++++++++ + 2 files changed, 41 insertions(+) + +commit 89b6e811b984f2f9f6e0eea652246a58e3200c8f +Author: Aleksander Morgado +Date: Sat Aug 1 09:59:43 2020 +0200 + + helpers-qmi: fix detection of primary active SIM status + + The original logic that parsed the 'UIM Get Card Status Output' did a + bit of guessing to decide what was the current lock status to consider + in the modem. This guessing was fine on systems with a single SIM + slot, but it was very wrong as soon as multiple SIMs had to be + considered. + + In a Multi-SIM Multi-Standby setup, with multiple SIMs reported as + active, we should look for the one flagged as "GW primary" to consider + it the primary SIM card of the system,the one required to start a data + connection. + + We explicitly ignore the ones flagged as "1X primary", as we don't + consider a SIM card required in CDMA/EVDO setups. + + src/mm-modem-helpers-qmi.c | 175 + +++++++++++++++++++++------------------------ + 1 file changed, 80 insertions(+), 95 deletions(-) + +commit e6ab1182df861e1243f5b93ec334008bec84943e +Author: Aleksander Morgado +Date: Sat Aug 1 09:59:40 2020 +0200 + + helpers-qmi: move 'UIM Get Card Status Output' parsing to helpers + + This is going to be used in handling the multi-SIM setup, so make it a + common helper. + + src/mm-broadband-modem-qmi.c | 265 + ++----------------------------------------- + src/mm-modem-helpers-qmi.c | 244 + +++++++++++++++++++++++++++++++++++++++ + src/mm-modem-helpers-qmi.h | 12 ++ + 3 files changed, 267 insertions(+), 254 deletions(-) + +commit 924cf1af3c5e1aec1df680d50e4b9ae6dd8e0ba9 +Author: Aleksander Morgado +Date: Sat Aug 1 09:59:37 2020 +0200 + + api,modem: new 'SetPrimarySimSlot' method + + This new method allows changing the SIM slot considered as primary, + when the modem supports multiple SIM slots. + + The generic handling of this method will make sure that the modem + object and all its SIM objects are re-probed from scratch as soon as a + successful SIM slot switch happens. + + Implementations may report MM_CORE_ERROR_EXISTS when the switch + doesn't need to happen (e.g. if the requested SIM slot is already the + active one). + + cli/mmcli-modem.c | 51 ++++++++++ + docs/man/mmcli.1 | 6 ++ + docs/reference/libmm-glib/libmm-glib-sections.txt | 7 ++ + .../org.freedesktop.ModemManager1.Modem.xml | 18 ++++ + libmm-glib/mm-modem.c | 87 ++++++++++++++++ + libmm-glib/mm-modem.h | 13 +++ + src/mm-iface-modem.c | 112 + +++++++++++++++++++++ + src/mm-iface-modem.h | 9 ++ + 8 files changed, 303 insertions(+) + +commit 5041b9c99b8587185b629715e3466d31a619abf3 +Author: Aleksander Morgado +Date: Sat Aug 1 09:59:33 2020 +0200 + + mmcli: also lookup SIM objects in the 'SimSlots' property + + If the device supports multiple SIM slots, when the user provides a + PATH or INDEX of a SIM card to use, don't look for the SIM object only + in the 'Sim' property, also look for it in the 'SimSlots' property. + + cli/mmcli-common.c | 102 + ++++++++++++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 97 insertions(+), 5 deletions(-) + +commit e20eebff473c37868b528f5031809c18645309ac +Author: Aleksander Morgado +Date: Sat Aug 1 09:59:30 2020 +0200 + + base-modem: SIM switch handling at base modem level + + When the SIM switch doesn't happen as part of an async hot swap + detection, we should trigger the switch handling at base modem level, + which e.g. doesn't require explicit cleanup of the SIM hot swap + detection port context. + + src/mm-base-modem.c | 22 ++++++++++++++++++++++ + src/mm-base-modem.h | 2 ++ + src/mm-broadband-modem.c | 19 +------------------ + 3 files changed, 25 insertions(+), 18 deletions(-) + +commit e7409b689876488594409e945687486adb1d9514 +Author: Aleksander Morgado +Date: Sat Aug 1 09:59:27 2020 +0200 + + api,modem: new 'SimSlots' and 'PrimarySimSlot' properties + + The 'SimSlots' property exposes an array of SIM object paths, with one + array item for each available SIM slot in the system. If a valid SIM + card is found in a given slot, the path of the SIM object will be + exposed in the array item; if no valid SIM card is found, the empty + object path ("/") will be exposed instead. + + The 'PrimarySimSlot' property exposes which of the SIM slots available + in the system is the one configured as being primary. In a Multi-SIM + Single-Standby setup, the primary slot will be the one corresponding + to the single active SIM in the system. In a Multi-SIM Multi-Standby + setup, the primary slot will be the one configured to act as primary + (e.g. the one that will be used for the data connection) among all the + active SIM cards found. + + cli/mmcli-modem.c | 2 + + cli/mmcli-output.c | 35 ++- + cli/mmcli-output.h | 20 +- + docs/reference/libmm-glib/libmm-glib-sections.txt | 11 + + .../org.freedesktop.ModemManager1.Modem.xml | 47 ++- + libmm-glib/mm-modem.c | 316 + +++++++++++++++++++++ + libmm-glib/mm-modem.h | 16 ++ + src/mm-broadband-modem.c | 14 + + src/mm-iface-modem.c | 94 +++++- + src/mm-iface-modem.h | 11 + + src/mm-private-boxed-types.c | 29 ++ + src/mm-private-boxed-types.h | 3 + + 12 files changed, 587 insertions(+), 11 deletions(-) + +commit b2979c63eb2d724512c7a96c071f3d4b422e79cb +Author: Aleksander Morgado +Date: Sat Aug 1 09:59:24 2020 +0200 + + base-sim: allow explicit wait for SIM readiness during initialization + + Before attempting to load any SIM property value, allow checking + whether the SIM is ready for operation or not. + + This action is implicitly done by the "unlock required check" step + that is triggered before initializing the primary SIM card, but it + would not be done when initializing other available SIM cards. + + src/mm-base-sim.c | 30 ++++++++++++++++++++++++++++++ + src/mm-base-sim.h | 8 ++++++++ + 2 files changed, 38 insertions(+) + +commit 18084f89394491d4a363a90354000c55af1490c8 +Author: Aleksander Morgado +Date: Sat Aug 1 09:59:21 2020 +0200 + + base-sim: allow creating preinitialized SIM objects + + The default SIM creation method will attempt to initialize the SIM + properties during the object creation. + + This new method allows creating SIM objects with already known + property values, and therefore not explicitly running the + asynchronous initialization process. + + src/mm-base-sim.c | 29 +++++++++++++++++++++++++++++ + src/mm-base-sim.h | 9 +++++++++ + 2 files changed, 38 insertions(+) + +commit c999c8e9cf54a6ef34b16325c32a03aa1e31db2d +Author: Aleksander Morgado +Date: Sat Aug 1 09:59:19 2020 +0200 + + base-sim: new 'slot number' property + + This new property helps us identify in which SIM slot the SIM card is + inserted, when multiple slots are available, in the [1,N] range. + + For the single-SIM systems this value will always be '0'. + + This property is not publicly exposed in DBus, it is considered an + implementation detail. + + src/mm-base-sim.c | 25 +++++++++++++++++++++++++ + src/mm-base-sim.h | 9 ++++++--- + 2 files changed, 31 insertions(+), 3 deletions(-) + +commit 842ad4bd64404e4a98d089c9a8fa60715c7018c6 +Author: Aleksander Morgado +Date: Sat Aug 1 09:59:16 2020 +0200 + + base-sim: only allow operations on active SIMs + + If a SIM is inactive we cannot perform any SIM-PIN or SIM-PUK related + operation with it. + + src/mm-base-sim.c | 56 + +++++++++++++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 48 insertions(+), 8 deletions(-) + +commit 86a183778b5b123f6556ecbe53ec7d06d6e7c575 +Author: Aleksander Morgado +Date: Sat Aug 1 09:59:13 2020 +0200 + + api,sim: new 'Active' property + + In preparation for the multi-SIM setup, we need a way to tell whether + a given SIM card is active or not in the system. + + On systems with one single SIM slot, the available SIM card will + always be active. + + On Multi-SIM Single-Standby setups we may have multiple SIM slots with + multiple SIM cards, but only one of them will be active at any given + time. + + On Multi-SIM Multi-Standby setups we may have multiple SIM slots with + multiple SIM cards that may be active at the same time. E.g. the QMI + protocol allows up to 5 different active SIM cards (primary, + secondary, tertiary...). + + cli/mmcli-output.c | 1 + + cli/mmcli-output.h | 1 + + cli/mmcli-sim.c | 1 + + docs/reference/libmm-glib/libmm-glib-sections.txt | 3 +++ + introspection/org.freedesktop.ModemManager1.Sim.xml | 13 +++++++++++++ + libmm-glib/mm-sim.c | 20 + ++++++++++++++++++++ + libmm-glib/mm-sim.h | 2 ++ + plugins/huawei/mm-sim-huawei.c | 1 + + plugins/iridium/mm-sim-iridium.c | 1 + + plugins/mbm/mm-sim-mbm.c | 1 + + plugins/nokia/mm-sim-nokia.c | 1 + + plugins/novatel/mm-sim-novatel-lte.c | 1 + + plugins/pantech/mm-sim-pantech.c | 1 + + plugins/sierra/mm-sim-sierra.c | 1 + + plugins/ublox/mm-sim-ublox.c | 1 + + src/mm-base-sim.c | 1 + + src/mm-sim-mbim.c | 1 + + src/mm-sim-qmi.c | 1 + + 18 files changed, 52 insertions(+) + +commit 48973e3d72307ca84375d1c7811eb0b04def91ce +Author: David Leonard +Date: Wed Aug 26 14:37:10 2020 +1000 + + sms: fix CMDA SMS UTF-8 translation + + Fixes incoming SMS translation issue seen on MC7354 when translating + contents from Latin-1 encoding to UTF-8, because the encoding + parameter + "ISO−8859−1" used U+2212 (MINUS SIGN) instead of U+002D + (HYPHEN-MINUS). + + [mm-sms-part-cdma.c:873] read_bearer_data_user_data(): + text/data: ignored (latin to UTF-8 conversion error): 0: + Conversion from character set 'ISO−8859−1' to 'UTF-8' is + not supported + + Fix thanks to Peter Hunt + + src/mm-sms-part-cdma.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 599f545c0d905505516c6546ff77caced2aa14f1 +Author: Aleksander Morgado +Date: Thu Aug 20 12:18:05 2020 +0200 + + sms-part-3gpp: allow sending UTF-16 as if it were UCS-2 + + Despite 3GPP TS 23.038 specifies that Unicode SMS messages are + encoded in UCS-2, UTF-16 encoding is commonly used instead on many + modern platforms to allow encoding code points that fall outside the + Basic Multilingual Plane (BMP), such as Emoji. + + Update the logic to always use UTF-16 instead of UCS-2 when creating + or parsing PDUs (even if we always report as sending or receiving + UCS-2). For all purposes, UCS-2 is considered a subset of UTF-16 + (assuming that code points out of the [U+0000,U+D7FF] and + [U+E000,U+FFFF] ranges are not applicable in UCS-2). + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/250 + + src/mm-sms-part-3gpp.c | 159 + +++++++++++++++++++++-------------------- + src/mm-sms-part.h | 18 ++++- + src/tests/test-sms-part-3gpp.c | 78 ++++++++++++++++---- + 3 files changed, 165 insertions(+), 90 deletions(-) + +commit 81162df15dc9a409d0979ff8d472a026f31ed883 +Author: Aleksander Morgado +Date: Thu Aug 20 11:32:18 2020 +0200 + + charsets: refactor coding style + + Mostly to use GLib types like gchar or gint, and also to use + G_N_ELEMENTS() instead of custom end of array terminating items. + + src/mm-charsets.c | 290 + ++++++++++++++++++++++++++++-------------------------- + src/mm-charsets.h | 42 ++++---- + 2 files changed, 170 insertions(+), 162 deletions(-) + +commit eb5443b197464e55c85d7a8af67a28f2088506a3 +Author: Aleksander Morgado +Date: Thu Aug 20 10:58:24 2020 +0200 + + charsets: add UTF-16BE as a possible modem charset + + Just as an implementation detail to be taken as an extension of + UCS2BE, never really to be used as a real modem charset. + + src/mm-charsets.c | 16 ++++++++++++++-- + src/mm-charsets.h | 3 ++- + src/tests/test-charsets.c | 18 ++++++++++-------- + 3 files changed, 26 insertions(+), 11 deletions(-) + +commit 93686510d737bc373100beaeeb3edb7ca091a3f0 +Author: Aleksander Morgado +Date: Thu Aug 20 10:57:01 2020 +0200 + + sms-part-3gpp: minor refactor in text split logic + + src/mm-sms-part-3gpp.c | 167 + ++++++++++++++++++++++++++++--------------------- + 1 file changed, 94 insertions(+), 73 deletions(-) + +commit d43d595c0270ff5fdbe62626679493d97824c668 +Author: Aleksander Morgado +Date: Wed Aug 19 14:55:41 2020 +0200 + + broadband-modem-qmi: avoid unused functions + + Only applicable when building with WITH_NEWEST_QMI_COMMANDS. + + mm-broadband-modem-qmi.c:4741:1: error: + ‘common_enable_disable_unsolicited_events_signal_strength’ + defined but not used [-Werror=unused-function] + 4741 | common_enable_disable_unsolicited_events_signal_strength + (GTask *task) + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + mm-broadband-modem-qmi.c:4528:1: error: + ‘serving_system_indication_cb’ defined but not used + [-Werror=unused-function] + 4528 | serving_system_indication_cb (QmiClientNas *client, + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ + mm-broadband-modem-qmi.c:3468:1: error: + ‘common_enable_disable_unsolicited_registration_events_serving_system’ + defined but not used [-Werror=unused-function] + 3468 | + common_enable_disable_unsolicited_registration_events_serving_system + (GTask *task) + | + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + mm-broadband-modem-qmi.c:2812:1: error: + ‘get_serving_system_3gpp_ready’ defined but not used + [-Werror=unused-function] + 2812 | get_serving_system_3gpp_ready (QmiClientNas *client, + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + mm-broadband-modem-qmi.c:1652:1: error: + ‘get_signal_strength_ready’ defined but not used + [-Werror=unused-function] + 1652 | get_signal_strength_ready (QmiClientNas *client, + + src/mm-broadband-modem-qmi.c | 23 ++++++++++++++++++----- + 1 file changed, 18 insertions(+), 5 deletions(-) + +commit 9b8fb447b0b2b967fe7fbb980ed2debd12be67ed +Author: Aleksander Morgado +Date: Wed Aug 19 14:48:12 2020 +0200 + + broadband-modem-qmi: fix type comparison + + Only applicable when building with WITH_NEWEST_QMI_COMMANDS. + + mm-broadband-modem-qmi.c: In function ‘process_common_info’: + mm-broadband-modem-qmi.c:2924:20: error: comparison is always + false due to limited range of data type [-Werror=type-limits] + 2924 | if (mnc[2] == 0xFF) { + | ^~ + + src/mm-broadband-modem-qmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 65f56122b53f52dfd9b5ffdcce53d829d80b31e7 +Author: Aleksander Morgado +Date: Wed Aug 19 14:59:01 2020 +0200 + + ci: add build test for WITH_NEWEST_QMI_COMMANDS + + We keep this logic around, so lets add a build test as well. + + .gitlab-ci.yml | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +commit 5346d3c55c7ffc38af58c879fd426a2c3accd489 +Author: carlyin +Date: Sun Aug 16 16:55:25 2020 +0800 + + quectel: add port type hints for the Quectel 5G RM500 + + plugins/quectel/77-mm-quectel-port-types.rules | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit de23b53ee4d91367b50a960f8b19b2e29449e49a +Author: Aleksander Morgado +Date: Sun Aug 16 11:13:26 2020 +0200 + + modem-helpers: ensure error is set in + mm_3gpp_parse_cpms_test_response() + + If splitting the +CPMS=? response in groups fails, make sure we set + the GError when returning FALSE. + + src/mm-modem-helpers.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit 55ae47a3bb874991ca621e4aa17cf16b08d28139 +Author: Aleksander Morgado +Date: Sun Aug 16 11:06:57 2020 +0200 + + quectel: add udev rules unit tester + + plugins/Makefile.am | 5 +++-- + plugins/tests/test-udev-rules.c | 11 +++++++++++ + 2 files changed, 14 insertions(+), 2 deletions(-) + +commit d9a64c74ff0244b96a44fa27abcdc411d29f4874 +Author: root +Date: Thu Aug 13 11:25:59 2020 +0800 + + quectel: allow MBIM devices + + plugins/quectel/mm-plugin-quectel.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +commit 7cd373589cb7d81633a5df279e0b63c405cc2bb6 +Author: Aleksander Morgado +Date: Tue Aug 4 16:33:11 2020 +0200 + + bearer-qmi: if connection aborted, ensure network handles are released + + If the connection attempt is aborted before finishing (either network + triggered or user triggered), we need to make sure that we run a 'Stop + Network' request for every 'Start Network' that had succeeded until + then, or otherwise we'll no longer be able to re-run a 'Start Network' + with the same settings and get a proper packet data handle. + + E.g. in this sequence we attempt a IPv4v6 connection. The logic starts + setting up the IPv4 path: + + Wed Jul 29 14:44:06 2020 daemon.info [1567]: Modem + /org/freedesktop/ModemManager1/Modem/0: state changed (registered + -> connecting) + Wed Jul 29 14:44:06 2020 daemon.debug [1567]: Launching + connection with QMI port (usb/cdc-wdm0) and data port (net/wwan0) + Wed Jul 29 14:44:06 2020 daemon.debug [1567]: Defaulting + to use static IP method + Wed Jul 29 14:44:06 2020 daemon.debug [1567]: Running + IPv4 connection setup + ... + + The 'Start Network' for IPv4 succeeds and we get a proper packet data + handle: + + Wed Jul 29 14:44:07 2020 daemon.debug [1567]: [/dev/cdc-wdm0] + sent generic request (translated)... <<<<<< QMUX: <<<<<< length + = 23 <<<<<< flags = 0x00 <<<<<< service = "wds" <<<<<< + client = 20 <<<<<< QMI: <<<<<< flags = "none" <<<<<< + transaction = 3075 <<<<<< tlv_length = 11 <<<<<< message + = "Start Network" (0x0020) <<<<<< TLV: <<<<<< type = + "APN" (0x14) <<<<<< length = 8 <<<<<< value = + 69:6E:74:65:72:6E:65:74 <<<<<< translated = internet + Wed Jul 29 14:44:07 2020 daemon.debug [1567]: [/dev/cdc-wdm0] + received generic response (translated)... <<<<<< QMUX: <<<<<< + length = 26 <<<<<< flags = 0x80 <<<<<< service = + "wds" <<<<<< client = 20 <<<<<< QMI: <<<<<< flags = + "response" <<<<<< transaction = 3075 <<<<<< tlv_length = + 14 <<<<<< message = "Start Network" (0x0020) <<<<<< TLV: + <<<<<< type = "Result" (0x02) <<<<<< length = 4 + <<<<<< value = 00:00:00:00 <<<<<< translated = SUCCESS + <<<<<< TLV: <<<<<< type = "Packet Data Handle" (0x01) + <<<<<< length = 4 <<<<<< value = 80:CD:AD:81 <<<<<< + translated = 2175651200 + + Then, we start the IPv6 connection path: + Wed Jul 29 14:44:07 2020 daemon.debug [1567]: Running + IPv6 connection setup + ... + + But, because we suddenly are not registered in the network, the + connection is aborted, and we don't cleanup the IPv4 path at this + point, as this patch wasn't available. + + Wed Jul 29 14:44:07 2020 daemon.debug [1567]: Bearer + not allowed to connect, not registered in 3GPP network + Wed Jul 29 14:44:07 2020 daemon.debug [1567]: Forcing + disconnection of bearer '/org/freedesktop/ModemManager1/Bearer/56' + Wed Jul 29 14:44:07 2020 daemon.debug [1567]: transaction 0xe1 + aborted, but message is not abortable + Wed Jul 29 14:44:07 2020 daemon.info [1567]: Modem + /org/freedesktop/ModemManager1/Modem/0: state changed (connecting + -> enabled) + Wed Jul 29 14:44:07 2020 daemon.debug [1567]: Couldn't + connect bearer '/org/freedesktop/ModemManager1/Bearer/56': + 'operation cancelled' + + We then attempt a new connection request with the same settings: + + Wed Jul 29 14:44:22 2020 daemon.info [1567]: Modem + /org/freedesktop/ModemManager1/Modem/0: state changed (registered + -> connecting) + Wed Jul 29 14:44:22 2020 daemon.debug [1567]: Launching + connection with QMI port (usb/cdc-wdm0) and data port (net/wwan0) + Wed Jul 29 14:44:22 2020 daemon.debug [1567]: Defaulting + to use static IP method + Wed Jul 29 14:44:22 2020 daemon.debug [1567]: Running + IPv4 connection setup + + And we see how the 'Start Network' command fails with a 'No Effect' + error, as the IPv4 was left connected earlier. Due to this, the modem + is assumed connected, but we won't have a valid packet data handle to + stop the connection cleanly: + + Wed Jul 29 14:44:22 2020 daemon.debug [1567]: [/dev/cdc-wdm0] + sent generic request (translated)... <<<<<< QMUX: <<<<<< length + = 23 <<<<<< flags = 0x00 <<<<<< service = "wds" <<<<<< + client = 20 <<<<<< QMI: <<<<<< flags = "none" <<<<<< + transaction = 3080 <<<<<< tlv_length = 11 <<<<<< message + = "Start Network" (0x0020) <<<<<< TLV: <<<<<< type = + "APN" (0x14) <<<<<< length = 8 <<<<<< value = + 69:6E:74:65:72:6E:65:74 <<<<<< translated = internet + Wed Jul 29 14:44:23 2020 daemon.debug [1567]: [/dev/cdc-wdm0] + received generic response (translated)... <<<<<< QMUX: <<<<<< + length = 26 <<<<<< flags = 0x80 <<<<<< service = + "wds" <<<<<< client = 20 <<<<<< QMI: <<<<<< flags = + "response" <<<<<< transaction = 3080 <<<<<< tlv_length = + 14 <<<<<< message = "Start Network" (0x0020) <<<<<< TLV: + <<<<<< type = "Result" (0x02) <<<<<< length = 4 + <<<<<< value = 01:00:1A:00 <<<<<< translated = FAILURE: + NoEffect <<<<<< TLV: <<<<<< type = "Packet Data Handle" + (0x01) <<<<<< length = 4 <<<<<< value = 00:00:00:00 + <<<<<< translated = 0 + + src/mm-bearer-qmi.c | 65 + +++++++++++++++++++++++++++++++++++------------------ + 1 file changed, 43 insertions(+), 22 deletions(-) + +commit 16e3bb892d25e3cb7796889082943b073924a695 +Author: Aleksander Morgado +Date: Tue Aug 4 14:13:45 2020 +0200 + + iface-modem: avoid connection status flapping if briefly unregistered + + If the modem is connected and we receive indications of a quick + unregistration cycle (i.e. unregistered, then registered again) we + should not end up flagging the modem as disconnected. + + We already had some logic to avoid this with the "deferred 3GPP + unregistration" logic in the base bearer object, but this logic only + took into account the status of the bearer, not the status of the + modem. + + Wed Jul 29 15:35:44 2020 daemon.info [1567]: Modem + /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state + changed (home -> idle) + Wed Jul 29 15:35:44 2020 daemon.debug [1567]: Modem + /org/freedesktop/ModemManager1/Modem/0: 3GPP location updated + (MCC: '0', MNC: '0', Location area code: '0', Tracking area code: + '1CE8', Cell ID: '68F832') + Wed Jul 29 15:35:44 2020 daemon.debug [1567]: Connected + bearer not registered in 3GPP network + Wed Jul 29 15:35:44 2020 daemon.info [1567]: Modem + /org/freedesktop/ModemManager1/Modem/0: state changed (connected + -> enabled) + Wed Jul 29 15:35:44 2020 daemon.debug [1567]: Modem + /org/freedesktop/ModemManager1/Modem/0: signal quality updated (0) + Wed Jul 29 15:35:44 2020 daemon.debug [1567]: Modem + /org/freedesktop/ModemManager1/Modem/0: access technology changed + (lte -> unknown) + Wed Jul 29 15:35:44 2020 daemon.debug [1567]: Periodic + signal checks disabled + Wed Jul 29 15:35:44 2020 daemon.info [1567]: Modem + /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state + changed (idle -> registering) + Wed Jul 29 15:35:44 2020 daemon.debug [1567]: Modem + /org/freedesktop/ModemManager1/Modem/0: 3GPP location updated + (MCC: '0', MNC: '0', Location area code: '0', Tracking area code: + '1C84', Cell ID: 'A3E050') + Wed Jul 29 15:35:44 2020 daemon.debug [1567]: Modem + /org/freedesktop/ModemManager1/Modem/0: 3GPP location updated + (MCC: '238', MNC: '1', Location area code: '0', Tracking area + code: '1C84', Cell ID: 'A3E050') + Wed Jul 29 15:35:44 2020 daemon.info [1567]: Modem + /org/freedesktop/ModemManager1/Modem/0: 3GPP Registration state + changed (registering -> home) + Wed Jul 29 15:35:44 2020 daemon.info [1567]: Modem + /org/freedesktop/ModemManager1/Modem/0: state changed (enabled + -> registered) + + We now try to improve this situation by also considering the case + where modem is supposed to get into "enabled" state (i.e. not + registered, not searching), but we still consider the amount of + connected bearers to decide the final state reported by the modem. In + other words, a modem with the 3GPP registration reported as 'idle' + will still be reported as 'connected' if there is at least one bearer + in connected state. This situation will end as soon as the 'deferred + 3GPP unregistration' timeout expires, as that will force the bearer to + be disconnected. + + src/mm-iface-modem.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 2f684ce92ea9cc772a36db2e7bd9d48e677d3935 +Author: Giacinto Cifelli +Date: Tue Aug 11 14:26:13 2020 +0200 + + cinterion: remove limitation to IPv4 only PDP contexts + + There was a limitation in the past in the plugin, because one of + the steps + during the dial (CONNECT_3GPP_CONTEXT_STEP_PDP_CTX) was to + reconfigure a + specific CID hardcoding the IP type to IPv4. + + That logic was removed in commit + af2d6c1c4b7f815862313bf0f84b1ff0e91ccd60, + but we didn't remove the IPv4 limitation at that point. + + plugins/cinterion/mm-broadband-bearer-cinterion.c | 8 -------- + plugins/cinterion/mm-broadband-modem-cinterion.c | 7 ------- + 2 files changed, 15 deletions(-) + +commit a36beb0a958f65bcaa5939e04bf340d98d4180a1 +Author: Giacinto Cifelli +Date: Tue Aug 11 07:10:36 2020 +0200 + + cinterion: clarify role of the AT ports for the ELS61/PLS62 family + + plugins/cinterion/77-mm-cinterion-port-types.rules | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +commit e2ab49db0f5078716156c70a23f8f5d5b6d27848 +Author: Giacinto Cifelli +Date: Mon Jul 27 10:29:14 2020 +0200 + + cinterion: setup initial LTE parameters + + plugins/cinterion/mm-broadband-bearer-cinterion.c | 37 +- + plugins/cinterion/mm-broadband-bearer-cinterion.h | 7 + + plugins/cinterion/mm-broadband-modem-cinterion.c | 563 + ++++++++++++++++++++- + plugins/cinterion/mm-modem-helpers-cinterion.c | 52 ++ + plugins/cinterion/mm-modem-helpers-cinterion.h | 9 + + .../cinterion/tests/test-modem-helpers-cinterion.c | 66 +++ + 6 files changed, 722 insertions(+), 12 deletions(-) + +commit 28ad994e372dc58e474567c70adbb0f58022cb22 +Author: Aleksander Morgado +Date: Mon Aug 10 19:26:56 2020 +0200 + + sierra: XMM-specific features in XMM based modems (e.g. EM7345) + + We create XMM-based modems like the EM7345 with XMM-specific features + like the AT+XLCSLSR based GNSS support. E.g.: + + $ mmcli -m a --location-status + ------------------------ + Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, + agps-msa, agps-msb + | enabled: 3gpp-lac-ci + | signals: no + ------------------------ + GPS | refresh rate: 30 seconds + + $ sudo mmcli -m a --location-enable-gps-nmea + successfully setup location gathering + + $ sudo mmcli -m a --location-get + -------------------------- + 3GPP | operator code: 214 + | operator name: 7 + | location area code: 0000 + | tracking area code: 6FFE + | cell id: 0465CD20 + -------------------------- + GPS | nmea: $GPGSA,A,1,,,,,,,,,,,,,,,*1E + | $GNGSA,A,1,,,,,,,,,,,,,,,,1*1D + | $GNRMC,235951.000,V,,,,,,,,,,N,V*20 + | $GNVTG,,T,,M,,N,,K,N*32 + | $GNGGA,235951.000,,,,,0,0,,,M,,M,,*5F + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/25 + + configure.ac | 3 ++- + plugins/Makefile.am | 1 + + plugins/sierra/mm-plugin-sierra.c | 20 ++++++++++++++++++++ + 3 files changed, 23 insertions(+), 1 deletion(-) + +commit 422a9070c40c48847870cb2cf141fe102cd72cba +Author: Giacinto Cifelli +Date: Tue Aug 4 11:04:17 2020 +0200 + + cinterion: fixed cast from wrong object + + MM_BROADBAND_MODEM_CINTERION shall be applied to a *MMBaseModem + (ctx->modem here) + and not to a *MMBaseBearer (self here) + + plugins/cinterion/mm-broadband-bearer-cinterion.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 1620f04b9b1b3166c37ca7e9170322df1e185258 +Author: Aleksander Morgado +Date: Sat Aug 1 09:59:10 2020 +0200 + + mmcli,output: use 'path' instead of 'dbus path' in field descriptions + + cli/mmcli-output.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit 74dd28c4e31cca38d0b4c7ed034af4226566b404 +Author: Aleksander Morgado +Date: Sat Aug 1 09:59:05 2020 +0200 + + broadband-modem: minor method rename + + plugins/telit/mm-broadband-modem-telit.c | 2 +- + src/mm-broadband-modem-mbim.c | 2 +- + src/mm-broadband-modem.c | 4 ++-- + src/mm-broadband-modem.h | 2 +- + 4 files changed, 5 insertions(+), 5 deletions(-) + +commit 130ea74cc953e9029a9a1662a788048ac765a0b3 +Author: Aleksander Morgado +Date: Sat Aug 1 09:59:01 2020 +0200 + + iface-modem: move sim hot swap ready to correct place in sequence + + src/mm-iface-modem.c | 53 + +++++++++++++++++++++++++--------------------------- + 1 file changed, 25 insertions(+), 28 deletions(-) + +commit 4f1da8797213fb79856a5e8e1c6e6dca7236c2e0 +Author: Giacinto Cifelli +Date: Mon Jul 27 12:27:26 2020 +0200 + + cinterion: IMT family SGAUTH + + some ITM family modems require full parameters: + AT^SGAUTH=cid,type,user,pwd + even when type is AUTH_NONE. + Fortunately, all modules of the IMT family tolerate this syntax, + so it can be adopted for the entire family. + + plugins/cinterion/mm-broadband-bearer-cinterion.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit 07ac85e2f70706e377c2019b07ce29958c70668c +Author: Giacinto Cifelli +Date: Mon Jul 27 12:24:17 2020 +0200 + + cinterion: ignore ^SYSSTART urc + + plugins/cinterion/mm-broadband-modem-cinterion.c | 35 + ++++++++++++++++++++++++ + 1 file changed, 35 insertions(+) + +commit 408ec530e0442137194cf048de72183011fdc40b +Author: Giacinto Cifelli +Date: Mon Jul 27 06:23:52 2020 +0200 + + cinterion: extend SGAUTH syntax + + AT^SGAUTH syntax depends on the modem family: + AT^SGAUTH=cid,type,user,pwd for the IMT family + AT^SGAUTH=cid,type,pwd,user for the rest + + plugins/cinterion/mm-broadband-bearer-cinterion.c | 19 + +++++++++++++++++-- + plugins/cinterion/mm-broadband-modem-cinterion.c | 8 ++++++++ + plugins/cinterion/mm-broadband-modem-cinterion.h | 3 +++ + 3 files changed, 28 insertions(+), 2 deletions(-) + +commit cec6fe9cce4f7f49f941262d48d081e30f8ea444 +Author: Giacinto Cifelli +Date: Fri Jul 24 16:25:03 2020 +0200 + + cinterion: radio/band single scfg line: no variance + + the AT^SCFG="Radio/Band" command does not return a different answer + for different charsets. + This code was working previously because the charset was left to + default (GSM) + at the time of this operation, and therefore the string was unchanged + anyway. + + plugins/cinterion/mm-modem-helpers-cinterion.c | 13 ++----------- + plugins/cinterion/tests/test-modem-helpers-cinterion.c | 18 + ------------------ + 2 files changed, 2 insertions(+), 29 deletions(-) + +commit 4d58278d7ffd65375e93b0da85ca88c08cba96c2 +Author: Giacinto Cifelli +Date: Wed Jul 22 06:58:22 2020 +0200 + + changed default authentication algorithm to CHAP + + CHAP is almost universal nowadays, and so it is a better default + than PAP + + Not changed for uBlox, that prefers an error if not specified, + and for Huawei, which uses NONE with user/pwd and has 2 CHAP choices + + plugins/cinterion/mm-broadband-bearer-cinterion.c | 6 +++--- + plugins/huawei/mm-broadband-bearer-huawei.c | 12 ++++++------ + plugins/icera/mm-broadband-bearer-icera.c | 10 +++++----- + plugins/option/mm-broadband-bearer-hso.c | 10 +++++----- + plugins/sierra/mm-broadband-bearer-sierra.c | 10 +++++----- + plugins/ublox/mm-broadband-bearer-ublox.c | 4 ++-- + src/mm-bearer-qmi.c | 6 +++--- + src/mm-modem-helpers-mbim.c | 8 ++++---- + 8 files changed, 33 insertions(+), 33 deletions(-) + +commit c70b3557184fdf1472ff0cb36e9fd937cc7f9024 +Author: Sven Schwermer +Date: Fri Jul 3 15:16:26 2020 +0200 + + qmi: Network registration via SSSP if possible + + Doing the network registration via Set System Selection Preference is + preferable because it doesn't override the currently set allowed mode, + i.e. access technology. + + https://lists.freedesktop.org/archives/modemmanager-devel/2020-July/007972.html + + Signed-off-by: Sven Schwermer + + + src/mm-shared-qmi.c | 138 + +++++++++++++++++++++++++++++++++++++++------------- + 1 file changed, 105 insertions(+), 33 deletions(-) + +commit 47a28114baa2504c16bf2bca2325cefe426aea95 +Author: Justin Standring +Date: Thu Jul 16 13:21:23 2020 +1200 + + broadband-modem-qmi: fix -Wempty-body warning + + mm-broadband-modem-qmi.c: In function 'process_common_info': + mm-broadband-modem-qmi.c:2897:30: warning: suggest braces around + empty body in an 'if' statement [-Wempty-body] + /* both apply */ ; + ^ + + Signed-off-by: Justin Standring + + src/mm-broadband-modem-qmi.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 6ec12add1ba6625a8470ae3cf7b30cefcf28d503 +Author: Justin Standring +Date: Thu Jul 16 12:55:31 2020 +1200 + + broadband-modem-qmi: fix object logging with WITH_NEWEST_QMI_COMMANDS + + mm-broadband-modem-qmi.c: In function + 'common_signal_info_get_quality': + mm-broadband-modem-qmi.c:1469:21: error: 'self' undeclared (first + use in this function) + mm_obj_dbg (self, "RSSI (CDMA): %d dBm", cdma1x_rssi); + ^~~~ + mm-broadband-modem-qmi.c:1469:21: note: each undeclared identifier + is reported only once for each function it appears in + mm_obj_dbg (self, "RSSI (CDMA): %d dBm", cdma1x_rssi); + ^~~~ + mm-broadband-modem-qmi.c: In function 'process_gsm_info': + mm-broadband-modem-qmi.c:2992:25: error: 'self' undeclared (first + use in this function) + mm_obj_dbg (self, "no GSM service reported"); + ^~~~ + mm-broadband-modem-qmi.c: In function 'process_wcdma_info': + mm-broadband-modem-qmi.c:3100:25: error: 'self' undeclared (first + use in this function) + mm_obj_dbg (self, "no WCDMA service reported"); + ^~~~ + mm-broadband-modem-qmi.c: In function 'process_lte_info': + mm-broadband-modem-qmi.c:3209:25: error: 'self' undeclared (first + use in this function) + mm_obj_dbg (self, "no LTE service reported"); + ^~~~ + mm-broadband-modem-qmi.c: In function 'config_signal_info_ready': + mm-broadband-modem-qmi.c:4890:21: error: 'self' undeclared (first + use in this function) + mm_obj_dbg (self, "QMI operation failed: '%s'", + error->message); + ^~~~ + + Signed-off-by: Justin Standring + + src/mm-broadband-modem-qmi.c | 30 +++++++++++++++++++----------- + 1 file changed, 19 insertions(+), 11 deletions(-) + +commit e98bc7cc0803595db8eb498817fb0d5f99d25813 +Author: Aleksander Morgado +Date: Wed Jul 8 11:40:41 2020 +0200 + + broadband-modem-qmi: fix parsing of USSD indications with UTF-16 data + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/240 + + src/mm-broadband-modem-qmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit a131c6953a0a24a6ed8c365cb5e398fa5e52afcf +Author: Aleksander Morgado +Date: Mon Jul 6 16:53:08 2020 +0200 + + cinterion: quote user/password strings in AT^SGAUTH calls + + The ELS61 doesn't like authentication given without quotes: + [modem3/ttyACM1/at] --> 'AT^SGAUTH=8,1,tm,t-mobile' + [modem3/ttyACM1/at] <-- '+CME ERROR: 4' + + Only when user/pass strings are quoted it works: + [modem6/ttyACM1/at] --> 'AT^SGAUTH=8,1,"t-mobile","tm"' + [modem6/ttyACM1/at] <-- 'OK' + + plugins/cinterion/mm-broadband-bearer-cinterion.c | 17 +++++++++++------ + 1 file changed, 11 insertions(+), 6 deletions(-) + +commit 0a89a9ae4ee62ba36b616fc444a866d61c203696 +Author: Aleksander Morgado +Date: Mon Jul 6 16:23:57 2020 +0200 + + cinterion: if user OR password given, don't set the other as (null) + + [modem2/ttyACM1/at] --> 'AT^SGAUTH=8,1,t-d1,(null)' + [modem2/ttyACM1/at] <-- '+CME ERROR: 4' + + We should use an empty string instead. + + plugins/cinterion/mm-broadband-bearer-cinterion.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit e933fe14130b20785b6ddd2993a8fc982976c7af +Author: Aleksander Morgado +Date: Thu Jun 25 18:43:57 2020 +0200 + + cinterion: increase SWWAN connection attempt timeout + + It's critical not to timeout early on devices with AT ports, or we may + end up flagging the modem as invalid. + + ModemManager[26829]: [1593097973.552712] [modem1/ttyACM0/at] + --> 'AT^SWWAN=1,2,1' + .... + ModemManager[26829]: [1593098064.195217] [modem1] couldn't + connect bearer: Serial command timed out + .... + ModemManager[26829]: [1593098091.167987] [modem1] port + ttyACM0 timed out 10 consecutive times, marking modem as invalid + + plugins/cinterion/mm-broadband-bearer-cinterion.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit bdbd0fc049f7e818b8ac29285bcbf187d9a0b8ed +Author: Aleksander Morgado +Date: Sat Jul 4 06:08:40 2020 +0200 + + iface-modem-signal: port skeleton update logic to use g_autoptr + + src/mm-iface-modem-signal.c | 112 + +++++++++++++++++--------------------------- + 1 file changed, 44 insertions(+), 68 deletions(-) + +commit 3d138f9f80823d2caafbc5117329b43472fe7d45 +Author: Aleksander Morgado +Date: Sat Jul 4 06:02:37 2020 +0200 + + iface-modem-signal: remove unneeded skeleton clear attempt + + It won't do anything because clear_values() tries to get the skeleton + from the modem object, and the skeleton hasn't been set at that point. + + src/mm-iface-modem-signal.c | 1 - + 1 file changed, 1 deletion(-) + +commit c79dcf794041724b5504a9576b07c1e53ca0affb +Author: Aleksander Morgado +Date: Sat Jul 4 05:47:25 2020 +0200 + + cinterion,signal: ^SMONI=? support check may be cached + + plugins/cinterion/mm-broadband-modem-cinterion.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit ee262a473dcfd5702f66c532d42285c2763bad11 +Author: Aleksander Morgado +Date: Sat Jul 4 05:46:56 2020 +0200 + + cinterion,signal: report error from parent signal support check + + plugins/cinterion/mm-broadband-modem-cinterion.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +commit 2cb8e5ef5d30330442af152fa7d65ec7cc612e89 +Author: Aleksander Morgado +Date: Sat Jul 4 05:45:28 2020 +0200 + + cinterion,signal: minor coding style fixes + + plugins/cinterion/mm-broadband-modem-cinterion.c | 17 ++++++++--------- + 1 file changed, 8 insertions(+), 9 deletions(-) + +commit 900f318d535f5775a544ae8b1551efb931460392 +Author: Aleksander Morgado +Date: Sat Jul 4 06:32:04 2020 +0200 + + docs,libmm-glib: add missing nr5g methods in signal interface + + docs/reference/libmm-glib/libmm-glib-sections.txt | 3 +++ + 1 file changed, 3 insertions(+) + +commit 6f6c09007667828d70708cedc04bbb9b680504ec +Author: Aleksander Morgado +Date: Sat Jul 4 05:55:17 2020 +0200 + + broadband-modem: remove misleading comment + + 5GNR is not 3GPP2 + + src/mm-broadband-modem.c | 1 - + 1 file changed, 1 deletion(-) + +commit 24670498bc1431388d670f07284e3a1c339b08fc +Author: Aleksander Morgado +Date: Sat Jul 4 05:53:43 2020 +0200 + + broadband-modem-qmi: minor alignment updates + + src/mm-broadband-modem-qmi.c | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +commit 10ee7f4cd9d8af46822959fc84055bac45f5c56b +Author: Aleksander Morgado +Date: Sat Jul 4 05:37:59 2020 +0200 + + mbim,signal: make sure output pointers are always set + + E.g. if 'gsm' pointer is given, make sure it's always set (either to a + MMSignal or to NULL). + + src/mm-broadband-modem-mbim.c | 27 ++++++++------------------- + 1 file changed, 8 insertions(+), 19 deletions(-) + +commit 0dd1f122221aae8d4c5b16802f5f47601ff99e10 +Author: Aleksander Morgado +Date: Sat Jul 4 05:35:00 2020 +0200 + + mbim,signal: provide 5G signal info if loaded by parent implementation + + src/mm-broadband-modem-mbim.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +commit 88923ffe3996fdef83dc13a7a4762855af77706d +Author: Walter Hagstrom +Date: Tue Jun 23 11:14:43 2020 -0400 + + iface-modem-signal: added 5G signal information + + Extended the ModemManager Signal interface to include 5G signal + information for RSRP, RSRQ and SINR via libqmi. Also extended mmci + to print 5G signal info. + + cli/mmcli-modem-signal.c | 16 ++++++ + cli/mmcli-output.c | 4 ++ + cli/mmcli-output.h | 4 ++ + docs/reference/libmm-glib/libmm-glib-sections.txt | 2 + + .../org.freedesktop.ModemManager1.Modem.Signal.xml | 38 +++++++++++++ + libmm-glib/mm-modem-signal.c | 62 + +++++++++++++++++++++- + libmm-glib/mm-modem-signal.h | 3 ++ + plugins/cinterion/mm-broadband-modem-cinterion.c | 5 +- + plugins/huawei/mm-broadband-modem-huawei.c | 3 ++ + plugins/xmm/mm-shared-xmm.c | 3 ++ + plugins/xmm/mm-shared-xmm.h | 1 + + src/mm-broadband-modem-mbim.c | 6 ++- + src/mm-broadband-modem-qmi.c | 54 + +++++++++++++------ + src/mm-broadband-modem.c | 4 ++ + src/mm-iface-modem-signal.c | 12 +++++ + src/mm-iface-modem-signal.h | 1 + + 16 files changed, 198 insertions(+), 20 deletions(-) + +commit 711b17278edecbc474418ecf95e7582f515711cb +Author: Aleksander Morgado +Date: Sat Jul 4 05:29:36 2020 +0200 + + build: require 5G signal info support from libqmi 1.27.1 + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 6df9cc084489a3aa8ab06b1e87f597b96dc79ffa +Author: Adrien Plazas +Date: Fri Jul 3 08:26:57 2020 +0200 + + plugin: define an autofree value to NULL + + This satisfies -Werror=maybe-uninitialized. + + src/mm-plugin.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit fff47478cc5887176830a5debe2c4204434c222f +Author: Daniele Palmas +Date: Thu Jul 2 13:09:19 2020 +0200 + + telit: added port type hints for default MEx10G1 composition + + While at this change also the previous generic reference to ME910 + in order to differentiate between ME910C1 (based on MDM9206) and + MEx10G1 (based on MDM9205). + + plugins/telit/77-mm-telit-port-types.rules | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +commit 23f8b580c3f394c10404ea346202cbe8997026db +Author: Aleksander Morgado +Date: Tue Jun 30 13:11:17 2020 +0200 + + quectel,shared: implement custom time support check + + We require CTZU=3 during the time support check, instead of CTZU=1, so + that the Quectel modem reports localtime instead of UTC time in +CCLK. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/233 + + plugins/quectel/mm-broadband-modem-qmi-quectel.c | 15 ++++++++-- + plugins/quectel/mm-broadband-modem-quectel.c | 14 ++++++++-- + plugins/quectel/mm-shared-quectel.c | 35 + +++++++++++++++++++++++- + plugins/quectel/mm-shared-quectel.h | 10 ++++++- + 4 files changed, 68 insertions(+), 6 deletions(-) + +commit ffca45d9cc416879881b75fb93880aee8c7563d2 +Author: Aleksander Morgado +Date: Mon Jun 29 10:46:47 2020 +0200 + + quectel,shared: add GPS trace handler + + plugins/quectel/mm-shared-quectel.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +commit 70b7218b7b303ba01f0be20ee14f1e4186884f79 +Author: Aleksander Morgado +Date: Mon Jun 29 10:23:37 2020 +0200 + + huawei: only flag GPS source as enabled if it was successful + + plugins/huawei/mm-broadband-modem-huawei.c | 22 ++++++++++++++-------- + 1 file changed, 14 insertions(+), 8 deletions(-) + +commit af8afcc6c9fd6eb6b88d43c88dee013d4a02c0cf +Author: Aleksander Morgado +Date: Mon Jun 29 10:13:44 2020 +0200 + + quectel,shared: only flag GPS source as enabled if it was successful + + plugins/quectel/mm-shared-quectel.c | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +commit 619b054e5c874844a73594a724b4e5ce5ec18b6d +Author: Aleksander Morgado +Date: Mon Jun 29 10:06:18 2020 +0200 + + libmm-glib,location: avoid warnings when no traces available + + ModemManager[201411]: + [1593417744.011884] [modem0/ttyUSB1/gps] <-- + '$GPVTG,,T,,M,,N,,K,N*2C$GPGSA,A,1,,,,,,,,,,,,,,,*1E$GPGGA,,,,,,0,,,,,,,,*66$GPRMC,,V,,,,,,,,,,N*53' + + (ModemManager:201411): GLib-CRITICAL **: 10:02:24.054: g_strjoinv: + assertion 'str_array != NULL' failed + + Thread 1 "ModemManager" received signal SIGTRAP, Trace/breakpoint + trap. + 0x00007ffff7832473 in g_logv () from /usr/lib/libglib-2.0.so.0 + (gdb) bt + #0 0x00007ffff7832473 in g_logv () at /usr/lib/libglib-2.0.so.0 + #1 0x00007ffff78326f0 in g_log () at /usr/lib/libglib-2.0.so.0 + #2 0x00007ffff7846b5e in g_strjoinv () at + /usr/lib/libglib-2.0.so.0 + #3 0x00007ffff7ee9663 in mm_location_gps_nmea_get_string_variant + (self=0x5555557dde50) at mm-location-gps-nmea.c:246 + #4 0x00005555555e7c47 in build_location_dictionary (previous=0x0, + location_3gpp=0x55555573e660, location_gps_nmea=0x5555557dde50, + location_gps_raw=0x0, location_cdma_bs=0x0) + at mm-iface-modem-location.c:183 + ... + (gdb) fr 3 + #3 0x00007ffff7ee9663 in mm_location_gps_nmea_get_string_variant + (self=0x5555557dde50) at mm-location-gps-nmea.c:246 + 246 built = g_strjoinv ("\r\n", traces); + (gdb) p traces + $1 = (GStrv) 0x0 + + libmm-glib/mm-location-gps-nmea.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 60211b51b112db23c07dfd62dd6336a964a287e0 +Author: Aleksander Morgado +Date: Mon Jun 29 09:57:28 2020 +0200 + + quectel,shared: use QGPS=? test to check capabilities + + plugins/quectel/mm-shared-quectel.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 58dbb68fa0c0a30d33d93969016f39880b142920 +Author: Aleksander Morgado +Date: Sun Jun 28 15:05:14 2020 +0200 + + quectel,qmi: add QGPS based fallback support + + plugins/quectel/mm-broadband-modem-qmi-quectel.c | 28 + ++++++++++++++++++++++-- + 1 file changed, 26 insertions(+), 2 deletions(-) + +commit 78d19c10ba50bbe6525e7f58d28e96e3e4614d86 +Author: Aleksander Morgado +Date: Sun Jun 28 14:57:49 2020 +0200 + + quectel,shared: port GPS enabling to use AT sequence + + plugins/quectel/mm-shared-quectel.c | 101 + ++++++++++++++---------------------- + 1 file changed, 38 insertions(+), 63 deletions(-) + +commit 41ba7d667ab7b6e7161a96b559823c832a3b8ba5 +Author: Aleksander Morgado +Date: Sun Jun 28 14:41:47 2020 +0200 + + huawei: simplify GPS stop logic + + The NMEA data port is closed right before stopping the engine. + + plugins/huawei/mm-broadband-modem-huawei.c | 69 + +++++++++++++----------------- + 1 file changed, 29 insertions(+), 40 deletions(-) + +commit aa4851ed03932fed5e4401e6d3e8c4fa0a20f589 +Author: Aleksander Morgado +Date: Sun Jun 28 14:22:24 2020 +0200 + + huawei: port GPS enabling to use AT sequence + + plugins/huawei/mm-broadband-modem-huawei.c | 143 + +++++++++++------------------ + 1 file changed, 53 insertions(+), 90 deletions(-) + +commit bbca65d682d6de03ba199a5a0a5c388e90e2764c +Author: Aleksander Morgado +Date: Sun Jun 28 11:43:51 2020 +0200 + + quectel,shared: skip QGPS? check after enabling/disabling failures + + If any enabling/disabling command fails, we consider the operation + failed, regardless of the QGPS status. This is because e.g. enabling + involves more operations than just QGPS=1, and so we should treat a + failure in the command sequence as a failure in the whole operation. + + plugins/quectel/mm-shared-quectel.c | 290 + ++++++++++++------------------------ + 1 file changed, 96 insertions(+), 194 deletions(-) + +commit bbfc10d7c5246b120e71143f59e1ea66e052a018 +Author: Aleksander Morgado +Date: Sun Jun 28 11:38:48 2020 +0200 + + huawei: minor refactor in GPS enabling/disabling logic + + plugins/huawei/mm-broadband-modem-huawei.c | 131 + ++++++++++++++--------------- + 1 file changed, 65 insertions(+), 66 deletions(-) + +commit 538ed3f24e9ec5d64abc1543476e5ee34b504455 +Author: Aleksander Morgado +Date: Sun Jun 28 11:06:06 2020 +0200 + + quectel,shared: don't report GPS capabilities if no GPS port found + + The QGPS based implementation needs the existence of a port flagged as + GPS data; if there is no such port, we cannot provide GPS support. + + plugins/quectel/mm-shared-quectel.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit 77f6637750362a8c319e2debc6f781ceb217675a +Author: Aleksander Morgado +Date: Sun Jun 28 11:04:20 2020 +0200 + + quectel,shared: fix reporting supported location capabilities + + The method that reports what location capabilities are supported must + report the capabilities provided by the parent interface plus the + additional capabilities supported by the shared implementation. + + Also, simplify the logic a bit reducing the amount of implemented + methods. + + plugins/quectel/mm-shared-quectel.c | 78 + ++++++++++++++----------------------- + 1 file changed, 29 insertions(+), 49 deletions(-) + +commit 0f9d69fd355a05b51b8367fa75dbd49440a9bd7e +Author: Aleksander Morgado +Date: Sun Jun 28 10:55:15 2020 +0200 + + quectel,shared: private context at beginning of source file + + plugins/quectel/mm-shared-quectel.c | 83 + +++++++++++++++++++------------------ + 1 file changed, 43 insertions(+), 40 deletions(-) + +commit 234ba4544b324765a3ba9f7d468715378c585106 +Author: Aleksander Morgado +Date: Sun Jun 28 10:53:33 2020 +0200 + + quectel: coding style fixes in the QGPS logic + + plugins/quectel/mm-broadband-modem-quectel.c | 38 ++--- + plugins/quectel/mm-shared-quectel.c | 203 + +++++++++++++++------------ + plugins/quectel/mm-shared-quectel.h | 50 +++---- + 3 files changed, 149 insertions(+), 142 deletions(-) + +commit 5a9d321346df5e964780def158072df794c604dd +Author: Aleksander Morgado +Date: Sun Jun 28 10:35:57 2020 +0200 + + quectel,shared: fix parent location disabling + + The GTask must be passed as user_data. + + plugins/quectel/mm-shared-quectel.c | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +commit df393df1479ab79f028b17eb3df0ea0eb96b9140 +Author: ArenM +Date: Fri Jun 5 15:25:54 2020 -0400 + + quectel: implement GPS support with +QGPS + + Quectel modems allow provide location information via AT commands. + Add this as a location source. + + plugins/quectel/mm-broadband-modem-quectel.c | 29 +- + plugins/quectel/mm-shared-quectel.c | 504 + +++++++++++++++++++++++++++ + plugins/quectel/mm-shared-quectel.h | 36 ++ + 3 files changed, 567 insertions(+), 2 deletions(-) + +commit 4b37b7d3cfd8c8e98af25eed334b1880b6b6c597 +Author: Aleksander Morgado +Date: Sun Jun 28 14:05:58 2020 +0200 + + base-modem,at: response processors return a more specific enum + + Instead of using the FALSE return of the method to indicate either a + fatal error (if result_error was set) or the continuation request (if + result_error wasn't set), provide a enum that has explicit states for + all three possible values (failure, success or continue). + + plugins/altair/mm-broadband-modem-altair-lte.c | 27 +--- + plugins/huawei/mm-broadband-modem-huawei.c | 22 +-- + plugins/icera/mm-broadband-modem-icera.c | 29 ++-- + plugins/novatel/mm-broadband-modem-novatel-lte.c | 61 ++++--- + plugins/sierra/mm-broadband-modem-sierra.c | 28 ++-- + plugins/telit/mm-broadband-modem-telit.c | 81 ++++++---- + src/mm-base-modem-at.c | 189 + +++++++++++++--------- + src/mm-base-modem-at.h | 112 +++++++------ + src/mm-broadband-modem.c | 192 + +++++++++++------------ + 9 files changed, 402 insertions(+), 339 deletions(-) + +commit c4d82aaf1e7cf10475204102533ac7784f83f0d3 +Author: Aleksander Morgado +Date: Sun Jun 28 12:06:51 2020 +0200 + + base-modem,at: improve documentation on response processor methods + + src/mm-base-modem-at.c | 68 ++++++++++++++++++----------------- + src/mm-base-modem-at.h | 98 + +++++++++++++++++++++++++++++++------------------- + 2 files changed, 98 insertions(+), 68 deletions(-) + +commit 7e3863897e73227a7de54db967fd95b40a8833d1 +Author: Aleksander Morgado +Date: Sun Jun 7 15:16:49 2020 +0200 + + broadband-modem: run implicit disabling if enabling fails + + The disabling sequence is updated so that the steps to disable the + interfaces never fail. This is done so that the modem is not left + in an "inconsistent" enabled state, if e.g. the modem is enabled and + one of the disabling steps for the interfaces ends up failing. In this + case, it is preferred to say that the modem is disabled, than having + it wrongly enabled. + + The enabling sequence is updated so that if any of the steps to enable + the interfaces fail, we end up running an implicit disabling operation + to disable all the interfaces. This is to attempt to cleanup whatever + we had enabled during the enabling operation, including e.g. the open + ports context. + + src/mm-broadband-modem.c | 270 + ++++++++++++++++++++++++++++++----------------- + 1 file changed, 175 insertions(+), 95 deletions(-) + +commit 408e9f327e09cda73ab87c92aab34176186d2c3d +Author: Aleksander Morgado +Date: Wed Jun 24 09:31:30 2020 +0200 + + broadband-modem-qmi: fix assertion when disabling unsolicited events + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/230 + + src/mm-broadband-modem-qmi.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit c6d213d6523a70aa8504bda4dbd1796a0b1cd4c7 +Author: Aleksander Morgado +Date: Thu Jun 11 14:41:44 2020 +0200 + + broadband-modem-qmi,bearer-qmi: avoid depending on the client version + + The QMI client version is an information provided by the QMI protocol + only when QMUX or MBIM backends are used, it won't be available when + e.g. QRTR is used. The logic in ModemManager should not rely on this + information. + + src/mm-bearer-qmi.c | 39 ++-- + src/mm-broadband-modem-qmi.c | 542 + +++++++++++++++++-------------------------- + 2 files changed, 230 insertions(+), 351 deletions(-) + +commit 62956b5c7a1bcfa143e6f5915562c55c4923eec4 +Author: Aleksander Morgado +Date: Tue Jun 23 14:22:39 2020 +0200 + + build: post-release version bump to 1.15.0 + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 5f20662aeb9b0f79865a9a9df151349a29b4a2bd +Author: Aleksander Morgado +Date: Tue Jun 23 14:06:03 2020 +0200 + + release: bump version to 1.14.0 + + configure.ac | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit 71d65bbe7e98248c21c4c35f4ec4210264ba745a +Author: Aleksander Morgado +Date: Mon Jun 22 14:10:28 2020 +0200 + + u-blox: always ignore M8 and M9 GPS modules + + plugins/ublox/77-mm-ublox-port-types.rules | 2 ++ + 1 file changed, 2 insertions(+) + +commit fbf38753441ee6eb9635a0f7b24e7a1b3ac818c3 +Author: Aleksander Morgado +Date: Mon Jun 22 09:30:09 2020 +0200 + + blacklist: add chinese clone of Arduino nano + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/228 + + src/77-mm-usb-device-blacklist.rules | 3 +++ + 1 file changed, 3 insertions(+) + +commit 5cbeeb1b99939f9bc6faea1c29e99bc1f274d077 +Author: Aleksander Morgado +Date: Sat Jun 20 12:05:18 2020 +0200 + + build: require libqmi 1.26.0 + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 57422ec0bb6403bd17efab174f1d9b67079a5b1e +Author: Aleksander Morgado +Date: Fri Jun 19 14:27:27 2020 +0200 + + NEWS: add info about MBIM-powered Cinterion devices + + NEWS | 1 + + 1 file changed, 1 insertion(+) + +commit ecf54efc671b8c05e6354470e6ed8f496985d3a9 +Author: Aleksander Morgado +Date: Wed Jun 17 14:53:45 2020 +0200 + + cinterion: added port type hints for the mPLS62-w in MBIM mode + + T: Bus=01 Lev=02 Prnt=04 Port=01 Cnt=01 Dev#= 40 Spd=480 MxCh= 0 + D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 + P: Vendor=1e2d ProdID=005d Rev=17.30 + S: Manufacturer=Cinterion Wireless Modules + S: Product=PLSx + C: #Ifs=12 Cfg#= 1 Atr=e0 MxPwr=100mA + I: If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=01 + Driver=cdc_acm + I: If#=0x1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 + Driver=cdc_acm + I: If#=0xa Alt= 1 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 + Driver=cdc_mbim + I: If#=0xb Alt= 2 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 + Driver=cdc_mbim + I: If#=0x2 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=00 + Driver=cdc_acm + I: If#=0x3 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 + Driver=cdc_acm + I: If#=0x4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=00 + Driver=cdc_acm + I: If#=0x5 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 + Driver=cdc_acm + I: If#=0x6 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=00 + Driver=cdc_acm + I: If#=0x7 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 + Driver=cdc_acm + I: If#=0x8 Alt= 0 #EPs= 1 Cls=02(commc) Sub=02 Prot=00 + Driver=cdc_acm + I: If#=0x9 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 + Driver=cdc_acm + + plugins/cinterion/77-mm-cinterion-port-types.rules | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +commit c2ee73173e77b57108e52a09bfecadef19ae13a8 +Author: Aleksander Morgado +Date: Wed Jun 17 14:26:58 2020 +0200 + + cinterion: allow MBIM-powered devices + + Like the mPLS62-w when setup to be controlled in MBIM mode instead of + plain AT commands. + + plugins/cinterion/mm-plugin-cinterion.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +commit 54de41928b73b2c7fdfe5b4c791625f6973510f0 +Author: Aleksander Morgado +Date: Thu Jun 18 10:58:14 2020 +0200 + + build: require libmbim 1.24.0 + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 9d31cbaa2dc2efb77d174134156b612072d6bf0b +Author: Eric Caruso +Date: Wed Jun 17 16:19:07 2020 -0700 + + mm-kernel-device: give cmp a total order + + This allows MMKernelDevice::cmp to compare two kernel devices + with different object types, which means that subclasses can + continue to only handle comparisons with their own type. The + order may not be stable across builds. + + src/kerneldevice/mm-kernel-device.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit 12ea728112f562a572a5c0ecc7bba47bb529d41c +Author: Aleksander Morgado +Date: Tue Jun 16 09:41:14 2020 +0200 + + AUTHORS: update with latest commit stats + + AUTHORS | 23 ++++++++++++++++++----- + 1 file changed, 18 insertions(+), 5 deletions(-) + +commit cb8d810583690ea2c011e66d36c1eeb346f83690 +Author: Brendan Peter +Date: Mon Jun 15 15:48:01 2020 -0700 + + quectel: add port type hints for EG95 + + plugins/quectel/77-mm-quectel-port-types.rules | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit 569990f38cc241b0309ec7d8c92a7b2de3e89005 +Author: Aleksander Morgado +Date: Fri Jun 12 09:25:09 2020 +0200 + + broadband-modem-qmi: also build 5GS reg state from Serving System + + src/mm-broadband-modem-qmi.c | 6 ++++++ + src/mm-iface-modem.c | 6 ++++++ + src/mm-iface-modem.h | 1 + + 3 files changed, 13 insertions(+) + +commit 8340237f9da911ca6ecc58fd6c453e9ea32616d4 +Author: Aleksander Morgado +Date: Fri Jun 12 09:17:40 2020 +0200 + + broadband-modem-qmi: avoid using stale EPS registration state + + When the device goes from LTE to UMTS, we must make sure we also + always update the EPS registration state as unknown, or the built + consolidated state will be wrong. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/225 + + src/mm-broadband-modem-qmi.c | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +commit 3af93cbe18709864a10c3efd752e7db44f41c18f +Author: Maxim Anisimov +Date: Fri Jun 5 08:57:48 2020 +0300 + + broadband-modem-qmi: switch USSD state to idle when ussd session is + terminated by network + + The cellular operator can break the interactive USSD session. In + this case, it is necessary + to process this situation otherwise --3gpp-ussd-initiate or + --3gpp-ussd-respond will give an error. + + Signed-off-by: Maxim Anisimov + + src/mm-broadband-modem-qmi.c | 34 ++++++++++++++++++++++++++++++++++ + 1 file changed, 34 insertions(+) + +commit 62c6f941a2ea44b0f67fbb849c92335d78137b96 +Author: Maxim Anisimov +Date: Fri Jun 5 09:29:23 2020 +0300 + + cli: make control chars in strings are escaped correctly for json + output + + We need to change json output escaping according to this + https://bugzilla.gnome.org/show_bug.cgi?id=730425 + + Signed-off-by: Maxim Anisimov + + cli/mmcli-output.c | 47 +++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 45 insertions(+), 2 deletions(-) + +commit 1e0b38d98aff792481f4635c524bbf669b0be5ad +Author: Maxim Anisimov +Date: Fri Jun 5 08:43:05 2020 +0300 + + sms-part-3gpp: fix unicode names in sms decode iconv() operations + + So that the limited iconv() in OpenWRT supports the conversion + properly. + + Signed-off-by: Maxim Anisimov + + src/mm-sms-part-3gpp.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit cbcc14110521fdb360a3028b1b15d59ffc74257e +Author: Aleksander Morgado +Date: Thu Jun 4 09:48:10 2020 +0200 + + build: bump version to 1.13.900 (1.14-rc1) + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit cd501c4d2657e8273d928748056050fc5b696f7c +Author: Aleksander Morgado +Date: Thu Jun 4 11:38:48 2020 +0200 + + NEWS: add details about the plugin configure options + + NEWS | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit a5c060ef879c804ee21aa6c68784ccdac7171ee7 +Author: Aleksander Morgado +Date: Tue Jun 2 15:42:58 2020 +0200 + + filter: setup automatic per-vid checks in the plugin whitelist + + Until now, the plugin whitelist rule in the filter would only handle + those plugins that require specific udev tags, and those that had + explicit full vid:pid pairs. + + This update makes a new implicit automatic whitelist for all devices + that match any of the vids managed by the different plugins. + + Looking at the current list of devices in the blacklist and greylist + maintained by ModemManager, there are no devices falling under the + list of supported plugin vids that would need to be blacklisted; + except for u-blox GPS modules: + + huawei -> 0x12d1 -> None in blacklist/greylist + thuraya -> 0x1a26 -> None in blacklist/greylist + telit -> 0x1bc7 -> None in blacklist/greylist + dLink -> 0x2001 -> None in blacklist/greylist + wavecom -> 0x114f -> None in blacklist/greylist + x22x -> 0x1bbb,0x0b3c -> None in blacklist/greylist + anydata -> 0x16d5 -> None in blacklist/greylist + quectel -> 0x2c7c -> None in blacklist/greylist + haier -> 0x201e -> None in blacklist/greylist + novatel -> 0x1410 -> None in blacklist/greylist + dell -> 0x413c -> None in blacklist/greylist + option -> 0x0af0,0x1931 -> None in blacklist/greylist + nokia -> 0x0421 -> None in blacklist/greylist + cinterion -> 0x1e2d,0x0681 -> None in blacklist/greylist + simtech -> 0x1e0e -> None in blacklist/greylist + iridium -> 0x1edd -> None in blacklist/greylist + pantech -> 0x106c -> None in blacklist/greylist + longcheer -> 0x1c9e,0x1bbb -> None in blacklist/greylist + linktop -> 0x230d -> None in blacklist/greylist + sierra -> 0x1199 -> None in blacklist/greylist + ublox -> 0x1546 -------------> GPS chips blacklisted + !!!!! + foxconn -> 0x0489 -> None in blacklist/greylist + broadmobi -> 0x2020 -> None in blacklist/greylist + fibocom -> 0x2cb7 -> None in blacklist/greylist + tplink -> 0x2357 -> None in blacklist/greylist + zte -> 0x19d2 -> None in blacklist/greylist + + The rules used to blacklist the u-blox GPS chips have already been + moved to the u-blox plugin itself, and now they use the broader + ID_MM_DEVICE_IGNORE tag that applies in all filter modes. + + NEWS | 4 ++++ + src/mm-filter.c | 37 +++++++++++++++++++++++++++++++++++++ + src/mm-filter.h | 2 ++ + src/mm-plugin-manager.c | 18 +++++++++++++++++- + src/mm-plugin.c | 6 ++++++ + src/mm-plugin.h | 1 + + 6 files changed, 67 insertions(+), 1 deletion(-) + +commit bbeca601138ff51b817bb1ef84b53a70572d0c19 +Author: Aleksander Morgado +Date: Tue Jun 2 15:39:51 2020 +0200 + + ublox: fully ignore GPS devices with plugin-installed rules + + Instead of setting up the ID_MM_TTY_BLACKLIST tag used in 'legacy' + filter mode, tag all known u-blox GPS devices with the broader + ID_MM_DEVICE_IGNORE tag that applies under all filter modes. + + Also, make this rules be installed by the plugin itself, because at + the end, it is the u-blox plugin the one attempting to probe all + devices with vid 0x1546. + + NEWS | 1 + + plugins/ublox/77-mm-ublox-port-types.rules | 5 +++++ + src/77-mm-usb-device-blacklist.rules | 5 ----- + 3 files changed, 6 insertions(+), 5 deletions(-) + +commit 657d5e61802db19be728e5e2e313c4f80244cb4d +Author: Aleksander Morgado +Date: Thu Jun 4 09:46:04 2020 +0200 + + NEWS: update MBIM reset operation info to include Qualcomm devices + + We're using QMI over MBIM to perform the reset if the device is QMI + based. + + NEWS | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 1ef46cdf80a26633bb6cb2dc2be335cdd56bcc5b +Author: Aleksander Morgado +Date: Wed Jun 3 17:32:19 2020 +0200 + + build: require libmbim 1.24-rc1 + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 30428ed57d4c43f80ef86da9d18f4da8cbb06285 +Author: Aleksander Morgado +Date: Wed Jun 3 17:29:57 2020 +0200 + + NEWS: update for 1.14.0 + + NEWS | 126 + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 126 insertions(+) + +commit b81101972ea49bf619d64c448a7eaf358c663bb1 +Author: Aleksander Morgado +Date: Wed Jun 3 17:29:46 2020 +0200 + + docs,libmm-glib: add 1.14 index + + docs/reference/libmm-glib/libmm-glib-docs.xml | 4 ++++ + 1 file changed, 4 insertions(+) + +commit d36df682264698e6c33a6c7e79e1f11ec142b609 +Author: Aleksander Morgado +Date: Tue Jun 2 10:16:33 2020 +0200 + + wavecom: break loop matching 2G bands if exact combination found + + plugins/wavecom/mm-broadband-modem-wavecom.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit a6607a5e7dc5ac036f416bb405d37e5c22691ec1 +Author: Aleksander Morgado +Date: Tue Jun 2 10:13:08 2020 +0200 + + wavecom: port to use g_autoptr() setup + + plugins/wavecom/mm-broadband-modem-wavecom.c | 113 + ++++++++++----------------- + 1 file changed, 42 insertions(+), 71 deletions(-) + +commit 08d40fe05d4b53946928c38ad488f5acff24d360 +Author: Aleksander Morgado +Date: Tue Jun 2 10:01:43 2020 +0200 + + wavecom: fix GTask return handling when loading current caps + + plugins/wavecom/mm-broadband-modem-wavecom.c | 26 + ++++++++++++++------------ + 1 file changed, 14 insertions(+), 12 deletions(-) + +commit d8b70602c51b77356eb439d63c4cac311d867310 +Author: Aleksander Morgado +Date: Fri May 15 15:09:33 2020 +0200 + + huawei: ignore NDISDUP disconnection errors + + Running NDISDUP=1,0 on an already disconnected bearer/context will + report ERROR, so we can really ignore the result of the command, + because we're anyway going to get the correct bearer/context status + later on with the NDISSTATQRY checks. + + plugins/huawei/mm-broadband-bearer-huawei.c | 13 +++++-------- + 1 file changed, 5 insertions(+), 8 deletions(-) + +commit 472fb96bbe758a7ba11c184ea7c04e328c27fd97 +Author: Aleksander Morgado +Date: Fri May 15 15:01:56 2020 +0200 + + huawei: don't delay reporting network initiated disconnects + + When a network-initiated event is received telling us that a + bearer/context is disconnected, we should handle and process it right + away, without thinking on whether there is going to be a + user-requested disconnect afterwards or not. + + This effectively reverts the changes introduced in commit + 21a5aaf4fe6934aad2e6c770aa4bdffa3ad29f9d, which looks like was done to + handle synchronization issues with upper layers (e.g. with + NetworkManager or Shill). + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/205 + + plugins/huawei/mm-broadband-bearer-huawei.c | 59 + ----------------------------- + plugins/huawei/mm-broadband-modem-huawei.c | 7 +--- + 2 files changed, 2 insertions(+), 64 deletions(-) + +commit 15543794b781266af31e613faea2d904afcee54e +Author: Aleksander Morgado +Date: Thu May 28 15:00:40 2020 +0200 + + filter: 'strict' is the new default + + The 'strict' filter policy is less invasive, as it will not touch TTYs + unless there are clear indications that it may be a modem. Under this + mode, the ModemManager-provided blacklist database is not used. + + src/mm-context.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 82d38f701cb523d83f6390dc5a5a84b0604b7948 +Author: Aleksander Morgado +Date: Thu May 28 14:58:47 2020 +0200 + + filter: rename 'default' to 'legacy' + + The old 'default' policy is renamed to 'legacy', and is considered now + deprecated. + + src/mm-context.c | 8 ++++---- + src/mm-filter.h | 4 ++-- + 2 files changed, 6 insertions(+), 6 deletions(-) + +commit 6eca223705b0e5c5ce52fff77858c41c82a854d7 +Author: Aleksander Morgado +Date: Mon Jun 1 15:09:20 2020 +0200 + + shared-qmi: require minimum set of NMEA types before starting + GNSS engine + + configure.ac | 2 +- + src/mm-shared-qmi.c | 248 + +++++++++++++++++++++++++++++++++++++++++++++++++++- + 2 files changed, 245 insertions(+), 5 deletions(-) + +commit fd28f9475011d3d62202b650b64a64b7c42b5027 +Author: Aleksander Morgado +Date: Mon Jun 1 15:56:42 2020 +0200 + + ci: always build libqmi with basic collection + + Which must be the minimum set of supported messages required by + ModemManager. + + .gitlab-ci.yml | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 10648f8d36c08dbd711604824c1a21fb7859aa54 +Author: Aleksander Morgado +Date: Mon Jun 1 15:18:01 2020 +0200 + + broadband-modem-qmi: plug memleak when changing current firmware + + ==80079== 104 (40 direct, 64 indirect) bytes in 1 blocks are + definitely lost in loss record 4,761 of 5,232 + ==80079== at 0x483977F: malloc (vg_replace_malloc.c:309) + ==80079== by 0x5025AE9: g_malloc (in + /usr/lib/libglib-2.0.so.0.6400.2) + ==80079== by 0x5006223: g_slice_alloc (in + /usr/lib/libglib-2.0.so.0.6400.2) + ==80079== by 0x505B0F4: g_array_sized_new (in + /usr/lib/libglib-2.0.so.0.6400.2) + ==80079== by 0x2008A3: firmware_change_current + (mm-broadband-modem-qmi.c:8426) + ==80079== by 0x1AB5F3: select_auth_ready + (mm-iface-modem-firmware.c:225) + ==80079== by 0x4E68653: ??? (in /usr/lib/libgio-2.0.so.0.6400.2) + ==80079== by 0x4E6DA26: ??? (in /usr/lib/libgio-2.0.so.0.6400.2) + ==80079== by 0x17402E: authorize_ready (mm-base-modem.c:1363) + ==80079== by 0x4E68653: ??? (in /usr/lib/libgio-2.0.so.0.6400.2) + ==80079== by 0x4E6DA26: ??? (in /usr/lib/libgio-2.0.so.0.6400.2) + ==80079== by 0x15366D: check_authorization_ready + (mm-auth-provider.c:99) + + src/mm-broadband-modem-qmi.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit d848b10d2479dd2d7a3e2c6330ca72b8902f829d +Author: Aleksander Morgado +Date: Mon Jun 1 15:16:23 2020 +0200 + + iface-modem-firmware: plug memleak when listing images + + ==80079== 1,377 (48 direct, 1,329 indirect) bytes in 1 blocks are + definitely lost in loss record 5,200 of 5,232 + ==80079== at 0x483977F: malloc (vg_replace_malloc.c:309) + ==80079== by 0x5025AE9: g_malloc (in + /usr/lib/libglib-2.0.so.0.6400.2) + ==80079== by 0x5006223: g_slice_alloc (in + /usr/lib/libglib-2.0.so.0.6400.2) + ==80079== by 0x4FEB59B: ??? (in /usr/lib/libglib-2.0.so.0.6400.2) + ==80079== by 0x4FEE378: g_variant_builder_end (in + /usr/lib/libglib-2.0.so.0.6400.2) + ==80079== by 0x48F8314: mm_firmware_properties_get_dictionary + (mm-firmware-properties.c:337) + ==80079== by 0x1AAF29: load_current_ready + (mm-iface-modem-firmware.c:80) + ==80079== by 0x4E68653: ??? (in /usr/lib/libgio-2.0.so.0.6400.2) + ==80079== by 0x4E68688: ??? (in /usr/lib/libgio-2.0.so.0.6400.2) + ==80079== by 0x502B58E: g_main_context_dispatch (in + /usr/lib/libglib-2.0.so.0.6400.2) + ==80079== by 0x502D530: ??? (in /usr/lib/libglib-2.0.so.0.6400.2) + ==80079== by 0x502E542: g_main_loop_run (in + /usr/lib/libglib-2.0.so.0.6400.2) + + src/mm-iface-modem-firmware.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +commit 3b35bbd47bc8accd42eed2c22070557104f09d27 +Author: Louis-Alexis Eyraud +Date: Fri May 29 10:47:11 2020 +0200 + + huawei: fix memory leak when parsing HCSQ response + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/220 + + plugins/huawei/mm-broadband-modem-huawei.c | 1 + + 1 file changed, 1 insertion(+) + +commit df36f8d2d3fc34bd4c95ad97587d7cad04c6a9df +Author: Giacinto Cifelli +Date: Thu May 28 05:28:32 2020 +0200 + + cinterion: fix syntax error for setting radio/bands/[23]g + + plugins/cinterion/mm-broadband-modem-cinterion.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 3efe127aa881a0be3595665cb3f0a38819b37626 +Author: Aleksander Morgado +Date: Wed May 27 15:48:40 2020 +0200 + + iface-modem-voice: fix assertions in call setup/teardown logic + + src/mm-iface-modem-voice.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit 0cc5a6ce4f225b9aad06ec20235467188fe23d66 +Author: Giacinto Cifelli +Date: Tue May 26 15:03:52 2020 +0200 + + cinterion: skip sim ready check for modules that don't support it + + plugins/cinterion/mm-broadband-modem-cinterion.c | 61 + ++++++++++++++++++++---- + 1 file changed, 51 insertions(+), 10 deletions(-) + +commit da7bc39f0c0bfc53d90195c0911f4a50b98bd1c8 +Author: Aleksander Morgado +Date: Wed May 27 07:09:58 2020 +0200 + + blacklist: add USB CEC adapters + + These are not being probed when using the STRICT filter, so this + blacklist update is relevant only for DEFAULT filter type. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/212 + + src/77-mm-usb-device-blacklist.rules | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 84ec3d2fcf081ab3404d27458031c87aa6214065 +Author: Giacinto Cifelli +Date: Tue May 26 15:00:03 2020 +0200 + + cinterion: simplify check + + no longer need to check the charset because of the fix in charsets, + that now accepts GSM and UCS2. + + plugins/cinterion/mm-modem-helpers-cinterion.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 502c636516b68dc1556f574a9cc2922462d077bf +Author: Aleksander Morgado +Date: Tue May 26 14:28:08 2020 +0200 + + zte: add MF667 port type hints + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/217 + + plugins/zte/77-mm-zte-port-types.rules | 3 +++ + 1 file changed, 3 insertions(+) + +commit a399c7e42a8e780dc47edbac45d64db75e031fac +Author: Aleksander Morgado +Date: Tue May 26 11:45:44 2020 +0200 + + charsets: take_and_convert() methods should support GSM encoding + + The iconv() operation would fail because we wouldn't give any proper + charset string to convert to/from. Use our custom GSM encoding support + instead. + + src/mm-charsets.c | 22 ++++++++++++++++++---- + src/tests/test-charsets.c | 14 ++++++++++++++ + 2 files changed, 32 insertions(+), 4 deletions(-) + +commit c99457695334eb7a9f32ea0d085ee39e01a96a59 +Author: Aleksander Morgado +Date: Tue May 26 11:44:59 2020 +0200 + + charsets,test: extend UCS2->UTF-8 testing for the reverse operation + + src/tests/test-charsets.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit c4e6a0c4f657781c45e8dac58aebd3e29a40895b +Author: Aleksander Morgado +Date: Tue May 26 11:26:01 2020 +0200 + + charsets: don't warn in unlikely case of needing to convert to HEX + from UTF-8 + + This would really be an implementation detail, not a real use + case. Just don't warn in this case, as in the conversion in the + opposite direction. + + src/mm-charsets.c | 2 -- + 1 file changed, 2 deletions(-) + +commit 87b8c9b295e22d234d2ed2e49761ba36e3aa3921 +Author: Aleksander Morgado +Date: Tue May 26 11:14:48 2020 +0200 + + cinterion: minor coding style fixes in new band management + + plugins/cinterion/mm-modem-helpers-cinterion.c | 139 + +++++++++++++------------ + 1 file changed, 71 insertions(+), 68 deletions(-) + +commit 793132d56d346ea1968c92c67156f3d8759bd395 +Author: Giacinto Cifelli +Date: Tue May 19 11:09:26 2020 +0200 + + cinterion: radio/band handling for LTE modems + + plugins/cinterion/77-mm-cinterion-port-types.rules | 2 + + plugins/cinterion/mm-broadband-modem-cinterion.c | 171 ++++-- + plugins/cinterion/mm-modem-helpers-cinterion.c | 495 + +++++++++++++---- + plugins/cinterion/mm-modem-helpers-cinterion.h | 67 ++- + .../cinterion/tests/test-modem-helpers-cinterion.c | 588 + +++++++++++++++++++-- + 5 files changed, 1133 insertions(+), 190 deletions(-) + +commit 09260311196c110493dd1d713d7341f3a2c02c14 +Author: Aleksander Morgado +Date: Tue May 26 15:03:24 2020 +0200 + + Revert "charsets: don't warn in unlikely case of needing to convert + to HEX from UTF-8" + + This reverts commit 6a7dd87f30b2cc1b459abab38a0805aa8ba1bfbc. + + Reverting because the merge request was set to squash all together.... + + plugins/cinterion/77-mm-cinterion-port-types.rules | 2 - + plugins/cinterion/mm-broadband-modem-cinterion.c | 171 ++---- + plugins/cinterion/mm-modem-helpers-cinterion.c | 520 + ++++-------------- + plugins/cinterion/mm-modem-helpers-cinterion.h | 67 +-- + .../cinterion/tests/test-modem-helpers-cinterion.c | 588 + ++------------------- + src/mm-charsets.c | 24 +- + src/tests/test-charsets.c | 20 +- + 7 files changed, 209 insertions(+), 1183 deletions(-) + +commit 6a7dd87f30b2cc1b459abab38a0805aa8ba1bfbc +Author: Giacinto Cifelli +Date: Tue May 26 12:45:40 2020 +0000 + + charsets: don't warn in unlikely case of needing to convert to HEX + from UTF-8 + + This would really be an implementation detail, not a real use + case. Just don't warn in this case, as in the conversion in the + opposite direction. + + plugins/cinterion/77-mm-cinterion-port-types.rules | 2 + + plugins/cinterion/mm-broadband-modem-cinterion.c | 171 ++++-- + plugins/cinterion/mm-modem-helpers-cinterion.c | 520 + ++++++++++++++---- + plugins/cinterion/mm-modem-helpers-cinterion.h | 67 ++- + .../cinterion/tests/test-modem-helpers-cinterion.c | 588 + +++++++++++++++++++-- + src/mm-charsets.c | 24 +- + src/tests/test-charsets.c | 20 +- + 7 files changed, 1183 insertions(+), 209 deletions(-) + +commit 15a941fae5e7d8000fd58f4da03be2d379151576 +Author: Aleksander Morgado +Date: Wed May 20 13:12:38 2020 +0200 + + broadband-modem-qmi: only use "Data Service Capabilities" array if + content given + + See + https://gitlab.freedesktop.org/mobile-broadband/libqmi/-/issues/32#note_505065 + + src/mm-broadband-modem-qmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 29a68c94b9896eb216f0b604210aafe751423fc2 +Author: Aleksander Morgado +Date: Fri May 22 10:58:29 2020 +0200 + + huawei: ignore ^CCALLSTATE URCs for now + + We will want to support these to avoid needing to have CLCC call + polling, but for now, just ignore them so that they don't interfere + with the call management. + + For context, see: + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/216 + + plugins/huawei/mm-broadband-modem-huawei.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit 1eeec40ee85552cee957f35db9cc85aae6116e48 +Author: Aleksander Morgado +Date: Thu May 21 15:03:17 2020 +0200 + + iface-modem-voice: fix assert() when setting up call polling + + If an incoming call is detected during the CLCC polling, the polling + timeout will already be set, so don't assert when checking the polling + id afterwards, just make sure we don't reset the timeout. + + https://lists.freedesktop.org/archives/modemmanager-devel/2020-May/007866.html + + src/mm-iface-modem-voice.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +commit 98fa83a693c24002dc0087c4304ea1143b498d1f +Author: Aleksander Morgado +Date: Tue May 19 13:49:53 2020 +0200 + + cinterion,tests: avoid cast-align errors + + We can safely cast the data in a GArray to gpointer first, and then + to the pointer type we require. + + cinterion/tests/test-modem-helpers-cinterion.c: In function + 'common_test_scfg': + cinterion/tests/test-modem-helpers-cinterion.c:56:56: error: cast + increases required alignment of target type [-Werror=cast-align] + expected_bands_str = mm_common_build_bands_string ((const + MMModemBand *)expected_bands->data, + ^ + cinterion/tests/test-modem-helpers-cinterion.c:58:47: error: cast + increases required alignment of target type [-Werror=cast-align] + bands_str = mm_common_build_bands_string ((const MMModemBand + *)bands->data, + ^ + cinterion/tests/test-modem-helpers-cinterion.c: In function + 'common_test_scfg_response': + cinterion/tests/test-modem-helpers-cinterion.c:209:56: error: cast + increases required alignment of target type [-Werror=cast-align] + expected_bands_str = mm_common_build_bands_string ((const + MMModemBand *)expected_bands->data, + ^ + cinterion/tests/test-modem-helpers-cinterion.c:211:47: error: cast + increases required alignment of target type [-Werror=cast-align] + bands_str = mm_common_build_bands_string ((const MMModemBand + *)bands->data, + ^ + + plugins/cinterion/tests/test-modem-helpers-cinterion.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit b71ae9ce72e9d0e28a01ff81dabb6126def9ca0c +Author: Aleksander Morgado +Date: Tue May 19 13:45:34 2020 +0200 + + wavecom: avoid cast-align errors + + We can safely cast the data in a GArray to gpointer first, and then + to the pointer type we require. + + wavecom/mm-broadband-modem-wavecom.c: In function 'set_bands_3g': + wavecom/mm-broadband-modem-wavecom.c:800:50: error: cast increases + required alignment of target type [-Werror=cast-align] + bands_string = mm_common_build_bands_string ((MMModemBand + *)bands_array_final->data, + ^ + wavecom/mm-broadband-modem-wavecom.c: In function 'set_bands_2g': + wavecom/mm-broadband-modem-wavecom.c:872:50: error: cast increases + required alignment of target type [-Werror=cast-align] + bands_string = mm_common_build_bands_string ((MMModemBand + *)bands_array_final->data, + ^ + + plugins/wavecom/mm-broadband-modem-wavecom.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 8bf13294819d57468a85a6bd2646b3467932bbb4 +Author: Aleksander Morgado +Date: Tue May 19 13:42:56 2020 +0200 + + libmm-glib,helpers: use locale-independent strtod() + + Otherwise parsing may fail, e.g. as in this unit test: + + # Start of smoni tests + # DEBUG: testing SMONI response: ^SMONI: + 2G,71,-61,262,02,0143,83BA,33,33,3,6,G,NOCONN + # DEBUG: testing SMONI response: ^SMONI: 2G,SEARCH,SEARCH + # DEBUG: testing SMONI response: ^SMONI: + 2G,673,-89,262,07,4EED,A500,16,16,7,4,G,5,-107,LIMSRV + # DEBUG: testing SMONI response: ^SMONI: + 2G,673,-80,262,07,4EED,A500,35,35,7,4,G,643,4,0,-80,0,S_FR + # DEBUG: testing SMONI response: ^SMONI: + 3G,10564,296,-7.5,-79,262,02,0143,00228FF,-92,-78,NOCONN + ** + ERROR:cinterion/tests/test-modem-helpers-cinterion.c:1036:test_smoni_response: + assertion failed (fabs (ecn0 - smoni_response_tests[i].ecn0) < 0.1): + (0,5 < 0,1) + Bail out! + ERROR:cinterion/tests/test-modem-helpers-cinterion.c:1036:test_smoni_response: + assertion failed (fabs (ecn0 - smoni_response_tests[i].ecn0) < 0.1): + (0,5 < 0,1) + Aborted (core dumped) + + libmm-glib/mm-common-helpers.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 58ae8f4c2451b5d1110263ffb5f9fa6e3fcdcf03 +Author: Aleksander Morgado +Date: Tue May 19 13:39:25 2020 +0200 + + cinterion,helpers: minor coding style fix + + plugins/cinterion/mm-modem-helpers-cinterion.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +commit 9bfc8a7829f5eacb7658011d177bb74e319af754 +Author: Aleksander Morgado +Date: Tue May 19 13:32:56 2020 +0200 + + novatel-lte: use GPtrArray to build a GStrv + + novatel/mm-broadband-modem-novatel-lte.c: In function + 'response_processor_nwmdn_ignore_at_errors': + novatel/mm-broadband-modem-novatel-lte.c:241:19: error: cast + increases required alignment of target type [-Werror=cast-align] + own_numbers = (GStrv) g_array_free (array, FALSE); + ^ + + plugins/novatel/mm-broadband-modem-novatel-lte.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit a2b0cee935e4d0648a13572b57fda059c16854fb +Author: Aleksander Morgado +Date: Tue May 19 13:27:02 2020 +0200 + + huawei,helpers: fix warnings with -Wcast-align + + huawei/mm-modem-helpers-huawei.c: In function + 'match_info_to_ip4_addr': + huawei/mm-modem-helpers-huawei.c:193:39: error: cast increases + required alignment of target type [-Werror=cast-align] + *out_addr = GUINT32_SWAP_LE_BE (*((guint32 *) bin)); + ^ + /usr/include/glib-2.0/glib/gtypes.h:184:77: note: in definition + of macro 'GUINT32_SWAP_LE_BE' + # define GUINT32_SWAP_LE_BE(val) ((guint32) __builtin_bswap32 + ((gint32) (val))) + ^~~ + + plugins/huawei/mm-modem-helpers-huawei.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit bd2e6f5df43236f709113647845afb9fe095f837 +Author: Aleksander Morgado +Date: Tue May 19 13:18:38 2020 +0200 + + huawei: avoid cast-align errors + + We can safely cast the data in a GArray to gpointer first, and then + to the pointer type we require. + + huawei/mm-broadband-modem-huawei.c: In function 'set_current_bands': + huawei/mm-broadband-modem-huawei.c:916:50: error: cast increases + required alignment of target type [-Werror=cast-align] + bands_string = mm_common_build_bands_string ((MMModemBand + *)bands_array->data, + ^ + + plugins/huawei/mm-broadband-modem-huawei.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 175bedf920159f75b2d517fd638835569477aa55 +Author: Aleksander Morgado +Date: Tue May 19 13:17:50 2020 +0200 + + xmm: avoid cast-align errors + + We can safely cast the data in a GArray to gpointer first, and then + to the pointer type we require. + + xmm/mm-shared-xmm.c: In function + 'validate_and_build_command_set_current_bands': + xmm/mm-shared-xmm.c:512:45: error: cast increases required alignment + of target type [-Werror=cast-align] + str = mm_common_build_bands_string ((const MMModemBand + *)unapplied_bands->data, unapplied_bands->len); + ^ + + plugins/xmm/mm-shared-xmm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit ccf16e00a73291899af4631557c90e4e697f9841 +Author: Aleksander Morgado +Date: Tue May 19 13:16:51 2020 +0200 + + ublox,helpers: avoid cast-align errors + + We can safely cast the data in a GArray to gpointer first, and then + to the pointer type we require. + + ublox/mm-modem-helpers-ublox.c: In function + 'parse_bands_from_string': + ublox/mm-modem-helpers-ublox.c:1612:48: error: cast increases + required alignment of target type [-Werror=cast-align] + tmpstr = mm_common_build_bands_string ((MMModemBand + *)(bands->data), bands->len); + ^ + + plugins/ublox/mm-modem-helpers-ublox.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 76d06ce697bd95e586d07361b4a447ced5b851f1 +Author: Aleksander Morgado +Date: Tue May 19 13:15:42 2020 +0200 + + cinterion,helpers: avoid cast-align errors + + We can safely cast the data in a GArray to gpointer first, and then + to the pointer type we require. + + cinterion/mm-modem-helpers-cinterion.c: In function + 'mm_cinterion_build_band': + cinterion/mm-modem-helpers-cinterion.c:409:54: error: cast increases + required alignment of target type [-Werror=cast-align] + bands_string = mm_common_build_bands_string ((MMModemBand + *)bands->data, bands->len); + ^ + + plugins/cinterion/mm-modem-helpers-cinterion.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit b0be4e895cc2b3b9f533b513eb4da3be99718497 +Author: Aleksander Morgado +Date: Tue May 19 13:12:28 2020 +0200 + + telit,helpers: avoid cast-align errors + + We can safely cast the data in a GArray to gpointer first, and then + to the pointer type we require. + + telit/mm-modem-helpers-telit.c: In function + 'mm_telit_build_bnd_request': + telit/mm-modem-helpers-telit.c:256:55: error: cast increases + required alignment of target type [-Werror=cast-align] + bands_str = mm_common_build_bands_string ((const + MMModemBand *)(bands_array->data), bands_array->len); + ^ + telit/mm-modem-helpers-telit.c:275:55: error: cast increases + required alignment of target type [-Werror=cast-align] + bands_str = mm_common_build_bands_string ((const + MMModemBand *)(bands_array->data), bands_array->len); + ^ + + plugins/telit/mm-modem-helpers-telit.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 301b6f0a64d358706c15efff6bca676c4213c9a5 +Author: Aleksander Morgado +Date: Tue May 19 13:10:26 2020 +0200 + + plugins,tests: avoid cast-align errors + + We can safely cast the data in a GArray to gpointer first, and then + to the pointer type we require. + + tests/test-helpers.c: In function 'mm_test_helpers_compare_bands': + tests/test-helpers.c:41:47: error: cast increases required alignment + of target type [-Werror=cast-align] + bands_str = mm_common_build_bands_string ((MMModemBand + *)(bands->data), bands->len); + ^ + tests/test-helpers.c:46:56: error: cast increases required alignment + of target type [-Werror=cast-align] + expected_bands_str = mm_common_build_bands_string ((MMModemBand + *)(expected_bands_array->data), expected_bands_array->len); + ^ + + plugins/tests/test-helpers.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit c7dee320c004bf9508e54555d0ad9f727b449705 +Author: Aleksander Morgado +Date: Tue May 19 13:08:40 2020 +0200 + + test-qcdm-serial-port: fix warnings with -Wsign-compare + + test-qcdm-serial-port.c: In function 'wait_for_child': + test-qcdm-serial-port.c:57:52: error: comparison between signed + and unsigned integer expressions [-Werror=sign-compare] + if (d->child && (now.tv_sec - start.tv_sec > timeout)) { + ^ + + src/tests/test-qcdm-serial-port.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 71d8bb2ec854e43c56d77c87f80c40807e8f8457 +Author: Aleksander Morgado +Date: Tue May 19 13:04:51 2020 +0200 + + iface-modem-messaging: avoid cast-align errors + + We can safely cast the data in a GArray to gpointer first, and then + to the pointer type we require. + + mm-iface-modem-messaging.c: In function + 'load_supported_storages_ready': + mm-iface-modem-messaging.c:1154:53: error: cast increases required + alignment of target type [-Werror=cast-align] + mem1 = mm_common_build_sms_storages_string ((MMSmsStorage + *)storage_ctx->supported_mem1->data, + ^ + mm-iface-modem-messaging.c:1156:53: error: cast increases required + alignment of target type [-Werror=cast-align] + mem2 = mm_common_build_sms_storages_string ((MMSmsStorage + *)storage_ctx->supported_mem2->data, + ^ + mm-iface-modem-messaging.c:1158:53: error: cast increases required + alignment of target type [-Werror=cast-align] + mem3 = mm_common_build_sms_storages_string ((MMSmsStorage + *)storage_ctx->supported_mem3->data, + ^ + + src/mm-iface-modem-messaging.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit ffbbec4a0d9a8a19f66b986db6534a10c3f973b4 +Author: Aleksander Morgado +Date: Tue May 19 13:03:26 2020 +0200 + + iface-modem-location: avoid warnings with -Wsign-compare + + mm-iface-modem-location.c: In function 'location_gps_update_nmea': + mm-iface-modem-location.c:272:61: error: comparison between signed + and unsigned integer expressions [-Werror=sign-compare] + time (NULL) - ctx->location_gps_nmea_last_time + >= mm_gdbus_modem_location_get_gps_refresh_rate + (skeleton))) { + ^~ + mm-iface-modem-location.c:282:60: error: comparison between signed + and unsigned integer expressions [-Werror=sign-compare] + time (NULL) - ctx->location_gps_raw_last_time >= + mm_gdbus_modem_location_get_gps_refresh_rate + (skeleton))) { + ^~ + + src/mm-iface-modem-location.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 7ccec0bd71a0451ad9e6c5f9ec63e47fbead8a27 +Author: Aleksander Morgado +Date: Tue May 19 11:40:33 2020 +0200 + + iface-modem: avoid cast-align errors + + We can safely cast the data in a GArray to gpointer first, and then + to the pointer type we require. + + mm-iface-modem.c: In function 'after_set_load_current_bands_ready': + mm-iface-modem.c:2358:55: error: cast increases required alignment + of target type [-Werror=cast-align] + requested_str = mm_common_build_bands_string ((MMModemBand + *)requested_bands->data, requested_bands->len); + ^ + mm-iface-modem.c:2359:55: error: cast increases required alignment + of target type [-Werror=cast-align] + current_str = mm_common_build_bands_string ((MMModemBand + *)current_bands->data, current_bands->len); + ^ + mm-iface-modem.c: In function 'validate_bands': + mm-iface-modem.c:2474:48: error: cast increases required alignment + of target type [-Werror=cast-align] + (const MMModemBand + *)supported_bands_array->data, + ^ + mm-iface-modem.c: In function 'mm_iface_modem_set_current_bands': + mm-iface-modem.c:2535:50: error: cast increases required alignment + of target type [-Werror=cast-align] + bands_string = mm_common_build_bands_string ((MMModemBand + *)bands_array->data, + ^ + + src/mm-iface-modem.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +commit 3476e140ad0b97dee50d14530f0c3dc04a1651b0 +Author: Aleksander Morgado +Date: Tue May 19 11:28:56 2020 +0200 + + modem-helpers: use GPtrArray to build a GStrv + + So that we avoid errors when building on ARM due to increasing target + type alignment. + + mm-modem-helpers.c: In function 'mm_3gpp_parse_cnum_exec_response': + mm-modem-helpers.c:3206:21: error: cast increases required alignment + of target type [-Werror=cast-align] + return (array ? (GStrv) g_array_free (array, FALSE) : NULL); + ^ + + src/mm-modem-helpers.c | 26 +++++++++++--------------- + 1 file changed, 11 insertions(+), 15 deletions(-) + +commit 8e033ba331647435bab95a071a450b9be977b295 +Author: Giacinto Cifelli +Date: Mon May 18 16:50:33 2020 +0200 + + AT modem: charset definition in init + + Charset definition moved from enable state machine to init state + machine, + so that the right current charset is available also during further + initialization steps + + src/mm-iface-modem.c | 206 + +++++++++++++++++++++++++-------------------------- + 1 file changed, 103 insertions(+), 103 deletions(-) + +commit 503581a3ac07e74fa9f31bb2d681750e8f577f96 +Author: Aleksander Morgado +Date: Sat May 16 10:33:29 2020 +0200 + + port-qmi: plug memleak when explicitly releasing client + + ==43111== 24 bytes in 1 blocks are definitely lost in loss record + 1,999 of 5,339 + ==43111== at 0x483BB65: calloc (vg_replace_malloc.c:762) + ==43111== by 0x50259D1: g_malloc0 (in + /usr/lib/libglib-2.0.so.0.6400.2) + ==43111== by 0x22AAB8: mm_port_qmi_allocate_client + (mm-port-qmi.c:201) + ==43111== by 0x2007F0: parent_enabling_started_ready + (mm-broadband-modem-qmi.c:9114) + ==43111== by 0x4E68653: ??? (in /usr/lib/libgio-2.0.so.0.6400.2) + ==43111== by 0x4E6DA26: ??? (in /usr/lib/libgio-2.0.so.0.6400.2) + ==43111== by 0x1C535E: enabling_flash_done + (mm-broadband-modem.c:10318) + ==43111== by 0x4E68653: ??? (in /usr/lib/libgio-2.0.so.0.6400.2) + ==43111== by 0x4E6DA26: ??? (in /usr/lib/libgio-2.0.so.0.6400.2) + ==43111== by 0x224F0B: flash_do (mm-port-serial.c:1776) + ==43111== by 0x502AC03: ??? (in /usr/lib/libglib-2.0.so.0.6400.2) + ==43111== by 0x502B58E: g_main_context_dispatch (in + /usr/lib/libglib-2.0.so.0.6400.2) + ==43111== + + src/mm-port-qmi.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit fae614becf16a8f03e85f19b40a31c933c05f1c6 +Author: Giacinto Cifelli +Date: Sat May 16 05:47:52 2020 +0200 + + udev rules for the PLS62 in 005b enumeration + + plugins/cinterion/77-mm-cinterion-port-types.rules | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit 6b36fe9f19289450dfbed00ade1d239d898a9feb +Author: Aleksander Morgado +Date: Fri May 15 14:12:12 2020 +0200 + + huawei: NDISDUP based devices may use plain TTYs for control + + So don't warn if no associated cdc-wdm port is found. + + plugins/huawei/mm-broadband-modem-huawei.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f109b528d3edb21fa08be3da6e2ad7280a15707f +Author: Giacinto Cifelli +Date: Thu May 14 05:38:33 2020 +0200 + + plugins/cinterion: added Signal interface + + Not all Cinterion modems support AT+CESQ. + However a much larger group of them support AT^SMONI + This commit uses the latter instead of the default former. + + plugins/cinterion/mm-broadband-modem-cinterion.c | 136 ++++++++++++ + plugins/cinterion/mm-modem-helpers-cinterion.c | 244 + +++++++++++++++++++++ + plugins/cinterion/mm-modem-helpers-cinterion.h | 25 +++ + .../cinterion/tests/test-modem-helpers-cinterion.c | 244 + +++++++++++++++++++++ + 4 files changed, 649 insertions(+) + +commit 8b7bdea7e07ca12f787ede809471f413ba988697 +Author: Aleksander Morgado +Date: Mon May 11 18:23:44 2020 +0200 + + telit: flag GPS port in the LE910C1 + + plugins/telit/77-mm-telit-port-types.rules | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 9c77fb8834cf8b666baa2778514f809f11e303f3 +Author: David Khouya +Date: Sun May 3 10:13:55 2020 -0400 + + telit: add LE910C1 udev rule + + plugins/telit/77-mm-telit-port-types.rules | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit bbd39a457ce2949dd167f9c2e01eecf6a9e14716 +Author: Giacinto Cifelli +Date: Thu May 14 09:48:35 2020 +0200 + + configure.ac: check for xsltproc + + configure.ac | 3 +++ + 1 file changed, 3 insertions(+) + +commit d33a883be4b8f0f273b91da7f21912ae2fb434de +Author: Aleksander Morgado +Date: Wed May 13 10:06:37 2020 +0200 + + build: require libmbim 1.23.1 for autoptr support + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 26b589cc021f744d1af5d3680907a3e1f0689823 +Author: Aleksander Morgado +Date: Sun May 10 10:36:47 2020 +0200 + + broadmobi: new plugin + + Right now, just with port type hints for the BM818. + + .gitlab-ci.yml | 6 +- + configure.ac | 2 + + plugins/Makefile.am | 23 ++++++ + plugins/broadmobi/77-mm-broadmobi-port-types.rules | 16 ++++ + plugins/broadmobi/mm-plugin-broadmobi.c | 95 + ++++++++++++++++++++++ + plugins/broadmobi/mm-plugin-broadmobi.h | 40 +++++++++ + 6 files changed, 179 insertions(+), 3 deletions(-) + +commit 0ddadbdc37c80397367dcd75f0752cc45b2285b6 +Author: Aleksander Morgado +Date: Sun May 10 09:56:10 2020 +0200 + + port: use correct enum to string conversion when logging + + CC mm-port.lo + mm-port.c: In function 'log_object_build_id': + mm-port.c:117:60: error: implicit conversion from 'MMPortType' + to 'MMModemPortType' [-Werror=enum-conversion] + 117 | mm_modem_port_type_get_string + (mm_port_get_port_type (self))); + | + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ + cc1: all warnings being treated as errors + + src/mm-port.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 83952c5a301a118738a6e51786b37a041058d2c2 +Author: Aleksander Morgado +Date: Fri May 8 13:24:14 2020 +0200 + + bearer-qmi: get correct bearer object pointer from task + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/207 + + src/mm-bearer-qmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit d4a45315cf30fa26185202d316a8db3af5e05fcc +Author: Aleksander Morgado +Date: Tue May 5 13:24:37 2020 +0200 + + cli: add allowed-auth bearer property in output + + Given as a list of items, because the bearer can be created with one + or more allowed authentication protocols. + + cli/mmcli-bearer.c | 23 +++++++++++++---------- + cli/mmcli-output.c | 1 + + cli/mmcli-output.h | 1 + + 3 files changed, 15 insertions(+), 10 deletions(-) + +commit dfc2c51b9cc7d9c780763d42c91bf696c2b8880a +Author: Eric Caruso +Date: Fri May 1 14:12:43 2020 -0700 + + introspection: use correct node name for ModemManager1 object + + In the D-Bus specification it is stated that the root node of + an introspection file should have an absolute path[1]. This path + should not be the root path in D-Bus as putting objects there is + considered incorrect, and also because the MM1 object does not + actually sit at the root path (instead, it uses MM_DBUS_PATH, which + is /org/freedesktop/ModemManager1). Fix this in the introspection + file. + + [1] + https://dbus.freedesktop.org/doc/dbus-specification.html#introspection-format + + introspection/org.freedesktop.ModemManager1.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 479d8e723c9965ee064a7a57d39d29f6c098da0f +Author: Murithi Borona +Date: Mon Apr 27 15:43:54 2020 +0300 + + huawei: updated HCSQ regex to match unquoted response + + plugins/huawei/mm-modem-helpers-huawei.c | 2 +- + plugins/huawei/tests/test-modem-helpers-huawei.c | 12 +++++++----- + 2 files changed, 8 insertions(+), 6 deletions(-) + +commit 18a7d9da7a810dcfe22f810e318f1c6fe34c6e03 +Author: Aleksander Morgado +Date: Wed Apr 22 15:49:05 2020 +0200 + + broadband-modem-qmi: GByteArray can be casted to GArray in USSD + encoding + + Reported by: Maxim Anisimov + + src/mm-broadband-modem-qmi.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +commit d3c5771b1ff8d7acf1c26fccc275f81f59868635 +Author: Maxim Anisimov +Date: Wed Apr 22 15:39:36 2020 +0200 + + broadband-modem-qmi: USSD data in UTF-16 not always given + + E.g. in the Quectel EP06-E only the ASCII/UCS-2 data TLV is given. + + src/mm-broadband-modem-qmi.c | 113 + ++++++++++++++++++++++++++++--------------- + 1 file changed, 73 insertions(+), 40 deletions(-) + +commit 6086c6877c6bca341f6a3b2b07798e8353575d11 +Author: Maxim Anisimov +Date: Wed Apr 22 15:33:40 2020 +0200 + + broadband-modem-qmi: fix unicode names in USSD iconv() operations + + So that the limited iconv() in OpenWRT supports the conversion + properly. + + src/mm-broadband-modem-qmi.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit ae90ed66a2ee94eed28da19e914feb75f03fd504 +Author: Aleksander Morgado +Date: Mon Apr 20 11:25:59 2020 +0200 + + broadband-modem-qmi: 3GPP USSD support + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/26 + + configure.ac | 2 +- + src/mm-broadband-modem-qmi.c | 517 + ++++++++++++++++++++++++++++++++++++++++++- + 2 files changed, 515 insertions(+), 4 deletions(-) + +commit d98597e4302983f2b12f2f70759015044c12ecf6 +Author: Teijo Kinnunen +Date: Thu Apr 16 13:16:28 2020 +0300 + + quectel: Check SIM swap after "+QUSIM: 1" URC + + Quectel emits "+QUSIM: 1" after eUICC reinitialization. Detect it + and perform SIM swap check if one is encountered. + + The motivation here is that M2M eUICC profile switch causes eUICC + reset and this is one way to detect and handle profile switches + properly on Quectel modems. The existing SIM hot swap mechanism is + used as it appears to be suitable for handling profile switches as + well as physical swapping of SIM cards. + + plugins/quectel/mm-broadband-modem-qmi-quectel.c | 9 +++ + plugins/quectel/mm-broadband-modem-quectel.c | 9 +++ + plugins/quectel/mm-shared-quectel.c | 89 + ++++++++++++++++++++++++ + plugins/quectel/mm-shared-quectel.h | 6 ++ + 4 files changed, 113 insertions(+) + +commit 1802bd07ac82faab9f0b196a92a69784f386daa1 +Author: Aleksander Morgado +Date: Thu Apr 16 15:52:50 2020 +0200 + + man,mmcli: remove non-existent --list-bearers option + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/203 + + docs/man/mmcli.1 | 3 --- + 1 file changed, 3 deletions(-) + +commit b95bcfe6e37662e9947ded7b1c73ae9b6ada0631 +Author: Aleksander Morgado +Date: Sun Apr 12 17:49:36 2020 +0200 + + api,location: improve InjectAssistanceData() method docs + + Explain when this method should be used instead of A-GPS. + + .../org.freedesktop.ModemManager1.Modem.Location.xml | 14 + ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +commit ef5611424448854d45f3ed3055bd46db93ed473e +Author: Aleksander Morgado +Date: Sun Apr 12 17:38:43 2020 +0200 + + api,location: improve Setup() method docs + + Explicitly state that the signals_location argument affects the + behavior of the Location property. + + ...rg.freedesktop.ModemManager1.Modem.Location.xml | 24 + ++++++++++++++-------- + 1 file changed, 16 insertions(+), 8 deletions(-) + +commit d93526a11481847a7e318c9d4ca0e5c83748a119 +Author: Aleksander Morgado +Date: Sun Apr 12 17:15:58 2020 +0200 + + api,location: improve Location property docs + + Clearly specify that GetLocation() is another way to retrieve the + location information instead of the Location property. + + .../org.freedesktop.ModemManager1.Modem.Location.xml | 13 + ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) + +commit 330e0b33a40754d2a952df0c25bc2315ad3f9a8b +Author: Aleksander Morgado +Date: Sat Mar 28 07:16:17 2020 +0100 + + base-bearer: log connection attempt failure reason + + We were logging it as debug, increase logging level to warning to make + sure it's always logged. + + src/mm-base-bearer.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 073043ca6bf8644881d768041d6b7779ebfbd88d +Author: Aleksander Morgado +Date: Sat Mar 28 06:57:42 2020 +0100 + + base-bearer: log stats on disconnection + + src/mm-base-bearer.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +commit eebd7582bbd7a47d32838e5031a1315f15317f59 +Author: Aleksander Morgado +Date: Sat Mar 28 06:57:13 2020 +0100 + + base-bearer: don't run disconnection path multiple times + + src/mm-base-bearer.c | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 79daa3099e1f8478b8e17d8065143bca3e38214b +Author: Aleksander Morgado +Date: Fri Mar 27 18:01:36 2020 +0100 + + api,bearer: add 'total-rx-bytes', 'total-tx-bytes' and + 'total-duration' stats + + Compiling the amount of bytes transferred and received during all + tracked connection attempts, as well as the total duration of all the + connections. + + cli/mmcli-bearer.c | 15 +++ + cli/mmcli-output.c | 3 + + cli/mmcli-output.h | 3 + + docs/reference/libmm-glib/libmm-glib-sections.txt | 6 + + .../org.freedesktop.ModemManager1.Bearer.xml | 25 +++- + libmm-glib/mm-bearer-stats.c | 129 + +++++++++++++++++++++ + libmm-glib/mm-bearer-stats.h | 6 + + src/mm-base-bearer.c | 72 ++++++++++-- + 8 files changed, 248 insertions(+), 11 deletions(-) + +commit f325ef59020b0acc33b6d05e96c8df7b58373715 +Author: Aleksander Morgado +Date: Fri Mar 27 16:24:48 2020 +0100 + + api,bearer: add 'attempts' and 'failed-attempts' statistics + + When we're reusing over and over the same bearer object, we can + provide statistical information about the number of connection + attempts that have been done and how many of them failed. + + cli/mmcli-bearer.c | 16 +++- + cli/mmcli-output.c | 2 + + cli/mmcli-output.h | 2 + + docs/reference/libmm-glib/libmm-glib-sections.txt | 4 + + .../org.freedesktop.ModemManager1.Bearer.xml | 36 +++++++-- + libmm-glib/mm-bearer-stats.c | 93 + ++++++++++++++++++++-- + libmm-glib/mm-bearer-stats.h | 16 ++-- + src/mm-base-bearer.c | 32 +++++--- + 8 files changed, 168 insertions(+), 33 deletions(-) + +commit b3ec30403fb813cf3902a02350289e769858f10e +Author: Aleksander Morgado +Date: Fri Apr 10 11:38:18 2020 +0200 + + doc,api: add reference to --with-at-command-via-dbus in Command() info + + introspection/org.freedesktop.ModemManager1.Modem.xml | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 868d0dbf3f01259887c2b5dc6d16eee28ab3ffb5 +Author: Aleksander Morgado +Date: Fri Apr 10 11:37:59 2020 +0200 + + api,doc: fix missing Command() doc output in html + + introspection/org.freedesktop.ModemManager1.Modem.xml | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit 797f2a5a2e73d2be64b16c739d9b859ffd7938d0 +Author: Aleksander Morgado +Date: Fri Apr 10 10:47:53 2020 +0200 + + api,doc: fix some property gtk-doc links + + introspection/org.freedesktop.ModemManager1.Modem.xml | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 9c0a937cf3ce311f8ed7992dc5b8abd38ffc3e08 +Author: Aleksander Morgado +Date: Thu Apr 9 11:15:30 2020 +0200 + + broadband-modem-qmi: since 1.24.6 all strings are valid UTF-8 + + src/mm-broadband-modem-qmi.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +commit 4758e49d879c47a92cd76156f0f7ec7739ceb39f +Author: Aleksander Morgado +Date: Thu Apr 9 11:09:45 2020 +0200 + + broadband-modem-qmi: request operator reload explicitly + + If the modem switches from one roaming operator to a different roaming + operator, the actual operator MCCMNC/description will change even if + the registration state keeps on being the same (roaming). Detect that, + and trigger operator info reloading explicitly. + + src/mm-broadband-modem-qmi.c | 59 + ++++++++++++++++++++++++++++++-------------- + 1 file changed, 40 insertions(+), 19 deletions(-) + +commit ff97a776315d9e61f793c7312edce1f7e833f04a +Author: Aleksander Morgado +Date: Thu Apr 9 08:24:00 2020 +0200 + + broadband-modem-mbim: request operator reload explicitly + + If the modem switches from one roaming operator to a different roaming + operator, the actual operator MCCMNC/description will change even if + the registration state keeps on being the same (roaming). Detect that, + and trigger operator info reloading explicitly. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/154 + + src/mm-broadband-modem-mbim.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit 5313c25bd8ad4543f207da611551e42537ede208 +Author: Aleksander Morgado +Date: Thu Apr 9 15:44:15 2020 +0200 + + broadband-modem-qmi: explicitly disable autoconnect during enable + + If the QMI device has autoconnect enabled, it will collide in one way + or another with the ModemManager triggered connection sequence, + usually because the user-requested settings are different to the + autoconnected ones. + + So, detect whether autoconnect is enabled or not, and if it is, + explicitly disable it. + + src/mm-broadband-modem-qmi.c | 177 + ++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 160 insertions(+), 17 deletions(-) + +commit a60beedcc590c9dc590e616676652eec2a3bc51b +Author: Aleksander Morgado +Date: Thu Apr 9 15:43:59 2020 +0200 + + port-qmi: allow users to release clients when no longer needed + + src/mm-port-qmi.c | 52 + +++++++++++++++++++++++++++++++++++++++++++++------- + src/mm-port-qmi.h | 4 ++++ + 2 files changed, 49 insertions(+), 7 deletions(-) + +commit 32e26230526dda8298b38db2b65e57dc635fbf9d +Author: Aleksander Morgado +Date: Thu Apr 9 07:48:21 2020 +0200 + + iface-modem-3gpp: add 5GNR to full 3GPP act mask + + So that the logic looking for 3GPP related registration info works in + the QMI modem object when selected network is reported as 'unknown' + but still the radio interfaces list reports 5GNR. + + <<<<<< TLV: + <<<<<< type = "Serving System" (0x01) + <<<<<< length = 6 + <<<<<< value = 01:02:01:00:01:0C + <<<<<< translated = [ registration_state = 'registered' + cs_attach_state = 'detached' ps_attach_state = 'attached' + selected_network = 'unknown' radio_interfaces = '{ [0] = '5gnr '}' ] + + src/mm-broadband-modem-qmi.c | 2 +- + src/mm-iface-modem-3gpp.h | 3 ++- + 2 files changed, 3 insertions(+), 2 deletions(-) + +commit 2293fbe6ba2991d16d663986933d112812f97703 +Author: Aleksander Morgado +Date: Wed Mar 25 18:07:53 2020 +0100 + + shared-qmi: include all possible 5G related combinations if SSP + is supported + + src/mm-shared-qmi.c | 111 + +++++++++++++++++++++++++--------------------------- + 1 file changed, 53 insertions(+), 58 deletions(-) + +commit c9ee47dd8f49ff24ce4244afbd44473f03a78f9a +Author: Aleksander Morgado +Date: Wed Mar 25 16:14:48 2020 +0100 + + helpers-qmi: always log all queried capabilities when building current + + src/mm-modem-helpers-qmi.c | 41 +++++++++++++++++++++-------------------- + 1 file changed, 21 insertions(+), 20 deletions(-) + +commit 8eaffb654f1cc5c66bcccfd069e43834405c200f +Author: Aleksander Morgado +Date: Tue Mar 24 16:15:34 2020 +0100 + + fibocom: add FM150 port type hints + + plugins/fibocom/77-mm-fibocom-port-types.rules | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit 03f625aa3b190a82b8947bed46d4d67f0f3a2cc6 +Author: Aleksander Morgado +Date: Tue Mar 24 16:10:25 2020 +0100 + + fibocom: support QMI capable devices + + plugins/fibocom/mm-plugin-fibocom.c | 19 +++++++++++++++++-- + 1 file changed, 17 insertions(+), 2 deletions(-) + +commit 426f69d64b0516407995c27cd567bbaca74ff487 +Author: Aleksander Morgado +Date: Tue Mar 24 15:33:31 2020 +0100 + + tests,modem-helpers: regex number is index of an array, so starts at 0 + + src/tests/test-modem-helpers.c | 90 + +++++++++++++++++++++--------------------- + 1 file changed, 45 insertions(+), 45 deletions(-) + +commit 8aec9e3889706bc1677c65919297a1310eed5718 +Author: Aleksander Morgado +Date: Tue Mar 24 15:27:57 2020 +0100 + + test,modem-helpers: use MMModem3gppRegistrationState values in tests + + src/tests/test-modem-helpers.c | 88 + +++++++++++++++++++++--------------------- + 1 file changed, 44 insertions(+), 44 deletions(-) + +commit 28b0e2b43917da0ebb3a69909321f6f06e704ede +Author: Aleksander Morgado +Date: Tue Mar 24 14:16:45 2020 +0100 + + modem-helpers: simplify logic to create array of GRegex + + Iterate over the list of available patterns, instead of adding + them one by one. + + src/mm-modem-helpers.c | 196 + +++++++++++-------------------------------------- + 1 file changed, 44 insertions(+), 152 deletions(-) + +commit c78da3de7e6bdd82b53268614b997e5a4f3190f6 +Author: Aleksander Morgado +Date: Tue Mar 24 07:38:00 2020 +0100 + + broadband-modem: run +C5GREG state checks + + The generic CREG parser is improved to also allow parsing +C5GREG + responses and URCs. + + src/mm-broadband-modem.c | 172 + ++++++++++++++++++++++++----------------- + src/mm-modem-helpers.c | 83 ++++++++++++++------ + src/mm-modem-helpers.h | 1 + + src/tests/test-modem-helpers.c | 139 ++++++++++++++++++++++----------- + 4 files changed, 254 insertions(+), 141 deletions(-) + +commit 040eb3880cae208660ae9e35bde75f7cffd790a7 +Author: Aleksander Morgado +Date: Tue Mar 24 07:36:01 2020 +0100 + + helpers: use generic number parsing methods in CREG parser + + This fixes the s8500 wave unit test, which was incorrectly parsing the + Act field reported as 'B' as "GSM" (strtol(B)=0) + + Also, given that the generic parsing methods are able to parse numbers + from quoted strings, this change allows us to remove the Thuraya + specific CREG matching that just took into consideration quoted + strings. The Thuraya unit tests are also fixed up to provide proper + testing of the logic. + + src/mm-modem-helpers.c | 93 + ++++++++++-------------------------------- + src/tests/test-modem-helpers.c | 14 +++---- + 2 files changed, 28 insertions(+), 79 deletions(-) + +commit 40b36a25cad1d43a46dc0bdf8acb88189fbfbb53 +Author: Aleksander Morgado +Date: Tue Mar 24 14:32:43 2020 +0100 + + test,modem-helpers: remove obsolete comments in u-blox CREG tests + + We already support "SMS only" registration state. + + src/tests/test-modem-helpers.c | 2 -- + 1 file changed, 2 deletions(-) + +commit ccb45a8941f2b96a06c032a6d009b6b74c23b3a3 +Author: Aleksander Morgado +Date: Tue Mar 24 07:10:45 2020 +0100 + + libmm-glib,helpers: ignore all leading whitespaces when parsing + numbers + + libmm-glib/mm-common-helpers.c | 22 ++++++++++++++++++++-- + 1 file changed, 20 insertions(+), 2 deletions(-) + +commit 7eee214b8e6e61db92d564b2757099620d4eccbf +Author: Aleksander Morgado +Date: Tue Mar 24 07:05:56 2020 +0100 + + helpers: add additional AcT values from 27.007 + + src/mm-modem-helpers.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +commit 68917f502e60a73bd1904bf6bf98b65354a55251 +Author: Aleksander Morgado +Date: Tue Mar 24 07:01:36 2020 +0100 + + api: new 'attached RLOS' registration state + + Reporting the state when the UE attaches to access restricted local + operator services. + + include/ModemManager-enums.h | 2 ++ + src/mm-base-bearer.c | 1 + + src/mm-modem-helpers.c | 4 ++-- + 3 files changed, 5 insertions(+), 2 deletions(-) + +commit 1c7304eb718a76dc679b1c08d3e5f0a5cf2d7a2d +Author: Aleksander Morgado +Date: Tue Mar 24 06:22:34 2020 +0100 + + libmm-glib,helpers: allow reading hex strings from match info + + libmm-glib/mm-common-helpers.c | 25 +++++++++++++++++++++++++ + libmm-glib/mm-common-helpers.h | 6 ++++++ + 2 files changed, 31 insertions(+) + +commit 539562af0181f12343f6ebe2e3ffd44c5efb2fce +Author: Aleksander Morgado +Date: Tue Mar 24 06:17:34 2020 +0100 + + libmm-glib,helpers: skip quotes when reading numbers from match infos + + Useful when the regex applied to the parseable strings don't have an + special ignore rule for the quotes. + + libmm-glib/mm-common-helpers.c | 39 + +++++++++------------------------------ + 1 file changed, 9 insertions(+), 30 deletions(-) + +commit 44ace9642cd8a2a80c65655a6d543c69169b2a06 +Author: Aleksander Morgado +Date: Mon Mar 23 10:42:39 2020 +0100 + + modem-helpers: improved +WS46 mode '25' handling + + The mode '25' means different things on LTE-capable and + non-LTE-capable devices, so improve the logic to clarify that. + + src/mm-modem-helpers.c | 43 ++++++++++++++++++++++++++++++++----------- + 1 file changed, 32 insertions(+), 11 deletions(-) + +commit f31182c08d3801489510cb40cca11f82868d1989 +Author: Aleksander Morgado +Date: Mon Mar 23 08:07:18 2020 +0100 + + iface-modem-3gpp: don't fixup CS network support + + This is already done by the modem interface as soon as current + capabilities are loaded. + + src/mm-iface-modem-3gpp.c | 9 --------- + src/mm-iface-modem.c | 9 --------- + src/mm-iface-modem.h | 1 - + 3 files changed, 19 deletions(-) + +commit 05301f23a1f3fdacb3a024b38d48d0129305daf0 +Author: Aleksander Morgado +Date: Mon Mar 23 07:58:23 2020 +0100 + + iface-modem-3gpp: new 5GS network support + + plugins/altair/mm-broadband-modem-altair-lte.c | 20 ++-- + src/mm-broadband-modem-mbim.c | 7 +- + src/mm-broadband-modem-qmi.c | 13 +- + src/mm-broadband-modem.c | 53 ++++++--- + src/mm-iface-modem-3gpp.c | 158 + ++++++++++++++++--------- + src/mm-iface-modem-3gpp.h | 12 +- + src/mm-iface-modem.c | 25 ++-- + 7 files changed, 183 insertions(+), 105 deletions(-) + +commit 9144a9fa344856c484e3354eafc41c11e4a0c4a2 +Author: Aleksander Morgado +Date: Mon Mar 23 07:34:15 2020 +0100 + + helpers-qmi: support 5G capabilities and modes + + src/mm-modem-helpers-qmi.c | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 1cfd5daf9b67c3394e0541d72210128461282d09 +Author: Aleksander Morgado +Date: Mon Mar 23 07:31:39 2020 +0100 + + api: new 5GNR access technology + + include/ModemManager-enums.h | 2 ++ + 1 file changed, 2 insertions(+) + +commit f912de357439174b1bc08f509052d053cefa2f29 +Author: Aleksander Morgado +Date: Mon Mar 23 07:29:46 2020 +0100 + + broadband-modem: support 5G in +WS46 to capabilities conversion + + src/mm-broadband-modem.c | 38 ++++++++++++++++++++++++++------------ + 1 file changed, 26 insertions(+), 12 deletions(-) + +commit 5db3fa88e92129b723e645c8bece1e620d2a6349 +Author: Aleksander Morgado +Date: Mon Mar 23 07:19:56 2020 +0100 + + api: new 5G mode + + include/ModemManager-enums.h | 2 ++ + src/mm-iface-modem.c | 16 ++++++++++++++++ + src/mm-iface-modem.h | 2 ++ + src/mm-modem-helpers-qmi.c | 15 +++++++++++++++ + src/mm-modem-helpers.c | 41 + ++++++++++++++++++++++++++++++----------- + 5 files changed, 65 insertions(+), 11 deletions(-) + +commit 7354dc928f389d090dfa5c3599ed199f232c2fde +Author: Aleksander Morgado +Date: Mon Mar 23 06:36:36 2020 +0100 + + api: new 5GNR capability + + include/ModemManager-enums.h | 4 +++- + libmm-glib/mm-modem-3gpp.c | 3 ++- + src/mm-iface-modem.c | 8 +++----- + src/mm-modem-helpers-qmi.c | 13 ++++++++++++- + src/mm-modem-helpers.h | 3 ++- + 5 files changed, 22 insertions(+), 9 deletions(-) + +commit bf771be7fac874a26f35afebd1fad27af64eaae7 +Author: Aleksander Morgado +Date: Wed Mar 25 18:14:52 2020 +0100 + + build: require libqmi 1.25.4 for full 5G enum support + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 0cd76bf1c411707b6ba1c4222d791e2115ef6840 +Author: Aleksander Morgado +Date: Mon Mar 23 06:34:53 2020 +0100 + + api: deprecate MM_MODEM_CAPABILITY_LTE_ADVANCED + + It's not used anywhere. + + cli/mmcli-modem.c | 2 +- + docs/reference/api/ModemManager-sections.txt | 2 ++ + include/ModemManager-compat.h | 17 +++++++++++++++++ + include/ModemManager-enums.h | 3 +-- + libmm-glib/mm-modem-3gpp.c | 2 +- + src/mm-iface-modem.c | 4 ++-- + src/mm-modem-helpers-qmi.c | 2 -- + src/mm-modem-helpers.h | 6 +----- + 8 files changed, 25 insertions(+), 13 deletions(-) + +commit 78266ac4895e34a02f4f66893d7ae867b38864b0 +Author: Aleksander Morgado +Date: Mon Mar 23 07:02:57 2020 +0100 + + iface-modem: simplify is_cdma_only() check + + The check needs to look for a matching single bit, so no need to make + it too complex. + + src/mm-iface-modem.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +commit e1cfe3b4ee47d94a0f63bb9dbe83e3415d15b664 +Author: Aleksander Morgado +Date: Thu Apr 9 14:35:31 2020 +0200 + + api,cdma: fix small typo + + Reported by Malte Grosse. + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/202#note_460466 + + introspection/org.freedesktop.ModemManager1.Modem.ModemCdma.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 1a67db047e6d5473ed6327d58c25cdf96134df5f +Author: Aleksander Morgado +Date: Mon Mar 23 06:18:22 2020 +0100 + + cli: improve --help output for --modem and --sim options + + Specify the full list of supported object lookup methods. + + cli/mmcli-common.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit d72a9df041bd25df6f6acb28eed5cbb044a89c51 +Author: Aleksander Morgado +Date: Mon Mar 23 06:05:51 2020 +0100 + + cli: allow looking up for first available modem or SIM + + When a system only has one single modem, it's convenient to just look + for the first available modem or SIM object, instead of needing to + provide the full path or the exact index number. + + This improvement allows users to use the "any" keyword, or any of its + substrings (e.g. "an" or even "a") to match the first available object + of the requested type. + + E.g.: + + $ mmcli -m a + -------------------------------- + General | dbus path: + /org/freedesktop/ModemManager1/Modem/0 + | device id: + 1a48f1180f1fb0166d91f7b139d027136b59ba63 + -------------------------------- + Hardware | manufacturer: Sierra Wireless Inc. + | model: Sierra Wireless EM7345 4G LTE + ... + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/196 + + cli/mmcli-common.c | 87 + ++++++++++++++++++++++++++++++++++-------------------- + 1 file changed, 55 insertions(+), 32 deletions(-) + +commit cc99ab562b2f47f48f5ed9e5afa0c23a4a5c32cd +Author: Aleksander Morgado +Date: Mon Mar 23 05:45:13 2020 +0100 + + cli: consolidate logic to process user provided object lookup info + + The user may specify DBus objects in several ways, e.g. with full + object paths, just with the object numeric ids, or in some other cases + with the full device UID. + + Setup one single method to process this info for all object types, so + that it's also easier to add new lookup methods for all at the same + time. + + cli/mmcli-common.c | 338 + ++++++++++++++++++++--------------------------------- + cli/mmcli-common.h | 20 ++-- + 2 files changed, 134 insertions(+), 224 deletions(-) + +commit 6f82ea3732278ca25f367aab3e1cef2ef865f52f +Author: Aleksander Morgado +Date: Thu Apr 9 07:34:39 2020 +0200 + + log: force using the object logging API + + Unless the generic API is explicitly allowed, as in the main.c source + file. + + src/main.c | 3 ++- + src/mm-log.h | 12 ++++++++---- + 2 files changed, 10 insertions(+), 5 deletions(-) + +commit 956dc8a704fce4ca5687cc7f43eaf7e9d703e699 +Author: Aleksander Morgado +Date: Thu Apr 9 07:10:52 2020 +0200 + + api,3gpp: fix InitialEpsBearerSettings documentation + + introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 57ad6654ba1e36cc3f5b7223381b9e34c0469fc1 +Author: Aleksander Morgado +Date: Thu Apr 9 07:09:26 2020 +0200 + + api,3gpp: add "Pco" property detailed documentation + + ...org.freedesktop.ModemManager1.Modem.Modem3gpp.xml | 20 + +++++++++++++++++++- + 1 file changed, 19 insertions(+), 1 deletion(-) + +commit 962fe8bdb8ed65909b9f4ea83e7b31408ef216b6 +Author: Aleksander Morgado +Date: Tue Apr 7 09:40:04 2020 +0200 + + api,simple: fix name of access-technologies field in GetStatus() + + introspection/org.freedesktop.ModemManager1.Modem.Simple.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 839e2ec7ab51132ab01530bef4bf894692b239a3 +Author: Aleksander Morgado +Date: Tue Apr 7 09:38:51 2020 +0200 + + api,modem: reword the properties argument explanation in + CreateBearer() + + introspection/org.freedesktop.ModemManager1.Modem.xml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 6de13631745f35391f895628cc17ca03526ed0cc +Author: Aleksander Morgado +Date: Tue Apr 7 09:36:06 2020 +0200 + + api,modem: improve capabilities related documentation + + And remove the unused mm_common_build_capability_combinations_any() + method in the common non-public library code. + + .../org.freedesktop.ModemManager1.Modem.xml | 26 + ++++++++++++++++------ + libmm-glib/mm-common-helpers.c | 11 --------- + libmm-glib/mm-common-helpers.h | 1 - + 3 files changed, 19 insertions(+), 19 deletions(-) + +commit 382b059c1eea8108b5dfb38d70f2a03118a566b7 +Author: Aleksander Morgado +Date: Wed Apr 8 16:25:35 2020 +0200 + + po: update source code lines + + po/cs.po | 4 ++-- + po/da.po | 4 ++-- + po/de.po | 4 ++-- + po/fr.po | 4 ++-- + po/fur.po | 4 ++-- + po/hu.po | 4 ++-- + po/id.po | 4 ++-- + po/it.po | 4 ++-- + po/lt.po | 4 ++-- + po/pl.po | 4 ++-- + po/pt_BR.po | 4 ++-- + po/ru.po | 4 ++-- + po/sk.po | 4 ++-- + po/sv.po | 4 ++-- + po/tr.po | 4 ++-- + po/uk.po | 8 ++++---- + po/zh_CN.po | 4 ++-- + 17 files changed, 36 insertions(+), 36 deletions(-) + +commit 93e4c8625beb1dab16dd2ae23b6d09587200fea8 +Author: Aleksander Morgado +Date: Wed Apr 8 16:22:52 2020 +0200 + + plugin: don't match generic plugin by name + + plugins/generic/mm-plugin-generic.c | 3 ++- + plugins/generic/tests/test-service-generic.c | 2 +- + src/mm-plugin-manager.c | 21 ++++++++++----------- + src/mm-plugin.c | 25 + ++++++++++++++++++++++++- + src/mm-plugin.h | 3 ++- + 5 files changed, 39 insertions(+), 15 deletions(-) + +commit 4b058872a092fa85413fa905c37a6a1510a7a056 +Author: Aleksander Morgado +Date: Wed Apr 8 16:14:00 2020 +0200 + + plugins: don't add plugin name in log message explicitly + + plugins/altair/mm-broadband-modem-altair-lte.c | 2 +- + plugins/cinterion/mm-broadband-bearer-cinterion.c | 16 ++++++++-------- + plugins/huawei/mm-broadband-modem-huawei.c | 4 ++-- + plugins/huawei/mm-plugin-huawei.c | 14 +++++++------- + plugins/longcheer/mm-plugin-longcheer.c | 6 +++--- + plugins/novatel/mm-broadband-modem-novatel.c | 6 +++--- + plugins/novatel/mm-common-novatel.c | 8 ++++---- + plugins/sierra/mm-common-sierra.c | 6 +++--- + plugins/ublox/mm-broadband-bearer-ublox.c | 4 ++-- + plugins/zte/mm-plugin-zte.c | 2 +- + 10 files changed, 34 insertions(+), 34 deletions(-) + +commit 8722215f7e6ceb00c692fc94c1915ad2671ca1ae +Author: Aleksander Morgado +Date: Wed Apr 8 16:07:58 2020 +0200 + + plugins: use logging module name as plugin name + + plugins/altair/mm-plugin-altair-lte.c | 2 +- + plugins/anydata/mm-plugin-anydata.c | 2 +- + plugins/cinterion/mm-plugin-cinterion.c | 2 +- + plugins/dell/mm-plugin-dell.c | 2 +- + plugins/dlink/mm-plugin-dlink.c | 2 +- + plugins/fibocom/mm-plugin-fibocom.c | 2 +- + plugins/foxconn/mm-plugin-foxconn.c | 2 +- + plugins/haier/mm-plugin-haier.c | 2 +- + plugins/huawei/mm-plugin-huawei.c | 2 +- + plugins/iridium/mm-plugin-iridium.c | 2 +- + plugins/linktop/mm-plugin-linktop.c | 2 +- + plugins/longcheer/mm-plugin-longcheer.c | 2 +- + plugins/mbm/mm-plugin-mbm.c | 2 +- + plugins/motorola/mm-plugin-motorola.c | 2 +- + plugins/mtk/mm-plugin-mtk.c | 2 +- + plugins/nokia/mm-plugin-nokia-icera.c | 2 +- + plugins/nokia/mm-plugin-nokia.c | 2 +- + plugins/novatel/mm-plugin-novatel-lte.c | 2 +- + plugins/novatel/mm-plugin-novatel.c | 2 +- + plugins/option/mm-plugin-hso.c | 2 +- + plugins/option/mm-plugin-option.c | 2 +- + plugins/pantech/mm-plugin-pantech.c | 2 +- + plugins/quectel/mm-plugin-quectel.c | 2 +- + plugins/samsung/mm-plugin-samsung.c | 2 +- + plugins/sierra/mm-plugin-sierra-legacy.c | 2 +- + plugins/sierra/mm-plugin-sierra.c | 2 +- + plugins/simtech/mm-plugin-simtech.c | 2 +- + plugins/telit/mm-plugin-telit.c | 2 +- + plugins/thuraya/mm-plugin-thuraya.c | 8 ++++---- + plugins/tplink/mm-plugin-tplink.c | 2 +- + plugins/ublox/mm-plugin-ublox.c | 2 +- + plugins/via/mm-plugin-via.c | 2 +- + plugins/wavecom/mm-plugin-wavecom.c | 2 +- + plugins/x22x/mm-plugin-x22x.c | 2 +- + plugins/zte/mm-plugin-zte.c | 2 +- + 35 files changed, 38 insertions(+), 38 deletions(-) + +commit 997e2cefb8d72ced4d8ad96382d40482ec58ccdd +Author: Aleksander Morgado +Date: Wed Apr 8 16:07:32 2020 +0200 + + log: define per-module logging for shared utils and plugins + + plugins/Makefile.am | 331 + +++++++++++++++++++++++++++++++++++++++------------- + src/mm-log-test.h | 1 + + src/mm-log.c | 3 + + src/mm-log.h | 15 ++- + 4 files changed, 263 insertions(+), 87 deletions(-) + +commit e956bac47b5a822a836381ec8dbb34041a8f41f4 +Author: Aleksander Morgado +Date: Wed Apr 8 15:13:53 2020 +0200 + + log: common logging method definition for all testers and helpers + + .../cinterion/tests/test-modem-helpers-cinterion.c | 23 +---------- + plugins/huawei/tests/test-modem-helpers-huawei.c | 22 +---------- + plugins/icera/tests/test-modem-helpers-icera.c | 23 +---------- + plugins/linktop/tests/test-modem-helpers-linktop.c | 23 +---------- + plugins/mbm/tests/test-modem-helpers-mbm.c | 23 +---------- + plugins/sierra/tests/test-modem-helpers-sierra.c | 23 +---------- + plugins/simtech/tests/test-modem-helpers-simtech.c | 23 +---------- + plugins/telit/tests/test-mm-modem-helpers-telit.c | 23 +---------- + plugins/tests/test-keyfiles.c | 23 +---------- + plugins/tests/test-udev-rules.c | 23 +---------- + .../thuraya/tests/test-mm-modem-helpers-thuraya.c | 23 +---------- + plugins/ublox/tests/test-modem-helpers-ublox.c | 23 +---------- + plugins/xmm/tests/test-modem-helpers-xmm.c | 23 +---------- + src/Makefile.am | 1 + + src/mm-log-test.h | 45 + ++++++++++++++++++++++ + src/mm-log.c | 10 ++--- + src/mm-log.h | 10 ++--- + src/tests/test-at-serial-port.c | 23 +---------- + src/tests/test-charsets.c | 23 +---------- + src/tests/test-error-helpers.c | 21 ---------- + src/tests/test-modem-helpers-qmi.c | 23 +---------- + src/tests/test-modem-helpers.c | 23 +---------- + src/tests/test-qcdm-serial-port.c | 23 +---------- + src/tests/test-sms-part-3gpp.c | 23 +---------- + src/tests/test-sms-part-cdma.c | 23 +---------- + src/tests/test-udev-rules.c | 23 +---------- + test/mmrules.c | 23 +---------- + test/mmsmspdu.c | 23 +---------- + test/mmtty.c | 23 +---------- + 29 files changed, 80 insertions(+), 558 deletions(-) + +commit f1e930d574c712b75bf5772d3ae128b72b327a38 +Author: Aleksander Morgado +Date: Wed Apr 8 10:11:50 2020 +0200 + + core: consolidate logging format in main daemon logic + + src/main.c | 30 ++++++++++++++---------------- + 1 file changed, 14 insertions(+), 16 deletions(-) + +commit 4508c11796fef8505891d47408de0e01c669003e +Author: Aleksander Morgado +Date: Wed Apr 8 09:40:25 2020 +0200 + + zte: port to use object logging + + plugins/zte/mm-broadband-modem-zte-icera.c | 1 - + plugins/zte/mm-broadband-modem-zte.c | 2 -- + plugins/zte/mm-plugin-zte.c | 8 ++++---- + 3 files changed, 4 insertions(+), 7 deletions(-) + +commit 35554aaeed42ddb9ecfad8d71f2e527485c10dda +Author: Aleksander Morgado +Date: Wed Apr 8 09:38:59 2020 +0200 + + xmm: port to use object logging + + plugins/xmm/mm-broadband-modem-mbim-xmm.c | 1 - + plugins/xmm/mm-broadband-modem-xmm.c | 1 - + plugins/xmm/mm-modem-helpers-xmm.c | 23 ++++++++++--------- + plugins/xmm/mm-shared-xmm.c | 37 + ++++++++++++++++--------------- + 4 files changed, 31 insertions(+), 31 deletions(-) + +commit 9c9e531130e3a6cad4fcdf30c90d345a98cfe1b2 +Author: Aleksander Morgado +Date: Wed Apr 8 08:00:03 2020 +0200 + + x22x: port to use object logging + + plugins/x22x/mm-broadband-modem-x22x.c | 1 - + plugins/x22x/mm-plugin-x22x.c | 24 ++++++++++++++---------- + 2 files changed, 14 insertions(+), 11 deletions(-) + +commit ab47b565731296ba76d18d17c0c2ccc9d029de52 +Author: Aleksander Morgado +Date: Wed Apr 8 07:56:51 2020 +0200 + + wavecom: port to use object logging + + plugins/wavecom/mm-broadband-modem-wavecom.c | 20 +++++++++----------- + 1 file changed, 9 insertions(+), 11 deletions(-) + +commit c891595e3f447c04eda7a14c00d63ea7d957ebea +Author: Aleksander Morgado +Date: Wed Apr 8 07:54:46 2020 +0200 + + via: port to use object logging + + plugins/via/mm-broadband-modem-via.c | 8 ++++---- + plugins/via/mm-plugin-via.c | 1 - + 2 files changed, 4 insertions(+), 5 deletions(-) + +commit ccd0f6de5ad875b5ddd73ed5a20aea060b679aea +Author: Aleksander Morgado +Date: Wed Apr 8 07:53:06 2020 +0200 + + ublox: port to use object logging + + plugins/ublox/mm-broadband-bearer-ublox.c | 219 +++++++++---------- + plugins/ublox/mm-broadband-modem-ublox.c | 282 + ++++++++++++------------- + plugins/ublox/mm-modem-helpers-ublox.c | 46 ++-- + plugins/ublox/mm-modem-helpers-ublox.h | 6 + + plugins/ublox/mm-plugin-ublox.c | 38 +--- + plugins/ublox/tests/test-modem-helpers-ublox.c | 10 +- + 6 files changed, 300 insertions(+), 301 deletions(-) + +commit e04aa0ea5d16ce4f162e8adcd4f42a02d23618ba +Author: Aleksander Morgado +Date: Wed Apr 8 07:09:19 2020 +0200 + + tplink: port to use object logging + + plugins/tplink/mm-plugin-tplink.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 94a15597518c2832803af71570fa3d006293c7ff +Author: Aleksander Morgado +Date: Wed Apr 8 07:08:35 2020 +0200 + + thuraya: no logging in plugin + + plugins/thuraya/mm-plugin-thuraya.c | 1 - + 1 file changed, 1 deletion(-) + +commit 98631e140ed9b85462d359503d22900edc30ad32 +Author: Aleksander Morgado +Date: Wed Apr 8 07:07:51 2020 +0200 + + thuraya: return GError in custom CPMS parser + + plugins/thuraya/mm-broadband-modem-thuraya.c | 10 +--- + plugins/thuraya/mm-modem-helpers-thuraya.c | 70 + ++++++++++------------ + plugins/thuraya/mm-modem-helpers-thuraya.h | 9 +-- + .../thuraya/tests/test-mm-modem-helpers-thuraya.c | 4 +- + 4 files changed, 42 insertions(+), 51 deletions(-) + +commit 078c638165b4c060ef6e7537d2cf306fa8cfa5f1 +Author: Aleksander Morgado +Date: Tue Apr 7 16:28:16 2020 +0200 + + telit: port to use object logging + + plugins/telit/mm-broadband-modem-mbim-telit.c | 19 +++---- + plugins/telit/mm-broadband-modem-telit.c | 60 + +++++++++++------------ + plugins/telit/mm-common-telit.c | 39 +++++++-------- + plugins/telit/mm-modem-helpers-telit.c | 19 ++++--- + plugins/telit/mm-modem-helpers-telit.h | 2 + + plugins/telit/mm-plugin-telit.c | 6 +-- + plugins/telit/mm-shared-telit.c | 6 ++- + plugins/telit/tests/test-mm-modem-helpers-telit.c | 2 + + 8 files changed, 81 insertions(+), 72 deletions(-) + +commit 9dbc346f93934da5901225f92b11703b23bcf22a +Author: Aleksander Morgado +Date: Tue Apr 7 16:08:57 2020 +0200 + + simtech: port to use object logging + + plugins/simtech/mm-broadband-modem-qmi-simtech.c | 1 - + plugins/simtech/mm-broadband-modem-simtech.c | 10 ++-- + plugins/simtech/mm-modem-helpers-simtech.c | 1 - + plugins/simtech/mm-plugin-simtech.c | 4 +- + plugins/simtech/mm-shared-simtech.c | 66 + ++++++++++++------------ + 5 files changed, 39 insertions(+), 43 deletions(-) + +commit d15da9cf60af9cd1a6b7036519ec557712b5dbad +Author: Aleksander Morgado +Date: Tue Apr 7 16:02:25 2020 +0200 + + sierra: port to use object logging + + plugins/sierra/mm-broadband-bearer-sierra.c | 27 + +++++++++++++----------- + plugins/sierra/mm-broadband-modem-sierra-icera.c | 4 ++-- + plugins/sierra/mm-broadband-modem-sierra.c | 26 + +++++++++++------------ + plugins/sierra/mm-common-sierra.c | 18 ++++++++-------- + plugins/sierra/mm-modem-helpers-sierra.c | 1 - + plugins/sierra/mm-plugin-sierra-legacy.c | 1 - + plugins/sierra/mm-plugin-sierra.c | 6 +++--- + plugins/sierra/mm-sim-sierra.c | 2 -- + 8 files changed, 41 insertions(+), 44 deletions(-) + +commit aed9f46443fe8e195785e54e4f12522520ee3c19 +Author: Aleksander Morgado +Date: Tue Apr 7 15:56:53 2020 +0200 + + samsung: port to use object logging + + plugins/samsung/mm-broadband-modem-samsung.c | 3 +-- + plugins/samsung/mm-plugin-samsung.c | 1 - + 2 files changed, 1 insertion(+), 3 deletions(-) + +commit e623a54d274eea6803043c3ace4168b5ad599ae0 +Author: Aleksander Morgado +Date: Tue Apr 7 15:55:40 2020 +0200 + + quectel: port to use object logging + + plugins/quectel/mm-plugin-quectel.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit d25163cca11abdcebe590ff720ef475918d71278 +Author: Aleksander Morgado +Date: Tue Apr 7 15:54:33 2020 +0200 + + pantech: port to use object logging + + plugins/pantech/mm-broadband-modem-pantech.c | 1 - + plugins/pantech/mm-plugin-pantech.c | 4 ++-- + 2 files changed, 2 insertions(+), 3 deletions(-) + +commit 662f8afc5658f8eede857608321558771b630de8 +Author: Aleksander Morgado +Date: Tue Apr 7 15:53:34 2020 +0200 + + option,hso: port to use object logging + + plugins/option/mm-broadband-bearer-hso.c | 30 + ++++++++++++++++-------------- + plugins/option/mm-broadband-modem-hso.c | 7 +++---- + plugins/option/mm-broadband-modem-option.c | 4 +--- + plugins/option/mm-plugin-hso.c | 4 ++-- + 4 files changed, 22 insertions(+), 23 deletions(-) + +commit 4e0a9b19853fbda4835918c80570969c808dbe4f +Author: Aleksander Morgado +Date: Tue Apr 7 15:49:10 2020 +0200 + + novatel: port to use object logging + + plugins/novatel/mm-broadband-bearer-novatel-lte.c | 69 +++++++++------- + plugins/novatel/mm-broadband-modem-novatel-lte.c | 13 +-- + plugins/novatel/mm-broadband-modem-novatel.c | 98 + ++++++++++++----------- + plugins/novatel/mm-common-novatel.c | 39 ++++----- + plugins/novatel/mm-plugin-novatel-lte.c | 1 - + plugins/novatel/mm-plugin-novatel.c | 4 +- + plugins/novatel/mm-sim-novatel-lte.c | 2 - + 7 files changed, 114 insertions(+), 112 deletions(-) + +commit 793fc1c51a6a7196b9b014377d43170ae5db3f8a +Author: Aleksander Morgado +Date: Tue Apr 7 15:22:56 2020 +0200 + + nokia: no logging in plugin + + plugins/nokia/mm-broadband-modem-nokia.c | 1 - + plugins/nokia/mm-plugin-nokia-icera.c | 1 - + plugins/nokia/mm-plugin-nokia.c | 1 - + 3 files changed, 3 deletions(-) + +commit 63955ce52dd85421a1820f89f4296aa667cfa0d7 +Author: Aleksander Morgado +Date: Tue Apr 7 15:21:38 2020 +0200 + + mtk: port to use object logging + + plugins/mtk/mm-broadband-modem-mtk.c | 16 +++++++--------- + plugins/mtk/mm-plugin-mtk.c | 1 - + 2 files changed, 7 insertions(+), 10 deletions(-) + +commit 1edd4bb101ed9ff20072c56dad4e07859a9a9202 +Author: Aleksander Morgado +Date: Tue Apr 7 15:18:55 2020 +0200 + + mbm: port to use object logging + + plugins/mbm/mm-broadband-bearer-mbm.c | 40 + ++++++++++++------------------ + plugins/mbm/mm-broadband-modem-mbm.c | 19 +++++++------- + plugins/mbm/mm-modem-helpers-mbm.c | 25 ++++++++++--------- + plugins/mbm/mm-modem-helpers-mbm.h | 7 +++--- + plugins/mbm/mm-plugin-mbm.c | 4 +-- + plugins/mbm/mm-sim-mbm.c | 8 +++--- + plugins/mbm/tests/test-modem-helpers-mbm.c | 2 +- + 7 files changed, 50 insertions(+), 55 deletions(-) + +commit 64ac1c19ff25b43320bbf3b5fea8a49d5c7c207f +Author: Aleksander Morgado +Date: Tue Apr 7 15:09:40 2020 +0200 + + longcheer: port to use object logging + + plugins/longcheer/mm-broadband-modem-longcheer.c | 2 -- + plugins/longcheer/mm-plugin-longcheer.c | 27 + ++++++++++++------------ + 2 files changed, 14 insertions(+), 15 deletions(-) + +commit 62033b1b6e37d944cd3dcc3eb27e3b1056b604df +Author: Aleksander Morgado +Date: Tue Apr 7 15:05:08 2020 +0200 + + linktop: no logging in plugin + + plugins/linktop/mm-broadband-modem-linktop.c | 1 - + plugins/linktop/mm-modem-helpers-linktop.c | 1 - + 2 files changed, 2 deletions(-) + +commit 2da417c7a2d86e8b240f5e044d25789785e4b05d +Author: Aleksander Morgado +Date: Tue Apr 7 15:04:10 2020 +0200 + + iridium: port to use object logging + + plugins/iridium/mm-bearer-iridium.c | 3 +-- + plugins/iridium/mm-broadband-modem-iridium.c | 8 ++++---- + plugins/iridium/mm-plugin-iridium.c | 1 - + 3 files changed, 5 insertions(+), 7 deletions(-) + +commit fe78612d6d546604b3a2fc0569f070060c0233f2 +Author: Aleksander Morgado +Date: Tue Apr 7 15:00:31 2020 +0200 + + icera: port to use object logging + + plugins/icera/mm-broadband-bearer-icera.c | 44 + +++++++++++++++--------------- + plugins/icera/mm-broadband-modem-icera.c | 45 + ++++++++++++++----------------- + 2 files changed, 42 insertions(+), 47 deletions(-) + +commit 1cb39536e9bbbf22f08fe5f05b359f18d6152d10 +Author: Aleksander Morgado +Date: Sat Apr 4 16:17:08 2020 +0200 + + huawei: port to use object logging + + plugins/huawei/mm-broadband-bearer-huawei.c | 24 ++-- + plugins/huawei/mm-broadband-modem-huawei.c | 147 + ++++++++++------------- + plugins/huawei/mm-modem-helpers-huawei.c | 31 ++--- + plugins/huawei/mm-modem-helpers-huawei.h | 10 +- + plugins/huawei/mm-plugin-huawei.c | 119 +++++++++--------- + plugins/huawei/mm-sim-huawei.c | 2 - + plugins/huawei/tests/test-modem-helpers-huawei.c | 53 +++----- + 7 files changed, 174 insertions(+), 212 deletions(-) + +commit 59e6e3b1411b511689b94e95ed2aa1c8a4eaa2fc +Author: Aleksander Morgado +Date: Sat Apr 4 15:47:57 2020 +0200 + + haier: no logging in plugin + + plugins/haier/mm-plugin-haier.c | 1 - + 1 file changed, 1 deletion(-) + +commit fb85b5cbf98ae37fe3d727b271ebec84479dd835 +Author: Aleksander Morgado +Date: Sat Apr 4 15:47:09 2020 +0200 + + generic: port to use object logging + + plugins/generic/mm-plugin-generic.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit a5df49c5f47b50548150ae9795172e424ff70de9 +Author: Aleksander Morgado +Date: Sat Apr 4 15:46:02 2020 +0200 + + foxconn: port to use object logging + + plugins/foxconn/mm-broadband-modem-foxconn-t77w968.c | 1 - + plugins/foxconn/mm-plugin-foxconn.c | 10 +++++----- + 2 files changed, 5 insertions(+), 6 deletions(-) + +commit 77080d5f26681aed9e43c9bdaba58139f291d591 +Author: Aleksander Morgado +Date: Sat Apr 4 15:44:34 2020 +0200 + + fibocom: port to use object logging + + plugins/fibocom/mm-plugin-fibocom.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit b3e56bc576a36a4aaa5675c4c650c49388afc250 +Author: Aleksander Morgado +Date: Sat Apr 4 15:44:00 2020 +0200 + + dlink: port to use object logging + + plugins/dlink/mm-plugin-dlink.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 784fd9b7405badc1a7a45cbc19575dea309ded44 +Author: Aleksander Morgado +Date: Sat Apr 4 15:43:05 2020 +0200 + + dell: port to use object logging + + plugins/dell/mm-plugin-dell.c | 37 ++++++++++++++++--------------------- + 1 file changed, 16 insertions(+), 21 deletions(-) + +commit 261ba90d088e6e7b6c4c628b4fd02267111cc7ae +Author: Aleksander Morgado +Date: Sat Apr 4 15:23:19 2020 +0200 + + cinterion: port to use object logging + + plugins/cinterion/mm-broadband-bearer-cinterion.c | 69 +++++----- + plugins/cinterion/mm-broadband-modem-cinterion.c | 91 ++++++------- + plugins/cinterion/mm-modem-helpers-cinterion.c | 21 +-- + plugins/cinterion/mm-modem-helpers-cinterion.h | 5 +- + plugins/cinterion/mm-plugin-cinterion.c | 16 +-- + plugins/cinterion/mm-shared-cinterion.c | 146 + +++++++++------------ + .../cinterion/tests/test-modem-helpers-cinterion.c | 8 +- + 7 files changed, 164 insertions(+), 192 deletions(-) + +commit fe4b8f6817490763103b0b52ec19a0173ea13537 +Author: Aleksander Morgado +Date: Sat Apr 4 15:19:52 2020 +0200 + + anydata: port to use object logging + + plugins/anydata/mm-broadband-modem-anydata.c | 8 ++++---- + plugins/anydata/mm-plugin-anydata.c | 4 ++-- + 2 files changed, 6 insertions(+), 6 deletions(-) + +commit f5ce4a722a4c5d89778470cdf774ca822fee7ace +Author: Aleksander Morgado +Date: Sat Apr 4 15:15:45 2020 +0200 + + altair: port to use object logging + + plugins/altair/mm-broadband-bearer-altair-lte.c | 13 ++---- + plugins/altair/mm-broadband-modem-altair-lte.c | 58 + +++++++++---------------- + 2 files changed, 24 insertions(+), 47 deletions(-) + +commit 2376859f36f56b2a63f8f6c13094aad0b129b279 +Author: Aleksander Morgado +Date: Sat Apr 4 14:51:22 2020 +0200 + + charsets: report GError in byte_array_append() failures + + src/mm-broadband-modem-mbim.c | 12 ++++++------ + src/mm-broadband-modem.c | 19 +++++++++---------- + src/mm-charsets.c | 28 ++++++++++++---------------- + src/mm-charsets.h | 9 +++++---- + src/mm-sms-part-3gpp.c | 28 ++++++++++++++-------------- + src/mm-sms-part-cdma.c | 29 ++++++++++++++++++----------- + 6 files changed, 64 insertions(+), 61 deletions(-) + +commit a2b57474dc60759416bc2a5a8808806fd3317c01 +Author: Aleksander Morgado +Date: Sat Apr 4 14:37:42 2020 +0200 + + error-helpers: port to use object logging + + plugins/icera/mm-broadband-bearer-icera.c | 10 ++++++---- + src/mm-base-call.c | 2 +- + src/mm-broadband-modem-mbim.c | 6 +++--- + src/mm-broadband-modem.c | 2 +- + src/mm-error-helpers.c | 25 +++++++++++++++---------- + src/mm-error-helpers.h | 10 +++++----- + src/mm-iface-modem-3gpp.c | 4 ++-- + src/mm-iface-modem-simple.c | 2 +- + src/mm-serial-parsers.c | 16 ++++++++-------- + src/mm-sim-mbim.c | 8 ++++---- + src/tests/test-error-helpers.c | 2 +- + 11 files changed, 47 insertions(+), 40 deletions(-) + +commit bac9ed21cbe806280ff999facbd02935ccdefaba +Author: Aleksander Morgado +Date: Sat Apr 4 14:29:44 2020 +0200 + + kerneldevice,generic: remove logging + + src/kerneldevice/mm-kernel-device-generic-rules.c | 5 ----- + 1 file changed, 5 deletions(-) + +commit bca5c5e42363646d3d91daef3d328cecc2a205e3 +Author: Aleksander Morgado +Date: Sat Apr 4 14:25:46 2020 +0200 + + modem-helpers-qmi: port qmi capabilities parser to use object logging + + src/mm-modem-helpers-qmi.c | 32 +++++++++++++++----------------- + src/mm-modem-helpers-qmi.h | 3 ++- + src/mm-shared-qmi.c | 2 +- + src/tests/test-modem-helpers-qmi.c | 2 +- + 4 files changed, 19 insertions(+), 20 deletions(-) + +commit 07b492c8879656aaaa795228edd3368f64c5504f +Author: Aleksander Morgado +Date: Sat Apr 4 14:21:43 2020 +0200 + + modem-helpers-qmi: port acquisition order preference parser to use + object logging + + src/mm-modem-helpers-qmi.c | 15 ++++++++------- + src/mm-modem-helpers-qmi.h | 6 ++++-- + src/mm-shared-qmi.c | 7 +++++-- + 3 files changed, 17 insertions(+), 11 deletions(-) + +commit f03fb06d8eed9678629ec31fd8611e6e70f341ae +Author: Aleksander Morgado +Date: Sat Apr 4 13:59:46 2020 +0200 + + modem-helpers-qmi: port qmi interface parser to use object logging + + src/mm-modem-helpers-qmi.c | 12 ++++++------ + src/mm-modem-helpers-qmi.h | 6 ++++-- + src/mm-shared-qmi.c | 6 +++--- + 3 files changed, 13 insertions(+), 11 deletions(-) + +commit fc76e797d7eeb8c13677ecc4eb24f8096497ffc3 +Author: Aleksander Morgado +Date: Sat Apr 4 13:57:53 2020 +0200 + + modem-helpers-qmi: port qmi band parser to use object logging + + src/mm-modem-helpers-qmi.c | 77 + ++++++++++++++++++++++++---------------------- + src/mm-modem-helpers-qmi.h | 25 ++++++++------- + src/mm-shared-qmi.c | 8 +++-- + 3 files changed, 60 insertions(+), 50 deletions(-) + +commit 4be88b899ecc1102973c541dec0e916b22178e0d +Author: Aleksander Morgado +Date: Sat Apr 4 13:53:28 2020 +0200 + + modem-helpers-mbim: port to use object logging + + src/mm-bearer-mbim.c | 2 +- + src/mm-broadband-modem-mbim.c | 2 +- + src/mm-modem-helpers-mbim.c | 5 +++-- + src/mm-modem-helpers-mbim.h | 1 + + 4 files changed, 6 insertions(+), 4 deletions(-) + +commit 7004f97093a3b44c793dcb930e432940d0663137 +Author: Aleksander Morgado +Date: Sat Apr 4 12:24:46 2020 +0200 + + modem-helpers: make cpms test parser return error on failure + + src/mm-broadband-modem.c | 9 +++----- + src/mm-modem-helpers.c | 50 + ++++++++++++++++++------------------------ + src/mm-modem-helpers.h | 9 ++++---- + src/tests/test-modem-helpers.c | 24 +++++++++++++++----- + 4 files changed, 47 insertions(+), 45 deletions(-) + +commit 105cb31e8cb423ff9b1e4bbeffce0124006be5fd +Author: Aleksander Morgado +Date: Sat Apr 4 12:15:49 2020 +0200 + + modem-helpers: port ccwa service query parser to use object logging + + src/mm-broadband-modem.c | 2 +- + src/mm-modem-helpers.c | 5 +++-- + src/mm-modem-helpers.h | 1 + + src/tests/test-modem-helpers.c | 2 +- + 4 files changed, 6 insertions(+), 4 deletions(-) + +commit ecd766796a4bb3cd1962bfe0b42d187931dd12f6 +Author: Aleksander Morgado +Date: Sat Apr 4 12:05:58 2020 +0200 + + modem-helpers: port cesq response parser to use object logging + + plugins/xmm/mm-modem-helpers-xmm.c | 11 +++---- + plugins/xmm/mm-modem-helpers-xmm.h | 1 + + plugins/xmm/mm-shared-xmm.c | 2 +- + plugins/xmm/tests/test-modem-helpers-xmm.c | 1 + + src/mm-broadband-modem.c | 2 +- + src/mm-modem-helpers.c | 46 + +++++++++++++++++------------- + src/mm-modem-helpers.h | 31 ++++++++++++-------- + src/tests/test-modem-helpers.c | 1 + + 8 files changed, 56 insertions(+), 39 deletions(-) + +commit ef1a570afe38537db18a0a3e384dc49c550d0749 +Author: Aleksander Morgado +Date: Sat Apr 4 11:57:19 2020 +0200 + + modem-helpers: port creg response parser to use object logging + + src/mm-broadband-modem.c | 2 ++ + src/mm-modem-helpers.c | 19 ++++++++++--------- + src/mm-modem-helpers.h | 17 +++++++++-------- + src/tests/test-modem-helpers.c | 2 +- + 4 files changed, 22 insertions(+), 18 deletions(-) + +commit 39dd4c166d2750a00dfe1a3505a02bccaaf7f755 +Author: Aleksander Morgado +Date: Sat Apr 4 11:53:36 2020 +0200 + + modem-helpers: port clcc list parser to use object logging + + plugins/simtech/mm-modem-helpers-simtech.c | 3 ++- + plugins/simtech/mm-modem-helpers-simtech.h | 1 + + plugins/simtech/mm-shared-simtech.c | 2 +- + plugins/simtech/tests/test-modem-helpers-simtech.c | 2 +- + src/mm-broadband-modem.c | 6 +++--- + src/mm-modem-helpers.c | 7 ++++--- + src/mm-modem-helpers.h | 1 + + src/tests/test-modem-helpers.c | 2 +- + 8 files changed, 14 insertions(+), 10 deletions(-) + +commit 78cad902ef342d6da628f26e1282782aa8361316 +Author: Aleksander Morgado +Date: Sat Apr 4 11:18:28 2020 +0200 + + modem-helpers: remove unused supported capabilities filter + + src/mm-modem-helpers.c | 28 ------------- + src/mm-modem-helpers.h | 3 -- + src/tests/test-modem-helpers.c | 94 + ------------------------------------------ + 3 files changed, 125 deletions(-) + +commit 5b1b33a894e3677dd633f032d5d9a07931096719 +Author: Aleksander Morgado +Date: Sat Apr 4 11:01:27 2020 +0200 + + modem-helpers: port cmer test parser to use object logging + + src/mm-broadband-modem.c | 2 +- + src/mm-modem-helpers.c | 5 +++-- + src/mm-modem-helpers.h | 1 + + src/tests/test-modem-helpers.c | 2 +- + 4 files changed, 6 insertions(+), 4 deletions(-) + +commit 3747f9e669204f0e609e36d629c708dafa1bb990 +Author: Aleksander Morgado +Date: Sat Apr 4 10:58:57 2020 +0200 + + modem-helpers: remove logging from cgdcont response parser + + src/mm-modem-helpers.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +commit 740827bde1d03c5f8b187f70be8ffb6ae3ca1785 +Author: Aleksander Morgado +Date: Fri Apr 3 16:05:17 2020 +0200 + + modem-helpers: parse cgdcont test parser to use object logging + + src/mm-broadband-bearer.c | 2 +- + src/mm-broadband-modem.c | 2 +- + src/mm-modem-helpers.c | 11 ++++++----- + src/mm-modem-helpers.h | 5 +++-- + src/tests/test-modem-helpers.c | 4 ++-- + 5 files changed, 13 insertions(+), 11 deletions(-) + +commit f76489cd8179000c1f4e6bc7b72d60933a6c08b9 +Author: Aleksander Morgado +Date: Fri Apr 3 16:01:06 2020 +0200 + + modem-helpers: port cid selection helper to use object logging + + src/mm-broadband-bearer.c | 1 + + src/mm-modem-helpers.c | 48 + +++++++++++++++++++++++------------------- + src/mm-modem-helpers.h | 5 +++-- + src/tests/test-modem-helpers.c | 1 + + 4 files changed, 31 insertions(+), 24 deletions(-) + +commit 2b23ef3fa62de79f6ec0f23f2971f3528125246a +Author: Aleksander Morgado +Date: Fri Apr 3 15:54:42 2020 +0200 + + modem-helpers: port cops test parser to use object logging + + src/mm-broadband-modem.c | 2 +- + src/mm-modem-helpers.c | 54 + ++++++++++++++++-------------------------- + src/mm-modem-helpers.h | 1 + + src/tests/test-modem-helpers.c | 6 ++--- + 4 files changed, 25 insertions(+), 38 deletions(-) + +commit fb61243b7dd37d020e5bc357340ed97a6e4a8857 +Author: Aleksander Morgado +Date: Fri Apr 3 15:52:00 2020 +0200 + + modem-helpers: port ifc test parser to use object logging + + src/mm-broadband-modem.c | 2 +- + src/mm-modem-helpers.c | 17 ++++++++++------- + src/mm-modem-helpers.h | 1 + + src/tests/test-modem-helpers.c | 2 +- + 4 files changed, 13 insertions(+), 9 deletions(-) + +commit 0f708daf0b9bfa26193d0efbd2591bcc81ef1d44 +Author: Aleksander Morgado +Date: Fri Apr 3 15:47:37 2020 +0200 + + modem-helpers: port supported modes filtering to use object logging + + plugins/cinterion/mm-broadband-modem-cinterion.c | 2 +- + plugins/linktop/mm-broadband-modem-linktop.c | 2 +- + plugins/longcheer/mm-broadband-modem-longcheer.c | 2 +- + plugins/novatel/mm-broadband-modem-novatel.c | 2 +- + plugins/option/mm-broadband-modem-option.c | 2 +- + plugins/sierra/mm-broadband-modem-sierra.c | 2 +- + plugins/simtech/mm-broadband-modem-simtech.c | 2 +- + plugins/telit/mm-broadband-modem-mbim-telit.c | 2 +- + plugins/telit/mm-broadband-modem-telit.c | 2 +- + plugins/ublox/mm-broadband-modem-ublox.c | 2 +- + plugins/ublox/mm-modem-helpers-ublox.c | 3 ++- + plugins/ublox/mm-modem-helpers-ublox.h | 1 + + plugins/ublox/tests/test-modem-helpers-ublox.c | 2 +- + plugins/wavecom/mm-broadband-modem-wavecom.c | 2 +- + plugins/x22x/mm-broadband-modem-x22x.c | 2 +- + plugins/xmm/mm-modem-helpers-xmm.c | 3 ++- + plugins/xmm/mm-modem-helpers-xmm.h | 1 + + plugins/xmm/mm-shared-xmm.c | 1 + + plugins/xmm/tests/test-modem-helpers-xmm.c | 2 +- + plugins/zte/mm-broadband-modem-zte.c | 2 +- + src/mm-modem-helpers.c | 13 ++++++++++--- + src/mm-modem-helpers.h | 3 ++- + src/mm-shared-qmi.c | 2 +- + src/tests/test-modem-helpers.c | 10 +++++----- + 24 files changed, 40 insertions(+), 27 deletions(-) + +commit fd1464cff04017f283ee296f81acb18f0c2ae7ab +Author: Aleksander Morgado +Date: Fri Apr 3 15:34:42 2020 +0200 + + modem-helpers: port device identifier to use object logging and + autoptr + + src/mm-broadband-modem.c | 1 + + src/mm-modem-helpers.c | 31 +++++++++++++------------------ + src/mm-modem-helpers.h | 5 +++-- + src/tests/test-modem-helpers.c | 1 + + 4 files changed, 18 insertions(+), 20 deletions(-) + +commit b682d7ec673b78446ed5cbd1d276e4e6f363ee3d +Author: Aleksander Morgado +Date: Tue Mar 31 19:19:22 2020 +0200 + + tests,test-sms-part-cdma: remove explicit logging + + src/tests/test-sms-part-cdma.c | 2 -- + 1 file changed, 2 deletions(-) + +commit d628db12fe432846675844cee9753a77d22ca451 +Author: Aleksander Morgado +Date: Tue Mar 31 19:18:37 2020 +0200 + + port-probe-at: remove explicit logging + + src/mm-port-probe-at.c | 2 -- + 1 file changed, 2 deletions(-) + +commit afe7a8e2363eaa57102d3dd4b5ae865e8d3311cc +Author: Aleksander Morgado +Date: Tue Mar 31 19:12:53 2020 +0200 + + port-probe: port to use object logging + + src/mm-port-probe.c | 177 + ++++++++++++++++++---------------------------------- + 1 file changed, 62 insertions(+), 115 deletions(-) + +commit 2b1201af3cba7f2dc11835a6ad088eddd0e37e61 +Author: Aleksander Morgado +Date: Tue Mar 31 19:01:21 2020 +0200 + + device: port to use object logging + + src/mm-device.c | 71 + ++++++++++++++++++++++++++++++++++----------------------- + 1 file changed, 42 insertions(+), 29 deletions(-) + +commit 0e00f04fd8d8b6452c6379193b2023f2ea340160 +Author: Aleksander Morgado +Date: Tue Mar 31 18:54:45 2020 +0200 + + sms-list: port to use object logging + + src/mm-sms-list.c | 62 + ++++++++++++++++++++++++++++++++++++------------------- + 1 file changed, 41 insertions(+), 21 deletions(-) + +commit dea6677df0eea55ac498f7c64011827035bfec25 +Author: Aleksander Morgado +Date: Tue Mar 31 18:51:37 2020 +0200 + + bearer-list: no logging in object + + src/mm-bearer-list.c | 4 ---- + 1 file changed, 4 deletions(-) + +commit 661e3c91ccf8834d2df250df1cc84f9818aefe67 +Author: Aleksander Morgado +Date: Tue Mar 31 18:45:56 2020 +0200 + + base-call: port to use object logging + + src/mm-base-call.c | 71 + ++++++++++++++++++++++++++++++++++++------------------ + 1 file changed, 47 insertions(+), 24 deletions(-) + +commit 84e3ea63b9fe3d15862ab79ad401474330c28454 +Author: Aleksander Morgado +Date: Tue Mar 31 18:44:47 2020 +0200 + + base-call: set dbus id as soon as object is created + + src/mm-base-call.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +commit aab6a46515f28c9459b08a7db30a5dc7984ffc71 +Author: Aleksander Morgado +Date: Tue Mar 31 18:40:34 2020 +0200 + + base-manager: port to use object logging + + src/mm-base-manager.c | 314 + +++++++++++++++++++++++++------------------------- + 1 file changed, 159 insertions(+), 155 deletions(-) + +commit b2a06fa99554cda2ddd5094d7ba05d7eb66d94b5 +Author: Aleksander Morgado +Date: Tue Mar 31 18:18:40 2020 +0200 + + plugin-manager: port to use object logging + + src/mm-plugin-manager.c | 317 + +++++++++++++++++++++++++++++------------------- + 1 file changed, 190 insertions(+), 127 deletions(-) + +commit 6987d1bea680b24110f79a66de7cac6b365fa418 +Author: Aleksander Morgado +Date: Tue Mar 31 17:58:09 2020 +0200 + + plugin: port to use object logging + + src/mm-plugin.c | 141 + +++++++++++++++++++++++++------------------------------- + 1 file changed, 62 insertions(+), 79 deletions(-) + +commit 4b0c83b9ed4c427bf848340fbccdb4853ce0d3f3 +Author: Aleksander Morgado +Date: Tue Mar 31 17:42:00 2020 +0200 + + utils: port to use object logging + + src/mm-utils.h | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit a6a4037da756498054d96408a8311932b9c9b5cc +Author: Aleksander Morgado +Date: Tue Mar 31 17:41:51 2020 +0200 + + auth-provider: port to use object logging + + src/mm-auth-provider.c | 25 +++++++++++++++++++++---- + 1 file changed, 21 insertions(+), 4 deletions(-) + +commit 28cb2b73682976df0abe6fa2fca95c2935064f22 +Author: Aleksander Morgado +Date: Tue Mar 31 17:35:05 2020 +0200 + + sleep-monitor: port to use object logging + + src/mm-sleep-monitor.c | 36 +++++++++++++++++++++++++++--------- + 1 file changed, 27 insertions(+), 9 deletions(-) + +commit 4d761330e1a1edecd460465c38ec66dad3176d93 +Author: Aleksander Morgado +Date: Tue Mar 31 17:17:35 2020 +0200 + + filter: port to use object logging + + src/mm-filter.c | 93 + ++++++++++++++++++++++++++++++++++----------------------- + 1 file changed, 55 insertions(+), 38 deletions(-) + +commit 2e0d23ce7218baab6d08aede3a1269ac475e420d +Author: Aleksander Morgado +Date: Tue Mar 31 17:09:53 2020 +0200 + + serial-parsers: port to use object logging + + src/mm-port-serial-at.c | 2 +- + src/mm-port-serial-at.h | 7 ++++--- + src/mm-serial-parsers.c | 13 +++++++------ + src/mm-serial-parsers.h | 1 + + 4 files changed, 13 insertions(+), 10 deletions(-) + +commit 72efb1b28da7daba1448def917d28b30014fde27 +Author: Aleksander Morgado +Date: Tue Mar 31 17:00:14 2020 +0200 + + sms-part-cdma: port to use object logging + + src/mm-broadband-modem-qmi.c | 1 + + src/mm-sms-part-cdma.c | 420 + +++++++++++++++++++++-------------------- + src/mm-sms-part-cdma.h | 25 +-- + src/mm-sms-qmi.c | 4 +- + src/tests/test-sms-part-cdma.c | 6 +- + 5 files changed, 238 insertions(+), 218 deletions(-) + +commit 3186a498c188a8686d6766a4c23bc051f3d00abe +Author: Aleksander Morgado +Date: Tue Mar 31 11:06:32 2020 +0200 + + sms-part-3gpp: port to use object logging + + src/mm-base-sms.c | 27 +++++---- + src/mm-broadband-modem-mbim.c | 1 + + src/mm-broadband-modem-qmi.c | 1 + + src/mm-broadband-modem.c | 6 +- + src/mm-sms-mbim.c | 5 +- + src/mm-sms-part-3gpp.c | 124 + ++++++++++++++++++++++------------------- + src/mm-sms-part-3gpp.h | 46 +++++++-------- + src/mm-sms-qmi.c | 8 ++- + src/tests/test-sms-part-3gpp.c | 9 +-- + test/mmsmspdu.c | 2 +- + 10 files changed, 128 insertions(+), 101 deletions(-) + +commit d0545f60ad76e5288a51c27d8063399c6a074955 +Author: Aleksander Morgado +Date: Tue Mar 31 07:33:06 2020 +0200 + + sms-mbim: port to use object logging + + src/mm-sms-mbim.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +commit cc1bb544ee46d69b7ab6b1026bc1dd66eafc24f4 +Author: Aleksander Morgado +Date: Tue Mar 31 07:32:00 2020 +0200 + + sms-qmi: port to use object logging + + src/mm-sms-qmi.c | 59 + ++++++++++++++++++++++++++++++-------------------------- + 1 file changed, 32 insertions(+), 27 deletions(-) + +commit 0e05d0dcf0548c93f441cc395ce6a64b13e74381 +Author: Aleksander Morgado +Date: Tue Mar 31 07:18:00 2020 +0200 + + base-sms: port to use object logging + + src/mm-base-sms.c | 73 + +++++++++++++++++++++++++++++++++++-------------------- + 1 file changed, 46 insertions(+), 27 deletions(-) + +commit 6c5a2e24aeaa6030ee7fc9d370acf502be5f4625 +Author: Aleksander Morgado +Date: Sun Mar 29 19:47:30 2020 +0200 + + base-sms: set dbus id as soon as object is created + + src/mm-base-sms.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +commit e2d15e9bf43e507fe973cf40bfd5f248faf09643 +Author: Aleksander Morgado +Date: Sun Mar 29 19:42:08 2020 +0200 + + sim-qmi: port to use object logging + + src/mm-sim-qmi.c | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +commit e8c9001f6e8867f95017378b96f34df91660fd5f +Author: Aleksander Morgado +Date: Sun Mar 29 19:40:49 2020 +0200 + + sim-mbim: port to use object logging + + src/mm-sim-mbim.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit ae38106ad21741d6668ccf9ca649518e9cd62d94 +Author: Aleksander Morgado +Date: Sun Mar 29 19:37:09 2020 +0200 + + base-sim: port to use object logging + + src/mm-base-sim.c | 59 + ++++++++++++++++++++++++++++++++++++------------------- + 1 file changed, 39 insertions(+), 20 deletions(-) + +commit 7e5af3b38d2afe8902f9ea194848a89a329fe83d +Author: Aleksander Morgado +Date: Sun Mar 29 19:34:18 2020 +0200 + + base-sim: set dbus id as soon as object is created + + src/mm-base-sim.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +commit 6c0d9e5a1be72d70036bca2adbd0955f31d5612b +Author: Aleksander Morgado +Date: Sun Mar 29 19:30:24 2020 +0200 + + bearer-mbim: port to use object logging + + src/mm-bearer-mbim.c | 118 + ++++++++++++++++++++++++++++----------------------- + 1 file changed, 65 insertions(+), 53 deletions(-) + +commit ba89d59471a92ac0b5caabdd03d3b199b1cf8ab5 +Author: Aleksander Morgado +Date: Sun Mar 29 19:25:25 2020 +0200 + + bearer-qmi: port to use object logging + + src/mm-bearer-qmi.c | 139 + ++++++++++++++++++++++++++-------------------------- + 1 file changed, 70 insertions(+), 69 deletions(-) + +commit b2d3ff0b3d77e2c859a37dcb0e3d67350c81c4c1 +Author: Aleksander Morgado +Date: Tue Mar 31 17:30:25 2020 +0200 + + broadband-bearer: port to use object logging + + src/mm-broadband-bearer.c | 195 + ++++++++++++++++++++++++++-------------------- + 1 file changed, 109 insertions(+), 86 deletions(-) + +commit fce081bbb05f8c62926e5184263e3a33f17e7d83 +Author: Aleksander Morgado +Date: Sun Mar 29 16:15:00 2020 +0200 + + base-bearer: port to use object logging + + src/mm-base-bearer.c | 103 + ++++++++++++++++++++++++++++----------------------- + 1 file changed, 57 insertions(+), 46 deletions(-) + +commit c0fb9b42c02e2f3a5697ca9e5f1d814be933066d +Author: Aleksander Morgado +Date: Sun Mar 29 16:07:11 2020 +0200 + + base-bearer: set dbus id as soon as object is created + + src/mm-base-bearer.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +commit ed41f969d5b80ae28e1841657c85b12ef5a29ad3 +Author: Aleksander Morgado +Date: Sun Mar 29 19:17:17 2020 +0200 + + iface-modem-voice: port to use object logging + + src/mm-iface-modem-voice.c | 163 + +++++++++++++++++++++++---------------------- + 1 file changed, 83 insertions(+), 80 deletions(-) + +commit c8c31f0613725fb638613f650614ee1d60c40dac +Author: Aleksander Morgado +Date: Sun Mar 29 19:10:47 2020 +0200 + + iface-modem-time: port to use object logging + + src/mm-iface-modem-time.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit 91de19e3aecef099f2c3b3e0ab2a6b4cdeb6116b +Author: Aleksander Morgado +Date: Sun Mar 29 19:09:23 2020 +0200 + + iface-modem-simple: port to use object logging + + src/mm-iface-modem-simple.c | 90 + +++++++++++++++++++++------------------------ + 1 file changed, 42 insertions(+), 48 deletions(-) + +commit 695a1003a1d00deb9e4171d5607d4c7dbf49f5e3 +Author: Aleksander Morgado +Date: Sun Mar 29 19:02:12 2020 +0200 + + iface-modem-signal: port to use object logging + + src/mm-iface-modem-signal.c | 17 ++++++++--------- + 1 file changed, 8 insertions(+), 9 deletions(-) + +commit 84851cc6164df15b1364fbe53f488200f6bdbd55 +Author: Aleksander Morgado +Date: Sun Mar 29 18:59:52 2020 +0200 + + iface-modem-oma: port to use object logging + + src/mm-iface-modem-oma.c | 29 ++++++++++++++--------------- + 1 file changed, 14 insertions(+), 15 deletions(-) + +commit 135b5c8065b0679b3cf33779ae4dd9252d8d8497 +Author: Aleksander Morgado +Date: Sun Mar 29 18:58:07 2020 +0200 + + iface-modem-messaging: port to use object logging + + src/mm-iface-modem-messaging.c | 53 + +++++++++++++++++++----------------------- + 1 file changed, 24 insertions(+), 29 deletions(-) + +commit 7d5871c59c736b83112acd9eb23d6201486c306c +Author: Aleksander Morgado +Date: Sun Mar 29 18:53:25 2020 +0200 + + iface-modem-location: port to use object logging + + src/mm-iface-modem-location.c | 65 + +++++++++++++++++-------------------------- + 1 file changed, 26 insertions(+), 39 deletions(-) + +commit 6314e5f1d22d8b3a69e071f78256ebe6059712b1 +Author: Aleksander Morgado +Date: Sun Mar 29 16:31:33 2020 +0200 + + iface-modem-firmware: port to use object logging + + src/mm-iface-modem-firmware.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit 0592bcfdec25965c55236c091ab5facb29d198b0 +Author: Aleksander Morgado +Date: Sun Mar 29 16:29:22 2020 +0200 + + iface-modem-cdma: port to use object logging + + src/mm-iface-modem-cdma.c | 85 + ++++++++++++++++++++++++----------------------- + 1 file changed, 44 insertions(+), 41 deletions(-) + +commit 301c984a872ecfadd8ef62706b7093078c70e842 +Author: Aleksander Morgado +Date: Sun Mar 29 16:23:39 2020 +0200 + + iface-modem-3gpp-ussd: port to use object logging + + src/mm-iface-modem-3gpp-ussd.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit 89a0adb962d4852324e297ce5b24a37aefdc5842 +Author: Aleksander Morgado +Date: Sun Mar 29 16:21:42 2020 +0200 + + iface-modem-3gpp: port to use object logging + + src/mm-iface-modem-3gpp.c | 105 + ++++++++++++++++++++++------------------------ + 1 file changed, 50 insertions(+), 55 deletions(-) + +commit aa5a77ce05cf7819482a02e1377e23166ab3ed3b +Author: Aleksander Morgado +Date: Sat Mar 28 18:46:42 2020 +0100 + + iface-modem: port to use object logging + + src/mm-iface-modem.c | 188 + ++++++++++++++++++++++++--------------------------- + 1 file changed, 88 insertions(+), 100 deletions(-) + +commit 6dff5ba673dfb838a290f3dc201a405017417a43 +Author: Aleksander Morgado +Date: Sat Mar 28 18:33:23 2020 +0100 + + shared-qmi: port to use object logging + + src/mm-shared-qmi.c | 145 + ++++++++++++++++++++++++++++++---------------------- + 1 file changed, 83 insertions(+), 62 deletions(-) + +commit 46405afdf3450744599c3962b9ec6a07dc62d6f8 +Author: Aleksander Morgado +Date: Sat Mar 28 18:23:08 2020 +0100 + + broadband-modem-mbim: port to use object logging + + src/mm-broadband-modem-mbim.c | 207 + +++++++++++++++++++++++------------------- + 1 file changed, 113 insertions(+), 94 deletions(-) + +commit 40a542be497e7269d79a7d6799eca5997d17a0f6 +Author: Aleksander Morgado +Date: Sat Mar 28 18:12:27 2020 +0100 + + broadband-modem-qmi: port to use object logging + + src/mm-broadband-modem-qmi.c | 418 + +++++++++++++++++++++++-------------------- + 1 file changed, 228 insertions(+), 190 deletions(-) + +commit ee454643299a59416a3ae799f958e676893afb0e +Author: Aleksander Morgado +Date: Sat Mar 28 17:51:44 2020 +0100 + + broadband-modem: port to use object logging + + src/mm-broadband-modem.c | 666 + +++++++++++++++++++++++------------------------ + 1 file changed, 333 insertions(+), 333 deletions(-) + +commit 875ef11a57e1f6eedc3ca1aa4065d6ffca84073f +Author: Aleksander Morgado +Date: Sat Mar 28 16:45:31 2020 +0100 + + base-modem: port to use object logging + + Also link all grabbed ports as owned by the modem. + + src/mm-base-modem.c | 85 + ++++++++++++++++++++++++++++++----------------------- + 1 file changed, 48 insertions(+), 37 deletions(-) + +commit 9e50dda400e0d5109e2901d7dfe8b49cebeffa56 +Author: Aleksander Morgado +Date: Sat Mar 28 16:31:01 2020 +0100 + + base-modem: set dbus id as soon as object is created + + src/mm-base-modem.c | 12 ++++++++++++ + src/mm-base-modem.h | 2 ++ + src/mm-device.c | 5 ++--- + 3 files changed, 16 insertions(+), 3 deletions(-) + +commit 850d302d24a7c0bdf58b1a0a38a2ef04a5bc862d +Author: Aleksander Morgado +Date: Sat Mar 28 16:14:22 2020 +0100 + + ports: port to object logging + + src/mm-port-mbim.c | 43 +++++++---------- + src/mm-port-qmi.c | 53 ++++++++++++--------- + src/mm-port-serial-at.c | 13 +++-- + src/mm-port-serial-gps.c | 11 +++-- + src/mm-port-serial-qcdm.c | 11 +++-- + src/mm-port-serial.c | 118 + +++++++++++++++++----------------------------- + src/mm-port-serial.h | 8 ++-- + src/mm-port.c | 32 ++++++++++--- + 8 files changed, 144 insertions(+), 145 deletions(-) + +commit 3a2466a3638390260a6149f15f81f3129371d7fd +Author: Aleksander Morgado +Date: Sat Mar 28 16:08:02 2020 +0100 + + port-serial: assert on totally unexpected serial settings + + The bits/parity/stopbits serial settings are set by the daemon, so if + any of them are not expected, assert, not just warn. + + src/mm-port-serial.c | 15 ++++++--------- + 1 file changed, 6 insertions(+), 9 deletions(-) + +commit b7d728696396da9645aae508c565ea0e094915a5 +Author: Aleksander Morgado +Date: Sat Mar 28 10:06:50 2020 +0100 + + kerneldevice: port to object logging + + src/kerneldevice/mm-kernel-device-generic.c | 119 + +++++++--------------------- + src/kerneldevice/mm-kernel-device-udev.c | 6 +- + src/kerneldevice/mm-kernel-device.c | 24 +++++- + 3 files changed, 54 insertions(+), 95 deletions(-) + +commit 9bcadea172cfba9317c55a9265012ff2f739cc96 +Author: Aleksander Morgado +Date: Sat Mar 28 08:06:41 2020 +0100 + + log: new object logging support + + So that we can provide the specific object id in every log associated + to a given object. + + .../cinterion/tests/test-modem-helpers-cinterion.c | 3 +- + plugins/huawei/tests/test-modem-helpers-huawei.c | 3 +- + plugins/icera/tests/test-modem-helpers-icera.c | 3 +- + plugins/linktop/tests/test-modem-helpers-linktop.c | 3 +- + plugins/mbm/tests/test-modem-helpers-mbm.c | 3 +- + plugins/sierra/tests/test-modem-helpers-sierra.c | 3 +- + plugins/simtech/tests/test-modem-helpers-simtech.c | 3 +- + plugins/telit/tests/test-mm-modem-helpers-telit.c | 3 +- + plugins/tests/test-keyfiles.c | 3 +- + plugins/tests/test-udev-rules.c | 3 +- + .../thuraya/tests/test-mm-modem-helpers-thuraya.c | 3 +- + plugins/ublox/tests/test-modem-helpers-ublox.c | 3 +- + plugins/xmm/tests/test-modem-helpers-xmm.c | 3 +- + src/Makefile.am | 9 ++- + src/mm-log-object.c | 89 + ++++++++++++++++++++++ + src/mm-log-object.h | 38 +++++++++ + src/mm-log.c | 10 ++- + src/mm-log.h | 29 ++++--- + src/tests/test-at-serial-port.c | 3 +- + src/tests/test-charsets.c | 3 +- + src/tests/test-error-helpers.c | 3 +- + src/tests/test-modem-helpers-qmi.c | 3 +- + src/tests/test-modem-helpers.c | 3 +- + src/tests/test-qcdm-serial-port.c | 3 +- + src/tests/test-sms-part-3gpp.c | 3 +- + src/tests/test-sms-part-cdma.c | 3 +- + src/tests/test-udev-rules.c | 3 +- + test/mmrules.c | 3 +- + test/mmsmspdu.c | 3 +- + test/mmtty.c | 3 +- + 30 files changed, 203 insertions(+), 47 deletions(-) + +commit faccb3b2b434d33936d4b7f1bc6bbeab8a14538f +Author: Артемий Судаков +Date: Sat Apr 4 18:30:38 2020 +0000 + + po: add Russian translation + + po/LINGUAS | 1 + + po/ru.po | 117 + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 118 insertions(+) + +commit d22523ff098ea1ea5aab542ebc3ac83a03f04c90 +Author: Andika Triwidada +Date: Tue Mar 31 11:15:39 2020 +0000 + + po: updated Indonesian translation + + po/id.po | 23 ++++++++++------------- + 1 file changed, 10 insertions(+), 13 deletions(-) + +commit a309b089c9453455f9310ef4bfea217bcffc0721 +Author: mozzwald +Date: Wed Mar 25 12:35:41 2020 -0500 + + quectel: add port type hints for EC25/EG25 #194 + + plugins/quectel/77-mm-quectel-port-types.rules | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit 3643c1513368ae11c5608f223f7e8c4e51968a9c +Author: Aleksander Morgado +Date: Sat Mar 21 15:49:31 2020 +0100 + + cli: remove empty whiteline in --version + + This also fixes the Copyright section in the troffit generated HTML + output. + + cli/mmcli.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit e9d7a9acde7670f384bc8127ca141b185a57ad6f +Author: Aleksander Morgado +Date: Sat Mar 21 15:48:49 2020 +0100 + + context: remove empty whiteline in --version + + This also fixes the Copyright section in the troffit generated HTML + output. + + src/mm-context.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit f1e77cdbe632659302e72b2d22b3ee9414c25e1e +Author: Aleksander Morgado +Date: Sat Mar 21 15:40:13 2020 +0100 + + cli: context: add ':' to the section titles + + So that --help-all print all sections in the same way as the Help and + Application option groups. + + cli/mmcli-bearer.c | 2 +- + cli/mmcli-call.c | 2 +- + cli/mmcli-manager.c | 2 +- + cli/mmcli-modem-3gpp.c | 2 +- + cli/mmcli-modem-cdma.c | 2 +- + cli/mmcli-modem-firmware.c | 2 +- + cli/mmcli-modem-location.c | 2 +- + cli/mmcli-modem-messaging.c | 2 +- + cli/mmcli-modem-oma.c | 2 +- + cli/mmcli-modem-signal.c | 2 +- + cli/mmcli-modem-simple.c | 2 +- + cli/mmcli-modem-time.c | 2 +- + cli/mmcli-modem-voice.c | 2 +- + cli/mmcli-modem.c | 2 +- + cli/mmcli-sim.c | 2 +- + cli/mmcli-sms.c | 2 +- + 16 files changed, 16 insertions(+), 16 deletions(-) + +commit 02f638d8d6d0eb67164dacb3477ff026621a319f +Author: Aleksander Morgado +Date: Sat Mar 21 15:37:58 2020 +0100 + + context: add ':' to the section titles + + So that --help-all print all sections in the same way as the Help and + Application option groups. + + src/mm-context.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 38f6e4eec920b2557ed7ba07310ce0160eab2cc9 +Author: Aleksander Morgado +Date: Mon Mar 16 09:53:27 2020 +0100 + + broadband-modem-mbim: fix segfault when loading capabilities + + If loading capabilities using QMI over MBIM returns NONE without an + explicit error, the process would crash. Fix that by making the error + optional when NONE is received. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/185 + + src/mm-broadband-modem-mbim.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit a6a721f3a8e010c0eefd7e38c4781f6e1a0c1e89 +Author: Milo Casagrande +Date: Tue Mar 10 20:16:15 2020 +0100 + + l10n: Update Italian translation + + Signed-off-by: Milo Casagrande + + po/it.po | 15 +++++++-------- + 1 file changed, 7 insertions(+), 8 deletions(-) + +commit b9e6f30ba835f5019db55d98631f6571fdc575ef Author: Aleksander Morgado Date: Thu Feb 20 16:11:42 2020 +0100 @@ -52,13 +10382,11 @@ ATTRS{bInterfaceClass}=="ff" ATTRS{authorized}=="1" - (cherry picked from commit b9e6f30ba835f5019db55d98631f6571fdc575ef) - src/kerneldevice/mm-kernel-device-udev.c | 62 +++++++++++++++++++++++--------- 1 file changed, 46 insertions(+), 16 deletions(-) -commit 593a942a63a5a61fdb7146ed41dd24ec390fa197 +commit 6eabfd27bf3c4c53d7779722b46e7261d22c1d92 Author: Aleksander Morgado Date: Tue Jan 21 12:21:28 2020 +0100 @@ -70,12 +10398,10 @@ (ttyUSB1): <--'^GETPORTMODE: TYPE: WCDMA: Huawei Technologies Co.,Ltd.,OK' - (cherry picked from commit 6eabfd27bf3c4c53d7779722b46e7261d22c1d92) - - plugins/huawei/mm-plugin-huawei.c | 23 ++++++++++++++--------- - 1 file changed, 14 insertions(+), 9 deletions(-) + plugins/huawei/mm-plugin-huawei.c | 25 +++++++++++++++---------- + 1 file changed, 15 insertions(+), 10 deletions(-) -commit a9966e2e59959a50204f0e2a5959ffcca909f466 +commit 353e27065dc9d8cf95e0ad81e14aae61648e2c85 Author: Aleksander Morgado Date: Fri Dec 27 22:47:36 2019 +0100 @@ -106,20 +10432,16 @@ Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/170 - (cherry picked from commit 353e27065dc9d8cf95e0ad81e14aae61648e2c85) - plugins/huawei/mm-plugin-huawei.c | 63 +++++++++++++++++++++++++++------------ 1 file changed, 44 insertions(+), 19 deletions(-) -commit 50622a4182b74971c6feec5ee0bf5b26ee48b828 +commit 9ef84d2cff27e99c2e805d636528d1740bc4985a Author: Aleksander Morgado Date: Fri Dec 27 22:24:24 2019 +0100 kerneldevice: support reading interface 'description' - (cherry picked from commit 9ef84d2cff27e99c2e805d636528d1740bc4985a) - src/kerneldevice/mm-kernel-device-generic.c | 93 ++++++++++++++++++----------- src/kerneldevice/mm-kernel-device-udev.c | 13 ++++ @@ -127,7 +10449,163 @@ src/kerneldevice/mm-kernel-device.h | 18 +++--- 4 files changed, 90 insertions(+), 44 deletions(-) -commit a77a449cd8c5638d4de0e52e2ff045751c67bc32 +commit 5da33df35b3266f8905578c56a43a56d79726602 +Author: Aleksander Morgado +Date: Wed Feb 26 13:12:20 2020 +0100 + + huawei: avoid attempting to complete GTask twice + + plugins/huawei/mm-plugin-huawei.c | 1 - + 1 file changed, 1 deletion(-) + +commit fd052c8e584a41efc211690e993f6ef0ee3092ac +Author: Aleksander Morgado +Date: Thu Jan 9 12:46:11 2020 +0100 + + base-sim: don't allow sending PIN/PUK if not required + + This avoids issues when e.g. sending SIM-PIN while the modem is + already unlocked or when SIM-PIN is not enabled. + + Under those conditions, the needlessly sent SIM-PIN unlock attempt may + fail while libmm-glib/mmcli reports a successful operation. E.g.: + + # mmcli --sim=/org/freedesktop/ModemManager1/SIM/0 --pin=3497 + successfully sent PIN code to the SIM + + But in reality... + + Wed Nov 20 14:38:52 2019 daemon.debug [4254]: + [1574260732.489513] Verifying PIN... + Wed Nov 20 14:38:52 2019 daemon.debug [4254]: [/dev/cdc-wdm0] + sent message... + <<<<<< RAW: + <<<<<< length = 27 + <<<<<< data = + 01:1A:00:00:0B:02:00:09:00:26:00:0E:00:02:06:00:01:04:33:34:39:37:01:02:00:06:00 + Wed Nov 20 14:38:52 2019 daemon.debug [4254]: [/dev/cdc-wdm0] + sent generic request (translated)... + <<<<<< QMUX: + <<<<<< length = 26 + <<<<<< flags = 0x00 + <<<<<< service = "uim" + <<<<<< client = 2 + <<<<<< QMI: + <<<<<< flags = "none" + <<<<<< transaction = 9 + <<<<<< tlv_length = 14 + <<<<<< message = "Verify PIN" (0x0026) + <<<<<< TLV: + <<<<<< type = "Info" (0x02) + <<<<<< length = 6 + <<<<<< value = 01:04:33:34:39:37 + <<<<<< translated = [ pin_id = 'pin1' pin_value = '3497' ] + Wed Nov 20 14:38:52 2019 daemon.debug [4254]: [/dev/cdc-wdm0] + received message... + <<<<<< RAW: + <<<<<< length = 30 + <<<<<< data = + 01:1D:00:80:0B:02:02:09:00:26:00:11:00:02:04:00:01:00:52:00:13:02:00:69:84:10:02:00:03:0A + Wed Nov 20 14:38:52 2019 daemon.debug [4254]: [/dev/cdc-wdm0] + received generic response (translated)... + <<<<<< QMUX: + <<<<<< length = 29 + <<<<<< flags = 0x80 + <<<<<< service = "uim" + <<<<<< client = 2 + <<<<<< QMI: + <<<<<< flags = "response" + <<<<<< transaction = 9 + <<<<<< tlv_length = 17 + <<<<<< message = "Verify PIN" (0x0026) + <<<<<< TLV: + <<<<<< type = "Result" (0x02) + <<<<<< length = 4 + <<<<<< value = 01:00:52:00 + <<<<<< translated = FAILURE: AccessDenied + + As we already know what the current lock status is, just abort the + user operation if the unlock operation isn't required. + + src/mm-base-sim.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +commit 9f192be632b388522088c5efa2e26fe293090707 +Author: Aleksander Morgado +Date: Thu Jan 9 12:45:41 2020 +0100 + + iface-modem: allow loading current required lock info + + src/mm-iface-modem.c | 18 ++++++++++++++++++ + src/mm-iface-modem.h | 3 ++- + 2 files changed, 20 insertions(+), 1 deletion(-) + +commit 634bb1caac878c7e26a6b5179f779ffd34478622 +Author: Aleksander Morgado +Date: Thu Jan 9 12:34:28 2020 +0100 + + base-sim: avoid using 'self' to refer to the modem + + src/mm-base-sim.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit b6add181572d93d35cc53631f8c311ce33474f20 +Author: Aleksander Morgado +Date: Thu Jan 9 12:25:17 2020 +0100 + + iface-modem-simple: don't abort connection attempt if SIM-PUK2 locked + + src/mm-iface-modem-simple.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 94025aad6c31c86c4ee12b6e06c5ac2dd3b5dd55 +Author: Aleksander Morgado +Date: Thu Jan 9 12:20:31 2020 +0100 + + base-sim: refactor common PIN/PUK unlock operations + + Keep the saved GError directly as GTask context, instead of allocating + the SendPinPukContext unconditionally. + + src/mm-base-sim.c | 136 + +++++++++++++++++++++--------------------------------- + 1 file changed, 52 insertions(+), 84 deletions(-) + +commit 00dc961cad885880b935becf9fc4dea6eff61160 +Author: Aleksander Morgado +Date: Fri Feb 7 15:24:38 2020 +0100 + + iface-modem-location: common helper code to test raw gps + + plugins/cinterion/mm-shared-cinterion.c | 25 ++------------- + plugins/option/mm-broadband-modem-hso.c | 25 ++------------- + plugins/simtech/mm-shared-simtech.c | 21 ------------- + plugins/xmm/mm-shared-xmm.c | 41 ------------------------ + src/mm-iface-modem-location.c | 56 + +++++++++++++++++++++++++++++---- + 5 files changed, 54 insertions(+), 114 deletions(-) + +commit a61caff747546441474b1a1fc50c664a13a1378f +Author: Aleksander Morgado +Date: Fri Feb 7 15:11:53 2020 +0100 + + iface-modem-location: plug memleaks when updating gps raw variant + + The helper method returning a variant from a MMLocationGpsRaw would + return already a full variant reference instead of a floating one, so + we were really increasing the refcount when doing g_variant_ref_sink() + in the location interface. + + Fix this by consolidating all helper methods in libmm-glib that return + variants from the different MMLocationXX objects, so that they all + return full variants instead of floating ones. + + libmm-glib/mm-location-3gpp.c | 2 +- + libmm-glib/mm-location-gps-nmea.c | 2 +- + src/mm-iface-modem-location.c | 12 ++++-------- + 3 files changed, 6 insertions(+), 10 deletions(-) + +commit a7a8fc909abeb0abe092feb2603d27216f0e1325 Author: Bob Ham Date: Tue Feb 4 11:21:34 2020 +0000 @@ -139,12 +10617,10 @@ doesn't match. To fix this we add an optional carriage return to the regex. This will match for the BM818's output. - (cherry picked from commit a7a8fc909abeb0abe092feb2603d27216f0e1325) - src/mm-broadband-modem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit 506fdb65ca21907e528565335db2ad5e8c9f437b +commit 38d7cc6683008394f51cadc6b66446ba96c5f388 Author: Bob Ham Date: Tue Feb 4 11:09:45 2020 +0000 @@ -154,12 +10630,10 @@ currently missed. To fix this, we include the secondary port in the port context. - (cherry picked from commit 38d7cc6683008394f51cadc6b66446ba96c5f388) - src/mm-broadband-modem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit 8db4669a114210c5c004e1e950d6a4787d07f175 +commit e128210a27e78b7d421993a610a12871ed922e19 Author: Bob Ham Date: Tue Feb 4 11:05:07 2020 +0000 @@ -170,12 +10644,10 @@ this, we only report the call list if the +CLCC didn't result in an error. - (cherry picked from commit e128210a27e78b7d421993a610a12871ed922e19) - src/mm-iface-modem-voice.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -commit 448d93bebc8ef7062548edc62bc9e19659bd870a +commit 2c9760af66454e492f601b9f12d3ad87de93765b Author: Bob Ham Date: Thu Feb 6 15:08:17 2020 +0000 @@ -184,12 +10656,10 @@ If a call is missing from the +CLCC call list and terminated because of that, add a debugging statement to log the call details. - (cherry picked from commit 2c9760af66454e492f601b9f12d3ad87de93765b) - src/mm-iface-modem-voice.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) -commit b405dfabb1c207a333a47d88880701be0a1503b9 +commit b5d4f045d888e94831b06624a15130c0b181219b Author: Bob Ham Date: Mon Feb 3 15:31:30 2020 +0000 @@ -217,229 +10687,4138 @@ To fix this, we match calls in a +CLCC call list by number as well. - (cherry picked from commit b5d4f045d888e94831b06624a15130c0b181219b) - src/mm-iface-modem-voice.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) -commit 6be1f4d3f1b9e1a2c9471e060ccd2f5fae7f8b29 +commit bdd1874f172438453c80f6b1cfcbd7ebbc31f02b Author: Aleksander Morgado -Date: Wed Nov 13 15:16:42 2019 +0100 +Date: Mon Feb 3 16:08:40 2020 +0100 - plugin-manager: allow new ports up to 1500ms since last port added + tests,keyfiles: add dummy test to avoid -Wunused-function warnings - Until now we had only a 2500ms timeout initialized since the first - port was exposed until we decided we were ready to consider all ports - notified by the kernel. + If none of the plugins enabled in the build has custom keyfiles, the + common_test() method would be unused. Avoid this just by adding a new + dummy test which is always available in the keyfiles tester. - With this new logic, we add an additional condition: even if the - 2500ms initial timeout has elapsed already, we leave an additional - 1500ms since the last port addition for new ports to appear. + plugins/tests/test-keyfiles.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) - This new logic is useful when relying on the ReportKernelEvent() DBus - method, as it is the user the one responsible for reporting the kernel - events instead of udev. Now, the user is not forced to make sure all - ports are exposed in 2500ms; instead, we also allow ports to be - reported in more than 2500ms as long as the time between port - additions reported is less than 1500ms. +commit 55d344ab963703ac91fb09e7e985395887a08dd6 +Author: Aleksander Morgado +Date: Sun Feb 2 11:33:13 2020 +0100 - Note that this does not mean that the whole probing time will now - always be 4000ms. On well behaved systems (like when based on udev) - this new 'extra' probing timeout may expire long before the 'min' - probing timeout we already had as well. + tests,udev-rules: add dummy test to avoid -Wunused-function warnings - E.g. in this setup, the reporting of the NET port was done 1100ms - later than the last ttyUSB3, and that was already too late as the - original 2500ms threshold had already expired. + If none of the plugins enabled in the build has custom udev rules, the + common_test() method would be unused. Avoid this just by adding a new + dummy test which is always available in the udev rules tester. - [1573536994.593874] (tty/ttyUSB0): first port in device - /sys/devices/platform/ehci-platform/usb1/1-1 - [1573536994.596659] [plugin manager] task 1: port grabbed: ttyUSB0 - [1573536995.093579] (tty/ttyUSB1): additional port in device - /sys/devices/platform/ehci-platform/usb1/1-1 - [1573536995.094172] [plugin manager] task 1: port grabbed: ttyUSB1 - [1573536995.603206] (tty/ttyUSB2): additional port in device - /sys/devices/platform/ehci-platform/usb1/1-1 - [1573536995.603822] [plugin manager] task 1: port grabbed: ttyUSB2 - [1573536996.111564] (tty/ttyUSB3): additional port in device - /sys/devices/platform/ehci-platform/usb1/1-1 - [1573536996.112257] [plugin manager] task 1: port grabbed: ttyUSB3 - [1573536996.814816] [device - /sys/devices/platform/ehci-platform/usb1/1-1] creating modem with - plugin 'Quectel' and '4' ports - [1573536997.265820] (net/wwan0): additional port in device - /sys/devices/platform/ehci-platform/usb1/1-1 - [1573536997.296935] (usbmisc/cdc-wdm0): additional port in device - /sys/devices/platform/ehci-platform/usb1/1-1 + plugins/tests/test-udev-rules.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) - (cherry picked from commit b4dcb76d5a924d0f49850a2115a377cd8ae6ccf5) +commit a8fd33ebaa80a0844c375fdb39173736d18f71cb +Author: Aleksander Morgado +Date: Fri Jan 24 12:27:07 2020 +0100 - src/mm-plugin-manager.c | 52 - +++++++++++++++++++++++++++++++++++++++++++++---- - 1 file changed, 48 insertions(+), 4 deletions(-) + port-qmi: fallback to raw-ip if WDA Get Data Format requests arguments -commit 5750a88e011904c122cb76045a8e52b8eb59d3f4 + New devices return a "Missing Argument" error in WDA Get Data Format, + requiring the use of the "Endpoint info" TLV. Given that all these new + devices are raw-ip only anyway, let's use this error to right away + fallback to require raw-ip in the interface. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/177 + + src/mm-port-qmi.c | 21 ++++++++++++++++----- + 1 file changed, 16 insertions(+), 5 deletions(-) + +commit 280363e0d639a77a4072f26b9ec499de6575c0f2 Author: Aleksander Morgado -Date: Wed Feb 26 13:12:20 2020 +0100 +Date: Fri Jan 31 15:46:14 2020 +0100 - huawei: avoid attempting to complete GTask twice + libmm-glib,helpers: allow \r\n in string to number conversions - (cherry picked from commit 5da33df35b3266f8905578c56a43a56d79726602) + It's not uncommon that we may want to parse a simple AT response that + contains a single number by doing mm_strip_tag() followed by + mm_get_uint_from_str(). In order to do this, we need to have the + helper methods that convert strings to numbers support \r\n characters + at the end of the string, as we would have in AT responses. + + libmm-glib/mm-common-helpers.c | 66 + +++++++++++++++++++++++++++++----- + libmm-glib/tests/test-common-helpers.c | 15 ++++++++ + 2 files changed, 73 insertions(+), 8 deletions(-) - plugins/huawei/mm-plugin-huawei.c | 1 - - 1 file changed, 1 deletion(-) +commit 2020f1f2e748beb3f919cd0818a32673b39aecbc +Author: Aleksander Morgado +Date: Fri Jan 31 14:50:41 2020 +0100 + + port-serial-qcdm: rewrite condition to make it more readable + + The logic is the same. -commit 18b7f3d8cb7123a5bf9eb98096516e2fe50fdb7a + src/mm-port-serial-qcdm.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +commit 11f04851cefe6553d2f12ad7ec6fdef892f7275a Author: Aleksander Morgado -Date: Wed Feb 12 11:20:11 2020 +0100 +Date: Fri Jan 31 14:30:23 2020 +0100 - build: post-release version bump to 1.12.7 + libmm-glib,location-gps-nmea: avoid using deprecated build_full() + method - configure.ac | 2 +- + mm-location-gps-nmea.c: In function + ‘mm_location_gps_nmea_get_string_variant’: + mm-location-gps-nmea.c:245:5: warning: + ‘mm_location_gps_nmea_build_full’ is deprecated: + Use 'mm_location_gps_nmea_get_traces' instead + [-Wdeprecated-declarations] + 245 | built = mm_location_gps_nmea_build_full (self); + | ^~~~~ + + libmm-glib/mm-location-gps-nmea.c | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) + +commit 02eafb582186021a7eab2863c88f3275b68c8f5e +Author: Aleksander Morgado +Date: Fri Jan 31 10:51:23 2020 +0100 + + libmm-glib,test: avoid using deprecated mm_pco_list_free() + + test-pco.c: In function ‘test_pco_list_add’: + test-pco.c:82:5: warning: ‘mm_pco_list_free’ is deprecated + [-Wdeprecated-declarations] + 82 | mm_pco_list_free (list); + | ^~~~~~~~~~~~~~~~ + In file included from ../../libmm-glib/libmm-glib.h:82, + from test-pco.c:17: + ../../libmm-glib/mm-pco.h:67:6: note: declared here + 67 | void mm_pco_list_free (GList *pco_list); + | ^~~~~~~~~~~~~~~~ + + libmm-glib/tests/test-pco.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit 79e61482840f27c894c4deaace9ca282bd4823af +commit 9e24226364f9c635160cdb0ca8a404781091ba7b Author: Aleksander Morgado -Date: Wed Feb 12 11:09:00 2020 +0100 +Date: Fri Jan 31 10:45:54 2020 +0100 - release: bump version to 1.12.6 + port-probe: MMPortProbeAtCommand always has constant command strings - configure.ac | 2 +- + plugins/altair/mm-plugin-altair-lte.c | 6 +++--- + plugins/nokia/mm-plugin-nokia-icera.c | 6 +++--- + plugins/nokia/mm-plugin-nokia.c | 6 +++--- + plugins/pantech/mm-plugin-pantech.c | 6 +++--- + plugins/zte/mm-plugin-zte.c | 6 +++--- + src/mm-port-probe-at.h | 3 +-- + src/mm-port-probe.c | 26 +++++++++++++------------- + 7 files changed, 29 insertions(+), 30 deletions(-) + +commit accd1a5841bafc81aa87db46eb35a8255ced4e22 +Author: Aleksander Morgado +Date: Fri Jan 31 10:36:50 2020 +0100 + + base-modem: define new helper MMBaseModemAtCommandAlloc + + It has the same exact format as MMBaseModemAtCommand, but its contents + are assumed heap allocated. + + The only real purpose of this type is to allow defining static + constant MMBaseModemAtCommand variables without warnings when using + -Wdiscarded-qualifiers. + + plugins/altair/mm-broadband-modem-altair-lte.c | 12 ++--- + plugins/huawei/mm-broadband-modem-huawei.c | 12 ++--- + plugins/icera/mm-broadband-modem-icera.c | 8 +-- + plugins/mbm/mm-broadband-modem-mbm.c | 36 ++++++------- + plugins/mtk/mm-broadband-modem-mtk.c | 4 +- + plugins/novatel/mm-broadband-modem-novatel-lte.c | 4 +- + plugins/option/mm-broadband-modem-option.c | 16 +++--- + plugins/sierra/mm-broadband-modem-sierra.c | 4 +- + plugins/telit/mm-broadband-modem-telit.c | 4 +- + src/mm-base-modem-at.c | 6 +++ + src/mm-base-modem-at.h | 24 ++++++++- + src/mm-broadband-modem.c | 68 + ++++++++++++------------ + 12 files changed, 112 insertions(+), 86 deletions(-) + +commit f77deb75a5d81fb1cfbfff576838900be866d016 +Author: Aleksander Morgado +Date: Fri Jan 31 10:15:45 2020 +0100 + + test,mmsmspdu: fix warnings with -Wswitch-enum + + mmsmspdu.c: In function ‘show_part_info’: + mmsmspdu.c:86:5: error: enumeration value + ‘MM_SMS_ENCODING_UNKNOWN’ not handled in switch + [-Werror=switch-enum] + 86 | switch (encoding) { + | ^~~~~~ + + test/mmsmspdu.c | 1 + + 1 file changed, 1 insertion(+) + +commit dce5dbeb9a22da31b30547bfde193292473207b0 +Author: Aleksander Morgado +Date: Fri Jan 31 10:15:12 2020 +0100 + + test,mmrules: fix warnings with -Wswitch-default + + mmrules.c: In function ‘print_rule’: + mmrules.c:97:13: error: switch missing default case + [-Werror=switch-default] + 97 | switch (rule_match->type) { + | ^~~~~~ + mmrules.c:113:5: error: switch missing default case + [-Werror=switch-default] + 113 | switch (rule->result.type) { + | ^~~~~~ + + test/mmrules.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit 6f433074e2fb4a17251ca483a6c848b67058ad5f +Author: Aleksander Morgado +Date: Fri Jan 31 10:14:25 2020 +0100 + + test,lsudev: fix warnings with -Wsign-compare + + lsudev.c: In function ‘println’: + lsudev.c:64:19: error: comparison of integer expressions of + different signedness: ‘int’ and ‘guint’ {aka ‘unsigned + int’} [-Werror=sign-compare] + 64 | for (i = 0; i < indent; i++) + | ^ + + test/lsudev.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 1fa7e1260d8b3c588c65ecb0c0f5d589ab61b1be +Author: Aleksander Morgado +Date: Fri Jan 31 10:13:35 2020 +0100 + + cli: fix warnings with -Wshadow + + mmcli-manager.c: In function ‘context_free’: + mmcli-manager.c:167:24: error: declaration of ‘ctx’ shadows + a global declaration [-Werror=shadow] + 167 | context_free (Context *ctx) + | ~~~~~~~~~^~~ + mmcli-manager.c:51:17: note: shadowed declaration is here + 51 | static Context *ctx; + | ^~~ + ... + + cli/mmcli-bearer.c | 4 ++-- + cli/mmcli-call.c | 4 ++-- + cli/mmcli-manager.c | 4 ++-- + cli/mmcli-modem-3gpp.c | 5 ++--- + cli/mmcli-modem-cdma.c | 4 ++-- + cli/mmcli-modem-firmware.c | 5 ++--- + cli/mmcli-modem-location.c | 4 ++-- + cli/mmcli-modem-messaging.c | 5 ++--- + cli/mmcli-modem-oma.c | 7 ++----- + cli/mmcli-modem-signal.c | 4 ++-- + cli/mmcli-modem-simple.c | 4 ++-- + cli/mmcli-modem-time.c | 4 ++-- + cli/mmcli-modem-voice.c | 5 ++--- + cli/mmcli-modem.c | 5 ++--- + cli/mmcli-sim.c | 4 ++-- + cli/mmcli-sms.c | 5 ++--- + 16 files changed, 32 insertions(+), 41 deletions(-) + +commit 1216e887168c580b5cd868dfa3f798ab90a43001 +Author: Aleksander Morgado +Date: Fri Jan 31 10:08:08 2020 +0100 + + cli: fix warnings with -Wswitch-default + + mmcli-output.c: In function ‘output_item_free’: + mmcli-output.c:321:5: error: switch missing default case + [-Werror=switch-default] + 321 | switch (item->type) { + | ^~~~~~ + mmcli-output.c: In function ‘mmcli_output_dump’: + mmcli-output.c:1208:5: error: switch missing default case + [-Werror=switch-default] + 1208 | switch (selected_type) { + | ^~~~~~ + mmcli-output.c: In function ‘mmcli_output_list_dump’: + mmcli-output.c:1231:5: error: switch missing default case + [-Werror=switch-default] + 1231 | switch (selected_type) { + | ^~~~~~ + + cli/mmcli-common.c | 5 ++--- + cli/mmcli-output.c | 6 ++++++ + 2 files changed, 8 insertions(+), 3 deletions(-) + +commit c32fdcefefb4d953bd4d7694cfc6b65d4beb9924 +Author: Aleksander Morgado +Date: Fri Jan 31 10:05:17 2020 +0100 + + cli: fix warnings with -Wswitch-enum + + mmcli.c: In function ‘log_handler’: + mmcli.c:118:5: error: enumeration value ‘G_LOG_FLAG_RECURSION’ + not handled in switch [-Werror=switch-enum] + 118 | switch (log_level) { + | ^~~~~~ + mmcli.c:118:5: error: enumeration value ‘G_LOG_LEVEL_MESSAGE’ + not handled in switch [-Werror=switch-enum] + mmcli.c:118:5: error: enumeration value ‘G_LOG_LEVEL_INFO’ + not handled in switch [-Werror=switch-enum] + mmcli.c:118:5: error: enumeration value ‘G_LOG_LEVEL_MASK’ + not handled in switch [-Werror=switch-enum] + + cli/mmcli.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +commit 1bf9937cd5be5b3a226b9c119c11c7f6f2bcaa7e +Author: Aleksander Morgado +Date: Fri Jan 31 10:02:56 2020 +0100 + + via: fix warnings with -Wdiscarded-qualifiers + + via/mm-plugin-via.c: In function ‘mm_plugin_create’: + via/mm-plugin-via.c:59:54: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 59 | static const mm_str_pair product_strings[] = { { "via", + "cbp7" }, + | ^~~~~ + via/mm-plugin-via.c:59:64: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 59 | static const mm_str_pair product_strings[] = { { "via", + "cbp7" }, + | + ^~~~~~ + via/mm-plugin-via.c:60:54: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 60 | { + "fusion", "2770p" }, + | + ^~~~~~~~ + via/mm-plugin-via.c:60:64: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 60 | { + "fusion", "2770p" }, + | + ^~~~~~~ + + plugins/via/mm-plugin-via.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 4a609e564a9ccce3312a98d4a4eec4613031313f +Author: Aleksander Morgado +Date: Fri Jan 31 10:01:25 2020 +0100 + + ublox: fix disabling of unsolicited events + + The incorrect ready() method was being used while disabling, which + ended up making the parent disable not being run at all. + + ublox/mm-broadband-modem-ublox.c:1178:1: error: + ‘voice_disable_unsolicited_events_ready’ defined but not used + [-Werror=unused-function] + 1178 | voice_disable_unsolicited_events_ready + (MMBroadbandModemUblox *self, + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + plugins/ublox/mm-broadband-modem-ublox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit ba9798fdc6216dcd9c9fa6142050bad1594e93f1 +commit 72a124a1218d0658036561763473b830a2c26bb3 Author: Aleksander Morgado -Date: Wed Feb 12 11:08:44 2020 +0100 +Date: Fri Jan 31 09:59:51 2020 +0100 - NEWS: update for 1.12.6 + ublox: fix warnings with -Wimplicit-fallthrough - NEWS | 26 ++++++++++++++++++++++++++ - 1 file changed, 26 insertions(+) + ublox/mm-broadband-modem-ublox.c:458:18: error: this statement + may fall through [-Werror=implicit-fallthrough=] + 458 | ctx->step++; + | ~~~~~~~~~^~ + ublox/mm-broadband-modem-ublox.c:461:5: note: here + 461 | case SET_CURRENT_MODES_BANDS_STEP_ACQUIRE: + | ^~~~ + ublox/mm-broadband-modem-ublox.c:468:18: error: this statement + may fall through [-Werror=implicit-fallthrough=] + 468 | ctx->step++; + | ~~~~~~~~~^~ + ublox/mm-broadband-modem-ublox.c:471:5: note: here + 471 | case SET_CURRENT_MODES_BANDS_STEP_CURRENT_POWER: + | ^~~~ + ... -commit fc47fa7fa3f3529744e681953300f4b4bd10e5d1 + plugins/ublox/mm-broadband-modem-ublox.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +commit 3197a52c58038a10cc63846867cb24d5204a59a0 Author: Aleksander Morgado -Date: Thu Jan 9 12:46:11 2020 +0100 +Date: Fri Jan 31 09:58:15 2020 +0100 - base-sim: don't allow sending PIN/PUK if not required + ublox: fix warnings with -Wswitch-enum - This avoids issues when e.g. sending SIM-PIN while the modem is - already unlocked or when SIM-PIN is not enabled. + ublox/mm-broadband-modem-ublox.c:1246:5: error: enumeration + value ‘MM_CALL_STATE_UNKNOWN’ not handled in switch + [-Werror=switch-enum] + 1246 | switch (call_info.state) { + | ^~~~~~ + ublox/mm-broadband-modem-ublox.c:1246:5: error: enumeration + value ‘MM_CALL_STATE_ACTIVE’ not handled in switch + [-Werror=switch-enum] + ublox/mm-broadband-modem-ublox.c:1246:5: error: enumeration value + ‘MM_CALL_STATE_HELD’ not handled in switch [-Werror=switch-enum] + ublox/mm-broadband-modem-ublox.c:1246:5: error: enumeration + value ‘MM_CALL_STATE_TERMINATED’ not handled in switch + [-Werror=switch-enum] - Under those conditions, the needlessly sent SIM-PIN unlock attempt may - fail while libmm-glib/mmcli reports a successful operation. E.g.: + plugins/ublox/mm-broadband-modem-ublox.c | 4 ++++ + 1 file changed, 4 insertions(+) - # mmcli --sim=/org/freedesktop/ModemManager1/SIM/0 --pin=3497 - successfully sent PIN code to the SIM +commit d6ec29c49e313dc9c74efd71d22176329592bcdb +Author: Aleksander Morgado +Date: Fri Jan 31 09:56:37 2020 +0100 - But in reality... + ublox: fix warnings with -Wswitch-default - Wed Nov 20 14:38:52 2019 daemon.debug [4254]: - [1574260732.489513] Verifying PIN... - Wed Nov 20 14:38:52 2019 daemon.debug [4254]: [/dev/cdc-wdm0] - sent message... - <<<<<< RAW: - <<<<<< length = 27 - <<<<<< data = - 01:1A:00:00:0B:02:00:09:00:26:00:0E:00:02:06:00:01:04:33:34:39:37:01:02:00:06:00 - Wed Nov 20 14:38:52 2019 daemon.debug [4254]: [/dev/cdc-wdm0] - sent generic request (translated)... - <<<<<< QMUX: - <<<<<< length = 26 - <<<<<< flags = 0x00 - <<<<<< service = "uim" - <<<<<< client = 2 - <<<<<< QMI: - <<<<<< flags = "none" - <<<<<< transaction = 9 - <<<<<< tlv_length = 14 - <<<<<< message = "Verify PIN" (0x0026) - <<<<<< TLV: - <<<<<< type = "Info" (0x02) - <<<<<< length = 6 - <<<<<< value = 01:04:33:34:39:37 - <<<<<< translated = [ pin_id = 'pin1' pin_value = '3497' ] - Wed Nov 20 14:38:52 2019 daemon.debug [4254]: [/dev/cdc-wdm0] - received message... - <<<<<< RAW: - <<<<<< length = 30 - <<<<<< data = - 01:1D:00:80:0B:02:02:09:00:26:00:11:00:02:04:00:01:00:52:00:13:02:00:69:84:10:02:00:03:0A - Wed Nov 20 14:38:52 2019 daemon.debug [4254]: [/dev/cdc-wdm0] - received generic response (translated)... - <<<<<< QMUX: - <<<<<< length = 29 - <<<<<< flags = 0x80 - <<<<<< service = "uim" - <<<<<< client = 2 - <<<<<< QMI: - <<<<<< flags = "response" - <<<<<< transaction = 9 - <<<<<< tlv_length = 17 - <<<<<< message = "Verify PIN" (0x0026) - <<<<<< TLV: - <<<<<< type = "Result" (0x02) - <<<<<< length = 4 - <<<<<< value = 01:00:52:00 - <<<<<< translated = FAILURE: AccessDenied + ublox/mm-broadband-modem-ublox.c: In function + ‘preload_support_config’: + ublox/mm-broadband-modem-ublox.c:100:5: error: switch missing + default case [-Werror=switch-default] + 100 | switch (self->priv->support_config.method) { + | ^~~~~~ + ublox/mm-broadband-modem-ublox.c:112:5: error: switch missing + default case [-Werror=switch-default] + 112 | switch (self->priv->support_config.uact) { + | ^~~~~~ + ublox/mm-broadband-modem-ublox.c:123:5: error: switch missing + default case [-Werror=switch-default] + 123 | switch (self->priv->support_config.ubandsel) { + | ^~~~~~ + ublox/mm-broadband-modem-ublox.c: In function + ‘set_current_modes_bands_step’: + ublox/mm-broadband-modem-ublox.c:452:5: error: switch missing + default case [-Werror=switch-default] + 452 | switch (ctx->step) { + | ^~~~~~ - As we already know what the current lock status is, just abort the - user operation if the unlock operation isn't required. + plugins/ublox/mm-broadband-modem-ublox.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) - (cherry picked from commit fd052c8e584a41efc211690e993f6ef0ee3092ac) +commit f66f7458b73dfd708eba6813f3adc37483d8948b +Author: Aleksander Morgado +Date: Fri Jan 31 09:38:38 2020 +0100 - src/mm-base-sim.c | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) + simtech: fix warnings with -Wimplicit-fallthrough -commit e8d81836cb346af259ef26790595e77588c6cf6b + simtech/mm-broadband-modem-simtech.c: In function + ‘enable_unsolicited_events_context_step’: + simtech/mm-broadband-modem-simtech.c:442:18: error: this statement + may fall through [-Werror=implicit-fallthrough=] + 442 | ctx->step++; + | ~~~~~~~~~^~ + simtech/mm-broadband-modem-simtech.c:444:5: note: here + 444 | case ENABLE_UNSOLICITED_EVENTS_STEP_LAST: + | ^~~~ + + plugins/simtech/mm-broadband-modem-simtech.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit f6a103ef135aebbec9294d0e7fb5f0a5d6578218 Author: Aleksander Morgado -Date: Thu Jan 9 12:45:41 2020 +0100 +Date: Fri Jan 31 09:36:06 2020 +0100 - iface-modem: allow loading current required lock info + simtech: fix warnings with -Wswitch-default - (cherry picked from commit 9f192be632b388522088c5efa2e26fe293090707) + simtech/mm-broadband-modem-simtech.c: In function + ‘enable_unsolicited_events_context_step’: + simtech/mm-broadband-modem-simtech.c:378:5: error: switch missing + default case [-Werror=switch-default] + 378 | switch (ctx->step) { + | ^~~~~~ + simtech/mm-broadband-modem-simtech.c: In function + ‘disable_unsolicited_events_context_step’: + simtech/mm-broadband-modem-simtech.c:563:5: error: switch missing + default case [-Werror=switch-default] + 563 | switch (ctx->step) { + | ^~~~~~ - src/mm-iface-modem.c | 18 ++++++++++++++++++ - src/mm-iface-modem.h | 3 ++- - 2 files changed, 20 insertions(+), 1 deletion(-) + plugins/simtech/mm-broadband-modem-simtech.c | 6 ++++++ + 1 file changed, 6 insertions(+) -commit 0de344ea0591ad7c0e6b15c0ea49d7603e9984f4 +commit 7873ef00e93f4bb390f873eddc16fa1afa071b8a Author: Aleksander Morgado -Date: Thu Jan 9 12:34:28 2020 +0100 +Date: Fri Jan 31 09:34:45 2020 +0100 - base-sim: avoid using 'self' to refer to the modem + simtech: fix warnings with -Wsign-compare - (cherry picked from commit 634bb1caac878c7e26a6b5179f779ffd34478622) + simtech/mm-broadband-modem-simtech.c: In function + ‘simtech_act_to_mm_act’: + simtech/mm-broadband-modem-simtech.c:89:19: error: comparison of + integer expressions of different signedness: ‘int’ and ‘long + unsigned int’ [-Werror=sign-compare] + 89 | return (nsmod < G_N_ELEMENTS + (simtech_act_to_mm_act_map) ? simtech_act_to_mm_act_map[nsmod] + : MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN); + | ^ - src/mm-base-sim.c | 4 ++-- + plugins/simtech/mm-broadband-modem-simtech.c | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +commit 68f3eeeaa785e77289f6c7f276400d61bbb7fd22 +Author: Aleksander Morgado +Date: Fri Jan 31 09:31:57 2020 +0100 + + option,hso: fix warnings with -Wsign-compare + + option/mm-broadband-bearer-hso.c: In function ‘ip_config_ready’: + option/mm-broadband-bearer-hso.c:128:21: error: comparison + of integer expressions of different signedness: ‘gint’ + {aka ‘int’} and ‘guint’ {aka ‘unsigned int’} + [-Werror=sign-compare] + 128 | num != ctx->cid) { + | ^~ + + plugins/option/mm-broadband-bearer-hso.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -commit 8ec19b38a7e3eceb6cfa4c618dc5bee8f1a4aed7 +commit fc581c50bd535d4bcaf4f21619c813101b8aef24 Author: Aleksander Morgado -Date: Thu Jan 9 12:25:17 2020 +0100 +Date: Fri Jan 31 09:31:14 2020 +0100 - iface-modem-simple: don't abort connection attempt if SIM-PUK2 locked + pantech: fix warnings with -Wdiscarded-qualifiers - (cherry picked from commit b6add181572d93d35cc53631f8c311ce33474f20) + pantech/mm-plugin-pantech.c:69:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 69 | { "ATE0", 3, + port_probe_response_processor_is_pantech_at }, + | ^~~~~~ + pantech/mm-plugin-pantech.c:70:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 70 | { "ATE0", 3, + port_probe_response_processor_is_pantech_at }, + | ^~~~~~ + pantech/mm-plugin-pantech.c:71:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 71 | { "ATE0", 3, + port_probe_response_processor_is_pantech_at }, + | ^~~~~~ - src/mm-iface-modem-simple.c | 5 +++-- + plugins/pantech/mm-plugin-pantech.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit f6611793105f4714ebc594c3046960b8ae94c62a +Author: Aleksander Morgado +Date: Fri Jan 31 09:30:41 2020 +0100 + + novatel-lte: fix warnings with -Wdiscarded-qualifiers + + novatel/mm-broadband-modem-novatel-lte.c:249:7: error: + initialization discards ‘const’ qualifier from pointer target + type [-Werror=discarded-qualifiers] + 249 | { "+CNUM", 3, TRUE, + response_processor_cnum_ignore_at_errors }, + | ^~~~~~~ + novatel/mm-broadband-modem-novatel-lte.c:250:7: error: + initialization discards ‘const’ qualifier from pointer target + type [-Werror=discarded-qualifiers] + 250 | { "$NWMDN", 3, TRUE, + response_processor_nwmdn_ignore_at_errors }, + | ^~~~~~~~ + + plugins/novatel/mm-broadband-modem-novatel-lte.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit f3acdcaa1b1a096dc0863eff4d3ad1b8f2a47c65 +Author: Aleksander Morgado +Date: Fri Jan 31 09:30:14 2020 +0100 + + mtk: fix warnings with -Wdiscarded-qualifiers + + mtk/mm-broadband-modem-mtk.c:727:6: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 727 | {"+ECSQ=2", 5, FALSE, NULL}, + | ^~~~~~~~~ + mtk/mm-broadband-modem-mtk.c:733:6: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 733 | {"+ECSQ=0", 5, FALSE, NULL}, + | ^~~~~~~~~ + + plugins/mtk/mm-broadband-modem-mtk.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit 1f2018d52416a16242fdba4d9ca4e1280b9907c0 +Author: Aleksander Morgado +Date: Fri Jan 31 09:29:16 2020 +0100 + + nokia: fix warnings with -Wdiscarded-qualifiers + + nokia/mm-plugin-nokia.c:37:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 37 | { "ATE1 E0", 3, mm_port_probe_response_processor_is_at + }, + | ^~~~~~~~~ + nokia/mm-plugin-nokia.c:38:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 38 | { "ATE1 E0", 3, mm_port_probe_response_processor_is_at + }, + | ^~~~~~~~~ + nokia/mm-plugin-nokia.c:39:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 39 | { "ATE1 E0", 3, mm_port_probe_response_processor_is_at + }, + | ^~~~~~~~~ + nokia/mm-plugin-nokia-icera.c:36:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 36 | { "ATE1 E0", 3, mm_port_probe_response_processor_is_at + }, + | ^~~~~~~~~ + nokia/mm-plugin-nokia-icera.c:37:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 37 | { "ATE1 E0", 3, mm_port_probe_response_processor_is_at + }, + | ^~~~~~~~~ + nokia/mm-plugin-nokia-icera.c:38:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 38 | { "ATE1 E0", 3, mm_port_probe_response_processor_is_at + }, + | ^~~~~~~~~ + + plugins/nokia/mm-plugin-nokia-icera.c | 6 +++--- + plugins/nokia/mm-plugin-nokia.c | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +commit b5c08a47bef1cf0be51d44207c85ecbfe3b0cfc4 +Author: Aleksander Morgado +Date: Fri Jan 31 09:27:57 2020 +0100 + + mbm: fix warnings with -Wdiscarded-qualifiers + + mbm/mm-broadband-modem-mbm.c:409:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 409 | { "&F", 3, FALSE, NULL }, + | ^~~~ + mbm/mm-broadband-modem-mbm.c:411:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 411 | { "*ENAP=0", 3, FALSE, NULL }, + | ^~~~~~~~~ + ... + + plugins/mbm/mm-broadband-modem-mbm.c | 36 + ++++++++++++++++++------------------ + 1 file changed, 18 insertions(+), 18 deletions(-) + +commit 40497a3904c3b5bad2056437b15c564143d77603 +Author: Aleksander Morgado +Date: Fri Jan 31 09:25:51 2020 +0100 + + iridium: fix warnings with -Wdiscarded-qualifiers + + iridium/mm-plugin-iridium.c: In function ‘mm_plugin_create’: + iridium/mm-plugin-iridium.c:64:52: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 64 | static const mm_str_pair product_strings[] = + {{"motorola", "satellite" }, + | + ^~~~~~~~~~ + iridium/mm-plugin-iridium.c:64:64: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 64 | static const mm_str_pair product_strings[] = + {{"motorola", "satellite" }, + | + ^~~~~~~~~~~ + + plugins/iridium/mm-plugin-iridium.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit db8c1b9c12c36ee27ea26386de74dbb7801168b4 +Author: Aleksander Morgado +Date: Fri Jan 31 09:20:58 2020 +0100 + + huawei: fix warnings with -Wimplicit-fallthrough + + huawei/mm-broadband-bearer-huawei.c: In function + ‘connect_3gpp_context_step’: + huawei/mm-broadband-bearer-huawei.c:378:18: error: this statement + may fall through [-Werror=implicit-fallthrough=] + 378 | ctx->step++; + | ~~~~~~~~~^~ + huawei/mm-broadband-bearer-huawei.c:382:5: note: here + 382 | case CONNECT_3GPP_CONTEXT_STEP_NDISDUP: { + | ^~~~ + huawei/mm-broadband-bearer-huawei.c: In function + ‘disconnect_3gpp_context_step’: + huawei/mm-broadband-bearer-huawei.c:708:18: error: this statement + may fall through [-Werror=implicit-fallthrough=] + 708 | ctx->step++; + | ~~~~~~~~~^~ + huawei/mm-broadband-bearer-huawei.c:711:5: note: here + 711 | case DISCONNECT_3GPP_CONTEXT_STEP_NDISDUP: + | ^~~~ + + plugins/huawei/mm-broadband-bearer-huawei.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +commit de360bd6204fad85c33d717e6c1ec87b15f18ab1 +Author: Aleksander Morgado +Date: Fri Jan 31 07:53:14 2020 +0100 + + huawei: fix warnings with -Wswitch-default + + plugins/huawei/mm-broadband-bearer-huawei.c | 6 ++++++ + plugins/huawei/mm-broadband-modem-huawei.c | 5 +++-- + 2 files changed, 9 insertions(+), 2 deletions(-) + +commit 50e6ead7e26c37824b0493acc3aef8def119f903 +Author: Aleksander Morgado +Date: Fri Jan 31 07:51:40 2020 +0100 + + huawei: fix warnings with -Wdiscarded-qualifiers + + huawei/mm-broadband-modem-huawei.c: At top level: + huawei/mm-broadband-modem-huawei.c:2011:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 2011 | { "^PORTSEL=0", 5, FALSE, NULL }, + | ^~~~~~~~~~~~ + huawei/mm-broadband-modem-huawei.c:2012:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 2012 | { "^CURC=1", 3, FALSE, NULL }, + | ^~~~~~~~~ + + plugins/huawei/mm-broadband-modem-huawei.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +commit 23f17ce766f12ec053a63948a92bb55b27c05376 +Author: Aleksander Morgado +Date: Fri Jan 31 07:49:36 2020 +0100 + + huawei: fix warnings with -Wswitch-enum + + huawei/mm-broadband-modem-huawei.c: In function + ‘huawei_hcsq_changed’: + huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration value + ‘MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN’ not handled in switch + [-Werror=switch-enum] + 1816 | switch (act) { + | ^~~~~~ + huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration + value ‘MM_MODEM_ACCESS_TECHNOLOGY_POTS’ not handled in switch + [-Werror=switch-enum] + huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration value + ‘MM_MODEM_ACCESS_TECHNOLOGY_GSM_COMPACT’ not handled in switch + [-Werror=switch-enum] + huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration + value ‘MM_MODEM_ACCESS_TECHNOLOGY_GPRS’ not handled in switch + [-Werror=switch-enum] + huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration + value ‘MM_MODEM_ACCESS_TECHNOLOGY_EDGE’ not handled in switch + [-Werror=switch-enum] + huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration + value ‘MM_MODEM_ACCESS_TECHNOLOGY_HSDPA’ not handled in switch + [-Werror=switch-enum] + huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration + value ‘MM_MODEM_ACCESS_TECHNOLOGY_HSUPA’ not handled in switch + [-Werror=switch-enum] + huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration + value ‘MM_MODEM_ACCESS_TECHNOLOGY_HSPA’ not handled in switch + [-Werror=switch-enum] + huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration value + ‘MM_MODEM_ACCESS_TECHNOLOGY_HSPA_PLUS’ not handled in switch + [-Werror=switch-enum] + huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration + value ‘MM_MODEM_ACCESS_TECHNOLOGY_1XRTT’ not handled in switch + [-Werror=switch-enum] + huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration + value ‘MM_MODEM_ACCESS_TECHNOLOGY_EVDO0’ not handled in switch + [-Werror=switch-enum] + huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration + value ‘MM_MODEM_ACCESS_TECHNOLOGY_EVDOA’ not handled in switch + [-Werror=switch-enum] + huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration + value ‘MM_MODEM_ACCESS_TECHNOLOGY_EVDOB’ not handled in switch + [-Werror=switch-enum] + huawei/mm-broadband-modem-huawei.c:1816:5: error: enumeration + value ‘MM_MODEM_ACCESS_TECHNOLOGY_ANY’ not handled in switch + [-Werror=switch-enum] + + plugins/huawei/mm-broadband-bearer-huawei.c | 3 +++ + plugins/huawei/mm-broadband-modem-huawei.c | 36 + ++++++++++++++--------------- + 2 files changed, 21 insertions(+), 18 deletions(-) + +commit 2753afb73c3c3acff1d34e477d3a6ebbb91f4f8b +Author: Aleksander Morgado +Date: Fri Jan 31 07:47:17 2020 +0100 + + huawei: fix warnings with -Wsign-compare + + huawei/mm-plugin-huawei.c: In function ‘try_next_usbif’: + huawei/mm-plugin-huawei.c:234:30: error: comparison of integer + expressions of different signedness: ‘guint’ {aka ‘unsigned + int’} and ‘gint’ {aka ‘int’} [-Werror=sign-compare] + 234 | usbif < closest) { + | ^ + huawei/mm-plugin-huawei.c: In function + ‘propagate_port_mode_results’: + huawei/mm-plugin-huawei.c:439:27: error: comparison of integer + expressions of different signedness: ‘guint’ {aka ‘unsigned + int’} and ‘int’ [-Werror=sign-compare] + 439 | if (usbif + 1 == GPOINTER_TO_INT + (g_object_get_data (G_OBJECT (device), TAG_HUAWEI_PCUI_PORT))) { + | ^~ + huawei/mm-plugin-huawei.c:442:34: error: comparison of integer + expressions of different signedness: ‘guint’ {aka ‘unsigned + int’} and ‘int’ [-Werror=sign-compare] + 442 | } else if (usbif + 1 == GPOINTER_TO_INT + (g_object_get_data (G_OBJECT (device), TAG_HUAWEI_MODEM_PORT))) + | ^~ + huawei/mm-plugin-huawei.c:445:32: error: comparison of integer + expressions of different signedness: ‘guint’ {aka ‘unsigned + int’} and ‘int’ [-Werror=sign-compare] + 445 | usbif + 1 == GPOINTER_TO_INT + (g_object_get_data (G_OBJECT (device), TAG_HUAWEI_NDIS_PORT))) + | ^~ + + plugins/huawei/mm-plugin-huawei.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +commit 497398158f34e84a746e3208fa289c0912303966 +Author: Aleksander Morgado +Date: Fri Jan 31 07:42:56 2020 +0100 + + cinterion: fix warnings with -Wimplicit-fallthrough + + cinterion/mm-broadband-bearer-cinterion.c: In function + ‘dial_3gpp_context_step’: + cinterion/mm-broadband-bearer-cinterion.c:393:18: error: this + statement may fall through [-Werror=implicit-fallthrough=] + 393 | ctx->step++; + | ~~~~~~~~~^~ + cinterion/mm-broadband-bearer-cinterion.c:396:5: note: here + 396 | case DIAL_3GPP_CONTEXT_STEP_AUTH: { + | ^~~~ + cinterion/mm-broadband-bearer-cinterion.c:419:18: error: this + statement may fall through [-Werror=implicit-fallthrough=] + 419 | ctx->step++; + | ~~~~~~~~~^~ + cinterion/mm-broadband-bearer-cinterion.c:422:5: note: here + 422 | case DIAL_3GPP_CONTEXT_STEP_START_SWWAN: { + | ^~~~ + cinterion/mm-broadband-bearer-cinterion.c: In function + ‘disconnect_3gpp_context_step’: + cinterion/mm-broadband-bearer-cinterion.c:613:18: error: this + statement may fall through [-Werror=implicit-fallthrough=] + 613 | ctx->step++; + | ~~~~~~~~~^~ + cinterion/mm-broadband-bearer-cinterion.c:615:5: note: here + 615 | case DISCONNECT_3GPP_CONTEXT_STEP_STOP_SWWAN: { + | ^~~~ + + plugins/cinterion/mm-broadband-bearer-cinterion.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +commit eff4ca989ddadd2fd27a66bdfe54792cd53015bd +Author: Aleksander Morgado +Date: Fri Jan 31 07:41:13 2020 +0100 + + cinterion: fix warnings with -Wswitch-default + + cinterion/mm-broadband-bearer-cinterion.c: In function + ‘dial_3gpp_context_step’: + cinterion/mm-broadband-bearer-cinterion.c:370:5: error: switch + missing default case [-Werror=switch-default] + 370 | switch (ctx->step) { + | ^~~~~~ + cinterion/mm-broadband-bearer-cinterion.c: In function + ‘disconnect_3gpp_context_step’: + cinterion/mm-broadband-bearer-cinterion.c:610:5: error: switch + missing default case [-Werror=switch-default] + 610 | switch (ctx->step) { + | ^~~~~~ + + plugins/cinterion/mm-broadband-bearer-cinterion.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 546715490dc7025fd4a3a17bb5e56287b43da86d +Author: Aleksander Morgado +Date: Fri Jan 31 07:40:27 2020 +0100 + + cinterion: fix warnings with -Wswitch-enum + + cinterion/mm-broadband-modem-cinterion.c: In function + ‘common_create_bearer’: + cinterion/mm-broadband-modem-cinterion.c:1699:5: error: enumeration + value ‘FEATURE_SUPPORT_UNKNOWN’ not handled in switch + [-Werror=switch-enum] + 1699 | switch (self->priv->swwan_support) { + | ^~~~~~ + ... + + plugins/cinterion/mm-broadband-bearer-cinterion.c | 5 +++++ + plugins/cinterion/mm-broadband-modem-cinterion.c | 1 + + 2 files changed, 6 insertions(+) + +commit 63d21151e22ed2bb81e2165e26ce5cd83791d678 +Author: Aleksander Morgado +Date: Fri Jan 31 07:37:08 2020 +0100 + + cinterion: fix warnings with -Wimplicit-fallthrough + + cinterion/mm-shared-cinterion.c: In function + ‘disable_location_gathering_context_gps_step’: + cinterion/mm-shared-cinterion.c:414:22: error: this statement may + fall through [-Werror=implicit-fallthrough=] + 414 | ctx->gps_step++; + | ~~~~~~~~~~~~~^~ + cinterion/mm-shared-cinterion.c:417:5: note: here + 417 | case DISABLE_LOCATION_GATHERING_GPS_STEP_SGPSS: + | ^~~~ + + plugins/cinterion/mm-shared-cinterion.c | 21 ++++++++++----------- + 1 file changed, 10 insertions(+), 11 deletions(-) + +commit 198529495ae1984958c0f072fa4ed1320b5e4044 +Author: Aleksander Morgado +Date: Fri Jan 31 07:35:15 2020 +0100 + + cinterion: fix warnings with -Wswitch-default + + cinterion/mm-shared-cinterion.c: In function + ‘disable_location_gathering_context_gps_step’: + cinterion/mm-shared-cinterion.c:412:5: error: switch missing + default case [-Werror=switch-default] + 412 | switch (ctx->gps_step) { + | ^~~~~~ + cinterion/mm-shared-cinterion.c: In function + ‘enable_location_gathering_context_gps_step’: + cinterion/mm-shared-cinterion.c:665:5: error: switch missing + default case [-Werror=switch-default] + 665 | switch (ctx->gps_step) { + | ^~~~~~ + + plugins/cinterion/mm-shared-cinterion.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit bbeabb495e1bd2df3d938b850fbce4e61a61d9fa +Author: Aleksander Morgado +Date: Thu Jan 30 18:54:23 2020 +0100 + + helpers: new macro to CLAMP high threshold only + + Useful when clamping a unsigned integer with low threshold set to 0, + which would give us compiler warnings with -Wtype-limits when using + CLAMP(), e.g.: + + via/mm-broadband-modem-via.c: In function + ‘handle_evdo_quality_change’: + /usr/include/glib-2.0/glib/gmacros.h:811:63: error: comparison of + unsigned expression < 0 is always false [-Werror=type-limits] + 811 | #define CLAMP(x, low, high) (((x) > (high)) ? (high) : + (((x) < (low)) ? (low) : (x))) + | + ^ + via/mm-broadband-modem-via.c:284:19: note: in expansion of macro + ‘CLAMP’ + 284 | quality = CLAMP (quality, 0, 100); + | ^~~~~ + + plugins/huawei/mm-broadband-modem-huawei.c | 14 +++++++------- + plugins/mtk/mm-broadband-modem-mtk.c | 16 ++++++++-------- + plugins/option/mm-broadband-modem-option.c | 6 +++--- + plugins/simtech/mm-broadband-modem-simtech.c | 2 +- + plugins/via/mm-broadband-modem-via.c | 2 +- + src/mm-broadband-modem-mbim.c | 8 ++------ + src/mm-modem-helpers.h | 6 ++++++ + 7 files changed, 28 insertions(+), 26 deletions(-) + +commit b856f3625db670346a248967a53d6d0119e725b7 +Author: Aleksander Morgado +Date: Thu Jan 30 18:52:01 2020 +0100 + + zte: fix warnings with -Wdiscarded-qualifiers + + zte/mm-plugin-zte.c:54:7: error: initialization discards ‘const’ + qualifier from pointer target type [-Werror=discarded-qualifiers] + 54 | { "ATE0+CPMS?", 3, + mm_port_probe_response_processor_is_at }, + | ^~~~~~~~~~~~ + zte/mm-plugin-zte.c:55:7: error: initialization discards ‘const’ + qualifier from pointer target type [-Werror=discarded-qualifiers] + 55 | { "ATE0+CPMS?", 3, + mm_port_probe_response_processor_is_at }, + | ^~~~~~~~~~~~ + zte/mm-plugin-zte.c:56:7: error: initialization discards ‘const’ + qualifier from pointer target type [-Werror=discarded-qualifiers] + 56 | { "ATE0+CPMS?", 3, + mm_port_probe_response_processor_is_at }, + | ^~~~~~~~~~~~ + + plugins/zte/mm-plugin-zte.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit c1aac8ed2678c2ac7ae0333a3322b8990fe50527 +Author: Aleksander Morgado +Date: Thu Jan 30 18:50:31 2020 +0100 + + altair: fix warnings with -Wdiscarded-qualifiers + + altair/mm-plugin-altair-lte.c:44:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 44 | { "AT", 7, mm_port_probe_response_processor_is_at }, + | ^~~~ + altair/mm-plugin-altair-lte.c:45:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 45 | { "AT", 7, mm_port_probe_response_processor_is_at }, + | ^~~~ + altair/mm-plugin-altair-lte.c:46:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 46 | { "AT", 7, mm_port_probe_response_processor_is_at }, + | ^~~~ + altair/mm-broadband-modem-altair-lte.c:886:5: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 886 | { "%STATCM=1", 10, FALSE, + response_processor_no_result_stop_on_error }, + | ^~~~~~~~~~~ + altair/mm-broadband-modem-altair-lte.c:887:5: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 887 | { "%NOTIFYEV=\"SIMREFRESH\",1", 10, FALSE, NULL }, + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ + altair/mm-broadband-modem-altair-lte.c:888:5: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 888 | { "%PCOINFO=1", 10, FALSE, NULL }, + | ^~~~~~~~~~~~ + ... + + plugins/altair/mm-broadband-modem-altair-lte.c | 12 ++++++------ + plugins/altair/mm-plugin-altair-lte.c | 6 +++--- + 2 files changed, 9 insertions(+), 9 deletions(-) + +commit 35649aa110821e59bf8b802eee087d6090579b17 +Author: Aleksander Morgado +Date: Fri Jan 31 15:17:23 2020 +0100 + + telit,tests: different errors for invalid vs unmatched band + combinations + + plugins/telit/tests/test-mm-modem-helpers-telit.c | 46 + +++++++++++++++++------ + 1 file changed, 35 insertions(+), 11 deletions(-) + +commit 5ba6a684af22f9d7c2079cee6e4ae5e3fc158d1c +Author: Aleksander Morgado +Date: Thu Jan 30 18:49:28 2020 +0100 + + telit: fix warnings with -Wimplicit-fallthrough + + telit/mm-broadband-modem-telit.c: In function ‘qss_setup_step’: + telit/mm-broadband-modem-telit.c:619:22: error: this statement + may fall through [-Werror=implicit-fallthrough=] + 619 | ctx->step++; + | ~~~~~~~~~^~ + telit/mm-broadband-modem-telit.c:620:9: note: here + 620 | case QSS_SETUP_STEP_QUERY: + | ^~~~ + telit/mm-broadband-modem-telit.c:653:22: error: this statement + may fall through [-Werror=implicit-fallthrough=] + 653 | ctx->step++; + | ~~~~~~~~~^~ + telit/mm-broadband-modem-telit.c:654:9: note: here + 654 | case QSS_SETUP_STEP_LAST: + | ^~~~ + telit/mm-broadband-modem-telit.c: In function + ‘load_unlock_retries_step’: + telit/mm-broadband-modem-telit.c:906:22: error: this statement + may fall through [-Werror=implicit-fallthrough=] + 906 | ctx->step++; + | ~~~~~~~~~^~ + telit/mm-broadband-modem-telit.c:907:9: note: here + 907 | case LOAD_UNLOCK_RETRIES_STEP_LOCK: + | ^~~~ + + plugins/telit/mm-broadband-modem-telit.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 7e19ed0a7967704565e793727eff5958b76ed481 +Author: Aleksander Morgado +Date: Thu Jan 30 18:48:26 2020 +0100 + + telit: fix warnings with -Wdiscarded-qualifiers + + telit/mm-broadband-modem-telit.c: At top level: + telit/mm-broadband-modem-telit.c:1184:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 1184 | { "#PSNT?", 3, FALSE, + response_processor_psnt_ignore_at_errors }, + | ^~~~~~~~ + telit/mm-broadband-modem-telit.c:1185:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 1185 | { "+SERVICE?", 3, FALSE, + response_processor_service_ignore_at_errors }, + | ^~~~~~~~~~~ + + plugins/telit/mm-broadband-modem-telit.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 26e565f6a3a784dadae4b55819e3f5cdc5848145 +Author: Aleksander Morgado +Date: Thu Jan 30 18:47:41 2020 +0100 + + telit: fix warnings with -Wswitch-default + + telit/mm-broadband-modem-telit.c: In function ‘qss_setup_step’: + telit/mm-broadband-modem-telit.c:616:5: error: switch missing + default case [-Werror=switch-default] + 616 | switch (ctx->step) { + | ^~~~~~ + + plugins/telit/mm-broadband-modem-telit.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit cfd5cad8826bba97261e1f2bdceab9523f516173 +Author: Aleksander Morgado +Date: Thu Jan 30 18:47:08 2020 +0100 + + telit: fix warnings with -Wsign-compare + + telit/mm-broadband-modem-telit.c: In function + ‘gps_enabled_ready’: + telit/mm-broadband-modem-telit.c:191:30: error: comparison of + integer expressions of different signedness: ‘gint’ {aka + ‘int’} and ‘long unsigned int’ [-Werror=sign-compare] + 191 | if (ctx->gps_enable_step < G_N_ELEMENTS (gps_enable)) { + | ^ + telit/mm-broadband-modem-telit.c: In function + ‘parent_enable_location_gathering_ready’: + telit/mm-broadband-modem-telit.c:254:43: error: comparison of + integer expressions of different signedness: ‘gint’ {aka + ‘int’} and ‘long unsigned int’ [-Werror=sign-compare] + 254 | if (start_gps && ctx->gps_enable_step < G_N_ELEMENTS + (gps_enable)) { + | ^ + + plugins/telit/mm-broadband-modem-telit.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 10c9ac18f706154437bf63a0905e59c8667208ca +Author: Aleksander Morgado +Date: Thu Jan 30 18:45:50 2020 +0100 + + telit: use integers to compare interface numbers + + plugins/telit/mm-common-telit.c | 29 +++++++++++++++-------------- + 1 file changed, 15 insertions(+), 14 deletions(-) + +commit b4a08e9eb934ddcfb688dca3d7fc58ccb2a2ea6a +Author: Aleksander Morgado +Date: Thu Jan 30 18:36:49 2020 +0100 + + xmm: fix warnings with -Wswitch-enum + + xmm/mm-shared-xmm.c: In function ‘gps_engine_start’: + xmm/mm-shared-xmm.c:1068:5: error: enumeration value + ‘GPS_ENGINE_STATE_OFF’ not handled in switch + [-Werror=switch-enum] + 1068 | switch (state) { + | ^~~~~~ + + plugins/xmm/mm-shared-xmm.c | 1 + + 1 file changed, 1 insertion(+) + +commit f560cae145b0c4906ed50d284e3fd2de0dadb518 +Author: Aleksander Morgado +Date: Thu Jan 30 18:35:58 2020 +0100 + + novatel: fix warnings with -Wswitch-default + + novatel/mm-broadband-modem-novatel.c: In function + ‘cdma_activation_step’: + novatel/mm-broadband-modem-novatel.c:1045:5: error: switch missing + default case [-Werror=switch-default] + 1045 | switch (ctx->step) { + | ^~~~~~ + + plugins/novatel/mm-broadband-modem-novatel.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -commit e310d9e445f98f81eb44991ea070668a728ef871 +commit 92cc41e06059cf9c5e9181443c933b47443ed8c0 Author: Aleksander Morgado -Date: Thu Jan 9 12:20:31 2020 +0100 +Date: Thu Jan 30 18:35:01 2020 +0100 - base-sim: refactor common PIN/PUK unlock operations + option: fix warnings with -Wimplicit-fallthrough - Keep the saved GError directly as GTask context, instead of allocating - the SendPinPukContext unconditionally. + option/mm-broadband-modem-option.c: In function + ‘load_access_technologies_step’: + option/mm-broadband-modem-option.c:565:18: error: this statement + may fall through [-Werror=implicit-fallthrough=] + 565 | ctx->step++; + | ~~~~~~~~~^~ + option/mm-broadband-modem-option.c:567:5: note: here + 567 | case ACCESS_TECHNOLOGIES_STEP_OSSYS: + | ^~~~ + option/mm-broadband-modem-option.c:587:18: error: this statement + may fall through [-Werror=implicit-fallthrough=] + 587 | ctx->step++; + | ~~~~~~~~~^~ + option/mm-broadband-modem-option.c:589:5: note: here + 589 | case ACCESS_TECHNOLOGIES_STEP_OWCTI: + | ^~~~ + option/mm-broadband-modem-option.c:600:18: error: this statement + may fall through [-Werror=implicit-fallthrough=] + 600 | ctx->step++; + | ~~~~~~~~~^~ + option/mm-broadband-modem-option.c:602:5: note: here + 602 | case ACCESS_TECHNOLOGIES_STEP_LAST: + | ^~~~ - (cherry picked from commit 94025aad6c31c86c4ee12b6e06c5ac2dd3b5dd55) + plugins/option/mm-broadband-modem-option.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) - src/mm-base-sim.c | 136 - +++++++++++++++++++++--------------------------------- - 1 file changed, 52 insertions(+), 84 deletions(-) +commit cff9d4a797de5a8d777369899501d343f7e7b8f0 +Author: Aleksander Morgado +Date: Thu Jan 30 18:32:38 2020 +0100 + + option: fix warnings with -Wdiscarded-qualifiers + + option/mm-broadband-modem-option.c:978:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 978 | { "_OSSYS=1", 3, FALSE, NULL }, + | ^~~~~~~~~~ + option/mm-broadband-modem-option.c:979:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 979 | { "_OCTI=1", 3, FALSE, NULL }, + | ^~~~~~~~~ + option/mm-broadband-modem-option.c:980:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 980 | { "_OUWCTI=1", 3, FALSE, NULL }, + | ^~~~~~~~~~~ + option/mm-broadband-modem-option.c:981:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 981 | { "_OSQI=1", 3, FALSE, NULL }, + | ^~~~~~~~~ + option/mm-broadband-modem-option.c:1033:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 1033 | { "_OSSYS=0", 3, FALSE, NULL }, + | ^~~~~~~~~~ + option/mm-broadband-modem-option.c:1034:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 1034 | { "_OCTI=0", 3, FALSE, NULL }, + | ^~~~~~~~~ + option/mm-broadband-modem-option.c:1035:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 1035 | { "_OUWCTI=0", 3, FALSE, NULL }, + | ^~~~~~~~~~~ + option/mm-broadband-modem-option.c:1036:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 1036 | { "_OSQI=0", 3, FALSE, NULL }, + | ^~~~~~~~~ + + plugins/option/mm-broadband-modem-option.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +commit 2fd6d401f5a468e69c60d5ee2d1d599414f7cb8d +Author: Aleksander Morgado +Date: Thu Jan 30 18:31:44 2020 +0100 + + option: fix warnings with -Wswitch-default + + plugins/option/mm-broadband-modem-option.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit b8a8b772b41a7b160d8f478f166206d5330acbeb +Author: Aleksander Morgado +Date: Thu Jan 30 18:30:15 2020 +0100 + + sierra: remove unused cdma_manual_activation_context_free() + + plugins/sierra/mm-broadband-modem-sierra.c | 7 ------- + 1 file changed, 7 deletions(-) + +commit 54a6e9fc85cb4c1b46937fdc6481e7b88b8dba2b +Author: Aleksander Morgado +Date: Thu Jan 30 18:29:43 2020 +0100 + + sierra: fix warnings with -Wdiscarded-qualifiers + + sierra/mm-broadband-modem-sierra.c:1815:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 1815 | { "!TIME?", 3, FALSE, parse_time_reply }, /* 3GPP */ + | ^~~~~~~~ + sierra/mm-broadband-modem-sierra.c:1816:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 1816 | { "!SYSTIME?", 3, FALSE, parse_time_reply }, /* CDMA */ + | ^~~~~~~~~~~ + + plugins/sierra/mm-broadband-modem-sierra.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 4a74ae07bc3ddd7b0334c1c6327ba0ca35ec364b +Author: Aleksander Morgado +Date: Thu Jan 30 18:28:44 2020 +0100 + + sierra: fix warnings with -Wimplicit-fallthrough + + sierra/mm-broadband-bearer-sierra.c: In function + ‘dial_3gpp_context_step’: + sierra/mm-broadband-bearer-sierra.c:304:18: error: this statement + may fall through [-Werror=implicit-fallthrough=] + 304 | ctx->step++; + | ~~~~~~~~~^~ + sierra/mm-broadband-bearer-sierra.c:306:5: note: here + 306 | case DIAL_3GPP_STEP_PS_ATTACH: + | ^~~~ + sierra/mm-broadband-bearer-sierra.c:398:18: error: this statement + may fall through [-Werror=implicit-fallthrough=] + 398 | ctx->step++; + | ~~~~~~~~~^~ + + plugins/sierra/mm-broadband-bearer-sierra.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 8e216b30a6ef3add8f615ac995e7afca71a28639 +Author: Aleksander Morgado +Date: Thu Jan 30 18:25:14 2020 +0100 + + sierra: fix warnings with -Wswitch-enum + + sierra/mm-broadband-modem-sierra.c: In function + ‘modem_time_load_network_time’: + sierra/mm-broadband-modem-sierra.c:1733:5: error: enumeration + value ‘TIME_METHOD_UNKNOWN’ not handled in switch + [-Werror=switch-enum] + 1733 | switch (MM_BROADBAND_MODEM_SIERRA + (self)->priv->time_method) { + | ^~~~~~ + + plugins/sierra/mm-broadband-modem-sierra.c | 1 + + 1 file changed, 1 insertion(+) + +commit e71819fcfece9237f1a0f9cb86fad66302b64333 +Author: Aleksander Morgado +Date: Thu Jan 30 18:24:00 2020 +0100 + + sierra: fix warnings with -Wswitch-default + + plugins/sierra/mm-broadband-bearer-sierra.c | 3 +++ + plugins/sierra/mm-broadband-modem-sierra.c | 10 ++++++---- + 2 files changed, 9 insertions(+), 4 deletions(-) + +commit 8d2fbc8429440c74a3aade3b9a779d5c5cfbc4d8 +Author: Aleksander Morgado +Date: Thu Jan 30 18:22:23 2020 +0100 + + icera: fix warnings with -Wsign-compare + + icera/mm-broadband-modem-icera.c: In function + ‘icera_band_to_mm’: + icera/mm-broadband-modem-icera.c:1105:20: error: comparison of + integer expressions of different signedness: ‘int’ and ‘long + unsigned int’ [-Werror=sign-compare] + 1105 | for (i = 0 ; i < G_N_ELEMENTS (modem_bands); i++) { + | ^ + + plugins/icera/mm-broadband-modem-icera.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 7af58f34508f7a71ca1ba072ac6c828db86a1e08 +Author: Aleksander Morgado +Date: Thu Jan 30 18:21:32 2020 +0100 + + icera: fix warnings with -Wdiscarded-qualifiers + + CC icera/libmm_shared_icera_la-mm-broadband-modem-icera.lo + icera/mm-broadband-modem-icera.c:1082:30: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 1082 | { MM_MODEM_BAND_UTRAN_1, "FDD_BAND_I", FALSE }, + | ^~~~~~~~~~~~ + icera/mm-broadband-modem-icera.c:1083:30: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 1083 | { MM_MODEM_BAND_UTRAN_2, "FDD_BAND_II", FALSE }, + | ^~~~~~~~~~~~~ + icera/mm-broadband-modem-icera.c:1084:30: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 1084 | { MM_MODEM_BAND_UTRAN_3, "FDD_BAND_III", FALSE }, + | ^~~~~~~~~~~~~~ + icera/mm-broadband-modem-icera.c:1085:30: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 1085 | { MM_MODEM_BAND_UTRAN_4, "FDD_BAND_IV", FALSE }, + | ^~~~~~~~~~~~~ + icera/mm-broadband-modem-icera.c:1086:30: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 1086 | { MM_MODEM_BAND_UTRAN_5, "FDD_BAND_V", FALSE }, + | ^~~~~~~~~~~~ + + plugins/icera/mm-broadband-modem-icera.c | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +commit 281f6560003e38c7c76a2164a6e84fb7c16856f5 +Author: Aleksander Morgado +Date: Thu Jan 30 18:17:52 2020 +0100 + + icera: fix warnings with -Wshadow + + icera/mm-broadband-modem-icera.c: In function + ‘modem_create_bearer’: + icera/mm-broadband-modem-icera.c:873:42: error: declaration of + ‘properties’ shadows a global declaration [-Werror=shadow] + 873 | MMBearerProperties *properties, + | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ + icera/mm-broadband-modem-icera.c:57:20: note: shadowed declaration + is here + 57 | static GParamSpec *properties[PROP_LAST]; + | ^~~~~~~~~~ + + plugins/icera/mm-broadband-modem-icera.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit 1e39e2a7dd52f8acdddd6910ea503a0c2eaea0a9 +Author: Aleksander Morgado +Date: Thu Jan 30 18:16:54 2020 +0100 + + simtech,helpers: fix warnings with -Wdiscarded-qualifiers + + simtech/tests/test-modem-helpers-simtech.c: In function + ‘test_clcc_urc_single’: + simtech/tests/test-modem-helpers-simtech.c:98:64: error: + initialization discards ‘const’ qualifier from pointer target + type [-Werror=discarded-qualifiers] + 98 | { 1, MM_CALL_DIRECTION_INCOMING, + MM_CALL_STATE_ACTIVE, "123456789" } + | + ^~~~~~~~~~~ + simtech/tests/test-modem-helpers-simtech.c: In function + ‘test_clcc_urc_multiple’: + simtech/tests/test-modem-helpers-simtech.c:113:65: error: + initialization discards ‘const’ qualifier from pointer target + type [-Werror=discarded-qualifiers] + 113 | { 2, MM_CALL_DIRECTION_INCOMING, + MM_CALL_STATE_ACTIVE, "123456789" }, + | + ^~~~~~~~~~~ + simtech/tests/test-modem-helpers-simtech.c:114:65: error: + initialization discards ‘const’ qualifier from pointer target + type [-Werror=discarded-qualifiers] + 114 | { 3, MM_CALL_DIRECTION_INCOMING, + MM_CALL_STATE_ACTIVE, "987654321" }, + | + ^~~~~~~~~~~ + simtech/tests/test-modem-helpers-simtech.c: In function + ‘test_clcc_urc_complex’: + simtech/tests/test-modem-helpers-simtech.c:130:65: error: + initialization discards ‘const’ qualifier from pointer target + type [-Werror=discarded-qualifiers] + 130 | { 1, MM_CALL_DIRECTION_INCOMING, + MM_CALL_STATE_ACTIVE, "123456789" }, + | + ^~~~~~~~~~~ + simtech/tests/test-modem-helpers-simtech.c:131:65: error: + initialization discards ‘const’ qualifier from pointer target + type [-Werror=discarded-qualifiers] + 131 | { 2, MM_CALL_DIRECTION_INCOMING, + MM_CALL_STATE_WAITING, "987654321" }, + | + ^~~~~~~~~~~ + + plugins/simtech/tests/test-modem-helpers-simtech.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit 71afc23261ac210ff5b36165665239864f626368 +Author: Aleksander Morgado +Date: Thu Jan 30 18:15:38 2020 +0100 + + huawei,helpers: fix warnings with -Wimplicit-fallthrough + + huawei/mm-modem-helpers-huawei.c: In function + ‘parse_mode_combination_string’: + huawei/mm-modem-helpers-huawei.c:991:20: error: this statement + may fall through [-Werror=implicit-fallthrough=] + 991 | *preferred = MM_MODEM_MODE_NONE; + | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ + huawei/mm-modem-helpers-huawei.c:993:5: note: here + 993 | default: + | ^~~~~~~ + + plugins/huawei/mm-modem-helpers-huawei.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit dcce64a11675105fd979ee46d01daebda08c40e2 +Author: Aleksander Morgado +Date: Thu Jan 30 18:14:08 2020 +0100 + + huawei: fix warnings with -Wsign-compare + + huawei/mm-modem-helpers-huawei.c: In function + ‘mm_huawei_parse_prefmode_response’: + huawei/mm-modem-helpers-huawei.c:550:18: error: comparison of + integer expressions of different signedness: ‘gint’ {aka + ‘int’} and ‘guint’ {aka ‘const unsigned int’} + [-Werror=sign-compare] + 550 | if (mode == combination->prefmode) + | ^~ + + plugins/huawei/mm-modem-helpers-huawei.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit d6c3d8929ee3aea9ac3146a0ce4b04c612365221 +Author: Aleksander Morgado +Date: Thu Jan 30 18:09:05 2020 +0100 + + huawei,tests: fix warnings with -Wdiscarded-qualifiers + + CC + huawei/tests/test_modem_helpers_huawei-test-modem-helpers-huawei.o + huawei/tests/test-modem-helpers-huawei.c:1176:41: error: + initialization discards ‘const’ qualifier from pointer target + type [-Werror=discarded-qualifiers] + 1176 | { "^TIME: 14/08/05 04:00:21", TRUE, + "2014-08-05T04:00:21" }, + | + ^~~~~~~~~~~~~~~~~~~~~ + huawei/tests/test-modem-helpers-huawei.c:1177:43: error: + initialization discards ‘const’ qualifier from pointer target + type [-Werror=discarded-qualifiers] + 1177 | { "^TIME: 2014/08/05 04:00:21", TRUE, + "2014-08-05T04:00:21" }, + | + ^~~~~~~~~~~~~~~~~~~~~ + + plugins/huawei/tests/test-modem-helpers-huawei.c | 30 + ++++++++++++------------ + 1 file changed, 15 insertions(+), 15 deletions(-) + +commit 52e4a6744c119d312f3cb3831b450453c267112f +Author: Aleksander Morgado +Date: Thu Jan 30 18:05:45 2020 +0100 + + cinterion,helpers: fix warnings with -Wdiscarded-qualifiers + + CC + cinterion/tests/test_modem_helpers_cinterion-test-modem-helpers-cinterion.o + cinterion/tests/test-modem-helpers-cinterion.c: In function + ‘test_slcc_urc_single’: + cinterion/tests/test-modem-helpers-cinterion.c:749:64: error: + initialization discards ‘const’ qualifier from pointer target + type [-Werror=discarded-qualifiers] + 749 | { 1, MM_CALL_DIRECTION_INCOMING, + MM_CALL_STATE_ACTIVE, "123456789" } + | + ^~~~~~~~~~~ + cinterion/tests/test-modem-helpers-cinterion.c: In function + ‘test_slcc_urc_multiple’: + cinterion/tests/test-modem-helpers-cinterion.c:764:65: error: + initialization discards ‘const’ qualifier from pointer target + type [-Werror=discarded-qualifiers] + 764 | { 2, MM_CALL_DIRECTION_INCOMING, + MM_CALL_STATE_ACTIVE, "123456789" }, + | + ^~~~~~~~~~~ + cinterion/tests/test-modem-helpers-cinterion.c:765:65: error: + initialization discards ‘const’ qualifier from pointer target + type [-Werror=discarded-qualifiers] + 765 | { 3, MM_CALL_DIRECTION_INCOMING, + MM_CALL_STATE_ACTIVE, "987654321" }, + | + ^~~~~~~~~~~ + cinterion/tests/test-modem-helpers-cinterion.c: In function + ‘test_slcc_urc_complex’: + cinterion/tests/test-modem-helpers-cinterion.c:781:65: error: + initialization discards ‘const’ qualifier from pointer target + type [-Werror=discarded-qualifiers] + 781 | { 1, MM_CALL_DIRECTION_INCOMING, + MM_CALL_STATE_ACTIVE, "123456789" }, + | + ^~~~~~~~~~~ + cinterion/tests/test-modem-helpers-cinterion.c:782:65: error: + initialization discards ‘const’ qualifier from pointer target + type [-Werror=discarded-qualifiers] + 782 | { 2, MM_CALL_DIRECTION_INCOMING, + MM_CALL_STATE_WAITING, "987654321" }, + | + + plugins/cinterion/tests/test-modem-helpers-cinterion.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit 20c23edb83b0bacbb28a0c7f5d3e41309ce4053e +Author: Aleksander Morgado +Date: Thu Jan 30 18:03:49 2020 +0100 + + altair,helpers: fix warnings with -Wsign-compare + + CC + altair/tests/test_modem_helpers_altair_lte-test-modem-helpers-altair-lte.o + In file included from /usr/lib/glib-2.0/include/glibconfig.h:9, + from /usr/include/glib-2.0/glib/gtypes.h:32, + from /usr/include/glib-2.0/glib/galloca.h:32, + from /usr/include/glib-2.0/glib.h:30, + from + altair/tests/test-modem-helpers-altair-lte.c:20: + altair/tests/test-modem-helpers-altair-lte.c: In function + ‘test_parse_cid’: + altair/tests/test-modem-helpers-altair-lte.c:98:58: error: + comparison of integer expressions of different signedness: + ‘guint’ {aka ‘unsigned int’} and ‘int’ + [-Werror=sign-compare] + 98 | g_assert (mm_altair_parse_cid ("%CGINFO:blah", NULL) + == -1); + | ^~ + /usr/include/glib-2.0/glib/gmacros.h:937:25: note: in definition + of macro ‘G_LIKELY’ + 937 | #define G_LIKELY(expr) (expr) + | ^~~~ + altair/tests/test-modem-helpers-altair-lte.c:98:5: note: in + expansion of macro ‘g_assert’ + 98 | g_assert (mm_altair_parse_cid ("%CGINFO:blah", NULL) + == -1); + | ^~~~~~~~ + + plugins/altair/mm-modem-helpers-altair-lte.c | 5 ++--- + plugins/altair/mm-modem-helpers-altair-lte.h | 2 +- + 2 files changed, 3 insertions(+), 4 deletions(-) + +commit 759ab6d94d2d34c5df2f665e7afbe0a66a1f7541 +Author: Aleksander Morgado +Date: Thu Jan 30 18:00:52 2020 +0100 + + telit,helpers: fix format of flags built during #BND request + generation + + We explicitly need 64bit values for 3G flags and 4G flags. + + plugins/telit/mm-modem-helpers-telit.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +commit ee8e81e55c187c3f1feca230d137fb25400a565e +Author: Aleksander Morgado +Date: Thu Jan 30 17:56:59 2020 +0100 + + telit,helpers: use correct flag to check caps when building #BND + request + + plugins/telit/mm-modem-helpers-telit.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 6cb9dc07dc68c04a9dd2f98f2b190ffef00c995e +Author: Aleksander Morgado +Date: Thu Jan 30 14:15:24 2020 +0100 + + broadband-modem-qmi,helpers-qmi: add missing 5GNR access tech enums + + Not adding full 5GNR support in ModemManager yet, just the enums in + QMI so that we don't fail building with -Wswitch-enum. + + src/mm-broadband-modem-qmi.c | 3 +++ + src/mm-modem-helpers-qmi.c | 4 ++++ + 2 files changed, 7 insertions(+) + +commit af2bea5a54e641b9d881184147ba8c855a5395c3 +Author: Aleksander Morgado +Date: Tue Jan 14 18:52:19 2020 +0100 + + broadband-modem-mbim: avoid using the deprecated mm_pco_list_free() + + src/mm-broadband-modem-mbim.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 808f823451ac6d461513cb77d97bce72db6a0d49 +Author: Aleksander Morgado +Date: Tue Jan 14 18:31:02 2020 +0100 + + sim-qmi: avoid using deprecated libqmi declarations + + Let's use the suggested compat symbols instead, provided in libqmi + 1.22. + + mm-sim-qmi.c: In function ‘uim_read’: + mm-sim-qmi.c:170:5: error: + ‘qmi_message_uim_read_transparent_input_set_session_information’ + is deprecated: Use + 'qmi_message_uim_read_transparent_input_set_session' instead + [-Werror=deprecated-declarations] + 170 | + qmi_message_uim_read_transparent_input_set_session_information ( + | + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + In file included from /usr/include/libqmi-glib/libqmi-glib.h:40, + from mm-port-qmi.h:23, + from mm-base-modem.h:39, + from mm-base-sim.h:25, + from mm-sim-qmi.h:22, + from mm-sim-qmi.c:29: + /usr/include/libqmi-glib/qmi-compat.h:1154:10: note: declared here + 1154 | gboolean + qmi_message_uim_read_transparent_input_set_session_information ( + | + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ... + + src/mm-sim-qmi.c | 35 +++++++++++++++++++++++++---------- + 1 file changed, 25 insertions(+), 10 deletions(-) + +commit 53784f95aa657295e5a5eb6c0deedded0a9fc757 +Author: Aleksander Morgado +Date: Tue Jan 14 10:24:28 2020 +0100 + + tests,fixture: fix warnings with -Wsign-compare + + tests/test-fixture.c:130:28: error: comparison of integer + expressions of different signedness: ‘gboolean’ {aka ‘int’} + and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare] + 130 | if (modem_expected == n_modems) { + | ^~ + + plugins/tests/test-fixture.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 7655f3b35c2f732bacb7a27633c15e107c43234c +Author: Aleksander Morgado +Date: Tue Jan 14 10:22:33 2020 +0100 + + telit: fix warnings with -Wdiscarded-qualifiers + + telit/tests/test-mm-modem-helpers-telit.c:48:9: error: + initialization discards ‘const’ qualifier from pointer target + type [-Werror=discarded-qualifiers] + 48 | "#BND: (0-3)", TRUE, FALSE, FALSE, FALSE, 4, + | ^~~~~~~~~~~~~ + ... + + plugins/telit/tests/test-mm-modem-helpers-telit.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit b0f9ddd295f432e4de31ce613da96a6281ca3eb6 +Author: Aleksander Morgado +Date: Tue Jan 14 10:21:55 2020 +0100 + + icera: fix warnings with -Wsign-compare + + icera/mm-modem-helpers-icera.c:256:13: error: comparison of integer + expressions of different signedness: ‘gint’ {aka ‘int’} + and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare] + 256 | num != expected_cid) { + | ^~ + + plugins/icera/mm-modem-helpers-icera.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 7075e852caabb164979a1192bfeda550bdd70f4f +Author: Aleksander Morgado +Date: Tue Jan 14 10:19:20 2020 +0100 + + test-error-helpers: fix warnings with -Wsign-compare + + test-error-helpers.c: In function + ‘test_error_helpers_connection_error’: + test-error-helpers.c:36:39: error: comparison of integer expressions + of different signedness: ‘guint’ {aka ‘unsigned int’} + and ‘gint’ {aka ‘int’} [-Werror=sign-compare] + 36 | for (i = enum_class->minimum; i <= + enum_class->maximum; i++) { \ + | ^~ + + src/tests/test-error-helpers.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 7125a86e0488320449767fcacbad5c7ca2c9c719 +Author: Aleksander Morgado +Date: Tue Jan 14 10:17:48 2020 +0100 + + test-qcdm-serial-port: fix warnings with -Wsign-compare + + test-qcdm-serial-port.c: In function ‘print_buf’: + test-qcdm-serial-port.c:79:19: error: comparison of integer + expressions of different signedness: ‘int’ and ‘gsize’ + {aka ‘long unsigned int’} [-Werror=sign-compare] + 79 | for (i = 0; i < len; i++) { + | ^ + test-qcdm-serial-port.c: In function ‘server_wait_request’: + test-qcdm-serial-port.c:163:20: error: comparison of integer + expressions of different signedness: ‘int’ and ‘long unsigned + int’ [-Werror=sign-compare] + 163 | } while (total < sizeof (readbuf)); + | ^ + + src/tests/test-qcdm-serial-port.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 9ad6e1f6334773217710105162fd507b704f8530 +Author: Aleksander Morgado +Date: Tue Jan 14 10:16:46 2020 +0100 + + test-modem-helpers: fix warnings with -Wswitch-enum + + test-modem-helpers.c: In function ‘test_cgev_indication’: + test-modem-helpers.c:2165:9: error: enumeration value + ‘MM_3GPP_CGEV_UNKNOWN’ not handled in switch + [-Werror=switch-enum] + 2165 | switch (type) { + | ^~~~~~ + cc1: all warnings being treated as errors + + src/tests/test-modem-helpers.c | 1 + + 1 file changed, 1 insertion(+) + +commit a27c957dc5100b33dd13ef4da1bcf19e40073ffd +Author: Aleksander Morgado +Date: Tue Jan 14 10:15:49 2020 +0100 + + test-modem-helpers: fix warnings with -Wsign-compare + + test-modem-helpers.c: In function ‘test_creg_match’: + test-modem-helpers.c:1127:19: error: comparison of integer + expressions of different signedness: ‘int’ and ‘guint’ + {aka ‘unsigned int’} [-Werror=sign-compare] + 1127 | for (i = 0; i < array->len; i++) { + | ^ + + src/tests/test-modem-helpers.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 6dcbda1c808c8e151f395bd0bcf3c06a0c094929 +Author: Aleksander Morgado +Date: Sat Jan 11 14:38:34 2020 +0100 + + test-modem-helpers: fix warnings with -Wdiscarded-qualifiers + + test-modem-helpers.c: In function ‘test_cmgl_response_generic’: + test-modem-helpers.c:294:20: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 294 | .pdu = + "07914306073011F00405812261F700003130916191314095C27" + | + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ... + + src/tests/test-modem-helpers.c | 224 + ++++++++++++++++++++--------------------- + 1 file changed, 112 insertions(+), 112 deletions(-) + +commit 0e59b9ec90a2e1fb3f70d1fc23838e4a5325779f +Author: Aleksander Morgado +Date: Sat Jan 11 14:36:17 2020 +0100 + + kernel-device-udev: fix warnings with -Wshadow + + kerneldevice/mm-kernel-device-udev.c: In function + ‘mm_kernel_device_udev_new_from_properties’: + kerneldevice/mm-kernel-device-udev.c:770:70: error: declaration + of ‘properties’ shadows a global declaration [-Werror=shadow] + 770 | mm_kernel_device_udev_new_from_properties + (MMKernelEventProperties *properties, + | + ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ + kerneldevice/mm-kernel-device-udev.c:38:20: note: shadowed + declaration is here + 38 | static GParamSpec *properties[PROP_LAST]; + | ^~~~~~~~~~ + + src/kerneldevice/mm-kernel-device-udev.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit b20d5384186482fadf93ab6d500ba695ba159ce2 +Author: Aleksander Morgado +Date: Sat Jan 11 14:35:33 2020 +0100 + + kernel-device-generic-rules: fix warnings with -Wswitch-default + + kerneldevice/mm-kernel-device-generic-rules.c: In function + ‘udev_rule_clear’: + kerneldevice/mm-kernel-device-generic-rules.c:40:5: error: switch + missing default case [-Werror=switch-default] + 40 | switch (rule->result.type) { + | ^~~~~~ + + src/kerneldevice/mm-kernel-device-generic-rules.c | 1 + + 1 file changed, 1 insertion(+) + +commit a13d0102c1dfa4ca7f0042ccc895f154acf36f2e +Author: Aleksander Morgado +Date: Sat Jan 11 14:34:53 2020 +0100 + + kernel-device-generic: fix warnings with -Wshadow + + kerneldevice/mm-kernel-device-generic.c: In function + ‘mm_kernel_device_generic_new_with_rules’: + kerneldevice/mm-kernel-device-generic.c:954:68: error: declaration + of ‘properties’ shadows a global declaration [-Werror=shadow] + 954 | mm_kernel_device_generic_new_with_rules + (MMKernelEventProperties *properties, + | + ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ + kerneldevice/mm-kernel-device-generic.c:46:20: note: shadowed + declaration is here + 46 | static GParamSpec *properties[PROP_LAST]; + | ^~~~~~~~~~ + kerneldevice/mm-kernel-device-generic.c: In function + ‘mm_kernel_device_generic_new’: + kerneldevice/mm-kernel-device-generic.c:971:57: error: declaration + of ‘properties’ shadows a global declaration [-Werror=shadow] + 971 | mm_kernel_device_generic_new (MMKernelEventProperties + *properties, + | + ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ + kerneldevice/mm-kernel-device-generic.c:46:20: note: shadowed + declaration is here + 46 | static GParamSpec *properties[PROP_LAST]; + | ^~~~~~~~~~ + + src/kerneldevice/mm-kernel-device-generic.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit ba53d2c29fe03da93c2a3316d4286a543aeef79e +Author: Aleksander Morgado +Date: Sat Jan 11 14:31:42 2020 +0100 + + kernel-device-generic: fix warnings with -Wswitch-default + + kerneldevice/mm-kernel-device-generic.c: In function + ‘check_rule’: + kerneldevice/mm-kernel-device-generic.c:802:9: error: switch + missing default case [-Werror=switch-default] + 802 | switch (rule->result.type) { + | ^~~~~~ + + src/kerneldevice/mm-kernel-device-generic.c | 1 + + 1 file changed, 1 insertion(+) + +commit f5fa2684113d7976efee066950e3da07d12c9cd2 +Author: Aleksander Morgado +Date: Sat Jan 11 14:30:25 2020 +0100 + + modem-helpers-mbim: fix warnings with -Wswitch-enum + + mm-modem-helpers-mbim.c: In function + ‘mm_mobile_equipment_error_from_mbim_nw_error’: + mm-modem-helpers-mbim.c:206:5: error: enumeration value + ‘MBIM_NW_ERROR_IMEI_NOT_ACCEPTED’ not handled in switch + [-Werror=switch-enum] + 206 | switch (nw_error) { + | ^~~~~~ + mm-modem-helpers-mbim.c: In function + ‘mm_bearer_ip_family_from_mbim_context_ip_type’: + mm-modem-helpers-mbim.c:403:5: error: enumeration value + ‘MBIM_CONTEXT_IP_TYPE_DEFAULT’ not handled in switch + [-Werror=switch-enum] + 403 | switch (ip_type) { + | ^~~~~~ + + src/mm-modem-helpers-mbim.c | 37 +++++++++++++++++++++++++++++++++++-- + 1 file changed, 35 insertions(+), 2 deletions(-) + +commit fa2330cba40b61feda52dcfc1583c72e6ed4d5a5 +Author: Aleksander Morgado +Date: Sat Jan 11 14:19:10 2020 +0100 + + modem-helpers-mbim: fix warnings with -Wswitch-default + + mm-modem-helpers-mbim.c: In function + ‘mm_modem_lock_from_mbim_pin_type’: + mm-modem-helpers-mbim.c:49:5: error: switch missing default case + [-Werror=switch-default] + 49 | switch (pin_type) { + | ^~~~~~ + mm-modem-helpers-mbim.c: In function + ‘mm_sms_state_from_mbim_message_status’: + mm-modem-helpers-mbim.c:425:5: error: switch missing default case + [-Werror=switch-default] + 425 | switch (status) { + | ^~~~~~ + + src/mm-modem-helpers-mbim.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +commit 911a763a558f2571d25cd6d01006d23113389a54 +Author: Aleksander Morgado +Date: Sat Jan 11 14:17:22 2020 +0100 + + modem-helpers-qmi: fix warnings with -Wlogical-op + + mm-modem-helpers-qmi.c: In function + ‘mm_modem_capability_from_qmi_capabilities_context’: + mm-modem-helpers-qmi.c:1455:31: error: logical ‘and’ of equal + expressions [-Werror=logical-op] + 1455 | else if (ctx->nas_tp_mask && (ctx->nas_tp_mask != + QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO)) + | ^~ + + src/mm-modem-helpers-qmi.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 9bd54e76fcf91cc25a36da44764a961aacc110aa +Author: Aleksander Morgado +Date: Sat Jan 11 14:15:35 2020 +0100 + + modem-helpers-qmi: fix warnings with -Wsign-compare + + mm-modem-helpers-qmi.c: In function + ‘mm_qmi_unique_id_to_firmware_unique_id’: + mm-modem-helpers-qmi.c:1653:19: error: comparison of integer + expressions of different signedness: ‘gint’ {aka ‘int’} + and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare] + 1653 | for (i = 0; i < qmi_unique_id->len; i++) { + | ^ + mm-modem-helpers-qmi.c:1679:11: error: comparison of integer + expressions of different signedness: ‘gint’ {aka ‘int’} + and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare] + 1679 | if (i != qmi_unique_id->len) + | ^~ + + src/mm-modem-helpers-qmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 7c900c51b5d530d48f7ebd86c2358a5c25068235 +Author: Aleksander Morgado +Date: Sat Jan 11 14:09:22 2020 +0100 + + modem-helpers-qmi: fix warnings with -Wswitch-enum + + mm-modem-helpers-qmi.c: In function + ‘mm_3gpp_facility_to_qmi_uim_facility’: + mm-modem-helpers-qmi.c:137:5: error: enumeration value + ‘MM_MODEM_3GPP_FACILITY_NONE’ not handled in switch + [-Werror=switch-enum] + 137 | switch (mm) { + | ^~~~~~ + mm-modem-helpers-qmi.c:137:5: error: enumeration value + ‘MM_MODEM_3GPP_FACILITY_SIM’ not handled in switch + [-Werror=switch-enum] + mm-modem-helpers-qmi.c:137:5: error: enumeration value + ‘MM_MODEM_3GPP_FACILITY_FIXED_DIALING’ not handled in switch + [-Werror=switch-enum] + mm-modem-helpers-qmi.c:137:5: error: enumeration value + ‘MM_MODEM_3GPP_FACILITY_PH_FSIM’ not handled in switch + [-Werror=switch-enum] + ... + + src/mm-modem-helpers-qmi.c | 25 ++++++++++++++++++++----- + 1 file changed, 20 insertions(+), 5 deletions(-) + +commit 40327b1b4814de74cd037dc0fd8f5afc23a042b6 +Author: Aleksander Morgado +Date: Sat Jan 11 14:07:44 2020 +0100 + + sms-part-cdma: fix warnings with -Wswitch-default + + mm-sms-part-cdma.c: In function + ‘mm_sms_part_cdma_new_from_binary_pdu’: + mm-sms-part-cdma.c:1138:5: error: switch missing default case + [-Werror=switch-default] + 1138 | switch (message_type) { + | ^~~~~~ + + src/mm-sms-part-cdma.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit a5c0a7849afb9a708f7ed49928b0b643fc5f598e +Author: Aleksander Morgado +Date: Sat Jan 11 14:06:48 2020 +0100 + + sms-part-3gpp: fix warnings with -Wswitch-enum + + mm-sms-part-3gpp.c: In function + ‘mm_sms_part_3gpp_new_from_binary_pdu’: + mm-sms-part-3gpp.c:721:9: error: enumeration value + ‘MM_SMS_ENCODING_8BIT’ not handled in switch + [-Werror=switch-enum] + 721 | switch (user_data_encoding) { + | ^~~~~~ + mm-sms-part-3gpp.c: In function + ‘mm_sms_part_3gpp_get_submit_pdu’: + mm-sms-part-3gpp.c:917:5: error: enumeration value + ‘MM_SMS_ENCODING_UNKNOWN’ not handled in switch + [-Werror=switch-enum] + 917 | switch (mm_sms_part_get_encoding (part)) { + | ^~~~~~ + mm-sms-part-3gpp.c:917:5: error: enumeration value + ‘MM_SMS_ENCODING_8BIT’ not handled in switch + [-Werror=switch-enum] + + src/mm-sms-part-3gpp.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit 6a7b1e7b8caa7a45386f1ea32da91d1831f2e875 +Author: Aleksander Morgado +Date: Sat Jan 11 13:58:44 2020 +0100 + + sms-part-3gpp: fix warnings with -Wswitch-enum + + mm-sms-part-3gpp.c: In function + ‘mm_sms_part_3gpp_new_from_binary_pdu’: + mm-sms-part-3gpp.c:607:9: error: enumeration value + ‘MM_SMS_ENCODING_UNKNOWN’ not handled in switch + [-Werror=switch-enum] + 607 | switch (user_data_encoding) { + | ^~~~~~ + mm-sms-part-3gpp.c:714:9: error: enumeration value + ‘MM_SMS_ENCODING_UNKNOWN’ not handled in switch + [-Werror=switch-enum] + 714 | switch (user_data_encoding) { + | ^~~~~~ + + src/mm-sms-part-3gpp.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit 5eedad988ee626a08b275bff021feedffdedc66e +Author: Aleksander Morgado +Date: Sat Jan 11 13:57:08 2020 +0100 + + sms-part-3gpp: fix warnings with -Wswitch-default + + mm-sms-part-3gpp.c: In function ‘sms_encoding_type’: + mm-sms-part-3gpp.c:190:13: error: switch missing default case + [-Werror=switch-default] + 190 | switch (dcs & 0x0c) { + | ^~~~~~ + mm-sms-part-3gpp.c:219:13: error: switch missing default case + [-Werror=switch-default] + 219 | switch (dcs & 0x04) { + | ^~~~~~ + + src/mm-sms-part-3gpp.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +commit 6dfb9d7a7e1f53e5aac3f28b2f6a249db0dd2b4c +Author: Aleksander Morgado +Date: Sat Jan 11 13:54:03 2020 +0100 + + charsets: fix warnings with -Wswitch-default + + mm-charsets.c: In function + ‘mm_charset_take_and_convert_to_utf8’: + mm-charsets.c:730:5: error: switch missing default case + [-Werror=switch-default] + 730 | switch (charset) { + | ^~~~~~ + mm-charsets.c: In function + ‘mm_utf8_take_and_convert_to_charset’: + mm-charsets.c:852:5: error: switch missing default case + [-Werror=switch-default] + 852 | switch (charset) { + | ^~~~~~ + + src/mm-charsets.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 7619148aa5364f6ff2aea3914690c4db81f2c786 +Author: Aleksander Morgado +Date: Sat Jan 11 13:52:40 2020 +0100 + + charsets: fix warnings with -Wsign-compare + + mm-charsets.c: In function ‘mm_charset_gsm_unpacked_to_utf8’: + mm-charsets.c:423:19: error: comparison of integer expressions of + different signedness: ‘int’ and ‘guint32’ {aka ‘unsigned + int’} [-Werror=sign-compare] + 423 | for (i = 0; i < len; i++) { + | ^ + mm-charsets.c: In function ‘pccp437_is_subset’: + mm-charsets.c:544:19: error: comparison of integer expressions + of different signedness: ‘int’ and ‘long unsigned int’ + [-Werror=sign-compare] + 544 | for (i = 0; i < G_N_ELEMENTS (t); i++) { + | ^ + mm-charsets.c: In function ‘pcdn_is_subset’: + mm-charsets.c:575:19: error: comparison of integer expressions + of different signedness: ‘int’ and ‘long unsigned int’ + [-Werror=sign-compare] + 575 | for (i = 0; i < sizeof (t) / sizeof (t[0]); i++) { + | ^ + mm-charsets.c: In function ‘mm_charset_gsm_unpack’: + mm-charsets.c:657:19: error: comparison of integer expressions of + different signedness: ‘int’ and ‘guint32’ {aka ‘unsigned + int’} [-Werror=sign-compare] + 657 | for (i = 0; i < num_septets; i++) { + | ^ + mm-charsets.c: In function ‘mm_charset_gsm_pack’: + mm-charsets.c:701:42: error: comparison of integer expressions of + different signedness: ‘int’ and ‘guint32’ {aka ‘unsigned + int’} [-Werror=sign-compare] + 701 | for (i = 0, lshift = start_offset; i < src_len; i++) { + | ^ + + src/mm-charsets.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit 623443d50f98fb7ce586c4ce85d24ca24895308a +Author: Aleksander Morgado +Date: Sat Jan 11 13:50:18 2020 +0100 + + modem-helpers: fix warnings with -Wswitch-enum + + mm-modem-helpers.c: In function + ‘mm_3gpp_get_pdp_type_from_ip_family’: + mm-modem-helpers.c:4166:5: error: enumeration value + ‘MM_BEARER_IP_FAMILY_NONE’ not handled in switch + [-Werror=switch-enum] + 4166 | switch (family) { + | ^~~~~~ + mm-modem-helpers.c:4166:5: error: enumeration value + ‘MM_BEARER_IP_FAMILY_ANY’ not handled in switch + [-Werror=switch-enum] + + src/mm-modem-helpers.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit 520a7ec7db3557f356fd9c5bad5a99a66f082ffd +Author: Aleksander Morgado +Date: Sat Jan 11 13:48:15 2020 +0100 + + modem-helpers: fix warnings with -Wdiscarded-qualifiers + + mm-modem-helpers.c:4019:45: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 4019 | { MM_MODEM_3GPP_FACILITY_SIM, "SC" }, + | ^~~~ + mm-modem-helpers.c:4020:45: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 4020 | { MM_MODEM_3GPP_FACILITY_PH_SIM, "PS" }, + | ^~~~ + mm-modem-helpers.c:4021:45: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 4021 | { MM_MODEM_3GPP_FACILITY_PH_FSIM, "PF" }, + | ^~~~ + mm-modem-helpers.c:4022:45: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 4022 | { MM_MODEM_3GPP_FACILITY_FIXED_DIALING, "FD" }, + | ^~~~ + mm-modem-helpers.c:4023:45: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 4023 | { MM_MODEM_3GPP_FACILITY_NET_PERS, "PN" }, + | ^~~~ + mm-modem-helpers.c:4024:45: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 4024 | { MM_MODEM_3GPP_FACILITY_NET_SUB_PERS, "PU" }, + | ^~~~ + mm-modem-helpers.c:4025:45: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 4025 | { MM_MODEM_3GPP_FACILITY_PROVIDER_PERS, "PP" }, + | ^~~~ + mm-modem-helpers.c:4026:45: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 4026 | { MM_MODEM_3GPP_FACILITY_CORP_PERS, "PC" } + | ^~~~ + + src/mm-modem-helpers.c | 6 +++--- + src/mm-modem-helpers.h | 4 ++-- + 2 files changed, 5 insertions(+), 5 deletions(-) + +commit 1f94d3f5f85d72a98c7e957c687a28bead54fcf5 +Author: Aleksander Morgado +Date: Sat Jan 11 13:46:34 2020 +0100 + + modem-helpers: fix warnings with -Wsign-compare + + mm-modem-helpers.c: In function ‘parse_uint’: + mm-modem-helpers.c:1953:36: error: comparison of integer expressions + of different signedness: ‘gulong’ {aka ‘long unsigned int’} + and ‘glong’ {aka ‘long int’} [-Werror=sign-compare] + 1953 | if ((nmin == nmax) || (ret >= nmin && ret <= nmax)) + | ^~ + mm-modem-helpers.c:1953:51: error: comparison of integer expressions + of different signedness: ‘gulong’ {aka ‘long unsigned int’} + and ‘glong’ {aka ‘long int’} [-Werror=sign-compare] + 1953 | if ((nmin == nmax) || (ret >= nmin && ret <= nmax)) + | ^~ + + src/mm-modem-helpers.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +commit 02e5015b5c98ca9903bf3ea296165aea40b9f381 +Author: Aleksander Morgado +Date: Sat Jan 11 13:39:36 2020 +0100 + + port-qmi: fix warnings with -Wimplicit-fallthrough + + mm-port-qmi.c:353:18: error: this statement may fall through + [-Werror=implicit-fallthrough=] + 353 | ctx->step++; + | ~~~~~~~~~^~ + mm-port-qmi.c:356:5: note: here + 356 | case PORT_OPEN_STEP_CHECK_OPENING: + | ^~~~ + mm-port-qmi.c:366:18: error: this statement may fall through + [-Werror=implicit-fallthrough=] + 366 | ctx->step++; + | ~~~~~~~~~^~ + mm-port-qmi.c:369:5: note: here + 369 | case PORT_OPEN_STEP_CHECK_ALREADY_OPEN: + | ^~~~ + mm-port-qmi.c:376:18: error: this statement may fall through + [-Werror=implicit-fallthrough=] + 376 | ctx->step++; + | ~~~~~~~~~^~ + mm-port-qmi.c:379:5: note: here + 379 | case PORT_OPEN_STEP_DEVICE_NEW: { + | ^~~~ + mm-port-qmi.c:424:18: error: this statement may fall through + [-Werror=implicit-fallthrough=] + 424 | ctx->step++; + | ~~~~~~~~~^~ + mm-port-qmi.c:427:5: note: here + 427 | case PORT_OPEN_STEP_ALLOCATE_WDA_CLIENT: + | ^~~~ + mm-port-qmi.c:474:18: error: this statement may fall through + [-Werror=implicit-fallthrough=] + 474 | ctx->step++; + | ~~~~~~~~~^~ + mm-port-qmi.c:477:5: note: here + 477 | case PORT_OPEN_STEP_SET_KERNEL_DATA_FORMAT: + | ^~~~ + + src/mm-port-qmi.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit a4b5419287a112801ac223e37d5a3b335d2e5694 +Author: Aleksander Morgado +Date: Sat Jan 11 13:38:15 2020 +0100 + + port-qmi: fix warnings with -Wswitch-default + + mm-port-qmi.c: In function ‘port_open_step’: + mm-port-qmi.c:350:5: error: switch missing default case + [-Werror=switch-default] + 350 | switch (ctx->step) { + | ^~~~~~ + + src/mm-port-qmi.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit afc314e5967400e400c45633a5ce088351c60938 +Author: Aleksander Morgado +Date: Sat Jan 11 13:37:00 2020 +0100 + + port-serial-qcdm: fix warnings with -Wsign-compare + + mm-port-serial-qcdm.c: In function ‘find_qcdm_start’: + mm-port-serial-qcdm.c:51:19: error: comparison of integer + expressions of different signedness: ‘int’ and ‘guint’ + {aka ‘unsigned int’} [-Werror=sign-compare] + 51 | for (i = 0; i < response->len; i++) { + | ^ + + src/mm-port-serial-qcdm.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 8d3d1183b9448ae9f4b87dda66aaf3314563b427 +Author: Aleksander Morgado +Date: Sat Jan 11 13:34:59 2020 +0100 + + port-serial: fix warnings with -Wimplicit-fallthrough + + mm-port-serial.c: In function ‘port_serial_process_command’: + mm-port-serial.c:605:16: error: this statement may fall through + [-Werror=implicit-fallthrough=] + 605 | if (written > 0) { + | ^ + mm-port-serial.c:611:9: note: here + 611 | case G_IO_STATUS_AGAIN: + | ^~~~ + + src/mm-port-serial.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit a812e06b96061286a1d671cc2ba4715f9091db78 +Author: Aleksander Morgado +Date: Sat Jan 11 13:33:09 2020 +0100 + + port-serial: fix warnings with -Wsign-compare + + mm-port-serial.c: In function ‘_close_internal’: + mm-port-serial.c:1464:19: error: comparison of integer expressions + of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned + int’} [-Werror=sign-compare] + 1464 | for (i = 0; i < g_queue_get_length (self->priv->queue); + i++) { + | ^ + + src/mm-port-serial.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 0c16898c3058531d24f82f6224401b66a39a37fa +Author: Aleksander Morgado +Date: Sat Jan 11 13:32:14 2020 +0100 + + port-serial: fix warnings with -Wswitch-default + + mm-port-serial.c: In function ‘port_serial_process_command’: + mm-port-serial.c:594:9: error: switch missing default case + [-Werror=switch-default] + 594 | switch (write_status) { + | ^~~~~~ + mm-port-serial.c: In function ‘parse_response_buffer’: + mm-port-serial.c:925:5: error: switch missing default case + [-Werror=switch-default] + 925 | switch (MM_PORT_SERIAL_GET_CLASS (self)->parse_response + (self, + | ^~~~~~ + + src/mm-port-serial.c | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 6d54691930003d9f01fa3d8bfc749bf87c6e4d4a +Author: Aleksander Morgado +Date: Sat Jan 11 13:28:45 2020 +0100 + + broadband-modem-mbim: fix warnings with -Wshadow + + mm-broadband-modem-mbim.c: In function ‘ussd_cancel_ready’: + mm-broadband-modem-mbim.c:5005:16: error: declaration of ‘task’ + shadows a parameter [-Werror=shadow] + 5005 | GTask *task; + | ^~~~ + mm-broadband-modem-mbim.c:4991:34: note: shadowed declaration + is here + 4991 | GTask *task) + | ~~~~~~~~~~~~~~^~~~ + + src/mm-broadband-modem-mbim.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit bcd380a6f1f1b42b0ce2cf79ed46634eccbd15eb +Author: Aleksander Morgado +Date: Sat Jan 11 13:26:43 2020 +0100 + + broadband-modem-mbim: fix warnings with -Wdouble-promotion + + mm-broadband-modem-mbim.c: In function + ‘atds_signal_query_ready’: + mm-broadband-modem-mbim.c:4389:49: error: implicit conversion + from ‘float’ to ‘double’ to match other operand of binary + expression [-Werror=double-promotion] + 4389 | mm_signal_set_ecio (result->umts, -24.0 + ((float) + ecno / 2)); + | ^ + mm-broadband-modem-mbim.c:4394:48: error: implicit conversion + from ‘float’ to ‘double’ to match other operand of binary + expression [-Werror=double-promotion] + 4394 | mm_signal_set_rsrq (result->lte, -19.5 + ((float) + rsrq / 2)); + | ^ + + src/mm-broadband-modem-mbim.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit c8e4c2e751e66d0e0c86ea4a2055331e9eedca88 +Author: Aleksander Morgado +Date: Sat Jan 11 13:23:24 2020 +0100 + + broadband-modem-mbim: fix warnings with -Wtype-limits + + mm-broadband-modem-mbim.c: In function + ‘basic_connect_notification_signal_state’: + /usr/include/glib-2.0/glib/gmacros.h:811:63: error: comparison of + unsigned expression < 0 is always false [-Werror=type-limits] + 811 | ine CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < + (low)) ? (low) : (x))) + | ^ + + mm-broadband-modem-mbim.c:2918:19: note: in expansion of macro + ‘CLAMP’ + 2918 | quality = CLAMP (rssi == 99 ? 0 : rssi, 0, 31) * + 100 / 31; + | ^~~~~ + + src/mm-broadband-modem-mbim.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit ac70712f1f5c12a2f85abf4e814efff8b41ff385 +Author: Aleksander Morgado +Date: Sat Jan 11 13:15:21 2020 +0100 + + broadband-modem-mbim: fix warnings with -Wtype-limits + + This change is exclusively to make the compiler happy, don't even like + it myself... + + mm-broadband-modem-mbim.c: In function + ‘signal_state_query_ready’: + /usr/include/glib-2.0/glib/gmacros.h:811:63: error: comparison of + unsigned expression < 0 is always false [-Werror=type-limits] + 811 | #define CLAMP(x, low, high) (((x) > (high)) ? (high) : + (((x) < (low)) ? (low) : (x))) + | + ^ + mm-broadband-modem-mbim.c:1680:19: note: in expansion of macro + ‘CLAMP’ + 1680 | quality = CLAMP (rssi == 99 ? 0 : rssi, 0, 31) * + 100 / 31; + | ^~~~~ + + src/mm-broadband-modem-mbim.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 7e67cbfe42815fdaae6d4852c5832542fd90904b +Author: Aleksander Morgado +Date: Sat Jan 11 13:22:42 2020 +0100 + + broadband-modem-mbim: fix warnings with -Wswitch-enum + + mm-broadband-modem-mbim.c: In function + ‘query_device_services_ready’: + mm-broadband-modem-mbim.c:2132:13: error: enumeration + value ‘MBIM_SERVICE_INVALID’ not handled in switch + [-Werror=switch-enum] + 2132 | switch (service) { + | ^~~~~~ + mm-broadband-modem-mbim.c:2132:13: error: enumeration value + ‘MBIM_SERVICE_BASIC_CONNECT’ not handled in switch + [-Werror=switch-enum] + mm-broadband-modem-mbim.c:2132:13: error: enumeration value + ‘MBIM_SERVICE_SMS’ not handled in switch [-Werror=switch-enum] + mm-broadband-modem-mbim.c:2132:13: error: enumeration + value ‘MBIM_SERVICE_PHONEBOOK’ not handled in switch + [-Werror=switch-enum] + mm-broadband-modem-mbim.c:2132:13: error: enumeration value + ‘MBIM_SERVICE_STK’ not handled in switch [-Werror=switch-enum] + mm-broadband-modem-mbim.c:2132:13: error: enumeration value + ‘MBIM_SERVICE_AUTH’ not handled in switch [-Werror=switch-enum] + mm-broadband-modem-mbim.c:2132:13: error: enumeration value + ‘MBIM_SERVICE_DSS’ not handled in switch [-Werror=switch-enum] + mm-broadband-modem-mbim.c:2132:13: error: enumeration value + ‘MBIM_SERVICE_MS_FIRMWARE_ID’ not handled in switch + [-Werror=switch-enum] + mm-broadband-modem-mbim.c:2132:13: error: enumeration value + ‘MBIM_SERVICE_MS_HOST_SHUTDOWN’ not handled in switch + [-Werror=switch-enum] + mm-broadband-modem-mbim.c:2132:13: error: enumeration value + ‘MBIM_SERVICE_PROXY_CONTROL’ not handled in switch + [-Werror=switch-enum] + mm-broadband-modem-mbim.c:2132:13: error: enumeration value + ‘MBIM_SERVICE_QMI’ not handled in switch [-Werror=switch-enum] + + src/mm-broadband-modem-mbim.c | 96 + +++++++++++++++++++++++++------------------ + 1 file changed, 57 insertions(+), 39 deletions(-) + +commit 9cffa62cf6bf20f52c238c0316dfa112a96257d6 +Author: Aleksander Morgado +Date: Sat Jan 11 13:11:51 2020 +0100 + + bearer-mbim: fix warnings with -Wimplicit-fallthrough + + mm-bearer-mbim.c: In function ‘connect_context_step’: + mm-bearer-mbim.c:843:18: error: this statement may fall through + [-Werror=implicit-fallthrough=] + 843 | ctx->step++; + | ~~~~~~~~~^~ + mm-bearer-mbim.c:845:5: note: here + 845 | case CONNECT_STEP_PACKET_SERVICE: { + | ^~~~ + mm-bearer-mbim.c: In function ‘disconnect_context_step’: + mm-bearer-mbim.c:1269:18: error: this statement may fall through + [-Werror=implicit-fallthrough=] + 1269 | ctx->step++; + | ~~~~~~~~~^~ + mm-bearer-mbim.c:1271:5: note: here + 1271 | case DISCONNECT_STEP_DISCONNECT: { + | ^~~~ + + src/mm-bearer-mbim.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 0a47c4bb6ab78fa49aaa6e476cb8d7bc811cd6b0 +Author: Aleksander Morgado +Date: Sat Jan 11 13:10:34 2020 +0100 + + bearer-mbim: fix warnings with -Wswitch-default + + mm-bearer-mbim.c: In function ‘connect_context_step’: + mm-bearer-mbim.c:840:5: error: switch missing default case + [-Werror=switch-default] + 840 | switch (ctx->step) { + | ^~~~~~ + mm-bearer-mbim.c: In function ‘disconnect_context_step’: + mm-bearer-mbim.c:1266:5: error: switch missing default case + [-Werror=switch-default] + 1266 | switch (ctx->step) { + | ^~~~~~ + ... + + src/mm-bearer-mbim.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit d068d0493e35c396a6c4fb37eaf2891e18cfcb88 +Author: Aleksander Morgado +Date: Sat Jan 11 13:08:22 2020 +0100 + + broadband-modem-qmi: fix warnings with -Wimplicit-fallthrough + + In file included from mm-broadband-modem-qmi.c:29: + mm-broadband-modem-qmi.c: In function + ‘uim_get_card_status_output_parse’: + mm-log.h:33:5: error: this statement may fall through + [-Werror=implicit-fallthrough=] + 33 | _mm_log (G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_WARN, ## + __VA_ARGS__ ) + | + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + mm-broadband-modem-qmi.c:894:13: note: in expansion of macro + ‘mm_warn’ + 894 | mm_warn ("PUK2 permanently blocked"); + | ^~~~~~~ + mm-broadband-modem-qmi.c:895:9: note: here + 895 | case QMI_UIM_PIN_STATE_BLOCKED: + | ^~~~ + ... + + src/mm-broadband-modem-qmi.c | 96 + ++++++++++++++++++++++++++------------------ + 1 file changed, 56 insertions(+), 40 deletions(-) + +commit 581d829eb7090e3c41ebf5b1720ab2799bc4fdd0 +Author: Aleksander Morgado +Date: Wed Dec 25 18:13:26 2019 +0100 + + broadband-modem-qmi: fix warnings with -Wswitch-enum + + mm-broadband-modem-qmi.c: In function ‘qmi_dbm_valid’: + mm-broadband-modem-qmi.c:1385:5: error: enumeration value + ‘QMI_NAS_RADIO_INTERFACE_UNKNOWN’ not handled in switch + [-Werror=switch-enum] + 1385 | switch (radio_interface) { + | ^~~~~~ + mm-broadband-modem-qmi.c:1385:5: error: enumeration value + ‘QMI_NAS_RADIO_INTERFACE_NONE’ not handled in switch + [-Werror=switch-enum] + mm-broadband-modem-qmi.c:1385:5: error: enumeration value + ‘QMI_NAS_RADIO_INTERFACE_AMPS’ not handled in switch + [-Werror=switch-enum] + mm-broadband-modem-qmi.c:1385:5: error: enumeration value + ‘QMI_NAS_RADIO_INTERFACE_GSM’ not handled in switch + [-Werror=switch-enum] + mm-broadband-modem-qmi.c:1385:5: error: enumeration value + ‘QMI_NAS_RADIO_INTERFACE_LTE’ not handled in switch + [-Werror=switch-enum] + mm-broadband-modem-qmi.c:1385:5: error: enumeration value + ‘QMI_NAS_RADIO_INTERFACE_TD_SCDMA’ not handled in switch + [-Werror=switch-enum] + ... + + src/mm-broadband-modem-qmi.c | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +commit 92c219480bbd2608e34f673ef424b03e3dee0ebe +Author: Aleksander Morgado +Date: Wed Dec 25 17:46:40 2019 +0100 + + broadband-modem-qmi: fix warnings with -Wswitch-default + + mm-broadband-modem-qmi.c: In function + ‘load_unlock_required_context_step’: + mm-broadband-modem-qmi.c:1062:5: error: switch missing default case + [-Werror=switch-default] + 1062 | switch (ctx->step) { + | ^~~~~~ + ... + + src/mm-broadband-modem-qmi.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +commit 8b9cb489169d5bdc53fa08524d63cacede04309f +Author: Aleksander Morgado +Date: Wed Dec 25 13:48:32 2019 +0100 + + broadband-modem-qmi: fix warnings with -Wswitch-enum + + mm-broadband-modem-qmi.c: In function + ‘uim_get_card_status_output_parse’: + mm-broadband-modem-qmi.c:846:5: error: enumeration value + ‘QMI_UIM_PIN_STATE_NOT_INITIALIZED’ not handled in switch + [-Werror=switch-enum] + 846 | switch (app->pin1_state) { + | ^~~~~~ + mm-broadband-modem-qmi.c:877:9: error: enumeration value + ‘QMI_UIM_PIN_STATE_NOT_INITIALIZED’ not handled in switch + [-Werror=switch-enum] + 877 | switch (app->pin2_state) { + | ^~~~~~ + ... + + src/mm-broadband-modem-qmi.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +commit 0db74e1d86cc36a3a50eccb58bb7567a9f4fbc3c +Author: Aleksander Morgado +Date: Wed Dec 25 13:41:32 2019 +0100 + + bearer-qmi: fix warnings with -Wimplicit-fallthrough + + mm-bearer-qmi.c:168:18: error: this statement may fall through + [-Werror=implicit-fallthrough=] + 168 | ctx->step++; + | ~~~~~~~~~^~ + mm-bearer-qmi.c:169:5: note: here + 169 | case RELOAD_STATS_CONTEXT_STEP_IPV4: + | ^~~~ + ... + + src/mm-bearer-qmi.c | 51 + ++++++++++++++++++++++----------------------------- + 1 file changed, 22 insertions(+), 29 deletions(-) + +commit be516b5aa8719f5a7b09bad4e43f9d547909f41e +Author: Aleksander Morgado +Date: Wed Dec 25 13:36:36 2019 +0100 + + bearer-qmi: fix warnings with -Wswitch-default + + mm-bearer-qmi.c: In function ‘reload_stats_context_step’: + mm-bearer-qmi.c:165:5: error: switch missing default case + [-Werror=switch-default] + 165 | switch (ctx->step) { + | ^~~~~~ + mm-bearer-qmi.c: In function ‘connection_status_context_step’: + mm-bearer-qmi.c:310:5: error: switch missing default case + [-Werror=switch-default] + 310 | switch (ctx->step) { + | ^~~~~~ + mm-bearer-qmi.c: In function ‘connect_context_step’: + mm-bearer-qmi.c:1290:5: error: switch missing default case + [-Werror=switch-default] + 1290 | switch (ctx->step) { + | ^~~~~~ + mm-bearer-qmi.c: In function ‘disconnect_context_step’: + mm-bearer-qmi.c:1954:5: error: switch missing default case + [-Werror=switch-default] + 1954 | switch (ctx->step) { + | ^~~~~~ + + src/mm-bearer-qmi.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +commit f1126d535badc2607b47ff82109d8a1a885aeff6 +Author: Aleksander Morgado +Date: Wed Dec 25 13:32:56 2019 +0100 + + shared-qmi: fix warnings with -Wswitch-enum + + mm-shared-qmi.c: In function + ‘pds_set_default_tracking_session_ready’: + mm-shared-qmi.c:4209:5: error: enumeration value + ‘GPS_OPERATION_MODE_UNKNOWN’ not handled in switch + [-Werror=switch-enum] + 4209 | switch (ctx->mode) { + | ^~~~~~ + mm-shared-qmi.c: In function + ‘loc_location_set_operation_mode_indication_cb’: + mm-shared-qmi.c:4354:5: error: enumeration value + ‘GPS_OPERATION_MODE_UNKNOWN’ not handled in switch + [-Werror=switch-enum] + 4354 | switch (ctx->mode) { + | ^~~~~~ + + src/mm-shared-qmi.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit 8defd21bc4802fefbe32f02c5b92de4dc599af8e +Author: Aleksander Morgado +Date: Wed Dec 25 13:30:28 2019 +0100 + + shared-qmi: fix warnings with -Wsign-compare + + mm-shared-qmi.c: In function ‘get_config_info_indication’: + mm-shared-qmi.c:2843:19: error: comparison of integer expressions + of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned + int’} [-Werror=sign-compare] + 2843 | for (i = 0; i < ctx->config_list->len; i++) { + | ^ + mm-shared-qmi.c:2850:11: error: comparison of integer expressions + of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned + int’} [-Werror=sign-compare] + 2850 | if (i == ctx->config_list->len) + | ^~ + mm-shared-qmi.c: In function ‘list_configs_indication’: + mm-shared-qmi.c:2927:19: error: comparison of integer expressions + of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned + int’} [-Werror=sign-compare] + 2927 | for (i = 0; i < configs->len; i++) { + | ^ + + src/mm-shared-qmi.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 25ea9d9bdd830696cafb1eef4de79c6cad109229 +Author: Aleksander Morgado +Date: Wed Dec 25 13:28:09 2019 +0100 + + shared-qmi: fix warnings with -Wswitch-default + + mm-shared-qmi.c: In function ‘set_current_capabilities_step’: + mm-shared-qmi.c:601:5: error: switch missing default case + [-Werror=switch-default] + 601 | switch (ctx->step) { + | ^~~~~~ + mm-shared-qmi.c: In function ‘load_current_capabilities_step’: + mm-shared-qmi.c:868:5: error: switch missing default case + [-Werror=switch-default] + 868 | switch (ctx->step) { + | ^~~~~~ + mm-shared-qmi.c: In function ‘setup_carrier_config_step’: + mm-shared-qmi.c:2473:5: error: switch missing default case + [-Werror=switch-default] + 2473 | switch (ctx->step) { + | ^~~~~~ + + src/mm-shared-qmi.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +commit a16ac01604da7c2b3f67c0f157db8e472ee100b1 +Author: Aleksander Morgado +Date: Wed Dec 25 13:20:48 2019 +0100 + + tests,at-serial-port: fix warnings with -Wdiscarded-qualifiers + + test-at-serial-port.c:29:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 29 | { "\r\n", "\r\n" }, + | ^~~~~~ + test-at-serial-port.c:29:15: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 29 | { "\r\n", "\r\n" }, + | ^~~~~~ + + src/tests/test-at-serial-port.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit de3a2f5d2e7586e02098cd7cc9c50fbeb3cdd5b3 +Author: Aleksander Morgado +Date: Wed Dec 25 13:19:11 2019 +0100 + + utils: fix warnings with -Wredundant-decls + + In file included from mm-sleep-monitor.c:30: + mm-utils.h:28:18: error: redundant redeclaration of + ‘singleton_instance’ [-Werror=redundant-decls] + e 28 | static TYPE *singleton_instance + | ^~~~~~~~~~~~~~~~~~ + mm-utils.h:31:5: note: in expansion of macro + ‘MM_DEFINE_SINGLETON_INSTANCE’ + 31 | MM_DEFINE_SINGLETON_INSTANCE (TYPE); + \ + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ + mm-utils.h:65:5: note: in expansion of macro + ‘MM_DEFINE_SINGLETON_WEAK_REF’ + 65 | MM_DEFINE_SINGLETON_WEAK_REF (TYPE); + \ + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + src/mm-utils.h | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +commit a246c36087986829f26ca624553fd4940c37a54b +Author: Aleksander Morgado +Date: Wed Dec 25 13:15:14 2019 +0100 + + plugin: fix warnings with -Wdiscarded-qualifiers + + mm-plugin.c:50:33: error: initialization discards ‘const’ + qualifier from pointer target type [-Werror=discarded-qualifiers] + 50 | static gchar *virtual_port[] = {"smd0", NULL}; + | ^~~~~~ + + src/mm-plugin.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit db45ba60c1f1e137f41737f567b3694a5cfa593a +Author: Aleksander Morgado +Date: Mon Dec 23 15:10:56 2019 +0100 + + broadband-modem: fix warnings with -Wimplicit-fallthrough + + mm-broadband-modem.c: In function ‘disabling_step’: + mm-broadband-modem.c:10498:18: error: this statement may fall + through [-Werror=implicit-fallthrough=] + 10498 | ctx->step++; + | ~~~~~~~~~^~ + mm-broadband-modem.c:10500:5: note: here + 10500 | case DISABLING_STEP_WAIT_FOR_FINAL_STATE: + | ^~~~ + ... + + src/mm-broadband-modem.c | 76 + ++++++++++++++++++++++++------------------------ + 1 file changed, 38 insertions(+), 38 deletions(-) + +commit 91ce5e9a6892dc82ba089841678cdd0264cb7da6 +Author: Aleksander Morgado +Date: Mon Dec 23 15:06:44 2019 +0100 + + broadband-modem: remove unused method + + The logic in open_ports_initialization() was included in the generic + ports_context_open() method, and the method was not being used + anywhere. + + src/mm-broadband-modem.c | 28 ---------------------------- + 1 file changed, 28 deletions(-) + +commit b1e0df4f24936b70f92581397fc9aebf32c4fa9e +Author: Aleksander Morgado +Date: Mon Dec 23 14:51:57 2019 +0100 + + broadband-modem: fix warnings with -Wsign-compare + + mm-broadband-modem.c: In function ‘setup_ports’: + mm-broadband-modem.c:9955:23: error: comparison of integer + expressions of different signedness: ‘gint’ {aka ‘int’} + and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare] + 9955 | for (j = 0; j < array->len; j++) { + | ^ + ... + + src/mm-broadband-modem.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 51ef497634aafc29f2c49cb665090adc40967a07 +Author: Aleksander Morgado +Date: Mon Dec 23 14:50:59 2019 +0100 + + port-probe: fix warnings with -Wdiscarded-qualifiers + + mm-port-probe.c:1091:7: error: initialization discards ‘const’ + qualifier from pointer target type [-Werror=discarded-qualifiers] + 1091 | { "AT", 3, mm_port_probe_response_processor_is_at }, + | ^~~~ + ... + + src/mm-port-probe.c | 26 +++++++++++++------------- + 1 file changed, 13 insertions(+), 13 deletions(-) + +commit 337e5e96e0a0d8fd0e6ffcc02e9c90aaaf0baa91 +Author: Aleksander Morgado +Date: Mon Dec 23 14:38:09 2019 +0100 + + broadband-modem: rework +CIEV URC handling + + Switch to use the helper methods to parse strings and numbers from + match info results. + + Also, avoid warnings with -Wsign-compare. + + src/mm-broadband-modem.c | 58 + ++++++++++++++++++++++++++---------------------- + 1 file changed, 32 insertions(+), 26 deletions(-) + +commit f0377d6e36505fa7383c20218e223b5389a42aa3 +Author: Aleksander Morgado +Date: Mon Dec 23 14:19:29 2019 +0100 + + broadband-modem: fix warnings with -Wswitch-default + + mm-broadband-modem.c: In function ‘access_tech_and_mask_new’: + mm-broadband-modem.c:2431:9: error: switch missing default case + [-Werror=switch-default] + 2431 | switch (ctx->sysmode) { + | ^~~~~~ + + src/mm-broadband-modem.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +commit 91216cb88451bb352be2bdaf27f2221751cf1730 +Author: Aleksander Morgado +Date: Mon Dec 23 14:18:34 2019 +0100 + + broadband-modem: fix warnings with -Wswitch-enum + + mm-broadband-modem.c: In function ‘cgev_process_detach’: + mm-broadband-modem.c:2845:5: error: enumeration value + ‘MM_3GPP_CGEV_UNKNOWN’ not handled in switch + [-Werror=switch-enum] + 2845 | switch (type) { + | ^~~~~~ + ... + + src/mm-broadband-modem.c | 71 + +++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 64 insertions(+), 7 deletions(-) + +commit 517862be35559a9f12dd424dd75a1a833d4648e0 +Author: Aleksander Morgado +Date: Mon Dec 23 14:16:45 2019 +0100 + + broadband-modem: plug memleak if mm_parse_csim_response() fails + + The GError would be leaking. + + src/mm-broadband-modem.c | 24 ++++++++++++++---------- + 1 file changed, 14 insertions(+), 10 deletions(-) + +commit d5b30be6de9b8282f2f03b8201fc097accaf27cb +Author: Aleksander Morgado +Date: Mon Dec 23 14:07:43 2019 +0100 + + broadband-modem: fix warnings with -Wdiscarded-qualifiers + + mm-broadband-modem.c: At top level: + mm-broadband-modem.c:551:7: error: initialization + discards ‘const’ qualifier from pointer target type + [-Werror=discarded-qualifiers] + 551 | { "+CGSM", MM_MODEM_CAPABILITY_GSM_UMTS }, + | ^~~~~~~ + ... + + src/mm-broadband-modem.c | 62 + ++++++++++++++++++++++++------------------------ + 1 file changed, 31 insertions(+), 31 deletions(-) + +commit cf86e94b8a1ec480f1df51b53a87dddf3e22597f +Author: Aleksander Morgado +Date: Mon Dec 23 14:07:07 2019 +0100 + + broadband-modem: fix warnings with -Wshadow + + mm-broadband-modem.c: In function ‘modem_create_bearer’: + mm-broadband-modem.c:421:42: error: declaration of ‘properties’ + shadows a global declaration [-Werror=shadow] + 421 | MMBearerProperties *properties, + | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ + mm-broadband-modem.c:132:20: note: shadowed declaration is here + 132 | static GParamSpec *properties[PROP_LAST]; + | ^~~~~~~~~~ + + src/mm-broadband-modem.c | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) + +commit 6887cfda71780d7be6654bde97a643032577866e +Author: Aleksander Morgado +Date: Mon Dec 23 14:06:14 2019 +0100 + + iface-modem-oma: fix warnings with -Wimplicit-fallthrough + + mm-iface-modem-oma.c: In function ‘interface_disabling_step’: + mm-iface-modem-oma.c:732:18: error: this statement may fall through + [-Werror=implicit-fallthrough=] + 732 | ctx->step++; + | ~~~~~~~~~^~ + ... + + src/mm-iface-modem-oma.c | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +commit e29e1f36696e8e03e379e293f2a2e0ff0e88d50f +Author: Aleksander Morgado +Date: Mon Dec 23 14:04:55 2019 +0100 + + iface-modem-oma: fix warnings with -Wswitch-default + + mm-iface-modem-oma.c: In function ‘interface_disabling_step’: + mm-iface-modem-oma.c:729:5: error: switch missing default case + [-Werror=switch-default] + 729 | switch (ctx->step) { + | ^~~~~~ + ... + + src/mm-iface-modem-oma.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +commit fee1ff66f76662c31c5c32c414d1889321914806 +Author: Aleksander Morgado +Date: Mon Dec 23 14:03:47 2019 +0100 + + iface-modem-signal: fix warnings with -Wimplicit-fallthrough + + mm-iface-modem-signal.c:447:18: error: this statement may fall + through [-Werror=implicit-fallthrough=] + 447 | ctx->step++; + | ~~~~~~~~~^~ + mm-iface-modem-signal.c:449:5: note: here + 449 | case INITIALIZATION_STEP_CHECK_SUPPORT: + | ^~~~ + ... + + src/mm-iface-modem-signal.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 8602e97e1c3608d69d9afcff79425a0f8ddbc9fe +Author: Aleksander Morgado +Date: Mon Dec 23 14:02:43 2019 +0100 + + iface-modem-signal: fix warnings with -Wswitch-default + + mm-iface-modem-signal.c: In function + ‘interface_initialization_step’: + mm-iface-modem-signal.c:436:5: error: switch missing default case + [-Werror=switch-default] + 436 | switch (ctx->step) { + | ^~~~~~ + + src/mm-iface-modem-signal.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit f856ab08fe9d24492459e605af3dcf09ff7b2641 +Author: Aleksander Morgado +Date: Mon Dec 23 14:01:42 2019 +0100 + + iface-modem-firmware: fix warnings with -Wimplicit-fallthrough + + mm-iface-modem-firmware.c:438:18: error: this statement may fall + through [-Werror=implicit-fallthrough=] + 438 | ctx->step++; + | ~~~~~~~~~^~ + mm-iface-modem-firmware.c:440:5: note: here + 440 | case INITIALIZATION_STEP_UPDATE_SETTINGS: + | ^~~~ + ... + + src/mm-iface-modem-firmware.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 823d65ee9949a3067bb0ce00b0f72ddfd72a6d39 +Author: Aleksander Morgado +Date: Mon Dec 23 14:01:00 2019 +0100 + + iface-modem-firmware: fix warnings with -Wswitch-default + + mm-iface-modem-firmware.c: In function + ‘interface_initialization_step’: + mm-iface-modem-firmware.c:435:5: error: switch missing default case + [-Werror=switch-default] + 435 | switch (ctx->step) { + | ^~~~~~ + + src/mm-iface-modem-firmware.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit a65fa9e1428b7464a13de1320270b4711dd13be0 +Author: Aleksander Morgado +Date: Mon Dec 23 13:59:29 2019 +0100 + + iface-modem-time: fix warnings with -Wimplicit-fallthrough + + mm-iface-modem-time.c: In function ‘interface_disabling_step’: + mm-iface-modem-time.c:484:18: error: this statement may fall through + [-Werror=implicit-fallthrough=] + 484 | ctx->step++; + | ~~~~~~~~~^~ + mm-iface-modem-time.c:486:5: note: here + 486 | case DISABLING_STEP_CANCEL_NETWORK_TIMEZONE_UPDATE: + | ^~~~ + ... + + src/mm-iface-modem-time.c | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +commit ecce8cb9fccaeaba6aa89dc23d93af8137c10e3a +Author: Aleksander Morgado +Date: Mon Dec 23 13:57:31 2019 +0100 + + iface-modem-time: fix warnings with -Wswitch-default + + mm-iface-modem-time.c: In function ‘interface_disabling_step’: + mm-iface-modem-time.c:481:5: error: switch missing default case + [-Werror=switch-default] + 481 | switch (ctx->step) { + | ^~~~~~ + ... + + src/mm-iface-modem-time.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +commit e8c64445ccebc615abb28f7e172257fc22b64cf6 +Author: Aleksander Morgado +Date: Mon Dec 23 13:56:28 2019 +0100 + + iface-modem-voice: fix warnings with -Wimplicit-fallthrough + + mm-iface-modem-voice.c: In function ‘interface_disabling_step’: + mm-iface-modem-voice.c:2589:18: error: this statement may fall + through [-Werror=implicit-fallthrough=] + 2589 | ctx->step++; + | ~~~~~~~~~^~ + mm-iface-modem-voice.c:2591:5: note: here + 2591 | case DISABLING_STEP_DISABLE_UNSOLICITED_EVENTS: + | ^~~~ + ... + + src/mm-iface-modem-voice.c | 17 ++++++++--------- + 1 file changed, 8 insertions(+), 9 deletions(-) + +commit b1d4c9063cb6c263a98a1538ed68989f58640d15 +Author: Aleksander Morgado +Date: Mon Dec 23 13:53:57 2019 +0100 + + iface-modem-voice: fix warnings with -Wswitch-default + + mm-iface-modem-voice.c: In function + ‘in_call_setup_context_step’: + mm-iface-modem-voice.c:1863:5: error: switch missing default case + [-Werror=switch-default] + 1863 | switch (ctx->step) { + | ^~~~~~ + ... + + src/mm-iface-modem-voice.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +commit 451eaa69c5169dc6a736dbf4b512432eab0c50f7 +Author: Aleksander Morgado +Date: Mon Dec 23 13:46:40 2019 +0100 + + iface-modem-voice: fix warnings with -Wswitch-enum + + mm-iface-modem-voice.c: In function + ‘prepare_hold_and_accept_foreach’: + mm-iface-modem-voice.c:804:5: error: enumeration value + ‘MM_CALL_STATE_UNKNOWN’ not handled in switch + [-Werror=switch-enum] + 804 | switch (mm_base_call_get_state (call)) { + | ^~~~~~ + ... + + src/mm-iface-modem-voice.c | 35 +++++++++++++++++++++++++++++++++++ + 1 file changed, 35 insertions(+) + +commit 189f1a2fb08da1ce54a11be4810619435f9b49ef +Author: Aleksander Morgado +Date: Mon Dec 23 13:44:44 2019 +0100 + + iface-modem-messaging: fix warnings with -Wimplicit-fallthrough + + mm-iface-modem-messaging.c: In function + ‘interface_disabling_step’: + mm-iface-modem-messaging.c:615:18: error: this statement may fall + through [-Werror=implicit-fallthrough=] + 615 | ctx->step++; + | ~~~~~~~~~^~ + mm-iface-modem-messaging.c:617:5: note: here + 617 | case DISABLING_STEP_DISABLE_UNSOLICITED_EVENTS: + | ^~~~ + ... + + src/mm-iface-modem-messaging.c | 30 ++++++++++++++---------------- + 1 file changed, 14 insertions(+), 16 deletions(-) + +commit 032eab4ba74679c3c6c1a9e8c8f41d86dbe51b01 +Author: Aleksander Morgado +Date: Mon Dec 23 13:42:43 2019 +0100 + + iface-modem-messaging: fix warnings with -Wswitch-default + + mm-iface-modem-messaging.c: In function + ‘interface_disabling_step’: + mm-iface-modem-messaging.c:612:5: error: switch missing default case + [-Werror=switch-default] + 612 | switch (ctx->step) { + | ^~~~~~ + ... + + src/mm-iface-modem-messaging.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +commit 8798ea889d390a007d57f1a367aa7af2366908cf +Author: Aleksander Morgado +Date: Mon Dec 23 13:40:30 2019 +0100 + + iface-modem-location: fix warnings with -Wimplicit-fallthrough + + mm-iface-modem-location.c: In function + ‘interface_disabling_step’: + mm-iface-modem-location.c:1389:18: error: this statement may fall + through [-Werror=implicit-fallthrough=] + 1389 | ctx->step++; + | ~~~~~~~~~^~ + mm-iface-modem-location.c:1391:5: note: here + 1391 | case DISABLING_STEP_DISABLE_GATHERING: + | ^~~~ + ... + + src/mm-iface-modem-location.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +commit 3ab3968e8f0ba092cd2b34e967a3bbb89be3f00c +Author: Aleksander Morgado +Date: Mon Dec 23 13:39:05 2019 +0100 + + iface-modem-location: fix warnings with -Wswitch-default + + mm-iface-modem-location.c: In function + ‘interface_disabling_step’: + mm-iface-modem-location.c:1386:5: error: switch missing default case + [-Werror=switch-default] + 1386 | switch (ctx->step) { + | ^~~~~~ + mm-iface-modem-location.c: In function + ‘interface_enabling_step’: + mm-iface-modem-location.c:1505:5: error: switch missing default case + [-Werror=switch-default] + 1505 | switch (ctx->step) { + | ^~~~~~ + mm-iface-modem-location.c: In function + ‘interface_initialization_step’: + mm-iface-modem-location.c:1709:5: error: switch missing default case + [-Werror=switch-default] + 1709 | switch (ctx->step) { + | ^~~~~~ + + src/mm-iface-modem-location.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +commit c1ffe15b9282d80b82c348d408aa2c8b5dc06943 +Author: Aleksander Morgado +Date: Mon Dec 23 13:37:35 2019 +0100 + + iface-modem-location: fix warnings with -Wswitch-enum + + mm-iface-modem-location.c: In function + ‘update_location_source_status’: + mm-iface-modem-location.c:482:5: error: enumeration value + ‘MM_MODEM_LOCATION_SOURCE_NONE’ not handled in switch + [-Werror=switch-enum] + 482 | switch (source) { + | ^~~~~~ + + src/mm-iface-modem-location.c | 1 + + 1 file changed, 1 insertion(+) + +commit 8744025545236c4623b04720cf1077293d6d651d +Author: Aleksander Morgado +Date: Mon Dec 23 13:36:05 2019 +0100 + + iface-modem-simple: fix warnings with -Wimplicit-fallthrough + + mm-iface-modem-simple.c: In function ‘connection_step’: + mm-iface-modem-simple.c:539:18: error: this statement may fall + through [-Werror=implicit-fallthrough=] + 539 | ctx->step++; + | ~~~~~~~~~^~ + ... + + src/mm-iface-modem-simple.c | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +commit a4dcf5dd68f243240930bb57b5586827dc44f933 +Author: Aleksander Morgado +Date: Mon Dec 23 13:34:46 2019 +0100 + + iface-modem-simple: fix warnings with -Wswitch-default + + mm-iface-modem-simple.c: In function ‘connection_step’: + mm-iface-modem-simple.c:536:5: error: switch missing default case + [-Werror=switch-default] + 536 | switch (ctx->step) { + | ^~~~~~ + + src/mm-iface-modem-simple.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit 3659660e8718e60c5a59521f817e5384495e675d +Author: Aleksander Morgado +Date: Mon Dec 23 13:32:27 2019 +0100 + + iface-modem-cdma: fix warnings with -Wimplicit-fallthrough + + mm-iface-modem-cdma.c: In function ‘registration_check_step’: + mm-iface-modem-cdma.c:846:18: error: this statement may fall through + [-Werror=implicit-fallthrough=] + 846 | ctx->step++; + | ~~~~~~~~~^~ + mm-iface-modem-cdma.c:848:5: note: here + 848 | case REGISTRATION_CHECK_STEP_SETUP_REGISTRATION_CHECKS: + | ^~~~ + ... + + src/mm-iface-modem-cdma.c | 38 +++++++++++++++++++------------------- + 1 file changed, 19 insertions(+), 19 deletions(-) + +commit 8dedd45e90109a7e22a7fedc232d71c3de7af7e7 +Author: Aleksander Morgado +Date: Mon Dec 23 13:29:52 2019 +0100 + + iface-modem-cdma: fix warnings with -Wswitch-default + + mm-iface-modem-cdma.c: In function ‘handle_activate_auth_ready’: + mm-iface-modem-cdma.c:198:5: error: switch missing default case + [-Werror=switch-default] + 198 | switch (modem_state) { + | ^~~~~~ + ... + + src/mm-iface-modem-cdma.c | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +commit 41bfa1f75d8ac6680034bc709149551efcad8034 +Author: Aleksander Morgado +Date: Mon Dec 23 13:23:14 2019 +0100 + + iface-modem-3gpp-ussd: fix warnings with -Wimplicit-fallthrough + + mm-iface-modem-3gpp-ussd.c: In function + ‘interface_disabling_step’: + mm-iface-modem-3gpp-ussd.c:572:18: error: this statement may fall + through [-Werror=implicit-fallthrough=] + 572 | ctx->step++; + | ~~~~~~~~~^~ + .. + + src/mm-iface-modem-3gpp-ussd.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit 82d30fd05255ea24dfb8556f80d5582c5517ba41 +Author: Aleksander Morgado +Date: Mon Dec 23 13:21:59 2019 +0100 + + iface-modem-3gpp-ussd: fix warnings with -Wswitch-default + + mm-iface-modem-3gpp-ussd.c: In function ‘ensure_enabled’: + mm-iface-modem-3gpp-ussd.c:59:5: error: switch missing default case + [-Werror=switch-default] + 59 | switch (modem_state) { + | ^~~~~~ + mm-iface-modem-3gpp-ussd.c: In function + ‘interface_disabling_step’: + mm-iface-modem-3gpp-ussd.c:565:5: error: switch missing default case + [-Werror=switch-default] + 565 | switch (ctx->step) { + | ^~~~~~ + mm-iface-modem-3gpp-ussd.c: In function + ‘interface_enabling_step’: + mm-iface-modem-3gpp-ussd.c:709:5: error: switch missing default case + [-Werror=switch-default] + 709 | switch (ctx->step) { + | ^~~~~~ + mm-iface-modem-3gpp-ussd.c: In function + ‘interface_initialization_step’: + mm-iface-modem-3gpp-ussd.c:831:5: error: switch missing default case + [-Werror=switch-default] + 831 | switch (ctx->step) { + | ^~~~~~ + + src/mm-iface-modem-3gpp-ussd.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +commit 5aa5e51a0eb13d4eca8a61d756bad22a17dc67fd +Author: Aleksander Morgado +Date: Mon Dec 23 13:16:40 2019 +0100 + + iface-modem-3gpp: fix warnings with -Wimplicit-fallthrough -commit f67da196081fb1bfc8c5bfedb1320dd812bc480e + mm-iface-modem-3gpp.c: In function ‘interface_disabling_step’: + mm-iface-modem-3gpp.c:1797:18: error: this statement may fall + through [-Werror=implicit-fallthrough=] + 1797 | ctx->step++; + | ~~~~~~~~~^~ + ... + + src/mm-iface-modem-3gpp.c | 42 +++++++++++++++++++----------------------- + 1 file changed, 19 insertions(+), 23 deletions(-) + +commit f6e53c41e40e6eba587219efd4ecf9b7308fd44a +Author: Aleksander Morgado +Date: Thu Nov 28 22:56:27 2019 +0100 + + iface-modem-3gpp: fix warnings with -Wswitch-default + + mm-iface-modem-3gpp.c: In function ‘handle_register_auth_ready’: + mm-iface-modem-3gpp.c:550:5: error: switch missing default case + [-Werror=switch-default] + 550 | switch (modem_state) { + | ^~~~~~ + mm-iface-modem-3gpp.c: In function ‘handle_scan_auth_ready’: + mm-iface-modem-3gpp.c:738:5: error: switch missing default case + [-Werror=switch-default] + 738 | switch (modem_state) { + | ^~~~~~ + mm-iface-modem-3gpp.c: In function ‘interface_disabling_step’: + mm-iface-modem-3gpp.c:1788:5: error: switch missing default case + [-Werror=switch-default] + 1788 | switch (ctx->step) { + | ^~~~~~ + mm-iface-modem-3gpp.c: In function ‘interface_enabling_step’: + mm-iface-modem-3gpp.c:2092:5: error: switch missing default case + [-Werror=switch-default] + 2092 | switch (ctx->step) { + | ^~~~~~ + mm-iface-modem-3gpp.c: In function + ‘interface_initialization_step’: + mm-iface-modem-3gpp.c:2394:5: error: switch missing default case + [-Werror=switch-default] + 2394 | switch (ctx->step) { + | ^~~~~~ + + src/mm-iface-modem-3gpp.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +commit 394df97acf80e36fb9b6f38f3a6a4464feeab0cf +Author: Aleksander Morgado +Date: Thu Nov 28 22:48:31 2019 +0100 + + iface-modem: fix warnings with -Wimplicit-fallthrough + + mm-iface-modem.c: In function ‘peridic_signal_check_step’: + mm-iface-modem.c:1311:26: error: this statement may fall through + [-Werror=implicit-fallthrough=] + 1311 | ctx->running_step++; + | ~~~~~~~~~~~~~~~~~^~ + ... + + src/mm-iface-modem.c | 77 + +++++++++++++++++++++++----------------------------- + 1 file changed, 34 insertions(+), 43 deletions(-) + +commit eb04eadccefe053be0c1fcf0a2bdf2537971cbd7 +Author: Aleksander Morgado +Date: Thu Nov 28 22:46:04 2019 +0100 + + iface-modem: fix warnings with -Wswitch-default + + mm-iface-modem.c: In function ‘bearer_status_changed’: + mm-iface-modem.c:483:9: error: switch missing default case + [-Werror=switch-default] + 483 | switch (mm_base_bearer_get_status (bearer)) { + | ^~~~~~ + mm-iface-modem.c: In function ‘peridic_signal_check_step’: + mm-iface-modem.c:1293:5: error: switch missing default case + [-Werror=switch-default] + 1293 | switch (ctx->running_step) { + | ^~~~~~ + mm-iface-modem.c: In function ‘interface_enabling_step’: + mm-iface-modem.c:3965:5: error: switch missing default case + [-Werror=switch-default] + 3965 | switch (ctx->step) { + | ^~~~~~ + mm-iface-modem.c: In function ‘interface_initialization_step’: + mm-iface-modem.c:4708:5: error: switch missing default case + [-Werror=switch-default] + 4708 | switch (ctx->step) { + | ^~~~~~ + + src/mm-iface-modem.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +commit 6a3e2d6a6143d84b646fcf8cf2e49cb3f4b830fa +Author: Aleksander Morgado +Date: Thu Nov 28 22:42:12 2019 +0100 + + base-sms: fix warnings with -Wshadow + + mm-base-sms.c: In function ‘mm_base_sms_new_from_properties’: + mm-base-sms.c:1831:51: error: declaration of ‘properties’ + shadows a global declaration [-Werror=shadow] + 1831 | MMSmsProperties + *properties, + | ~~~~~~~~~~~~~~~~~^~~~~~~~~~ + mm-base-sms.c:53:20: note: shadowed declaration is here + 53 | static GParamSpec *properties[PROP_LAST]; + | ^~~~~~~~~~ + + src/mm-base-sms.c | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) + +commit 1d0ead9acac6e9b0c878aca042f335aad77378e1 +Author: Aleksander Morgado +Date: Thu Nov 28 22:40:09 2019 +0100 + + base-sms: fix warnings with -Wshadow + + mm-base-sms.c: In function ‘generate_3gpp_submit_pdus’: + mm-base-sms.c:153:19: error: declaration of ‘i’ shadows a + previous local [-Werror=shadow] + 153 | guint i = 0; + | ^ + mm-base-sms.c:102:11: note: shadowed declaration is here + 102 | guint i; + | ^ + + src/mm-base-sms.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 316f2fdff8fc10e658f13faa20feabe409ca90f5 +Author: Aleksander Morgado +Date: Thu Nov 28 22:38:24 2019 +0100 + + base-modem: fix warnings with -Wswitch-enum + + mm-base-modem.c: In function ‘mm_base_modem_organize_ports’: + mm-base-modem.c:1088:9: error: enumeration value + ‘MM_PORT_TYPE_UNKNOWN’ not handled in switch + [-Werror=switch-enum] + 1088 | switch (mm_port_get_port_type (candidate)) { + | ^~~~~~ + mm-base-modem.c:1088:9: error: enumeration value + ‘MM_PORT_TYPE_IGNORED’ not handled in switch + [-Werror=switch-enum] + + src/mm-base-modem.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit c93a3cf589841f11c7f724a98a371b7f25723ffc +Author: Aleksander Morgado +Date: Thu Nov 28 22:35:09 2019 +0100 + + bearer-list: fix warnings with -Wshadow + + mm-bearer-list.c: In function + ‘mm_bearer_list_find_by_properties’: + mm-bearer-list.c:151:56: error: declaration of + ‘properties’ shadows a global declaration [-Werror=shadow] + 151 | MMBearerProperties + *properties) + | + ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ + mm-bearer-list.c:42:20: note: shadowed declaration is here + 42 | static GParamSpec *properties[PROP_LAST]; + | ^~~~~~~~~~ + + src/mm-bearer-list.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 71ee2e900d4c1e9af3f1fabb79de00c678a16c18 +Author: Aleksander Morgado +Date: Wed Nov 20 16:16:29 2019 +0100 + + core,broadband-bearer: fix warnings with -Wimplicit-fallthrough + + mm-broadband-bearer.c: In function + ‘cid_selection_3gpp_context_step’: + mm-broadband-bearer.c:871:18: warning: this statement may fall + through [-Wimplicit-fallthrough=] + 871 | ctx->step++; + | ~~~~~~~~~^~ + mm-broadband-bearer.c:873:5: note: here + 873 | case CID_SELECTION_3GPP_STEP_FORMAT: + | ^~~~ + mm-broadband-bearer.c: In function + ‘interface_initialization_step’: + mm-broadband-bearer.c:2127:18: warning: this statement may fall + through [-Wimplicit-fallthrough=] + 2127 | ctx->step++; + | ~~~~~~~~~^~ + mm-broadband-bearer.c:2129:5: note: here + 2129 | case INITIALIZATION_STEP_CDMA_RM_PROTOCOL: + | ^~~~ + mm-broadband-bearer.c:2148:18: warning: this statement may fall + through [-Wimplicit-fallthrough=] + 2148 | ctx->step++; + | ~~~~~~~~~^~ + + src/mm-broadband-bearer.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit cdcc44922f0195b5b3933b79232042ea62f8ebb8 +Author: Aleksander Morgado +Date: Wed Nov 20 16:15:20 2019 +0100 + + core,broadband-bearer: fix warnings with -Wshadow + + mm-broadband-bearer.c: In function ‘mm_broadband_bearer_new’: + mm-broadband-bearer.c:2204:46: warning: declaration of + ‘properties’ shadows a global declaration [-Wshadow] + 2204 | MMBearerProperties *properties, + | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ + mm-broadband-bearer.c:58:20: note: shadowed declaration is here + 58 | static GParamSpec *properties[PROP_LAST]; + | ^~~~~~~~~~ + + src/mm-broadband-bearer.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 7c4220bc68c695099199c56d2d97a8f8fa34c9a2 +Author: Aleksander Morgado +Date: Wed Nov 20 16:14:25 2019 +0100 + + core,broadband-bearer: fix warnings with -Wswitch-default + + mm-broadband-bearer.c: In function + ‘cid_selection_3gpp_context_step’: + mm-broadband-bearer.c:868:5: warning: switch missing default case + [-Wswitch-default] + 868 | switch (ctx->step) { + | ^~~~~~ + mm-broadband-bearer.c: In function ‘disconnect’: + mm-broadband-bearer.c:1842:5: warning: switch missing default case + [-Wswitch-default] + 1842 | switch (MM_BROADBAND_BEARER + (self)->priv->connection_type) { + | ^~~~~~ + mm-broadband-bearer.c: In function + ‘interface_initialization_step’: + mm-broadband-bearer.c:2124:5: warning: switch missing default case + [-Wswitch-default] + 2124 | switch (ctx->step) { + | ^~~~~~ + + src/mm-broadband-bearer.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit 2a0e4e062fc47f9ff39542d37b6303be8344f7f2 +Author: Aleksander Morgado +Date: Wed Nov 20 16:13:07 2019 +0100 + + core,base-bearer: fix warnings with -Wswitch-default + + mm-base-bearer.c: In function + ‘modem_3gpp_registration_state_changed’: + mm-base-bearer.c:463:5: warning: switch missing default case + [-Wswitch-default] + 463 | switch (state) { + | ^~~~~~ + + src/mm-base-bearer.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit ce5689112d927cf23162777024d586c2ebf0ab31 +Author: Aleksander Morgado +Date: Wed Nov 20 16:11:55 2019 +0100 + + core,base-sim: fix warnings with -Wimplicit-fallthrough + + mm-base-sim.c:1590:18: warning: this statement may fall through + [-Wimplicit-fallthrough=] + 1590 | ctx->step++; + | ~~~~~~~~~^~ + mm-base-sim.c:1592:5: note: here + 1592 | case INITIALIZATION_STEP_SIM_IDENTIFIER: + | ^~~~ + mm-base-sim.c:1606:18: warning: this statement may fall through + [-Wimplicit-fallthrough=] + 1606 | ctx->step++; + | ~~~~~~~~~^~ + mm-base-sim.c:1608:5: note: here + 1608 | case INITIALIZATION_STEP_IMSI: + | ^~~~ + mm-base-sim.c:1622:18: warning: this statement may fall through + [-Wimplicit-fallthrough=] + 1622 | ctx->step++; + | ~~~~~~~~~^~ + mm-base-sim.c:1624:5: note: here + 1624 | case INITIALIZATION_STEP_OPERATOR_ID: + | ^~~~ + mm-base-sim.c:1638:18: warning: this statement may fall through + [-Wimplicit-fallthrough=] + 1638 | ctx->step++; + | ~~~~~~~~~^~ + mm-base-sim.c:1640:5: note: here + 1640 | case INITIALIZATION_STEP_OPERATOR_NAME: + | ^~~~ + mm-base-sim.c:1654:18: warning: this statement may fall through + [-Wimplicit-fallthrough=] + 1654 | ctx->step++; + | ~~~~~~~~~^~ + mm-base-sim.c:1656:5: note: here + 1656 | case INITIALIZATION_STEP_EMERGENCY_NUMBERS: + | ^~~~ + mm-base-sim.c:1670:18: warning: this statement may fall through + [-Wimplicit-fallthrough=] + 1670 | ctx->step++; + | ~~~~~~~~~^~ + mm-base-sim.c:1672:5: note: here + 1672 | case INITIALIZATION_STEP_LAST: + | ^~~~ + + src/mm-base-sim.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit 850c6636bf26d38bdd2cd0e5d6668fe53bb0072a +Author: Aleksander Morgado +Date: Wed Nov 20 16:10:34 2019 +0100 + + core,base-sim: fix warnings with -Wswitch-default + + mm-base-sim.c: In function ‘interface_initialization_step’: + mm-base-sim.c:1587:5: warning: switch missing default case + [-Wswitch-default] + 1587 | switch (ctx->step) { + | ^~~~~~ + + src/mm-base-sim.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit 645f8e10ea44cb9668a7740b4838eb3378d0e8d7 +Author: Aleksander Morgado +Date: Wed Nov 20 16:09:48 2019 +0100 + + core,plugin-manager: fix warnings with -Wswitch-default + + mm-plugin-manager.c: In function ‘plugin_supports_port_ready’: + mm-plugin-manager.c:480:5: warning: switch missing default case + [-Wswitch-default] + 480 | switch (support_result) { + | ^~~~~~ + + src/mm-plugin-manager.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit b087549c7d60050d9174a54b0fc7c450c3a9b92e +Author: Aleksander Morgado +Date: Wed Nov 20 16:06:03 2019 +0100 + + core,log: fix warnings with -Wswitch-enum + + mm-log.c: In function ‘glib_to_syslog_priority’: + mm-log.c:99:5: warning: enumeration value ‘G_LOG_FLAG_RECURSION’ + not handled in switch [-Wswitch-enum] + 99 | switch (level) { + | ^~~~~~ + mm-log.c:99:5: warning: enumeration value ‘G_LOG_FLAG_FATAL’ + not handled in switch [-Wswitch-enum] + mm-log.c:99:5: warning: enumeration value ‘G_LOG_LEVEL_INFO’ + not handled in switch [-Wswitch-enum] + mm-log.c:99:5: warning: enumeration value ‘G_LOG_LEVEL_MASK’ + not handled in switch [-Wswitch-enum] + + src/mm-log.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +commit b024381be57f3ef07c1ef067c0816a52d267fa8f +Author: Aleksander Morgado +Date: Wed Nov 20 16:03:09 2019 +0100 + + core,log: fix warnings with -Wswitch-default + + mm-log.c: In function ‘mm_to_syslog_priority’: + mm-log.c:82:5: warning: switch missing default case + [-Wswitch-default] + 82 | switch (level) { + | ^~~~~~ + + mm-log.c: In function ‘log_level_description’: + mm-log.c:118:5: warning: switch missing default case + [-Wswitch-default] + 118 | switch (level) { + | ^~~~~~ + + src/mm-log.c | 4 ++++ + 1 file changed, 4 insertions(+) + +commit a1f2429790eb4c7e106cd928cbb387fd5ba0aa46 +Author: Aleksander Morgado +Date: Wed Nov 20 16:02:21 2019 +0100 + + libqcdm,reset: fix warnings with -Wdiscarded-qualifiers + + reset.c: In function ‘main’: + reset.c:238:17: warning: passing argument 1 of ‘putenv’ + discards ‘const’ qualifier from pointer target type + [-Wdiscarded-qualifiers] + 238 | putenv ("QCDM_DEBUG=1"); + | ^~~~~~~~~~~~~~ + In file included from reset.c:22: + /usr/include/stdlib.h:647:26: note: expected ‘char *’ but + argument is of type ‘const char *’ + 647 | extern int putenv (char *__string) __THROW __nonnull ((1)); + | ~~~~~~^~~~~~~~ + + libqcdm/tests/reset.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 305d927ee07d7e28de4133d0edf92722155c61cf +Author: Aleksander Morgado +Date: Wed Nov 20 16:01:43 2019 +0100 + + libqcdm,reset: fix warnings with -Wsign-compare + + reset.c: In function ‘print_buf’: + reset.c:47:19: warning: comparison of integer expressions of + different signedness: ‘int’ and ‘size_t’ {aka ‘long + unsigned int’} [-Wsign-compare] + 47 | for (i = 0; i < len; i++) { + | ^ + reset.c: In function ‘qcdm_wait_reply’: + reset.c:168:20: warning: comparison of integer expressions of + different signedness: ‘int’ and ‘long unsigned int’ + [-Wsign-compare] + 168 | } while (total < sizeof (readbuf)); + | ^ + + libqcdm/tests/reset.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 47a380a2ae6b68cbe8b6dfc5c2ea0c37745b92b0 +Author: Aleksander Morgado +Date: Wed Nov 20 16:00:32 2019 +0100 + + libqcdm,ipv6pref: fix warnings with -Wdiscarded-qualifiers + + ipv6pref.c: In function ‘main’: + ipv6pref.c:288:11: warning: passing argument 1 of ‘putenv’ + discards ‘const’ qualifier from pointer target type + [-Wdiscarded-qualifiers] + 288 | putenv ("QCDM_DEBUG=1"); + | ^~~~~~~~~~~~~~ + + libqcdm/tests/ipv6pref.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 07fe3bed65ebe1a1f59f3bb8d1e06de572120e3c +Author: Aleksander Morgado +Date: Wed Nov 20 16:00:01 2019 +0100 + + libqcdm,ipv6pref: fix warnings with -Wsign-compare + + ipv6pref.c: In function ‘print_buf’: + ipv6pref.c:46:16: warning: comparison of integer expressions of + different signedness: ‘int’ and ‘size_t’ {aka ‘long + unsigned int’} [-Wsign-compare] + 46 | for (i = 0; i < len; i++) { + | ^ + ipv6pref.c: In function ‘qcdm_wait_reply’: + ipv6pref.c:167:17: warning: comparison of integer expressions + of different signedness: ‘int’ and ‘long unsigned int’ + [-Wsign-compare] + 167 | } while (total < sizeof (readbuf)); + | ^ + + libqcdm/tests/ipv6pref.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit c135c66684d6fba899f26ddc1085494ee299fd4f +Author: Aleksander Morgado +Date: Wed Nov 20 15:59:07 2019 +0100 + + libqcdm,modepref: fix warnings with -Wdiscarded-qualifiers + + modepref.c: In function ‘main’: + modepref.c:539:11: warning: passing argument 1 of ‘putenv’ + discards ‘const’ qualifier from pointer target type + [-Wdiscarded-qualifiers] + 539 | putenv ("QCDM_DEBUG=1"); + | ^~~~~~~~~~~~~~ + In file included from modepref.c:21: + /usr/include/stdlib.h:647:26: note: expected ‘char *’ but + argument is of type ‘const char *’ + 647 | extern int putenv (char *__string) __THROW __nonnull ((1)); + | ~~~~~~^~~~~~~~ + + libqcdm/tests/modepref.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 17a00ce1fcad6e0ce28d2312620ff27af12e618d +Author: Aleksander Morgado +Date: Wed Nov 20 15:57:20 2019 +0100 + + libqcdm,modepref: fix warnings with -Wsign-compare + + modepref.c: In function ‘print_buf’: + modepref.c:46:16: warning: comparison of integer expressions of + different signedness: ‘int’ and ‘size_t’ {aka ‘long + unsigned int’} [-Wsign-compare] + 46 | for (i = 0; i < len; i++) { + | ^ + modepref.c: In function ‘qcdm_wait_reply’: + modepref.c:167:17: warning: comparison of integer expressions + of different signedness: ‘int’ and ‘long unsigned int’ + [-Wsign-compare] + 167 | } while (total < sizeof (readbuf)); + | ^ + + libqcdm/tests/modepref.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 4fa669b894cd1ff5619e834a30ec3975d11d1505 +Author: Aleksander Morgado +Date: Wed Nov 20 15:56:22 2019 +0100 + + test-qcdm-com: fix warnings with -Wdouble-promotion + + test-qcdm-com.c: In function ‘test_com_pilot_sets’: + test-qcdm-com.c:1085:59: warning: implicit conversion from + ‘float’ to ‘double’ when passing argument to function + [-Wdouble-promotion] + 1085 | g_message (" EC/IO %d (%.1f dB)", + ecio, db); + | ^~ + /usr/include/glib-2.0/glib/gmessages.h:333:32: note: in definition + of macro ‘g_message’ + 333 | __VA_ARGS__) + | ^~~~~~~~~~~ + + libqcdm/tests/test-qcdm-com.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 45c0015c0883bc8a65854d246070d5ec13bbcae8 +Author: Aleksander Morgado +Date: Wed Nov 20 15:54:44 2019 +0100 + + test-qcdm-com: fix warnings with -Wsign-compare + + test-qcdm-com.c: In function ‘print_buf’: + test-qcdm-com.c:273:19: warning: comparison of integer expressions + of different signedness: ‘int’ and ‘gsize’ {aka ‘long + unsigned int’} [-Wsign-compare] + 273 | for (i = 0; i < len; i++) { + | ^ + test-qcdm-com.c: In function ‘wait_reply’: + test-qcdm-com.c:367:20: warning: comparison of integer expressions + of different signedness: ‘int’ and ‘long unsigned int’ + [-Wsign-compare] + 367 | } while (total < sizeof (readbuf)); + | ^ + + libqcdm/tests/test-qcdm-com.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 06567283b1687f0628ee5464fe04c4550d4788ad +Author: Aleksander Morgado +Date: Wed Nov 20 15:53:35 2019 +0100 + + libqcdm,logs: fix warnings with -Wdouble-promotion + + logs.c: In function + ‘qcdm_log_item_evdo_pilot_sets_v2_get_pilot’: + logs.c:179:94: warning: implicit conversion from ‘float’ + to ‘double’ to match other operand of binary expression + [-Wdouble-promotion] + 179 | *out_rssi_dbm = (int32_t) (-110.0 + ((float) MAX + (le16toh (pilot->pilot_energy) - 50, 0) / 14.0)); + | + + libqcdm/src/logs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 3c19b48f8c4eeaf0c5bd66c737fbaabaab407f11 +Author: Aleksander Morgado +Date: Wed Nov 20 15:51:38 2019 +0100 + + libqcdm,commands: fix warnings with -Wdouble-promotion + + commands.c: In function ‘qcdm_cmd_pilot_sets_result_get_pilot’: + commands.c:756:33: warning: implicit conversion from ‘float’ + to ‘double’ to match other operand of binary expression + [-Wdouble-promotion] + 756 | *out_db = (float) set->ecio * -0.5; + | ^ + + libqcdm/src/commands.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 9bc5d742dc6d13f6363393d68328d21210e5fa48 +Author: Aleksander Morgado +Date: Wed Nov 20 15:49:53 2019 +0100 + + libqcdm,commands: fix warnings with -Wswitch-default + + commands.c: In function ‘nv_mode_pref_from_qcdm’: + commands.c:109:5: warning: switch missing default case + [-Wswitch-default] + 109 | switch (qcdm) { + | ^~~~~~ + + libqcdm/src/commands.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit cf211c01e9f0c1ce18b154b1457e9afabffe4921 +Author: Aleksander Morgado +Date: Tue Nov 19 11:36:08 2019 +0100 + + build-aux: fix warning in the built _get_string() methods with + -Wsign-compare + + mm-enums-types.c: In function ‘mm_modem_lock_get_string’: + mm-enums-types.c:165:17: warning: comparison of integer + expressions of different signedness: ‘MMModemLock’ {aka + ‘enum ’} and ‘gint’ {aka ‘const int’} + [-Wsign-compare] + 165 | if (val == mm_modem_lock_values[i].value) + | ^~ + + build-aux/mm-enums-template.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 1c078531a017358241a35475fb24f2bd65d501db +Author: Aleksander Morgado +Date: Tue Nov 19 11:06:43 2019 +0100 + + build: use AX_IS_RELEASE() and AX_COMPILER_FLAGS() + + The autoconf macros AX_COMPILER_FLAGS_{CFLAGS|GIR|LDFLAGS} test + for compiler and linker support of various flags, and add the flags to + the generated output. + + If the command-line option '--enable-compile-warnings' is specified to + 'configure', a number of additional warning options is also added + to the + output. This is the default. + + This update requires the presence of the GNU autoconf-archive in the + system. + + cli/Makefile.am | 9 +++++++-- + configure.ac | 32 ++++++++++++++++++++++++++++++-- + libmm-glib/Makefile.am | 12 ++++++------ + libmm-glib/generated/Makefile.am | 9 ++++++++- + libqcdm/src/Makefile.am | 13 ++++++++++--- + libqcdm/tests/Makefile.am | 11 +++++++++-- + m4/compiler_warnings.m4 | 35 ----------------------------------- + plugins/Makefile.am | 2 ++ + src/Makefile.am | 2 ++ + src/tests/Makefile.am | 2 ++ + test/Makefile.am | 8 ++++++++ + 11 files changed, 84 insertions(+), 51 deletions(-) + +commit 4bfd955e64af56b47d398a857be4e8e1b16ce260 +Author: Aleksander Morgado +Date: Tue Jan 28 10:32:11 2020 +0100 + + auth-provider: fix reference count in manager and modem objects + + The auth provider is now a singleton (since 20ab6550), one single + object that lives throughout the whole program execution, and so we + don't need to keep our own full references around. This fix makes + sure we don't attempt to unref a full auth provider reference we + don't own. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/179 + + src/mm-base-manager.c | 3 +-- + src/mm-base-modem.c | 3 ++- + 2 files changed, 3 insertions(+), 3 deletions(-) + +commit 2406a5519fb3004f424a880d534121aa6469ad76 Author: Aleksander Morgado Date: Fri Jan 24 09:57:54 2020 +0100 @@ -465,34 +14844,57 @@ after having it updated to perform the full conversion cycle: UTF-8 -> packed GSM7 -> UTF-8 - (cherry picked from commit 2406a5519fb3004f424a880d534121aa6469ad76) - src/mm-charsets.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) -commit 3b820dbc5c86dae3e26f752d920bfd68a83d9dc6 +commit 6c80577bec3ad6b565682dc1836881350efc4ec3 Author: Aleksander Morgado -Date: Fri Feb 7 15:11:53 2020 +0100 +Date: Thu Jan 23 16:17:31 2020 +0100 - iface-modem-location: plug memleaks when updating gps raw variant + tests,charsets: full gsm7/pack/unpack/utf8 sequence in tests - The helper method returning a variant from a MMLocationGpsRaw would - return already a full variant reference instead of a floating one, so - we were really increasing the refcount when doing g_variant_ref_sink() - in the location interface. + src/tests/test-charsets.c | 88 + +++++++++++++++++++++++++---------------------- + 1 file changed, 46 insertions(+), 42 deletions(-) - Fix this by consolidating all helper methods in libmm-glib that return - variants from the different MMLocationXX objects, so that they all - return full variants instead of floating ones. +commit 20ab6550fbf88b6e89d7243c08fe1ba12bf44fdf +Author: Aleksander Morgado +Date: Fri Jan 10 14:47:40 2020 +0100 - (cherry picked from commit a61caff747546441474b1a1fc50c664a13a1378f) + auth-provider: refactor and simplify - libmm-glib/mm-location-3gpp.c | 2 +- - libmm-glib/mm-location-gps-nmea.c | 2 +- - src/mm-iface-modem-location.c | 12 ++++-------- - 3 files changed, 6 insertions(+), 10 deletions(-) + The auth provider setup is a bit over-engineered. Simplify it by + making a single MMAuthProvider object that may or may not use polkit, + depending on configure options. This object is also setup as a + singleton object using the helper MM_DEFINE_SINGLETON_GETTER(). + + src/Makefile.am | 7 -- + src/mm-auth-provider-polkit.c | 197 + ----------------------------------------- + src/mm-auth-provider-polkit.h | 46 ---------- + src/mm-auth-provider.c | 198 + ++++++++++++++++++++++++++++++++---------- + src/mm-auth-provider.h | 53 ++++------- + src/mm-auth.c | 53 ----------- + src/mm-auth.h | 27 ------ + src/mm-base-manager.c | 4 +- + src/mm-base-modem.c | 2 +- + src/mm-base-modem.h | 2 +- + 10 files changed, 172 insertions(+), 417 deletions(-) -commit 13a041364f709850b8c144de89f907c4dedb9e57 +commit a6a3db21846248979f7cd1062a2551aac6f9ad3c +Author: Aleksander Morgado +Date: Wed Jan 22 18:19:46 2020 +0100 + + base-modem: use g_steal_pointer() during dispose + + g_steal_pointer() sets the original location to NULL already, so it's + very handy. + + src/mm-base-modem.c | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +commit 3490f997f99e744d567de68572933dd65f6fbbd3 Author: Aleksander Morgado Date: Wed Jan 22 18:19:15 2020 +0100 @@ -502,12 +14904,10 @@ Fixes https://lists.freedesktop.org/archives/modemmanager-devel/2020-January/007686.html - (cherry picked from commit 3490f997f99e744d567de68572933dd65f6fbbd3) - src/mm-base-modem.c | 6 ++++++ 1 file changed, 6 insertions(+) -commit 9647a0601e0cca380cafe7dd5e1c63a604d5a2cb +commit 9b56ce8cccf83ab3d980aacfc06e5483528b89de Author: Aleksander Morgado Date: Wed Jan 22 18:17:27 2020 +0100 @@ -518,13 +14918,65 @@ explicit device close, and some other port types may need other cleanups. - (cherry picked from commit 9b56ce8cccf83ab3d980aacfc06e5483528b89de) + src/mm-base-modem.c | 91 + ++++++++++++++++++++++++++++++++++------------------- + 1 file changed, 59 insertions(+), 32 deletions(-) + +commit 377691afd431c5cb8994da6e814c083e9e3c180f +Author: Aleksander Morgado +Date: Wed Jan 22 13:04:32 2020 +0100 + + port-qmi: asynchronous close operation always - src/mm-base-modem.c | 84 - ++++++++++++++++++++++++++++++++++++++--------------- - 1 file changed, 60 insertions(+), 24 deletions(-) + To be in sync with the qmi_device_close_async() underlying method, + given that the synchronous one is deprecated. -commit f2ab731bc7ce6353f207f2d77fee4860208cb394 + src/mm-base-modem.c | 10 ++++- + src/mm-bearer-qmi.c | 4 +- + src/mm-broadband-modem-qmi.c | 2 +- + src/mm-port-probe.c | 26 ++++++++--- + src/mm-port-qmi.c | 104 + ++++++++++++++++++++++++++++++++++--------- + src/mm-port-qmi.h | 25 ++++++----- + 6 files changed, 132 insertions(+), 39 deletions(-) + +commit bf76fcd52627ead57fac6ba64f11b474619bb700 +Author: Aleksander Morgado +Date: Wed Jan 22 12:30:39 2020 +0100 + + port-qmi: use qmi_device_close_async() in the port open logic + + The qmi_device_close() synchronous operation is deprecated. + + src/mm-port-qmi.c | 137 + +++++++++++++++++++++++++++++++++++++----------------- + 1 file changed, 95 insertions(+), 42 deletions(-) + +commit de8b6dd01956cc7af74cbe4cbab9a903f610557c +Author: Aleksander Morgado +Date: Wed Jan 22 12:24:30 2020 +0100 + + port-mbim: use qmi_device_close_async() + + The qmi_device_close() synchronous operation is deprecated. + + src/mm-port-mbim.c | 102 + ++++++++++++++++++++++++++++++++++++++++------------- + 1 file changed, 77 insertions(+), 25 deletions(-) + +commit 31c94a883b4b7b2157f402a53399003c563bacfa +Author: Aleksander Morgado +Date: Wed Jan 22 12:55:41 2020 +0100 + + broadband-modem-qmi: no longer need QMI port cleanup in finalize() + + We're already doing it in dispose() since commit + 00bb228472ff8669b1d60a251ac533a366e507cb. + + src/mm-broadband-modem-qmi.c | 10 ---------- + 1 file changed, 10 deletions(-) + +commit e793e4e6d8a4db844ffb138cd72eff1185c5fec2 Author: Aleksander Morgado Date: Wed Jan 22 13:06:31 2020 +0100 @@ -533,39 +14985,130 @@ The mm_port_mbim_close() operation needs 3 arguments explicitly, so make sure we provide the two additional ones as NULL. - (cherry picked from commit e793e4e6d8a4db844ffb138cd72eff1185c5fec2) - src/mm-base-modem.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -commit c1272bab6c02a55354ce4052e42692b084eb7524 +commit 5e4b559f480438570f438b8f49974a6c97a081c8 Author: Aleksander Morgado -Date: Mon Jan 13 17:44:23 2020 +0100 +Date: Tue Jan 21 10:58:55 2020 +0100 - build: post-release version bump to 1.12.5 + build: add note for glib < 2.55.1 - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + configure.ac | 2 ++ + 1 file changed, 2 insertions(+) -commit c699b3fc0f4c51d13af4eaf8f8f374c6dff1ae2c +commit ddb7d915a7509a35986ee77d83aa230ccbd028a6 Author: Aleksander Morgado -Date: Sun Jan 12 10:25:12 2020 +0100 +Date: Wed Jan 15 18:56:21 2020 +0100 - release: bump version to 1.12.4 + libmm-glib: unconditionally define autoptr support for all types - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + As we now depend on glib 2.48 + + libmm-glib/mm-bearer-ip-config.h | 3 --- + libmm-glib/mm-bearer-properties.h | 3 --- + libmm-glib/mm-bearer-stats.h | 3 --- + libmm-glib/mm-bearer.h | 3 --- + libmm-glib/mm-call-audio-format.h | 3 --- + libmm-glib/mm-call-properties.h | 3 --- + libmm-glib/mm-call.h | 3 --- + libmm-glib/mm-cdma-manual-activation-properties.h | 3 --- + libmm-glib/mm-common-helpers.h | 23 + ----------------------- + libmm-glib/mm-firmware-properties.h | 3 --- + libmm-glib/mm-firmware-update-settings.h | 3 --- + libmm-glib/mm-kernel-event-properties.h | 3 --- + libmm-glib/mm-location-3gpp.h | 3 --- + libmm-glib/mm-location-cdma-bs.h | 3 --- + libmm-glib/mm-location-gps-nmea.h | 3 --- + libmm-glib/mm-location-gps-raw.h | 3 --- + libmm-glib/mm-manager.h | 3 --- + libmm-glib/mm-modem-3gpp-ussd.h | 3 --- + libmm-glib/mm-modem-3gpp.h | 6 ------ + libmm-glib/mm-modem-cdma.h | 3 --- + libmm-glib/mm-modem-firmware.h | 3 --- + libmm-glib/mm-modem-location.h | 3 --- + libmm-glib/mm-modem-messaging.h | 3 --- + libmm-glib/mm-modem-oma.h | 3 --- + libmm-glib/mm-modem-signal.h | 3 --- + libmm-glib/mm-modem-simple.h | 3 --- + libmm-glib/mm-modem-time.h | 3 --- + libmm-glib/mm-modem-voice.h | 3 --- + libmm-glib/mm-modem.h | 3 --- + libmm-glib/mm-network-timezone.h | 3 --- + libmm-glib/mm-object.h | 3 --- + libmm-glib/mm-pco.h | 3 --- + libmm-glib/mm-signal.h | 3 --- + libmm-glib/mm-sim.h | 3 --- + libmm-glib/mm-simple-connect-properties.h | 3 --- + libmm-glib/mm-simple-status.h | 3 --- + libmm-glib/mm-sms-properties.h | 3 --- + libmm-glib/mm-sms.h | 3 --- + libmm-glib/mm-unlock-retries.h | 3 --- + 39 files changed, 140 deletions(-) + +commit 40e9434cc36174506ed9bbd01c8f78eaea673a2f +Author: Aleksander Morgado +Date: Wed Jan 15 18:56:01 2020 +0100 + + altair-lte: use autoptr support from glib + + plugins/altair/mm-modem-helpers-altair-lte.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit f7757218176b79d9703a72d5142b3b0e63aea692 +Author: Aleksander Morgado +Date: Wed Jan 15 18:49:09 2020 +0100 + + build: bump minimum glib required version to 2.48 + + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit de002539db43124cb22dc04e84409132d15255cc +commit 00bb228472ff8669b1d60a251ac533a366e507cb Author: Aleksander Morgado -Date: Sun Jan 12 10:24:23 2020 +0100 +Date: Wed Jan 15 15:37:06 2020 +0100 - NEWS: update for 1.12.4 + broadband-modem-{qmi,mbim}: port cleanups always during dispose() - NEWS | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 53 insertions(+) + If we need to disconnect signal handlers for the different port + objects managed in the QMI/MBIM modems, we need to do that during + dispose(), as there is no guarantee at all that the port objects will + exist in the MMBaseModem by the time finalize() is run. + + ModemManager[4183]: [1579097652.255333] Modem (Sierra) + '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.4' completely + disposed + ModemManager[4183]: [/dev/cdc-wdm1] unexpected port hangup! + ModemManager[4183]: [/dev/cdc-wdm1] channel destroyed + ModemManager[4183]: [1579097652.258186] Connection to + mbim-proxy for /dev/cdc-wdm1 lost, reprobing + + (ModemManager:4183): GLib-GObject-WARNING **: 15:14:12.258: + invalid unclassed pointer in cast to 'MMBaseModem' + ModemManager[4183]: mm_base_modem_set_reprobe: assertion + 'MM_IS_BASE_MODEM (self)' failed + + (ModemManager:4183): GLib-GObject-WARNING **: 15:14:12.258: + invalid unclassed pointer in cast to 'MMBaseModem' + ModemManager[4183]: mm_base_modem_set_valid: assertion + 'MM_IS_BASE_MODEM (self)' failed + ModemManager[4183]: [/dev/cdc-wdm1] unexpected port hangup! + ModemManager[4183]: [/dev/cdc-wdm1] channel destroyed + ModemManager[4183]: [/dev/cdc-wdm1] MBIM error: Cannot write + message: Broken pipe + ModemManager[4183]: [/dev/cdc-wdm1] MBIM error: Cannot write + message: Broken pipe + ModemManager[4183]: [/dev/cdc-wdm1] MBIM error: Cannot write + message: Broken pipe + ModemManager[4183]: [/dev/cdc-wdm1] MBIM error: Cannot write + message: Broken pipe + + src/mm-broadband-modem-mbim.c | 14 +++++++++++++- + src/mm-broadband-modem-qmi.c | 13 +++++++++++++ + 2 files changed, 26 insertions(+), 1 deletion(-) -commit 3c02f7e9d9f5b87d2aa7ce336e148ad7d9d0d1ab +commit 246fe710b728c7d2637b8a30b7db1901a79fca58 Author: Aleksander Morgado Date: Fri Jan 10 13:22:33 2020 +0100 @@ -626,34 +15169,39 @@ ==3146== by 0x19659A: notify_gps_location_update (mm-iface-modem-location.c:231) - (cherry picked from commit 246fe710b728c7d2637b8a30b7db1901a79fca58) - src/mm-iface-modem-location.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) -commit 964167575f6a40ab12a002a24f0d3100025b5287 +commit 7c66b608c977413ffae6b6900c1c1e4033f07214 Author: Aleksander Morgado Date: Fri Jan 10 13:21:16 2020 +0100 iface-modem-location: fix very very unlikely memory leak - (cherry picked from commit 7c66b608c977413ffae6b6900c1c1e4033f07214) - src/mm-iface-modem-location.c | 1 + 1 file changed, 1 insertion(+) -commit d97528d385b5b8b360fc926907c36b54162f0265 +commit 97f9679b701e0d90999b8e441a8f2b4ed5ae27f3 +Author: Aleksander Morgado +Date: Fri Jan 10 13:19:28 2020 +0100 + + iface-modem-location: assert if rewriting a variant during iteration + + This should never ever happen, so assert + + src/mm-iface-modem-location.c | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 33b1962615febea5c34f0fbddc24eab8de5a9c7a Author: Aleksander Morgado Date: Thu Jan 9 15:05:59 2020 +0100 bearer-qmi: simplify dispose() just by reseting connection data - (cherry picked from commit 33b1962615febea5c34f0fbddc24eab8de5a9c7a) - src/mm-bearer-qmi.c | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) -commit 562b0dcba18560fe28ad13e12b73738ff2508541 +commit 29e64f59af44a23d929107fb4896d10f44b4dfd7 Author: Aleksander Morgado Date: Thu Jan 9 14:52:50 2020 +0100 @@ -680,12 +15228,10 @@ ==991919== by 0x4EC92AA: g_task_return (gtask.c:1281) ==991919== by 0x4EC9E34: g_task_return_pointer (gtask.c:1689) - (cherry picked from commit 29e64f59af44a23d929107fb4896d10f44b4dfd7) - src/mm-bearer-qmi.c | 5 +++++ 1 file changed, 5 insertions(+) -commit 914cfb5fddf92b2198757ef421cefef6fd1074ac +commit e3e837a8a777a3c4404f8d598eb68c7467f53b19 Author: Aleksander Morgado Date: Thu Jan 9 14:06:14 2020 +0100 @@ -711,12 +15257,271 @@ ==990910== by 0x50CD616: g_main_context_dispatch (gmain.c:3844) ==990910== by 0x50CD81B: g_main_context_iterate (gmain.c:3917) - (cherry picked from commit e3e837a8a777a3c4404f8d598eb68c7467f53b19) - src/mm-broadband-modem-qmi.c | 1 + 1 file changed, 1 insertion(+) -commit 25938fbc226c50cdfdaa7f091bb03e729c1f6861 +commit fbc1e3f89e89ba980417a77df8987425a654ec55 +Author: Aleksander Morgado +Date: Thu Jan 2 11:59:42 2020 +0100 + + device: don't reprobe if device is gone + + When a QMI/MBIM device is unplugged, we first get the notification + from the proxy that the communication is broken, and then we get the + kernel event reporting that the cdc-wdm port is gone. + + If we reprobe the device as soon as the proxy notifies us that the + communication is broken, we would end up trying to reprobe the cdc-wdm + port when it's already gone, and we end up trying to create a modem + object when we shouldn't: + + [1577963152.429386] (ttyUSB0) unexpected port hangup! + [1577963152.429506] (ttyUSB0) forced to close port + [1577963152.429546] (ttyUSB0) device open count is 0 + (close) + [1577963152.429582] (ttyUSB0) closing serial port... + [1577963152.429653] (ttyUSB0) serial port closed + [1577963152.430340] (ttyUSB2) unexpected port hangup! + [1577963152.430391] (ttyUSB2) forced to close port + [1577963152.430418] (ttyUSB2) device open count is 0 + (close) + [1577963152.430451] (ttyUSB2) closing serial port... + [1577963152.430517] (ttyUSB2) serial port closed + [1577963152.436932] (tty/ttyUSB0): released by device + '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-3' + [1577963152.439176] (tty/ttyUSB1): released by device + '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-3' + [1577963152.440409] (tty/ttyUSB2): released by device + '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-3' + [1577963152.447977] (net/wwan1): released by device + '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-3' + Cannot read from istream: connection broken + [1577963152.458878] Connection to qmi-proxy for + /dev/cdc-wdm1 lost, reprobing + [1577963152.459144] [device + /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3] unexported modem + from path '/org/freedesktop/ModemManager1/Modem/1' + [1577963152.460151] (ttyUSB1) forced to close port + [1577963152.460182] [device + /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3] creating modem + with plugin 'Sierra' and '1' ports + [1577963152.460199] QMI-powered Sierra modem found... + [1577963152.460382] (cdc-wdm1) type 'qmi' claimed by + /sys/devices/pci0000:00/0000:00:14.0/usb2/2-3 + [1577963152.460417] Modem (Sierra) + '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-3' completely disposed + [1577963152.460431] Could not recreate modem for device + '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-3': Failed to find + a net port in the QMI modem + [1577963152.460526] Modem (Sierra) + '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-3' completely disposed + [1577963152.460627] (usbmisc/cdc-wdm1): released by device + '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-3' + [1577963152.460666] Removing empty device + '/sys/devices/pci0000:00/0000:00:14.0/usb2/2-3' + + Fix this by delaying the reprobing attempt some time, and make sure we + cancel the reprobing if the device detects that all ports are gone. + + src/mm-device.c | 40 +++++++++++++++++++++++++++------------- + 1 file changed, 27 insertions(+), 13 deletions(-) + +commit 941879b43af4848b444fd299ec18fb4d92729642 +Author: Aleksander Morgado +Date: Thu Jan 2 11:48:20 2020 +0100 + + device: keep reference to object manager server + + Instead of having the reference to the object manager server only + while the modem is exported, just keep a reference for as long as the + device object exists. This will make it easier to handle reprobing + logic. + + src/mm-base-manager.c | 10 ++++---- + src/mm-device.c | 67 + +++++++++++++++++++++++++++------------------------ + src/mm-device.h | 28 ++++++++++----------- + 3 files changed, 55 insertions(+), 50 deletions(-) + +commit debec6f650e395eaa722da62ce89dab2d754a059 +Author: Aleksander Morgado +Date: Wed Dec 18 15:54:28 2019 +0100 + + iface-modem-3gpp: forced registration is not state + + The request for forced registration is an implementation detail of + mm_iface_modem_3gpp_register_in_network(), not part of any state to + keep in the private info. + + src/mm-iface-modem-3gpp.c | 11 +++++------ + src/mm-iface-modem-3gpp.h | 1 + + src/mm-iface-modem-simple.c | 1 + + 3 files changed, 7 insertions(+), 6 deletions(-) + +commit 88983fd1572cc912ad0f905caf172a976f6433f0 +Author: Aleksander Morgado +Date: Wed Dec 18 15:02:37 2019 +0100 + + cinterion: use common re-registration logic when needed + + If the modem requires +COPS re-registration after setting modes, + use the common logic provided by the 3GPP interface, which + already knows e.g. whether the registration was automatic or the + actual requested operator id in case of being manual. + + plugins/cinterion/mm-broadband-modem-cinterion.c | 89 + +++++------------------- + 1 file changed, 18 insertions(+), 71 deletions(-) + +commit a1966222e9df597f5b6ab98cc383b7065463967e +Author: Aleksander Morgado +Date: Wed Dec 18 14:56:50 2019 +0100 + + ublox: use common re-registration logic when needed + + If the modem requires +COPS re-registration after setting bands or + modes, use the common logic provided by the 3GPP interface, which + already knows e.g. whether the registration was automatic or the + actual requested operator id in case of being manual. + + This will also make the u-blox plugin use the common +COPS set command + implemented in the broadband modem object, which has the fallback to + use the MCCMNC encoded in the current charset if needed. + + plugins/ublox/mm-broadband-modem-ublox.c | 110 + ++++++------------------------- + 1 file changed, 21 insertions(+), 89 deletions(-) + +commit 32fcac5ce7f76dae7b1eafbd663d1eb2970b5567 +Author: Aleksander Morgado +Date: Wed Dec 18 14:50:13 2019 +0100 + + iface-modem-3gpp: allow re-registering in network with last settings + + This is going to be used by modems that require this operation + e.g. after changing access technology or bands. + + src/mm-iface-modem-3gpp.c | 47 + +++++++++++++++++++++++++++++++++++++++++++++-- + src/mm-iface-modem-3gpp.h | 24 ++++++++++++++++-------- + 2 files changed, 61 insertions(+), 10 deletions(-) + +commit 4862e42c86505cc607989bd30c2ce25390786321 +Author: Aleksander Morgado +Date: Wed Dec 18 14:39:20 2019 +0100 + + iface-modem-3gpp: fix manual re-registration to the same operator + + We should not assume that a manual registration request to a given + operator is successful if the modem is already registered in that + operator, because if the registration was due to an automatic process, + we cannot make sure the modem won't roam to a different network. + + We should only assume that a manual registration is not needed to be + relaunched if the modem is already registered in the requested network + AND if the registration process was manual (i.e. we asked the modem to + lock into a given network). + + src/mm-iface-modem-3gpp.c | 29 ++++++++++++++--------------- + 1 file changed, 14 insertions(+), 15 deletions(-) + +commit 19618b4f51703b774c54a9ddb17187554294259d +Author: Aleksander Morgado +Date: Wed Dec 18 14:30:31 2019 +0100 + + iface-modem-3gpp: refactor private data handling + + Instead of having separate contexts for different things, setup a + interface-wide private struct. + + src/mm-iface-modem-3gpp.c | 488 + +++++++++++++++++++++------------------------- + 1 file changed, 226 insertions(+), 262 deletions(-) + +commit cf9afc32208ca4068fc2e0a2daa088c15160e9cb +Author: Aleksander Morgado +Date: Wed Dec 18 12:11:22 2019 +0100 + + broadband-modem: retry +COPS=1,2, with current charset + + If the modem (e.g. u-blox LARA) returns a "Not supported" error when + attempting to run +COPS=1,2, with the MCCMNC encoded in ASCII + (and current charset is different, e.g. UCS2), then attempt to re-run + the same command with the MCCMNC encoded in the explicit current + charset. + + (ttyACM0): --> 'AT+COPS=1,2,"21404"' + (ttyACM0): <-- '+CME ERROR: 4' + Got failure code 4: Operation not supported + (ttyACM0): --> 'AT+COPS=1,2,"00320031003400300034"' + (ttyACM0): <-- '+CME ERROR: 111 + + src/mm-broadband-modem.c | 111 + ++++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 91 insertions(+), 20 deletions(-) + +commit 1722915f5eae0efa7b02540dadfbcaef4f513633 +Author: Aleksander Morgado +Date: Wed Dec 18 10:59:05 2019 +0100 + + broadband-modem: +COPS=? response may give strings in UCS2 + + If the charset selected via CSCS is UCS2, the modem may decide to + return all the strings in the +COPS=? response in UCS2: + + (ttyACM0): --> 'AT+COPS=?' + (ttyACM0): <-- '+COPS: + (2,"004D006F007600690073007400610072","004D006F007600690073007400610072","00320031003400300037",7) + Found network '00320031003400300037' + ('004D006F007600690073007400610072','004D006F007600690073007400610072'); + availability: current, access tech: lte + + src/mm-broadband-modem.c | 2 +- + src/mm-modem-helpers.c | 10 ++++- + src/mm-modem-helpers.h | 5 ++- + src/tests/test-modem-helpers.c | 98 + ++++++++++++++++++++++++++++-------------- + 4 files changed, 78 insertions(+), 37 deletions(-) + +commit a23040756b3aeae0fd202b77cfe29d8a272582fe +Author: Aleksander Morgado +Date: Wed Dec 18 10:51:59 2019 +0100 + + novatel-lte: fallback to parent scan method + + There is no need to run +COPS=? in the same way as the parent does it, + just fallback to the parent implementation. + + plugins/novatel/mm-broadband-modem-novatel-lte.c | 47 + ++++++++++-------------- + 1 file changed, 19 insertions(+), 28 deletions(-) + +commit baa68f5a4aead320ed2c1a7debfc624cdd2a5e48 +Author: Aleksander Morgado +Date: Mon Jan 6 14:46:36 2020 +0100 + + libmm-glib,simple-connect-properties: cleaner error handling + + If processing a key-value pair as a bearer property fails, we need to + know if it failed due to the key being unknown or due to some other + reason (e.g. failure parsing value of a known key). + + We'll only try with the Simple.Connect properties if the key is + reported as unknown in the bearer properties. + + This will help us better identify errors if e.g. an invalid value is + given to a known key. E.g. "yes" was invalid for allow-roaming here: + + daemon.notice netifd: wan (30476): simple + connect=apn=internet,ip-type=ipv4,allow-roaming=yes + daemon.notice netifd: wan (30476): Error parsing connect string: + 'Invalid properties string, unexpected key 'allow-roaming'' + + libmm-glib/mm-bearer-properties.c | 4 ++-- + libmm-glib/mm-simple-connect-properties.c | 18 +++++++++++++++--- + 2 files changed, 17 insertions(+), 5 deletions(-) + +commit 15e8a78a15e458efae781d4905134e07043aad25 Author: Aleksander Morgado Date: Mon Jan 6 14:39:45 2020 +0100 @@ -733,12 +15538,10 @@ This also goes inline with e.g. the --create-bearer help in the man page that suggests using yes/no for the allow-roaming setting. - (cherry picked from commit 15e8a78a15e458efae781d4905134e07043aad25) - libmm-glib/mm-common-helpers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -commit 46d305823714de57a549a2a22aa918e21ff5843a +commit 0d8a5e2a43e6baff0c282a3d2b15d03063c48199 Author: Aleksander Morgado Date: Fri Jan 3 22:25:44 2020 +0100 @@ -750,12 +15553,60 @@ Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/172 - (cherry picked from commit 0d8a5e2a43e6baff0c282a3d2b15d03063c48199) - src/mm-iface-modem-voice.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -commit 4ea5184d4850b5da709f71e9b8e37b5219982704 +commit b774cbe658c6e7e0eba169d72c2cbee9764eddc1 +Author: Aleksander Morgado +Date: Fri Jan 3 20:43:45 2020 +0100 + + build: bump copyright years to 2020 + + cli/mmcli.c | 2 +- + docs/reference/api/ModemManager-docs.xml | 1 + + docs/reference/libmm-glib/libmm-glib-docs.xml | 1 + + src/mm-context.c | 2 +- + 4 files changed, 4 insertions(+), 2 deletions(-) + +commit 70910a6713fed1996afbde69d0be18ac55ae8244 +Author: Aleksander Morgado +Date: Wed Jan 1 09:22:41 2020 +0100 + + libmm-glib,nmea: deprecate mm_location_gps_nmea_build_full() + + The new mm_location_gps_nmea_get_traces() is a much more generic way + to retrieve the full list of traces and suits the libmm-glib API much + better. + + libmm-glib/mm-location-gps-nmea.c | 9 ++++++++- + libmm-glib/mm-location-gps-nmea.h | 6 +++++- + 2 files changed, 13 insertions(+), 2 deletions(-) + +commit 6c1991e93063181e152c20eb69500cef8e9b1a37 +Author: Aleksander Morgado +Date: Wed Jan 1 09:13:45 2020 +0100 + + cli,location: use new mm_location_gps_nmea_get_traces() + + cli/mmcli-modem-location.c | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +commit 9805ffe1b0ecac78fd7009717ad4be623e74c68a +Author: Aleksander Morgado +Date: Tue Dec 31 16:41:28 2019 +0100 + + libmm-glib,nmea: new method to get list of traces + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/120 + + docs/reference/libmm-glib/libmm-glib-sections.txt | 1 + + libmm-glib/mm-location-gps-nmea.c | 36 + +++++++++++++++++++++++ + libmm-glib/mm-location-gps-nmea.h | 7 +++-- + 3 files changed, 41 insertions(+), 3 deletions(-) + +commit 21e5b1d68336ec5a19f71e36c035e19d29623ca2 Author: Aleksander Morgado Date: Tue Dec 31 15:40:13 2019 +0100 @@ -769,12 +15620,10 @@ See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/merge_requests/178#note_330017 - (cherry picked from commit 21e5b1d68336ec5a19f71e36c035e19d29623ca2) - src/mm-port-serial.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) -commit 160821383eedccf7e7e2ae1a3cfeb028df7b15ae +commit 7a398214f9a4d85399d082634d08b2f47a8b7778 Author: Aleksander Morgado Date: Sat Dec 21 09:45:08 2019 +0100 @@ -808,12 +15657,36 @@ Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/169 - (cherry picked from commit 7a398214f9a4d85399d082634d08b2f47a8b7778) - src/mm-iface-modem-simple.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) -commit 7d3adeca4d9feee55e74831a086e88ae49886efd +commit d83c018f9825d4244cc4254ff729e64172afbc2e +Author: Aleksander Morgado +Date: Tue Dec 17 10:45:52 2019 +0100 + + core,tests: new test to make sure all error codes are supported + + Defining the new error codes in the headers is not enough, we also + need to add support in the error helpers in order to create proper + GErrors with the expected error codes. + + .gitignore | 1 + + src/tests/Makefile.am | 1 + + src/tests/test-error-helpers.c | 86 + ++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 88 insertions(+) + +commit 9991f2906fcaeb7c86740f3d0d19c82dc0ac86f9 +Author: Aleksander Morgado +Date: Tue Dec 17 10:47:04 2019 +0100 + + core,error-helpers: add missing ME error codes + + src/mm-error-helpers.c | 132 + +++++++++++++++++++++++++++++++------------------ + 1 file changed, 83 insertions(+), 49 deletions(-) + +commit ab007960092f5c494a790ce496d15858a236bb58 Author: Aleksander Morgado Date: Wed Dec 11 15:46:09 2019 +0100 @@ -843,42 +15716,10 @@ modem is not connected. The actual conncheck and stat update timeouts will be removed once completely disconnected, as it was before. - (cherry picked from commit ab007960092f5c494a790ce496d15858a236bb58) - src/mm-base-bearer.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) -commit 5af2002233b71a580f15d6151195fd43fe4cd009 -Author: Aleksander Morgado -Date: Tue Dec 17 10:45:52 2019 +0100 - - core,tests: new test to make sure all error codes are supported - - Defining the new error codes in the headers is not enough, we also - need to add support in the error helpers in order to create proper - GErrors with the expected error codes. - - (cherry picked from commit d83c018f9825d4244cc4254ff729e64172afbc2e) - - .gitignore | 1 + - src/tests/Makefile.am | 1 + - src/tests/test-error-helpers.c | 86 - ++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 88 insertions(+) - -commit b75010a0ee2f886d1b706818ea692c21b1d88570 -Author: Aleksander Morgado -Date: Tue Dec 17 10:47:04 2019 +0100 - - core,error-helpers: add missing ME error codes - - (cherry picked from commit 9991f2906fcaeb7c86740f3d0d19c82dc0ac86f9) - - src/mm-error-helpers.c | 132 - +++++++++++++++++++++++++++++++------------------ - 1 file changed, 83 insertions(+), 49 deletions(-) - -commit bfcb8a212ea5760f012a7a472b301350a1f28423 +commit 7d1e949137bf5d7d354f8d4508f876b2a07312fc Author: Aleksander Morgado Date: Thu Dec 12 10:59:29 2019 +0100 @@ -891,13 +15732,11 @@ Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/166 - (cherry picked from commit 7d1e949137bf5d7d354f8d4508f876b2a07312fc) - plugins/ublox/mm-broadband-bearer-ublox.c | 32 +++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) -commit 8bb8a89b27f4dcc6f2bb0475dbba5e5b839829a5 +commit f157d02fc668777ccd7de559c6e1b8400c102412 Author: Aleksander Morgado Date: Mon Dec 16 14:32:44 2019 +0100 @@ -913,12 +15752,10 @@ that 151 isn't defined to a different meaning in the specs, let's define it in the same way as 171. - (cherry picked from commit f157d02fc668777ccd7de559c6e1b8400c102412) - include/ModemManager-errors.h | 2 ++ 1 file changed, 2 insertions(+) -commit 5eb69716765c35ca91da485e53c4504e921b8b7d +commit fcbffbd1231052fb3ea543382b59ad195cc45211 Author: Aleksander Morgado Date: Fri Dec 13 18:04:02 2019 +0100 @@ -937,15 +15774,13 @@ There is no API break in libmm-glib. - (cherry picked from commit fcbffbd1231052fb3ea543382b59ad195cc45211) - docs/reference/libmm-glib/libmm-glib-sections.txt | 2 ++ examples/network-scan-python/network-scan-python | 10 +++++----- libmm-glib/mm-modem-3gpp.c | 17 +++++++++++++++++ libmm-glib/mm-modem-3gpp.h | 7 +++++++ 4 files changed, 31 insertions(+), 5 deletions(-) -commit bd1fb1e1a1a1fd1660184983264d833394c456c3 +commit 248cd55f0e5d2a125569f9e7974a43d6b895d6de Author: Aleksander Morgado Date: Fri Dec 13 15:38:33 2019 +0100 @@ -969,8 +15804,6 @@ free(): invalid pointer Aborted - (cherry picked from commit 248cd55f0e5d2a125569f9e7974a43d6b895d6de) - configure.ac | 1 + examples/Makefile.am | 2 +- examples/network-scan-python/Makefile.am | 4 ++ @@ -979,7 +15812,7 @@ ++++++++++++++++++++++++ 5 files changed, 79 insertions(+), 1 deletion(-) -commit db6279d453a1a942377c1db297174318b75cf355 +commit f9e26fb54b96921fcb5f3cc7647ba4c4ff14085f Author: Aleksander Morgado Date: Thu Dec 12 14:53:44 2019 +0100 @@ -990,12 +15823,10 @@ This change is plain wrong. The correct order was already fixed in commit 42dab8e8. - (cherry picked from commit f9e26fb54b96921fcb5f3cc7647ba4c4ff14085f) - test/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -commit bfd8c2fc1f75278cf9e46102539f46f5b08f2fd8 +commit 3eb623e73b546a444c1fc717f4ed105b3b2d5eae Author: Aleksander Morgado Date: Wed Dec 11 16:09:25 2019 +0100 @@ -1004,39 +15835,78 @@ Solving build issues with truly strict linkers, as in: http://lists.busybox.net/pipermail/buildroot/2019-December/268817.html - (cherry picked from commit 3eb623e73b546a444c1fc717f4ed105b3b2d5eae) - test/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -commit ae3a17c7497f09637eb4e007224f0369f0ed2a18 +commit 42aa9cc2f6d4de62e180e6f2b4b8989da009490b Author: Aleksander Morgado -Date: Tue Dec 10 13:54:34 2019 +0100 +Date: Thu Dec 5 14:39:57 2019 +0100 - build: post-release version bump to 1.12.3 + ublox: implement support to enable and detect +UUDTMF URCs - configure.ac | 2 +- + Also, make sure we enable/disable the voice related unsolicited events + in both primary and secondary ports, because it may happen that the + primary port is connected with PPP and we're using the secondary port + for control. + + plugins/ublox/mm-broadband-modem-ublox.c | 363 + +++++++++++++++++++++++++++---- + 1 file changed, 325 insertions(+), 38 deletions(-) + +commit 8d96d1d6604bbe9dd010912f9f23d7db73de0561 +Author: Aleksander Morgado +Date: Thu Dec 5 15:44:21 2019 +0100 + + cinterion: fix using correct finish() method in AT command + + When using mm_base_modem_at_command_full(), the corresponding + mm_base_modem_at_command_full_finish() should be used. + + plugins/cinterion/mm-shared-cinterion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit dc0f43e71f63e832c708ffd3db3e706302fe376c +commit 5f0f2cb9d97b28f873a521128393532c8524d054 Author: Aleksander Morgado -Date: Tue Dec 10 12:26:56 2019 +0100 +Date: Thu Dec 5 15:04:02 2019 +0100 - release: bump version to 1.12.2 + base-call: do not require primary port to start a call - configure.ac | 2 +- + If the modem is connected using the primary port, we can just rely on + the secondary port. + + # mmcli --call 0 --start + error: couldn't start the call: + 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Connected: + Cannot run sequence: port is connected' + + src/mm-base-call.c | 23 ++++++++++++++++------- + 1 file changed, 16 insertions(+), 7 deletions(-) + +commit 0660b6b16270c4d8144f046b7f84783d6cbb7f70 +Author: Aleksander Morgado +Date: Wed Dec 4 10:10:39 2019 +0100 + + broadband-modem: trivial fix in logging +CLIP setting + + src/mm-broadband-modem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit 1ffbde4f0a6058d9fd87397a3975e742a46b9d24 +commit 28869463a1f93d980c72ae4e8c7997c9be899535 Author: Aleksander Morgado -Date: Tue Dec 10 12:26:33 2019 +0100 +Date: Tue Dec 3 09:55:07 2019 +0100 + + iface-modem: allow Command() while in Failed state - NEWS: update for 1.12.2 + Allow the generic command API while in FAILED state, in case the modem + integrator has some special commands to recover the device. - NEWS | 46 ++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 46 insertions(+) + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/163 -commit 77b6623bfe85de2c8f702098521e5e3a243f5a7f + src/mm-iface-modem.c | 5 ----- + 1 file changed, 5 deletions(-) + +commit 03e6375a95ace2c1c1ecd8b621fc90b7e86ebe8b Author: Aleksander Morgado Date: Mon Dec 2 16:10:44 2019 +0100 @@ -1093,12 +15963,10 @@ | access tech: 'lte' | signal quality: '96' (recent) - (cherry picked from commit 03e6375a95ace2c1c1ecd8b621fc90b7e86ebe8b) - src/mm-bearer-qmi.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) -commit 267f64d6623adc12471139c7e6f581b8de1a4c01 +commit 76cafbb603599a9f19592daca50e00c6e960998e Author: Aleksander Morgado Date: Mon Dec 2 13:07:23 2019 +0100 @@ -1114,14 +15982,12 @@ QMI bearer: this bearer is not connected'. Will assume disconnected anyway. - (cherry picked from commit 76cafbb603599a9f19592daca50e00c6e960998e) - src/mm-bearer-mbim.c | 20 ++++++++------------ src/mm-bearer-qmi.c | 13 +++++-------- src/mm-broadband-bearer.c | 28 ++++++++++------------------ 3 files changed, 23 insertions(+), 38 deletions(-) -commit 89356ec51d2db800cb518e167149bfabd80904aa +commit 991e615736c1b467d7ab7041f0475297e6ef86d2 Author: Aleksander Morgado Date: Mon Nov 25 10:40:10 2019 +0100 @@ -1136,13 +16002,11 @@ Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/155 - (cherry picked from commit 991e615736c1b467d7ab7041f0475297e6ef86d2) - src/mm-bearer-qmi.c | 97 +++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 75 insertions(+), 22 deletions(-) -commit 7e028ba1197564d7c6f6740c22420ea7227d24e0 +commit ae53b0458bd5ca110c04aef42069e9e7b4cd2af5 Author: Aleksander Morgado Date: Mon Nov 25 10:37:42 2019 +0100 @@ -1151,13 +16015,11 @@ Refactor the logic and setup a common complete_connect() method that helps us complete the GTask associated to the connection attempt. - (cherry picked from commit ae53b0458bd5ca110c04aef42069e9e7b4cd2af5) - src/mm-bearer-qmi.c | 131 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 76 insertions(+), 55 deletions(-) -commit d91f4b5f0e2635414adb8448c4654c652065d9b5 +commit 2790074c7e00b94f5079ba7bda8911a12ab0e28c Author: Aleksander Morgado Date: Mon Nov 25 10:04:18 2019 +0100 @@ -1168,24 +16030,100 @@ that, and make sure we close it during normal disconnection or if the connection attempt fails. - (cherry picked from commit 2790074c7e00b94f5079ba7bda8911a12ab0e28c) - src/mm-bearer-qmi.c | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) -commit 7b27fde4526097b7fe2120bca5b436e8ffd1d9e9 +commit 32d1f1dedabf3567af3519cc3f0bf6df355b3889 +Author: Aleksander Morgado +Date: Wed Apr 9 15:57:13 2014 +0200 + + sierra: implement manual CDMA activation + + plugins/sierra/mm-broadband-modem-sierra.c | 157 + +++++++++++++++++++++++++++++ + 1 file changed, 157 insertions(+) + +commit af08492209bcc5a027112835321c9b93472b8443 +Author: Aleksander Morgado +Date: Wed Apr 9 15:47:11 2014 +0200 + + sierra: implement automatic CDMA activation + + plugins/sierra/mm-broadband-modem-sierra.c | 137 + +++++++++++++++++++++++++++++ + 1 file changed, 137 insertions(+) + +commit 8fa622ddbb136999e4dd89c15a06a7ddc7f173d3 +Author: Aleksander Morgado +Date: Thu Apr 3 22:17:01 2014 +0200 + + novatel: implement manual CDMA activation + + Including IOTA-based update, e.g. for Sprint. + + plugins/novatel/mm-broadband-modem-novatel.c | 213 + +++++++++++++++++++++++++++ + 1 file changed, 213 insertions(+) + +commit 5712c71593067bc1d60146f7031cbff08406492f +Author: Aleksander Morgado +Date: Thu Apr 3 16:23:37 2014 +0200 + + novatel: implement automatic CDMA activation + + plugins/novatel/mm-broadband-modem-novatel.c | 76 + ++++++++++++++++++++++++++++ + 1 file changed, 76 insertions(+) + +commit 2bcd1e42719a731b2fbdb84998832a87ecebd3bf +Author: Aleksander Morgado +Date: Thu Nov 28 13:51:49 2019 +0100 + + iface-modem-cdma: don't allow multiple concurrent activation attempts + + src/mm-iface-modem-cdma.c | 88 + +++++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 78 insertions(+), 10 deletions(-) + +commit bfa5fd660c9b66aa91acfa9268c5c41ba1e8fdac +Author: Aleksander Morgado +Date: Sat Jul 5 07:06:05 2014 +0200 + + iface-modem-cdma: disallow empty carrier code in automatic activation + + src/mm-iface-modem-cdma.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +commit e60132284be762323519e6a2b3f3f4d91ee5382b +Author: Aleksander Morgado +Date: Wed Apr 9 18:22:36 2014 +0200 + + libmm-glib: SID value '0' is actually a good one + + libmm-glib/mm-cdma-manual-activation-properties.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit f7418da3bc26dbbd03a3961f48462e8577fc944e Author: Aleksander Morgado Date: Fri Oct 18 12:12:46 2019 +0200 huawei: avoid using the QCDM port during a voice call - (cherry picked from commit f7418da3bc26dbbd03a3961f48462e8577fc944e) - plugins/huawei/mm-broadband-modem-huawei.c | 52 +++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) -commit 6f4fbd20a131e175da17292a59860fdf5a50bc1e +commit 09619e8cc437ee9449a2e5228af07a86ebafd07f +Author: Aleksander Morgado +Date: Mon Dec 2 12:38:30 2019 +0100 + + data: added valgrind suppressions file imported from NM + + data/valgrind.suppressions | 487 + +++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 487 insertions(+) + +commit 9e785e145f4f48907bee9d350aae2961037b3a23 Author: Aleksander Morgado Date: Mon Dec 2 12:27:19 2019 +0100 @@ -1205,137 +16143,166 @@ | operator name: 901 70 | emergency numbers: - (cherry picked from commit 9e785e145f4f48907bee9d350aae2961037b3a23) - cli/mmcli-output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit 59c0d319e88e0c0873374e019431281f239b5de6 +commit a28f88b6846b352b055ed692082542e5c459c400 +Author: Aleksander Morgado +Date: Thu Nov 28 22:25:36 2019 +0100 + + broadband-modem-mbim: implement reset in Intel-based devices + + src/mm-broadband-modem-mbim.c | 118 + +++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 116 insertions(+), 2 deletions(-) + +commit 9ef658f697c53f51df220378de0efa14968588ff Author: Aleksander Morgado Date: Thu Nov 28 17:17:21 2019 +0100 iface-modem-voice: plug task memleaks when returning error if cancelled - (cherry picked from commit 9ef658f697c53f51df220378de0efa14968588ff) - src/mm-iface-modem-voice.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -commit d7fc2b8c7cb8535f6115c2baf67c4564cd9c36a2 +commit dc3bd91b53abbe9b9592812a8e6935016204a903 Author: Aleksander Morgado Date: Thu Nov 28 14:58:31 2019 +0100 broadband-modem-mbim: plug task leak when completing USSD operation - (cherry picked from commit dc3bd91b53abbe9b9592812a8e6935016204a903) - src/mm-broadband-modem-mbim.c | 1 + 1 file changed, 1 insertion(+) -commit 9585402820645863a359bc8f5ee1443ecf9c69bc +commit d27b108efbc32343444bc8d4c3976ebfbee9369c Author: Aleksander Morgado -Date: Mon Nov 25 09:48:05 2019 +0100 +Date: Thu Nov 28 14:47:21 2019 +0100 - bearer-qmi: plug memleaks when connection attempt fails early + iface-modem-signal: avoid logging about signal refresh context if + not enabled - The data and qmi objects were not being correctly disposed on several - error conditions. + src/mm-iface-modem-signal.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) - (cherry picked from commit c523d5bdc31946f4106976c4f38f34b8f61690d7) +commit 551f0e0250e4610200d9b79a7543948424002d46 +Author: Aleksander Morgado +Date: Wed Nov 27 17:30:07 2019 +0100 - src/mm-bearer-qmi.c | 32 +++++++++++++++----------------- - 1 file changed, 15 insertions(+), 17 deletions(-) + port-mbim: before attempting to use QMI over MBIM, check device + services + + If we blindly try to use QMI over MBIM on devices that don't support + it, the logic works ok but it's very slow, given that the QMI device + open operation has several internal retries, and all those end up + timing out. + + Avoid that lost time by checking the list of services supported by the + MBIM modem, and if the QMI over MBIM service is not listed, we'll + avoid trying to open the QMI device right away. -commit b7a653b64bcb86240094c2a1f59360658d12c9a6 + src/mm-port-mbim.c | 108 + ++++++++++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 95 insertions(+), 13 deletions(-) + +commit 792f15648ca30a15097c7c90c4ebfd1cc0a13d30 Author: Aleksander Morgado -Date: Wed Nov 27 08:56:14 2019 +0100 +Date: Fri Nov 22 13:59:45 2019 +0100 - broadband-modem-mbim: avoid LTE attach config/status if unsupported + ci: redefine when jobs are run - If we know that the LTE attach status/configuration CIDs in the Basic - Connect Extensions service are unsupported, don't even try to use - them, so that we avoid timeouts in the requests. + * single-plugin builds only on schedules + * with/without qmi/mbim builds on master and merge requests + * default build always, including on branches and when git pushing - (cherry picked from commit 8f21f40674d7b33b58762fff2e7a8487d6b7efbd) + .gitlab-ci.yml | 28 ++++++++++++++++++++++++++-- + 1 file changed, 26 insertions(+), 2 deletions(-) - src/mm-broadband-modem-mbim.c | 49 - ++++++++++++++++++++++++++++++++----------- - 1 file changed, 37 insertions(+), 12 deletions(-) +commit c4991165c262d3e8cc1c1cac3c5a63cce9aaf524 +Author: Aleksander Morgado +Date: Fri Nov 22 13:55:14 2019 +0100 -commit 0fe780ef56fe4dfabdbc89cd715045c5eae6498b -Author: Rafael Fontenelle -Date: Mon Nov 25 03:20:20 2019 +0000 + ci: new job to build all single-plugin configurations - po: update Brazilian Portuguese translation + .gitlab-ci.yml | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + +commit 09080073ff724cf7a13e23edd1dfef7c8c98f727 +Author: Aleksander Morgado +Date: Thu Nov 21 18:28:51 2019 +0100 - (cherry picked from commit 95dd8aaf9043a70bc7fb84c01b57af2d7578666b) + build: setup plugin selection logic - po/pt_BR.po | 19 +++++++++---------- - 1 file changed, 9 insertions(+), 10 deletions(-) + configure.ac | 130 ++++- + m4/mm-enable-plugin.m4 | 57 ++ + plugins/Makefile.am | 1100 + ++++++++++++++++++++++----------------- + plugins/tests/test-keyfiles.c | 5 + + plugins/tests/test-udev-rules.c | 80 ++- + 5 files changed, 893 insertions(+), 479 deletions(-) -commit f5d973233d3553cfa20333cbc09982c465ebebce +commit 1d1f597b5534d01d2df61a1543ed549ac9a3621b Author: Aleksander Morgado Date: Sun Nov 17 14:38:57 2019 +0100 telit: setup as loadable 'shared' utils - (cherry picked from commit 1d1f597b5534d01d2df61a1543ed549ac9a3621b) - plugins/Makefile.am | 184 +++++++++++++++++++++++----------------------- plugins/telit/mm-shared.c | 20 +++++ 2 files changed, 114 insertions(+), 90 deletions(-) -commit 23edb526a905801a7e635118fb14e7186fea3fa5 +commit 7bcb8c951597e0c78df3980f9778942391e79324 +Author: Aleksander Morgado +Date: Sun Nov 17 14:26:02 2019 +0100 + + foxconn: setup as loadable 'shared' utils + + plugins/Makefile.am | 11 ++++++----- + plugins/foxconn/mm-shared.c | 20 ++++++++++++++++++++ + 2 files changed, 26 insertions(+), 5 deletions(-) + +commit fce7892058dbe027089ec03909eab739e00af03e Author: Aleksander Morgado Date: Sun Nov 17 14:22:11 2019 +0100 xmm: setup as loadable 'shared' utils - (cherry picked from commit fce7892058dbe027089ec03909eab739e00af03e) - plugins/Makefile.am | 14 +++++++------- plugins/xmm/mm-shared.c | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+), 7 deletions(-) -commit a0eec9d66831c844fe668cdcc7b27a86b8ef467c +commit b765e88e5718ddaad968fb079bcc98f55808a353 Author: Aleksander Morgado Date: Sun Nov 17 14:14:17 2019 +0100 novatel: setup as loadable 'shared' utils - (cherry picked from commit b765e88e5718ddaad968fb079bcc98f55808a353) - plugins/Makefile.am | 10 +++++----- plugins/novatel/mm-shared.c | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) -commit 7f9a41beddfa98474a9dcc272d9db0c2a234943a +commit 2d779b97c4b7c79fff00f17d25b0c210de384f00 Author: Aleksander Morgado Date: Sun Nov 17 14:12:40 2019 +0100 option: setup as loadable 'shared' utils - (cherry picked from commit 2d779b97c4b7c79fff00f17d25b0c210de384f00) - plugins/Makefile.am | 10 +++++----- plugins/option/mm-shared.c | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) -commit 39b9ce58b8e0355869d64a15418094f42bc0ca5f +commit 23df25f25c2bb1fb6c4867152141219151bd1942 Author: Aleksander Morgado Date: Sun Nov 17 14:09:03 2019 +0100 sierra: setup as loadable 'shared' utils - (cherry picked from commit 23df25f25c2bb1fb6c4867152141219151bd1942) - plugins/Makefile.am | 12 ++++++------ plugins/sierra/mm-shared.c | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 6 deletions(-) -commit 4b408c35a82ba02b2ae0839c617c6e4fc210244e +commit 9907407fd1a5713f0366438394bd0e3776c2cf4e Author: Aleksander Morgado Date: Sun Nov 17 14:05:40 2019 +0100 @@ -1343,26 +16310,22 @@ The Ericsson MBM modem management is only used by the MBM plugin. - (cherry picked from commit 9907407fd1a5713f0366438394bd0e3776c2cf4e) - plugins/Makefile.am | 70 +++++++++++++++++++++-------------------------------- 1 file changed, 27 insertions(+), 43 deletions(-) -commit 24981162501d60ae4ce72982781576a7ab770e0f +commit a6d76cfcebab95c8e6338ab996df07b77f733e37 Author: Aleksander Morgado Date: Sun Nov 17 13:45:45 2019 +0100 icera: setup as loadable 'shared' utils - (cherry picked from commit a6d76cfcebab95c8e6338ab996df07b77f733e37) - plugins/Makefile.am | 15 +++++++-------- plugins/icera/mm-broadband-modem-icera.h | 2 ++ plugins/icera/mm-shared.c | 20 ++++++++++++++++++++ 3 files changed, 29 insertions(+), 8 deletions(-) -commit 7450665fb85fd95e7d56c86c86ee9ffc39dc887b +commit 8fcc470a5cdea2987536df9436e99a19a58473eb Author: Aleksander Morgado Date: Sun Nov 17 13:50:42 2019 +0100 @@ -1371,19 +16334,15 @@ Never do lazy loading, we'll always make sure that a plugin will only be fully loaded if all the symbols it requires are already available. - (cherry picked from commit 8fcc470a5cdea2987536df9436e99a19a58473eb) - src/mm-plugin-manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -commit b65f902861f168085a8fc0d3525d11996438fb17 +commit b1c3f1eb1c740975b3ea387ae5e08dc426643c8b Author: Aleksander Morgado Date: Sun Nov 17 13:45:07 2019 +0100 plugin-manager: dynamically load 'shared' util libraries - (cherry picked from commit b1c3f1eb1c740975b3ea387ae5e08dc426643c8b) - plugins/Makefile.am | 8 +++++ src/Makefile.am | 1 + src/mm-plugin-manager.c | 91 @@ -1391,40 +16350,142 @@ src/mm-shared.h | 35 +++++++++++++++++++ 4 files changed, 124 insertions(+), 11 deletions(-) -commit ec85ea32cb01c4e4c3922fb586b5cd9c143bcba2 +commit 1bd6980510e4f8f4471debff173845cd67fe8ccb Author: Aleksander Morgado -Date: Fri Nov 22 11:06:26 2019 +0100 +Date: Sun Nov 17 10:20:35 2019 +0100 - ci: require autoconf-archive + plugins: add README explaining plugin relationships - (cherry picked from commit 913f0d638d5380658c1ef008af67a69953323273) + plugins/README.txt | 155 + +++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 155 insertions(+) - .gitlab-ci.yml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) +commit 95dd8aaf9043a70bc7fb84c01b57af2d7578666b +Author: Rafael Fontenelle +Date: Mon Nov 25 03:20:20 2019 +0000 + + po: update Brazilian Portuguese translation + + po/pt_BR.po | 19 +++++++++---------- + 1 file changed, 9 insertions(+), 10 deletions(-) + +commit b4dcb76d5a924d0f49850a2115a377cd8ae6ccf5 +Author: Aleksander Morgado +Date: Wed Nov 13 15:16:42 2019 +0100 + + plugin-manager: allow new ports up to 1500ms since last port added + + Until now we had only a 2500ms timeout initialized since the first + port was exposed until we decided we were ready to consider all ports + notified by the kernel. + + With this new logic, we add an additional condition: even if the + 2500ms initial timeout has elapsed already, we leave an additional + 1500ms since the last port addition for new ports to appear. + + This new logic is useful when relying on the ReportKernelEvent() DBus + method, as it is the user the one responsible for reporting the kernel + events instead of udev. Now, the user is not forced to make sure all + ports are exposed in 2500ms; instead, we also allow ports to be + reported in more than 2500ms as long as the time between port + additions reported is less than 1500ms. + + Note that this does not mean that the whole probing time will now + always be 4000ms. On well behaved systems (like when based on udev) + this new 'extra' probing timeout may expire long before the 'min' + probing timeout we already had as well. + + E.g. in this setup, the reporting of the NET port was done 1100ms + later than the last ttyUSB3, and that was already too late as the + original 2500ms threshold had already expired. -commit 203217c6a6af3a868a98f917e14e856c95205cc0 + [1573536994.593874] (tty/ttyUSB0): first port in device + /sys/devices/platform/ehci-platform/usb1/1-1 + [1573536994.596659] [plugin manager] task 1: port grabbed: ttyUSB0 + [1573536995.093579] (tty/ttyUSB1): additional port in device + /sys/devices/platform/ehci-platform/usb1/1-1 + [1573536995.094172] [plugin manager] task 1: port grabbed: ttyUSB1 + [1573536995.603206] (tty/ttyUSB2): additional port in device + /sys/devices/platform/ehci-platform/usb1/1-1 + [1573536995.603822] [plugin manager] task 1: port grabbed: ttyUSB2 + [1573536996.111564] (tty/ttyUSB3): additional port in device + /sys/devices/platform/ehci-platform/usb1/1-1 + [1573536996.112257] [plugin manager] task 1: port grabbed: ttyUSB3 + [1573536996.814816] [device + /sys/devices/platform/ehci-platform/usb1/1-1] creating modem with + plugin 'Quectel' and '4' ports + [1573536997.265820] (net/wwan0): additional port in device + /sys/devices/platform/ehci-platform/usb1/1-1 + [1573536997.296935] (usbmisc/cdc-wdm0): additional port in device + /sys/devices/platform/ehci-platform/usb1/1-1 + + src/mm-plugin-manager.c | 52 + +++++++++++++++++++++++++++++++++++++++++++++---- + 1 file changed, 48 insertions(+), 4 deletions(-) + +commit 8f21f40674d7b33b58762fff2e7a8487d6b7efbd +Author: Aleksander Morgado +Date: Wed Nov 27 08:56:14 2019 +0100 + + broadband-modem-mbim: avoid LTE attach config/status if unsupported + + If we know that the LTE attach status/configuration CIDs in the Basic + Connect Extensions service are unsupported, don't even try to use + them, so that we avoid timeouts in the requests. + + src/mm-broadband-modem-mbim.c | 49 + ++++++++++++++++++++++++++++++++----------- + 1 file changed, 37 insertions(+), 12 deletions(-) + +commit c523d5bdc31946f4106976c4f38f34b8f61690d7 +Author: Aleksander Morgado +Date: Mon Nov 25 09:48:05 2019 +0100 + + bearer-qmi: plug memleaks when connection attempt fails early + + The data and qmi objects were not being correctly disposed on several + error conditions. + + src/mm-bearer-qmi.c | 32 +++++++++++++++----------------- + 1 file changed, 15 insertions(+), 17 deletions(-) + +commit 260d34be76a94b2562b7cbfda2af43bc1ed57c70 Author: Aleksander Morgado Date: Mon Nov 25 12:28:56 2019 +0100 bearer-qmi: plug memleaks during network disconnection - (cherry picked from commit 260d34be76a94b2562b7cbfda2af43bc1ed57c70) - src/mm-bearer-qmi.c | 2 ++ 1 file changed, 2 insertions(+) -commit 46bf6b38b93105ca41e309213a2f72a65bfd5608 +commit 7297b3fc90ec06023194aceae67e1c60e88801d4 +Author: Amol Lad +Date: Sat Nov 23 14:57:48 2019 +0530 + + mbim: release all allocated CIDs during shutdown + + src/mm-port-mbim.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +commit 913f0d638d5380658c1ef008af67a69953323273 +Author: Aleksander Morgado +Date: Fri Nov 22 11:06:26 2019 +0100 + + ci: require autoconf-archive + + .gitlab-ci.yml | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8f4b5b52ee905b856cd1a73adadfb8dc70342d4a Author: Amol Lad Date: Tue Nov 19 16:01:41 2019 +0530 sierra: add port hints for EM7565 modem - (cherry picked from commit 8f4b5b52ee905b856cd1a73adadfb8dc70342d4a) - plugins/sierra/77-mm-sierra.rules | 8 ++++++++ 1 file changed, 8 insertions(+) -commit 64b31d64c6824e33082cd947989f060be4b87d2f +commit 42dab8e827d84b86d0f7253ce68748758f29aef1 Author: Aleksander Morgado Date: Fri Nov 15 09:52:39 2019 +0100 @@ -1433,23 +16494,19 @@ Symbols are resolved forward, so if libhelpers depends on libmm-glib, it needs to be specified first. - (cherry picked from commit 42dab8e827d84b86d0f7253ce68748758f29aef1) - test/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -commit 288fb2e700cc8963576598324eefc804d7f647d8 +commit 16f40391595dfd880fc44260a4144d4b5952b429 Author: Aleksander Morgado Date: Fri Nov 15 09:26:17 2019 +0100 cli,modem: avoid using deprecated mm_pco_list_free() - (cherry picked from commit 16f40391595dfd880fc44260a4144d4b5952b429) - cli/mmcli-modem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit 772227506830735d48794726f0ffdaed127c8372 +commit 5e8c64d092e85f6d5479675499463464e1a42de6 Author: Aleksander Morgado Date: Wed Nov 13 18:20:27 2019 +0100 @@ -1470,12 +16527,10 @@ modem object. In this case, the ongoing attempt cancellable will still exist, so just clean it up as well. - (cherry picked from commit 5e8c64d092e85f6d5479675499463464e1a42de6) - src/mm-iface-modem-simple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -commit c8eebbce4177aef18b55b5f774d550d022e43852 +commit 3da82d10501aae216d3a77c85d2d42c9b0d8a6d1 Author: Aleksander Morgado Date: Wed Nov 13 15:32:04 2019 +0100 @@ -1484,12 +16539,10 @@ There is no need to wait for the minimum wait/probing time before we can cancel the device probing. - (cherry picked from commit 3da82d10501aae216d3a77c85d2d42c9b0d8a6d1) - src/mm-plugin-manager.c | 10 ++++++++++ 1 file changed, 10 insertions(+) -commit ea0e16220e3cea1b456479085563c1cdf8473483 +commit 76e862597cbffd6073523eeb842a886f5d5742e9 Author: Aleksander Morgado Date: Wed Nov 13 15:03:39 2019 +0100 @@ -1498,34 +16551,51 @@ The device port probings were being finished before the minimum probing time, making this timeout effectively useless. - (cherry picked from commit 76e862597cbffd6073523eeb842a886f5d5742e9) - src/mm-plugin-manager.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) -commit 090dc5ff9d5d74f2ec353816a96c387d0db06799 +commit d7d2b9108e12f86f50f82f124066fab46792bd44 +Author: Aleksander Morgado +Date: Tue Nov 12 10:55:06 2019 +0100 + + foxconn: new plugin to support the T77W968 + + The Dell DW5821e is really a re-branded Foxconn T77W968. + + configure.ac | 2 +- + plugins/Makefile.am | 51 +++++++-- + plugins/dell/mm-broadband-modem-dell-dw5821e.h | 49 -------- + plugins/dell/mm-plugin-dell.c | 16 +-- + plugins/foxconn/77-mm-foxconn-port-types.rules | 26 +++++ + .../mm-broadband-modem-foxconn-t77w968.c} | 104 + ++++++++--------- + .../foxconn/mm-broadband-modem-foxconn-t77w968.h | 49 ++++++++ + .../mm-foxconn-t77w968-carrier-mapping.conf} | 4 +- + plugins/foxconn/mm-plugin-foxconn.c | 127 + +++++++++++++++++++++ + plugins/foxconn/mm-plugin-foxconn.h | 46 ++++++++ + plugins/tests/test-keyfiles.c | 6 +- + 11 files changed, 355 insertions(+), 125 deletions(-) + +commit 5ab5593edbf86a268f9b6d196f30e303c1e1b879 Author: Yuri Chornoivan Date: Sun Nov 10 14:35:46 2019 +0200 uk: update Ukrainian translation - (cherry picked from commit 5ab5593edbf86a268f9b6d196f30e303c1e1b879) - po/uk.po | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) -commit a12779b2a5b13a63d1dbf9167332d5e5eb54bdba +commit 81daaa25be658c44fa1f656ae0c1ca61b1af76c8 Author: emintufan Date: Sun Nov 10 07:22:20 2019 +0000 po: update Turkish translation - (cherry picked from commit 81daaa25be658c44fa1f656ae0c1ca61b1af76c8) - po/tr.po | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) -commit c079f1f1d6df755749b8337975af3ad765329cf7 +commit ad371cecd1782894ab884f2d9843abc55471eb7a Author: Aleksander Morgado Date: Thu Nov 7 12:29:07 2019 +0100 @@ -1533,17 +16603,15 @@ Same port layout as the default one, just a different PID. - (cherry picked from commit ad371cecd1782894ab884f2d9843abc55471eb7a) - plugins/dell/77-mm-dell-port-types.rules | 6 +++++- plugins/dell/mm-plugin-dell.c | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) -commit 68593d4ad19f92850a5577e638450feba456f7c3 +commit 0c554aec9e58391ec5699d131e2f15b445510788 Author: Aleksander Morgado -Date: Wed Nov 6 13:16:57 2019 +0100 +Date: Wed Nov 6 13:15:47 2019 +0100 - build: post-release version bump to 1.12.1 + build: post-release version bump to 1.13.0 configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -Nru modemmanager-1.12.8/Makefile.am modemmanager-1.16.6/Makefile.am --- modemmanager-1.12.8/Makefile.am 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/Makefile.am 2021-06-06 21:40:59.000000000 +0800 @@ -13,6 +13,7 @@ vapi \ introspection \ test \ + tools \ examples \ docs \ $(NULL) diff -Nru modemmanager-1.12.8/Makefile.in modemmanager-1.16.6/Makefile.in --- modemmanager-1.12.8/Makefile.in 2020-03-14 17:16:02.000000000 +0800 +++ modemmanager-1.16.6/Makefile.in 2021-06-06 21:43:42.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,14 +90,14 @@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -108,7 +108,8 @@ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = \ + tools/tests/services/org.freedesktop.ModemManager1.service CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -145,8 +146,8 @@ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)config.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -168,9 +169,10 @@ CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/tools/tests/services/org.freedesktop.ModemManager1.service.in \ ABOUT-NLS AUTHORS COPYING COPYING.LIB ChangeLog INSTALL NEWS \ README TODO compile config.guess config.rpath config.sub \ - depcomp install-sh ltmain.sh missing + install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) @@ -209,6 +211,8 @@ GZIP_ENV = --best DIST_ARCHIVES = $(distdir).tar.xz DIST_TARGETS = dist-xz +# Exists only to be overridden by the user if desired. +AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -278,6 +282,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -351,9 +357,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -398,6 +408,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -420,6 +431,7 @@ vapi \ introspection \ test \ + tools \ examples \ docs \ $(NULL) @@ -489,6 +501,8 @@ distclean-hdr: -rm -f config.h stamp-h1 +tools/tests/services/org.freedesktop.ModemManager1.service: $(top_builddir)/config.status $(top_srcdir)/tools/tests/services/org.freedesktop.ModemManager1.service.in + cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo @@ -687,6 +701,10 @@ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -729,6 +747,8 @@ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -744,7 +764,7 @@ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ @@ -907,7 +927,7 @@ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool clean-local cscope cscopelist-am ctags ctags-am \ dist dist-all dist-bzip2 dist-gzip dist-lzip dist-shar \ - dist-tarZ dist-xz dist-zip distcheck distclean \ + dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ diff -Nru modemmanager-1.12.8/NEWS modemmanager-1.16.6/NEWS --- modemmanager-1.12.8/NEWS 2020-03-14 17:15:38.000000000 +0800 +++ modemmanager-1.16.6/NEWS 2021-06-06 21:41:15.000000000 +0800 @@ -1,153 +1,370 @@ -ModemManager 1.12.8 +ModemManager 1.16.6 ------------------------------------------- -This is a new bugfix release of ModemManager. -The list of changes in this version includes: + * Build: + ** Require libqmi >= 1.28.6 (for the optional QMI support). + ** Fix error with GCC 11 and -Wincompatible-pointer-types. + ** Fix warning with GCC 11 and -Wmaybe-uninitialized. - * Plugin manager: - ** Updated logic to allow new ports added to a device up to 1500ms since last - port was added. - - * Voice interface: - ** Match calls in call list by number. - ** Don't report an empty list if +CLCC for any reason fails. - ** Expect in-call URCs also in secondary port. - ** Allow optional extra CR in in-call URCs. - - * Kernel device: - ** Fix looking up for interface details in udev-based builds. - - * Huawei: - ** Allow reading port type hints from USB interface descriptions. - ** Fix segfault if device is removed while probing is ongoing. + * QMI: + ** Increased device open timeout to 45s. + ** Added support to handle transfer-route messages. - * Several other minor fixes. + * Base manager: + ** Added support for Qualcomm based PCI devices in the new WWAN subsystem in + kernel 5.13. + ** Fix segfault on rare conditions when ports reported don't have a proper + subsystem or name. + ** Fix segfault when trying to create device id after device is already gone. + + * plugins: + ** foxconn: added support for the T99W175 module. + ** foxconn: fix segfault when attempting to use parent location support. + ** quectel: ignore QLWURC URCs. + * Several other minor improvements and fixes. -ModemManager 1.12.6 +ModemManager 1.16.4 ------------------------------------------- -This is a new bugfix release of ModemManager. - -The list of changes in this version includes: - - * SIM: - ** Updated logic to avoid sending PIN/PUK to the SIM card when not required - (e.g. if already unlocked). - * Simple interface: - ** Avoid aborting connection if SIM-PUK2 locked, as PIN2/PUK2 doesn't - prevent us from getting connected. + * Fix build when using libgudev < 232, which is when autoptr support was + introduced in the GUdev* types. We'll keep the 1.16.x branch depending on + libgudev 147, and only bump the requirement in git master. + + * This version comes with an overall rework of the charset encoding handling + inside the ModemManager daemon, which was already available in git master + for some time and has been proved to be very useful. + ** The charset conversion is now strict, except for a few cases where we + would try to do our best (e.g. operator name normalization). + ** The charset methods are cleaned up, with clear distinction between the + ones that allow NUL-finished C strings and the ones that may have valid + embedded NUL bytes. + ** The //TRANSLIT extension is completely avoided, as not all implementations + out there have it (e.g. unavailable in musl libc), and we now use + g_convert_with_fallback() instead where appropriate. + + * Modem interface: + ** Fixed crash triggered when attempting to update lock info on an already + removed DBus skeleton. + + * Time interface: + ** Fixed invalid memory read when loading network timezone fails. + + * Base bearer: + ** Ignored forced disconnections after some time unregistered when PPP is + being used, so that we don't end up hijacking the TTY while pppd is using + it. - * Location interface: - ** Fixed memory leak happening as soon as a position fix was obtained and - gps-raw location source was enabled. + * Kernel device: + ** Fix segfault when processing event for non-existing port. - * Core: - ** Fixed handling of 0x00 bytes at the end of GSM encoded strings. - ** Fixed cleaning up 'timed-out' signal on the serial port objects. - ** Fixed logic that closes MBIM ports during cleanup. + * QMI: + ** Fixed allowed modes setup when using the "Acquisition Order Preference" + TLV in the "NAS System Selection Preference" messages. 3GPP+3GPP2 + multimode devices like the MC73xx series were affected. + + * libmm-glib: + ** Fixed comparison of 'allowed auth' and 'rm protocol' settings in bearer + properties. - * Several other minor fixes and memory leak plugs. + * Plugins: + ** cinterion: allow '*' in Prov/Cfg response. + ** cinterion: fixed several FALSE returns without GError set. + ** quectel: ignore +QGPSURC URCs. + * Several other minor improvements and fixes. -ModemManager 1.12.4 +ModemManager 1.16.2 ------------------------------------------- -This is a new bugfix release of ModemManager. - -This release breaks the API of the bindings supporting the MMModem3gppNetwork -type, used as result when a Modem3gpp.Scan() operation finishes. This type is -now a boxed type with explicit copy/free info, so the interpreter using the -bindings is now able to cleanly dispose these variables (it would make the -program crash otherwise, so the change is well justified). - -The getters for the MMModem3gppNetwork type now look like this: - - E.g. instead of: - ModemManager.Modem3gpp.network_get_operator_code(network) - We should now do: - network.get_operator_code() - -A new example python application using the Modem3gpp.Scan() operation is -provided in the sources, under examples/network-scan-python. -There is no API/ABI break in libmm-glib itself. + * build: fixed with GLib < 2.54. + * qmi: fixed network regitration cancellation when asserts disabled. + * libmm-glib: fix allow-roaming setting comparison in bearer properties. -The list of additional changes in this version includes: +ModemManager 1.16.0 +------------------------------------------- +This is a new stable release of ModemManager. - * Core: - ** Added missing ME error codes when building GError variables for the - MM_MOBILE_EQUIPMENT_ERROR domain. +The following notes are directed to package maintainers: - * Bearer: - ** Avoid connection checks or stats updates while disconnecting. + * This version now requires: + ** libqmi >= 1.28.0 (for the optional QMI support) - * Serial port: - ** Fix segfault when port flash operation gets cancelled. + * The 1.16.x branch will be the last one supporting the 'LEGACY' and 'PARANOID' + filter modes; standard distributions are advised to use the default 'STRICT' + mode if they aren't using it already (i.e. running the daemon without any + explicit '--filter-policy' option). + + * A new 'qcom-soc' plugin is implemented to be able to use ModemManager in + Qualcomm SoCs like the MSM8916 or MSM8974. This plugin uses a combination of + RPMSG based control ports plus BAM-DMUX based network ports. This plugin is + disabled by default, even when `--enable-all-plugins` is used, and if wanted + it must be explicitly enabled with `--enable-plugin-qcom-soc`. Systems + targeting this kind of SoCs, like postmarketos, should enable it. Standard + distributions may or may not include it, up to the targeted hardware in each + distribution. + + * Gentoo's 'libelogind' library may now be used to detect the systemd + suspend/resume support. + +The API is backwards compatible with the previous releases, the only updates +are the following: + + * Modem interface: + ** Updated the 'Ports' property so that it exposes all ports that are + owned by the modem even if they are explicitly ignored and not used. + ** New 'SimSlots' property that exposes the available SIM slots in the modem, + including the SIM object paths in each of them if the cards are present. + ** New 'PrimarySimSlot' property indicating which of the slots in the + 'SimSlots' array is the one currently active. + ** New 'SetPrimarySimSlot' method to select which SIM slot in the 'SimSlots' + array should be considered active. When the switch happens, the modem will + be fully re-probed. + + * Signal interface: + ** New 'Nr5g' dictionary property including signal information for the 5GNR + access technology. + + * SIM interface: + ** New 'Active' boolean property, indicating whether the SIM object is the + currently active one. + ** New 'Eid' string property, indicating the EID of the card, if any. + + * New udev tags: + ** New 'ID_MM_PORT_TYPE_QMI' tag to explicitly flag a port as being QMI, when + there is no other way to guess the type of port; e.g. this tag is not + needed for ports exposed by the qmi_wwan driver. + ** New 'ID_MM_PORT_TYPE_MBIM' tag to explicitly flag a port as being MBIM, + when there is no other way to guess the type of port; e.g. this tag is not + needed for ports exposed by the cdc_mbim driver. + +The most important features and changes in this release are the following: + + * Implemented support for Multi SIM Single Standby support, for systems that + have multiple SIM slots and they can select which of them (only one) is + active at any given time. Currently implemented for QMI modems only. + + * If the modem enabling phase fails in a fatal way, an implicit disabling + sequence is now run, in order to avoid leaving the modem in an inconsistent + state. + + * If the connection attempt includes user/password information but no explicit + authentication type, CHAP will now be used by default instead of PAP. + + * Full USB device removal events reported via udev are no longer used. The + device removal logic relies exclusively on independent port removal events, + as that logic is supported for all subsystems and kernel device backends + (e.g. also working for non-USB devices and for systems without udev like + OpenWRT). + + * Added support to monitor the 'rpmsg' subsystem, but only in plugins that + explicitly require its use (e.g. the 'qcom-soc' plugin). + + * New options in the ModemManager daemon: + ** Added new '--test-no-suspend-resume' option to disable the runtime + suspend/resume support even if the daemon was built with it. + ** Added new '--test-no-udev' option to disable the runtime udev support even + if the daemon was built with it. - * Simple interface: - ** Fix the ongoing connection cancellable handling. + * Serial: + ** Also match OK or ERROR responses that are not at end of line. - * Voice interface: - ** Fix segfault when voice support check fails. + * SIM: + ** Force reprobing the modem if a new SIM is detected in a modem that + initially started in Failed state without SIM. + ** Force reprobing the modem if the lock status cannot be read after sending + SIM-PUK, so that it transitions to the Failed state. + ** Force reprobing the modem if a PUK lock is discovered after sending + SIM-PIN, so that it transitions to the Failed state. * QMI: - ** Fixed several memory leaks, including a severe one happening when multiple - GPS sources (e.g. raw and nmea) were enabled at the same time. + ** The logic no longer depends on the service version reported by each + client, the support for each feature is explicitly probed instead. + ** Implemented SIM profile (eUICC) change detection. + ** Support for QMI modems on kernels < 3.6 is dropped. Only kernels where the + QMI control ports are exposed in the 'usbmisc' subsystem are supported. + ** Implemented additional step in the connection logic to allow binding the + WDS client to a given SIO port, required in the BAM-DMUX driver setup. + ** Implemented support for the initial EPS bearer settings logic. + ** Disabled explicit signal and access technology polling if indications have + been correctly enabled. - * Plugins: - ** ublox: ignore errors when attempting to disconnect last bearer. + * MBIM: + ** Enable SIM hot swap detection logic with QMI over MBIM. + ** Allow plugins to specify explicitly that QMI over MBIM is not supported. - * mmcli: - ** Allow "yes" and "no" as boolean strings. + * libmm-glib: + ** Added missing APIs to get/set RM protocol in the Simple connect settings. - * Several other minor fixes and memory leak plugs. + * Plugins: + ** gosuncn: new plugin, for now just with port type hints for the GM800. + ** quectel: implemented GPS support with +QGPS. + ** quectel: implemented custom time support check to prefer +CTZU=3 instead + of +CTZU=1 so that the modem reports localtime instead of UTC in +CCLK. + ** sierra: added support for XMM-specific features (e.g. EM7345). + ** cinterion: implemented support for the initial EPS bearer settings logic. + ** cinterion: added SIM hot swap support to AT-based modems. + ** huawei: updated to avoid applying multiple port type hint methods. + ** huawei: updated the ^GETPORTMODE logic so that we don't assume the hints + in the response apply to specific USB interfaces. + +The following features which were backported to 1.14.x releases are also present +in ModemManager 1.16.0: + + * location: allow CID only updates. + * sms: allow sending/receiving UTF-16 as if it were UCS-2. + * modem: don't consider charset setup failure as fatal. + * QMI: fix reporting signal strength indications. + * QMI: fix parsing of USSD indications with UTF-16 data. + * QMI: run network registration with NAS Set System Selection Preference. + * QMI: when connection aborted, ensure network handles are released. + * MBIM: don't fail IPv4v6 connection attempt if only IPv4 succeeds. + * cinterion: improve user/password handling in AT^SGAUTH calls. + * cinterion: removed limitation to IPv4 only PDP contexts. + * cinterion: configure the PLAS9 to send URCs correctly. + * quectel: add support for MBIM devices. + * telit: add initial delay for AT ports to become responsive. -ModemManager 1.12.2 +ModemManager 1.14.0 ------------------------------------------- -This is a new bugfix release of ModemManager. +This is a new stable release of ModemManager. The following notes are directed to package maintainers: - * This version splits all common logic from different plugins into separate - shared libraries that are loaded before the plugins. This means that in - addition to 'libmm-plugin-*.so' files, a new set of 'libmm-shared-*.so' - files will also be installed in ${libdir}/ModemManager. - -The list of changes in this version includes: - - * Simple interface: - ** Avoid assertion on the ongoing connect cancellable. - - * Plugin manager: - ** Fix waiting the minimum probing time. - ** Explicitly cancel timeouts when device probing is cancelled. - ** Disable lazy plugin loading, we now require all missing symbols to be - resolved at loading time for a plugin to correctly be loaded. - - * Bearer: - ** Avoid reporting disconnection error if trying to disconnect a bearer that - is already disconnected. + * This version requires: + ** GLib/GObject/GIO >= 2.48.0 + ** libmbim >= 1.24.0 (for the optional MBIM support) + ** libqmi >= 1.26.0 (for the optional QMI support) + + * Build updated with several improvements: + ** The build has been updated to use by default all warnings enabled by + AX_COMPILER_FLAGS(), and therefore when building the release from a git + checkout, autoconf-archive >= 2017.03.21 is now required. This new build + dependency isn't required when building from the release tarball. + ** Also when building from a git checkout, beware because by default + --enable-compile-warnings=error is enabled, which implies -Werror. If + you'd like to build from git and avoid -Werror, you should explicitly use + --enable-compile-warnings=yes (to keep the warnings but without being + errors), --enable-compile-warnings=no (to disable all the extra warnings + enabled by default) or --disable-Werror (to unconditionally make all + compiler warnings non-fatal). + ** Users can now preselect which plugins to build and install during + configure, with the --enable-plugin-[PLUGIN-NAME] options. The user can + also build and install all except for some, just by using the + --enable-all-plugins option followed by --disable-plugin-[PLUGIN-NAME]. + By default all plugins are enabled, so all of them built and installed. + This new set of options are useful for users building custom systems + where they already know what kind of devices they're going to have, it + isn't recommended for standard distributions. + +The only updates in the public API are the following: + + * Modem interface: + ** Added support for AT-based and/or QMI-based 5G devices, which will report + the new MM_MODEM_CAPABILITY_5GNR capability. + ** Deprecated the MM_MODEM_CAPABILITY_LTE_ADVANCED capability, as it was + never used in any implementation. + + * Bearer interface: + ** Added additional 'attempts', 'failed-attempts', 'total-rx-bytes', + 'total-tx-bytes' and 'total-duration' values in the 'Stats' property + exposed by the Bearer objects. + +The most important features and changes in this release are the following: + + * The daemon switched to 'STRICT' filter mode by default. The old 'DEFAULT' + mode is renamed to 'LEGACY' and is considered now deprecated. Under the + 'STRICT' filter mode, the TTY blacklist and greylist are ignored, and the + port probing mechanism uses its own heuristics to guess whether a given TTY + is owned by a modem or not. + + * Added a new implicit whitelist rules applicable in 'STRICT' filter mode, so + that all devices with a USB vid matching one of the vids allowed by the + different installed plugins are implicitly allowed. + + * Updated daemon logging so that we always prefix the messages with a string + identifying which modem the log refers to, making it easy to grep logs for + one specific device if the system has more than one. + + * Updated the probing logic to make sure we don't attempt a re-probe when the + device is gone. + + * Probing logic now allows new ports detected up to 1500ms since last port + added, useful on OpenWrt setups where ports are notified one by one via + hotplug events. + + * AT: + ** Moved the charset definition logic to the initialization phase instead of + the enabling phase, because the feature support checks may already require + string processing based on the current charset. + ** Updated manual registration operation to attempt using current charset + (e.g. UCS2) if ASCII fails. + + * QMI: + ** Devices using the LOC service for GNSS will now also setup the list of + required NMEA traces before starting the engine. + ** Implemented 3GPP USSD support using the Voice service. + ** Update carrier code if registration changes from one roaming operator to + another. + ** Explicitly disable autoconnect during modem enabling phase, because it + interferes with our connection management logic. + ** Fallback to raw-ip if WDA Get Data Format requests arguments, as in most + new 5G devices. + ** Updated to always use the asynchronous close() operation. + ** Handle disconnection indications during connection attempts. * MBIM: - ** Completely skip LTE attach config/status if unsupported. + ** Update carrier code if registration changes from one roaming operator to + another. + ** Implement reset in Intel-based and Qualcomm-based devices. + ** Avoid LTE attach config/status if unsupported. + ** Updated to make sure all allocated QMI CIDs are released during shutdown. + + * SIM interface: + ** Don't allow sending PIN/PUK if not required. + + * 3GPP interface: + ** Fixed manual re-registration to the same operator. + + * CDMA interface: + ** Don't allow multiple concurrent activation attempts. + ** Disallow empty carrier code in automatic activation. + + * Bearer interface: + ** Updated to avoid connection checks or stats updates while disconnecting. + + * libmm-glib: + ** New 'mm_location_gps_nmea_get_traces()' method to retrieve a NULL + terminated array of strings with all cached NMEA traces. + ** Deprecated the 'mm_location_gps_nmea_build_full()' method. - * QMI: - ** Make current settings mandatory when using 'static' addressing. - ** Handle disconnection indications during connection attempt. - ** Explicitly close QMI port during disconnection if it was opened during a - connection attempt. + * mmcli: + ** Added a new 'any' lookup keyword for the --modem and --sim options, useful + when the system is only expected to have one single device. * Plugins: - ** huawei: avoid using QCDM port during a voice call. - ** sierra: added port type hints for the EM7565. + ** broadmobi: new plugin, right now just with port type hints for the BM818. + ** foxconn: new plugin to support the T77W968 (both with and without eSIM). ** dell,dw5821e: added support for the DW5821e with eSIM variant. + ** huawei: don't delay reporting network initiated disconnects. + ** huawei: try to read port type hints from interface descriptions. + ** huawei: avoid using the QCDM port during a voice call. + ** cinterion: skip sim ready check for modules that don't support it. + ** cinterion: implemented radio/band handling for LTE modems. + ** cinterion: added Signal interface support bsaed on AT^SMONI. + ** cinterion: added support for MBIM based devices like the PLS62-W. + ** quectel: updated to detect SIM hot swap via +QUSIM URCs. + ** fibocom: added support for QMI based devices like the FM150. + ** ublox: ignore error when disconnecting last LTE bearer. + ** ublox: implement support to enable and detect +UUDTMF URCs. + ** ublox: added blacklist rules for GPS modules in the plugin itself. + ** sierra: implement manual and automatic CDMA activation. + ** novatel: implement manual and automatic CDMA activation. - * mmcli: - ** Fix printing empty value lists in human-friendly output. - - * Several other minor fixes and memory leak plugs. +All the features and fixes which were backported to 1.12.x releases are also +present in ModemManager 1.14.0. ModemManager 1.12.0 diff -Nru modemmanager-1.12.8/README modemmanager-1.16.6/README --- modemmanager-1.12.8/README 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/README 2021-06-06 21:40:59.000000000 +0800 @@ -34,3 +34,11 @@ License. The ModemManager and mmcli binaries are both GPLv2+. The libmm-glib library is LGPLv2+. + +Code of Conduct. +Please note that this project is released with a Contributor Code of Conduct. +By participating in this project you agree to abide by its terms, which you can +find in the following link: + https://www.freedesktop.org/wiki/CodeOfConduct +CoC issues may be raised to the project maintainers at the following address: + modemmanager-devel-owner@lists.freedesktop.org diff -Nru modemmanager-1.12.8/aclocal.m4 modemmanager-1.16.6/aclocal.m4 --- modemmanager-1.12.8/aclocal.m4 2020-03-14 17:16:01.000000000 +0800 +++ modemmanager-1.16.6/aclocal.m4 2021-06-06 21:43:41.000000000 +0800 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.3 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,12 +14,876 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, -[m4_warning([this file was generated for autoconf 2.69. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, +[m4_warning([this file was generated for autoconf 2.71. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) +# ============================================================================ +# https://www.gnu.org/software/autoconf-archive/ax_append_compile_flags.html +# ============================================================================ +# +# SYNOPSIS +# +# AX_APPEND_COMPILE_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT]) +# +# DESCRIPTION +# +# For every FLAG1, FLAG2 it is checked whether the compiler works with the +# flag. If it does, the flag is added FLAGS-VARIABLE +# +# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. +# CFLAGS) is used. During the check the flag is always added to the +# current language's flags. +# +# If EXTRA-FLAGS is defined, it is added to the current language's default +# flags (e.g. CFLAGS) when the check is done. The check is thus made with +# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to +# force the compiler to issue an error when a bad flag is given. +# +# INPUT gives an alternative input source to AC_COMPILE_IFELSE. +# +# NOTE: This macro depends on the AX_APPEND_FLAG and +# AX_CHECK_COMPILE_FLAG. Please keep this macro in sync with +# AX_APPEND_LINK_FLAGS. +# +# LICENSE +# +# Copyright (c) 2011 Maarten Bosmans +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 7 + +AC_DEFUN([AX_APPEND_COMPILE_FLAGS], +[AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) +AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) +for flag in $1; do + AX_CHECK_COMPILE_FLAG([$flag], [AX_APPEND_FLAG([$flag], [$2])], [], [$3], [$4]) +done +])dnl AX_APPEND_COMPILE_FLAGS + +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_append_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_APPEND_FLAG(FLAG, [FLAGS-VARIABLE]) +# +# DESCRIPTION +# +# FLAG is appended to the FLAGS-VARIABLE shell variable, with a space +# added in between. +# +# If FLAGS-VARIABLE is not specified, the current language's flags (e.g. +# CFLAGS) is used. FLAGS-VARIABLE is not changed if it already contains +# FLAG. If FLAGS-VARIABLE is unset in the shell, it is set to exactly +# FLAG. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim +# Copyright (c) 2011 Maarten Bosmans +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 8 + +AC_DEFUN([AX_APPEND_FLAG], +[dnl +AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_SET_IF +AS_VAR_PUSHDEF([FLAGS], [m4_default($2,_AC_LANG_PREFIX[FLAGS])]) +AS_VAR_SET_IF(FLAGS,[ + AS_CASE([" AS_VAR_GET(FLAGS) "], + [*" $1 "*], [AC_RUN_LOG([: FLAGS already contains $1])], + [ + AS_VAR_APPEND(FLAGS,[" $1"]) + AC_RUN_LOG([: FLAGS="$FLAGS"]) + ]) + ], + [ + AS_VAR_SET(FLAGS,[$1]) + AC_RUN_LOG([: FLAGS="$FLAGS"]) + ]) +AS_VAR_POPDEF([FLAGS])dnl +])dnl AX_APPEND_FLAG + +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_append_link_flags.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_APPEND_LINK_FLAGS([FLAG1 FLAG2 ...], [FLAGS-VARIABLE], [EXTRA-FLAGS], [INPUT]) +# +# DESCRIPTION +# +# For every FLAG1, FLAG2 it is checked whether the linker works with the +# flag. If it does, the flag is added FLAGS-VARIABLE +# +# If FLAGS-VARIABLE is not specified, the linker's flags (LDFLAGS) is +# used. During the check the flag is always added to the linker's flags. +# +# If EXTRA-FLAGS is defined, it is added to the linker's default flags +# when the check is done. The check is thus made with the flags: "LDFLAGS +# EXTRA-FLAGS FLAG". This can for example be used to force the linker to +# issue an error when a bad flag is given. +# +# INPUT gives an alternative input source to AC_COMPILE_IFELSE. +# +# NOTE: This macro depends on the AX_APPEND_FLAG and AX_CHECK_LINK_FLAG. +# Please keep this macro in sync with AX_APPEND_COMPILE_FLAGS. +# +# LICENSE +# +# Copyright (c) 2011 Maarten Bosmans +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 7 + +AC_DEFUN([AX_APPEND_LINK_FLAGS], +[AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) +AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) +for flag in $1; do + AX_CHECK_LINK_FLAG([$flag], [AX_APPEND_FLAG([$flag], [m4_default([$2], [LDFLAGS])])], [], [$3], [$4]) +done +])dnl AX_APPEND_LINK_FLAGS + +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) +# +# DESCRIPTION +# +# Check whether the given FLAG works with the current language's compiler +# or gives an error. (Warnings, however, are ignored) +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# If EXTRA-FLAGS is defined, it is added to the current language's default +# flags (e.g. CFLAGS) when the check is done. The check is thus made with +# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to +# force the compiler to issue an error when a bad flag is given. +# +# INPUT gives an alternative input source to AC_COMPILE_IFELSE. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this +# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim +# Copyright (c) 2011 Maarten Bosmans +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 6 + +AC_DEFUN([AX_CHECK_COMPILE_FLAG], +[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF +AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl +AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ + ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS + _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" + AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], + [AS_VAR_SET(CACHEVAR,[yes])], + [AS_VAR_SET(CACHEVAR,[no])]) + _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) +AS_VAR_IF(CACHEVAR,yes, + [m4_default([$2], :)], + [m4_default([$3], :)]) +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_COMPILE_FLAGS + +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) +# +# DESCRIPTION +# +# Check whether the given FLAG works with the linker or gives an error. +# (Warnings, however, are ignored) +# +# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on +# success/failure. +# +# If EXTRA-FLAGS is defined, it is added to the linker's default flags +# when the check is done. The check is thus made with the flags: "LDFLAGS +# EXTRA-FLAGS FLAG". This can for example be used to force the linker to +# issue an error when a bad flag is given. +# +# INPUT gives an alternative input source to AC_LINK_IFELSE. +# +# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this +# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. +# +# LICENSE +# +# Copyright (c) 2008 Guido U. Draheim +# Copyright (c) 2011 Maarten Bosmans +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 6 + +AC_DEFUN([AX_CHECK_LINK_FLAG], +[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF +AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl +AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $4 $1" + AC_LINK_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], + [AS_VAR_SET(CACHEVAR,[yes])], + [AS_VAR_SET(CACHEVAR,[no])]) + LDFLAGS=$ax_check_save_flags]) +AS_VAR_IF(CACHEVAR,yes, + [m4_default([$2], :)], + [m4_default([$3], :)]) +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_LINK_FLAGS + +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_compiler_flags.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_COMPILER_FLAGS([CFLAGS-VARIABLE], [LDFLAGS-VARIABLE], [IS-RELEASE], [EXTRA-BASE-CFLAGS], [EXTRA-YES-CFLAGS], [UNUSED], [UNUSED], [UNUSED], [EXTRA-BASE-LDFLAGS], [EXTRA-YES-LDFLAGS], [UNUSED], [UNUSED], [UNUSED]) +# +# DESCRIPTION +# +# Check for the presence of an --enable-compile-warnings option to +# configure, defaulting to "error" in normal operation, or "yes" if +# IS-RELEASE is equal to "yes". Return the value in the variable +# $ax_enable_compile_warnings. +# +# Depending on the value of --enable-compile-warnings, different compiler +# warnings are checked to see if they work with the current compiler and, +# if so, are appended to CFLAGS-VARIABLE and LDFLAGS-VARIABLE. This +# allows a consistent set of baseline compiler warnings to be used across +# a code base, irrespective of any warnings enabled locally by individual +# developers. By standardising the warnings used by all developers of a +# project, the project can commit to a zero-warnings policy, using -Werror +# to prevent compilation if new warnings are introduced. This makes +# catching bugs which are flagged by warnings a lot easier. +# +# By providing a consistent --enable-compile-warnings argument across all +# projects using this macro, continuous integration systems can easily be +# configured the same for all projects. Automated systems or build +# systems aimed at beginners may want to pass the --disable-Werror +# argument to unconditionally prevent warnings being fatal. +# +# --enable-compile-warnings can take the values: +# +# * no: Base compiler warnings only; not even -Wall. +# * yes: The above, plus a broad range of useful warnings. +# * error: The above, plus -Werror so that all warnings are fatal. +# Use --disable-Werror to override this and disable fatal +# warnings. +# +# The set of base and enabled flags can be augmented using the +# EXTRA-*-CFLAGS and EXTRA-*-LDFLAGS variables, which are tested and +# appended to the output variable if --enable-compile-warnings is not +# "no". Flags should not be disabled using these arguments, as the entire +# point of AX_COMPILER_FLAGS is to enforce a consistent set of useful +# compiler warnings on code, using warnings which have been chosen for low +# false positive rates. If a compiler emits false positives for a +# warning, a #pragma should be used in the code to disable the warning +# locally. See: +# +# https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas +# +# The EXTRA-* variables should only be used to supply extra warning flags, +# and not general purpose compiler flags, as they are controlled by +# configure options such as --disable-Werror. +# +# IS-RELEASE can be used to disable -Werror when making a release, which +# is useful for those hairy moments when you just want to get the release +# done as quickly as possible. Set it to "yes" to disable -Werror. By +# default, it uses the value of $ax_is_release, so if you are using the +# AX_IS_RELEASE macro, there is no need to pass this parameter. For +# example: +# +# AX_IS_RELEASE([git-directory]) +# AX_COMPILER_FLAGS() +# +# CFLAGS-VARIABLE defaults to WARN_CFLAGS, and LDFLAGS-VARIABLE defaults +# to WARN_LDFLAGS. Both variables are AC_SUBST-ed by this macro, but must +# be manually added to the CFLAGS and LDFLAGS variables for each target in +# the code base. +# +# If C++ language support is enabled with AC_PROG_CXX, which must occur +# before this macro in configure.ac, warning flags for the C++ compiler +# are AC_SUBST-ed as WARN_CXXFLAGS, and must be manually added to the +# CXXFLAGS variables for each target in the code base. EXTRA-*-CFLAGS can +# be used to augment the base and enabled flags. +# +# Warning flags for g-ir-scanner (from GObject Introspection) are +# AC_SUBST-ed as WARN_SCANNERFLAGS. This variable must be manually added +# to the SCANNERFLAGS variable for each GIR target in the code base. If +# extra g-ir-scanner flags need to be enabled, the AX_COMPILER_FLAGS_GIR +# macro must be invoked manually. +# +# AX_COMPILER_FLAGS may add support for other tools in future, in addition +# to the compiler and linker. No extra EXTRA-* variables will be added +# for those tools, and all extra support will still use the single +# --enable-compile-warnings configure option. For finer grained control +# over the flags for individual tools, use AX_COMPILER_FLAGS_CFLAGS, +# AX_COMPILER_FLAGS_LDFLAGS and AX_COMPILER_FLAGS_* for new tools. +# +# The UNUSED variables date from a previous version of this macro, and are +# automatically appended to the preceding non-UNUSED variable. They should +# be left empty in new uses of the macro. +# +# LICENSE +# +# Copyright (c) 2014, 2015 Philip Withnall +# Copyright (c) 2015 David King +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 14 + +# _AX_COMPILER_FLAGS_LANG([LANGNAME]) +m4_defun([_AX_COMPILER_FLAGS_LANG], +[m4_ifdef([_AX_COMPILER_FLAGS_LANG_]$1[_enabled], [], + [m4_define([_AX_COMPILER_FLAGS_LANG_]$1[_enabled], [])dnl + AX_REQUIRE_DEFINED([AX_COMPILER_FLAGS_]$1[FLAGS])])dnl +]) + +AC_DEFUN([AX_COMPILER_FLAGS],[ + # C support is enabled by default. + _AX_COMPILER_FLAGS_LANG([C]) + # Only enable C++ support if AC_PROG_CXX is called. The redefinition of + # AC_PROG_CXX is so that a fatal error is emitted if this macro is called + # before AC_PROG_CXX, which would otherwise cause no C++ warnings to be + # checked. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AX_COMPILER_FLAGS_LANG([CXX])], + [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AX_COMPILER_FLAGS_LANG([CXX])])]) + AX_REQUIRE_DEFINED([AX_COMPILER_FLAGS_LDFLAGS]) + + # Default value for IS-RELEASE is $ax_is_release + ax_compiler_flags_is_release=m4_tolower(m4_normalize(ifelse([$3],, + [$ax_is_release], + [$3]))) + + AC_ARG_ENABLE([compile-warnings], + AS_HELP_STRING([--enable-compile-warnings=@<:@no/yes/error@:>@], + [Enable compiler warnings and errors]),, + [AS_IF([test "$ax_compiler_flags_is_release" = "yes"], + [enable_compile_warnings="yes"], + [enable_compile_warnings="error"])]) + AC_ARG_ENABLE([Werror], + AS_HELP_STRING([--disable-Werror], + [Unconditionally make all compiler warnings non-fatal]),, + [enable_Werror=maybe]) + + # Return the user's chosen warning level + AS_IF([test "$enable_Werror" = "no" -a \ + "$enable_compile_warnings" = "error"],[ + enable_compile_warnings="yes" + ]) + + ax_enable_compile_warnings=$enable_compile_warnings + + AX_COMPILER_FLAGS_CFLAGS([$1],[$ax_compiler_flags_is_release], + [$4],[$5 $6 $7 $8]) + m4_ifdef([_AX_COMPILER_FLAGS_LANG_CXX_enabled], + [AX_COMPILER_FLAGS_CXXFLAGS([WARN_CXXFLAGS], + [$ax_compiler_flags_is_release], + [$4],[$5 $6 $7 $8])]) + AX_COMPILER_FLAGS_LDFLAGS([$2],[$ax_compiler_flags_is_release], + [$9],[$10 $11 $12 $13]) + AX_COMPILER_FLAGS_GIR([WARN_SCANNERFLAGS],[$ax_compiler_flags_is_release]) +])dnl AX_COMPILER_FLAGS + +# ============================================================================= +# https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_cflags.html +# ============================================================================= +# +# SYNOPSIS +# +# AX_COMPILER_FLAGS_CFLAGS([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS]) +# +# DESCRIPTION +# +# Add warning flags for the C compiler to VARIABLE, which defaults to +# WARN_CFLAGS. VARIABLE is AC_SUBST-ed by this macro, but must be +# manually added to the CFLAGS variable for each target in the code base. +# +# This macro depends on the environment set up by AX_COMPILER_FLAGS. +# Specifically, it uses the value of $ax_enable_compile_warnings to decide +# which flags to enable. +# +# LICENSE +# +# Copyright (c) 2014, 2015 Philip Withnall +# Copyright (c) 2017, 2018 Reini Urban +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 17 + +AC_DEFUN([AX_COMPILER_FLAGS_CFLAGS],[ + AC_REQUIRE([AC_PROG_SED]) + AX_REQUIRE_DEFINED([AX_APPEND_COMPILE_FLAGS]) + AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) + AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) + + # Variable names + m4_define([ax_warn_cflags_variable], + [m4_normalize(ifelse([$1],,[WARN_CFLAGS],[$1]))]) + + AC_LANG_PUSH([C]) + + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ + [#ifndef __cplusplus + #error "no C++" + #endif]])], + [ax_compiler_cxx=yes;], + [ax_compiler_cxx=no;]) + + # Always pass -Werror=unknown-warning-option to get Clang to fail on bad + # flags, otherwise they are always appended to the warn_cflags variable, and + # Clang warns on them for every compilation unit. + # If this is passed to GCC, it will explode, so the flag must be enabled + # conditionally. + AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option],[ + ax_compiler_flags_test="-Werror=unknown-warning-option" + ],[ + ax_compiler_flags_test="" + ]) + + # Check that -Wno-suggest-attribute=format is supported + AX_CHECK_COMPILE_FLAG([-Wno-suggest-attribute=format],[ + ax_compiler_no_suggest_attribute_flags="-Wno-suggest-attribute=format" + ],[ + ax_compiler_no_suggest_attribute_flags="" + ]) + + # Base flags + AX_APPEND_COMPILE_FLAGS([ dnl + -fno-strict-aliasing dnl + $3 dnl + ],ax_warn_cflags_variable,[$ax_compiler_flags_test]) + + AS_IF([test "$ax_enable_compile_warnings" != "no"],[ + if test "$ax_compiler_cxx" = "no" ; then + # C-only flags. Warn in C++ + AX_APPEND_COMPILE_FLAGS([ dnl + -Wnested-externs dnl + -Wmissing-prototypes dnl + -Wstrict-prototypes dnl + -Wdeclaration-after-statement dnl + -Wimplicit-function-declaration dnl + -Wold-style-definition dnl + -Wjump-misses-init dnl + ],ax_warn_cflags_variable,[$ax_compiler_flags_test]) + fi + + # "yes" flags + AX_APPEND_COMPILE_FLAGS([ dnl + -Wall dnl + -Wextra dnl + -Wundef dnl + -Wwrite-strings dnl + -Wpointer-arith dnl + -Wmissing-declarations dnl + -Wredundant-decls dnl + -Wno-unused-parameter dnl + -Wno-missing-field-initializers dnl + -Wformat=2 dnl + -Wcast-align dnl + -Wformat-nonliteral dnl + -Wformat-security dnl + -Wsign-compare dnl + -Wstrict-aliasing dnl + -Wshadow dnl + -Winline dnl + -Wpacked dnl + -Wmissing-format-attribute dnl + -Wmissing-noreturn dnl + -Winit-self dnl + -Wredundant-decls dnl + -Wmissing-include-dirs dnl + -Wunused-but-set-variable dnl + -Warray-bounds dnl + -Wreturn-type dnl + -Wswitch-enum dnl + -Wswitch-default dnl + -Wduplicated-cond dnl + -Wduplicated-branches dnl + -Wlogical-op dnl + -Wrestrict dnl + -Wnull-dereference dnl + -Wdouble-promotion dnl + $4 dnl + $5 dnl + $6 dnl + $7 dnl + ],ax_warn_cflags_variable,[$ax_compiler_flags_test]) + ]) + AS_IF([test "$ax_enable_compile_warnings" = "error"],[ + # "error" flags; -Werror has to be appended unconditionally because + # it's not possible to test for + # + # suggest-attribute=format is disabled because it gives too many false + # positives + AX_APPEND_FLAG([-Werror],ax_warn_cflags_variable) + + AX_APPEND_COMPILE_FLAGS([ dnl + [$ax_compiler_no_suggest_attribute_flags] dnl + ],ax_warn_cflags_variable,[$ax_compiler_flags_test]) + ]) + + # In the flags below, when disabling specific flags, always add *both* + # -Wno-foo and -Wno-error=foo. This fixes the situation where (for example) + # we enable -Werror, disable a flag, and a build bot passes CFLAGS=-Wall, + # which effectively turns that flag back on again as an error. + for flag in $ax_warn_cflags_variable; do + AS_CASE([$flag], + [-Wno-*=*],[], + [-Wno-*],[ + AX_APPEND_COMPILE_FLAGS([-Wno-error=$(AS_ECHO([$flag]) | $SED 's/^-Wno-//')], + ax_warn_cflags_variable, + [$ax_compiler_flags_test]) + ]) + done + + AC_LANG_POP([C]) + + # Substitute the variables + AC_SUBST(ax_warn_cflags_variable) +])dnl AX_COMPILER_FLAGS + +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_gir.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_COMPILER_FLAGS_GIR([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS]) +# +# DESCRIPTION +# +# Add warning flags for the g-ir-scanner (from GObject Introspection) to +# VARIABLE, which defaults to WARN_SCANNERFLAGS. VARIABLE is AC_SUBST-ed +# by this macro, but must be manually added to the SCANNERFLAGS variable +# for each GIR target in the code base. +# +# This macro depends on the environment set up by AX_COMPILER_FLAGS. +# Specifically, it uses the value of $ax_enable_compile_warnings to decide +# which flags to enable. +# +# LICENSE +# +# Copyright (c) 2015 Philip Withnall +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 6 + +AC_DEFUN([AX_COMPILER_FLAGS_GIR],[ + AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) + + # Variable names + m4_define([ax_warn_scannerflags_variable], + [m4_normalize(ifelse([$1],,[WARN_SCANNERFLAGS],[$1]))]) + + # Base flags + AX_APPEND_FLAG([$3],ax_warn_scannerflags_variable) + + AS_IF([test "$ax_enable_compile_warnings" != "no"],[ + # "yes" flags + AX_APPEND_FLAG([ dnl + --warn-all dnl + $4 dnl + $5 dnl + $6 dnl + $7 dnl + ],ax_warn_scannerflags_variable) + ]) + AS_IF([test "$ax_enable_compile_warnings" = "error"],[ + # "error" flags + AX_APPEND_FLAG([ dnl + --warn-error dnl + ],ax_warn_scannerflags_variable) + ]) + + # Substitute the variables + AC_SUBST(ax_warn_scannerflags_variable) +])dnl AX_COMPILER_FLAGS + +# ============================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_compiler_flags_ldflags.html +# ============================================================================== +# +# SYNOPSIS +# +# AX_COMPILER_FLAGS_LDFLAGS([VARIABLE], [IS-RELEASE], [EXTRA-BASE-FLAGS], [EXTRA-YES-FLAGS]) +# +# DESCRIPTION +# +# Add warning flags for the linker to VARIABLE, which defaults to +# WARN_LDFLAGS. VARIABLE is AC_SUBST-ed by this macro, but must be +# manually added to the LDFLAGS variable for each target in the code base. +# +# This macro depends on the environment set up by AX_COMPILER_FLAGS. +# Specifically, it uses the value of $ax_enable_compile_warnings to decide +# which flags to enable. +# +# LICENSE +# +# Copyright (c) 2014, 2015 Philip Withnall +# Copyright (c) 2017, 2018 Reini Urban +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 9 + +AC_DEFUN([AX_COMPILER_FLAGS_LDFLAGS],[ + AX_REQUIRE_DEFINED([AX_APPEND_LINK_FLAGS]) + AX_REQUIRE_DEFINED([AX_APPEND_FLAG]) + AX_REQUIRE_DEFINED([AX_CHECK_COMPILE_FLAG]) + AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) + + # Variable names + m4_define([ax_warn_ldflags_variable], + [m4_normalize(ifelse([$1],,[WARN_LDFLAGS],[$1]))]) + + # Always pass -Werror=unknown-warning-option to get Clang to fail on bad + # flags, otherwise they are always appended to the warn_ldflags variable, + # and Clang warns on them for every compilation unit. + # If this is passed to GCC, it will explode, so the flag must be enabled + # conditionally. + AX_CHECK_COMPILE_FLAG([-Werror=unknown-warning-option],[ + ax_compiler_flags_test="-Werror=unknown-warning-option" + ],[ + ax_compiler_flags_test="" + ]) + + AX_CHECK_LINK_FLAG([-Wl,--as-needed], [ + AX_APPEND_LINK_FLAGS([-Wl,--as-needed], + [AM_LDFLAGS],[$ax_compiler_flags_test]) + ]) + AX_CHECK_LINK_FLAG([-Wl,-z,relro], [ + AX_APPEND_LINK_FLAGS([-Wl,-z,relro], + [AM_LDFLAGS],[$ax_compiler_flags_test]) + ]) + AX_CHECK_LINK_FLAG([-Wl,-z,now], [ + AX_APPEND_LINK_FLAGS([-Wl,-z,now], + [AM_LDFLAGS],[$ax_compiler_flags_test]) + ]) + AX_CHECK_LINK_FLAG([-Wl,-z,noexecstack], [ + AX_APPEND_LINK_FLAGS([-Wl,-z,noexecstack], + [AM_LDFLAGS],[$ax_compiler_flags_test]) + ]) + # textonly, retpolineplt not yet + + # macOS and cygwin linker do not have --as-needed + AX_CHECK_LINK_FLAG([-Wl,--no-as-needed], [ + ax_compiler_flags_as_needed_option="-Wl,--no-as-needed" + ], [ + ax_compiler_flags_as_needed_option="" + ]) + + # macOS linker speaks with a different accent + ax_compiler_flags_fatal_warnings_option="" + AX_CHECK_LINK_FLAG([-Wl,--fatal-warnings], [ + ax_compiler_flags_fatal_warnings_option="-Wl,--fatal-warnings" + ]) + AX_CHECK_LINK_FLAG([-Wl,-fatal_warnings], [ + ax_compiler_flags_fatal_warnings_option="-Wl,-fatal_warnings" + ]) + + # Base flags + AX_APPEND_LINK_FLAGS([ dnl + $ax_compiler_flags_as_needed_option dnl + $3 dnl + ],ax_warn_ldflags_variable,[$ax_compiler_flags_test]) + + AS_IF([test "$ax_enable_compile_warnings" != "no"],[ + # "yes" flags + AX_APPEND_LINK_FLAGS([$4 $5 $6 $7], + ax_warn_ldflags_variable, + [$ax_compiler_flags_test]) + ]) + AS_IF([test "$ax_enable_compile_warnings" = "error"],[ + # "error" flags; -Werror has to be appended unconditionally because + # it's not possible to test for + # + # suggest-attribute=format is disabled because it gives too many false + # positives + AX_APPEND_LINK_FLAGS([ dnl + $ax_compiler_flags_fatal_warnings_option dnl + ],ax_warn_ldflags_variable,[$ax_compiler_flags_test]) + ]) + + # Substitute the variables + AC_SUBST(ax_warn_ldflags_variable) +])dnl AX_COMPILER_FLAGS + +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_is_release.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_IS_RELEASE(POLICY) +# +# DESCRIPTION +# +# Determine whether the code is being configured as a release, or from +# git. Set the ax_is_release variable to 'yes' or 'no'. +# +# If building a release version, it is recommended that the configure +# script disable compiler errors and debug features, by conditionalising +# them on the ax_is_release variable. If building from git, these +# features should be enabled. +# +# The POLICY parameter specifies how ax_is_release is determined. It can +# take the following values: +# +# * git-directory: ax_is_release will be 'no' if a '.git' directory exists +# * minor-version: ax_is_release will be 'no' if the minor version number +# in $PACKAGE_VERSION is odd; this assumes +# $PACKAGE_VERSION follows the 'major.minor.micro' scheme +# * micro-version: ax_is_release will be 'no' if the micro version number +# in $PACKAGE_VERSION is odd; this assumes +# $PACKAGE_VERSION follows the 'major.minor.micro' scheme +# * dash-version: ax_is_release will be 'no' if there is a dash '-' +# in $PACKAGE_VERSION, for example 1.2-pre3, 1.2.42-a8b9 +# or 2.0-dirty (in particular this is suitable for use +# with git-version-gen) +# * always: ax_is_release will always be 'yes' +# * never: ax_is_release will always be 'no' +# +# Other policies may be added in future. +# +# LICENSE +# +# Copyright (c) 2015 Philip Withnall +# Copyright (c) 2016 Collabora Ltd. +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. + +#serial 7 + +AC_DEFUN([AX_IS_RELEASE],[ + AC_BEFORE([AC_INIT],[$0]) + + m4_case([$1], + [git-directory],[ + # $is_release = (.git directory does not exist) + AS_IF([test -d ${srcdir}/.git],[ax_is_release=no],[ax_is_release=yes]) + ], + [minor-version],[ + # $is_release = ($minor_version is even) + minor_version=`echo "$PACKAGE_VERSION" | sed 's/[[^.]][[^.]]*.\([[^.]][[^.]]*\).*/\1/'` + AS_IF([test "$(( $minor_version % 2 ))" -ne 0], + [ax_is_release=no],[ax_is_release=yes]) + ], + [micro-version],[ + # $is_release = ($micro_version is even) + micro_version=`echo "$PACKAGE_VERSION" | sed 's/[[^.]]*\.[[^.]]*\.\([[^.]]*\).*/\1/'` + AS_IF([test "$(( $micro_version % 2 ))" -ne 0], + [ax_is_release=no],[ax_is_release=yes]) + ], + [dash-version],[ + # $is_release = ($PACKAGE_VERSION has a dash) + AS_CASE([$PACKAGE_VERSION], + [*-*], [ax_is_release=no], + [*], [ax_is_release=yes]) + ], + [always],[ax_is_release=yes], + [never],[ax_is_release=no], + [ + AC_MSG_ERROR([Invalid policy. Valid policies: git-directory, minor-version, micro-version, dash-version, always, never.]) + ]) +]) + +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_require_defined.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_REQUIRE_DEFINED(MACRO) +# +# DESCRIPTION +# +# AX_REQUIRE_DEFINED is a simple helper for making sure other macros have +# been defined and thus are available for use. This avoids random issues +# where a macro isn't expanded. Instead the configure script emits a +# non-fatal: +# +# ./configure: line 1673: AX_CFLAGS_WARN_ALL: command not found +# +# It's like AC_REQUIRE except it doesn't expand the required macro. +# +# Here's an example: +# +# AX_REQUIRE_DEFINED([AX_CHECK_LINK_FLAG]) +# +# LICENSE +# +# Copyright (c) 2014 Mike Frysinger +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 2 + +AC_DEFUN([AX_REQUIRE_DEFINED], [dnl + m4_ifndef([$1], [m4_fatal([macro ]$1[ is not defined; is a m4 file missing?])]) +])dnl AX_REQUIRE_DEFINED + # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 11 (pkg-config-0.29.1) @@ -364,7 +1228,7 @@ [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) ])dnl PKG_HAVE_DEFINE_WITH_MODULES -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -379,7 +1243,7 @@ [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.1], [], +m4_if([$1], [1.16.3], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -395,14 +1259,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.1])dnl +[AM_AUTOMAKE_VERSION([1.16.3])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -454,7 +1318,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -485,7 +1349,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -676,7 +1540,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -715,7 +1579,9 @@ done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -742,7 +1608,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -939,7 +1805,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -960,7 +1826,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -982,7 +1848,7 @@ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1017,7 +1883,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1060,7 +1926,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1081,12 +1947,7 @@ [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -1099,7 +1960,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1128,7 +1989,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1175,7 +2036,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1194,7 +2055,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1275,7 +2136,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1335,7 +2196,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1363,7 +2224,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1382,7 +2243,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2018 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1514,7 +2375,6 @@ ]) # _AM_PROG_TAR m4_include([m4/ax_code_coverage.m4]) -m4_include([m4/compiler_warnings.m4]) m4_include([m4/gettext.m4]) m4_include([m4/gtk-doc.m4]) m4_include([m4/iconv.m4]) @@ -1528,6 +2388,7 @@ m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) +m4_include([m4/mm-enable-plugin.m4]) m4_include([m4/nls.m4]) m4_include([m4/po.m4]) m4_include([m4/progtest.m4]) diff -Nru modemmanager-1.12.8/autogen.sh modemmanager-1.16.6/autogen.sh --- modemmanager-1.12.8/autogen.sh 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/autogen.sh 2021-06-06 21:40:59.000000000 +0800 @@ -14,7 +14,7 @@ } (cd $srcdir; - autoreconf --force --install --verbose + GTKDOCIZE="true" autoreconf --force --install --verbose ) if test -z "$NOCONFIGURE"; then diff -Nru modemmanager-1.12.8/build-aux/Makefile.in modemmanager-1.16.6/build-aux/Makefile.in --- modemmanager-1.12.8/build-aux/Makefile.in 2020-03-14 17:16:02.000000000 +0800 +++ modemmanager-1.16.6/build-aux/Makefile.in 2021-06-06 21:43:42.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,14 +90,14 @@ subdir = build-aux ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -194,6 +194,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -267,9 +269,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -314,6 +320,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru modemmanager-1.12.8/build-aux/mm-enums-template.c modemmanager-1.16.6/build-aux/mm-enums-template.c --- modemmanager-1.12.8/build-aux/mm-enums-template.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/build-aux/mm-enums-template.c 2021-06-06 21:40:59.000000000 +0800 @@ -24,16 +24,16 @@ GType @enum_name@_get_type (void) { - static volatile gsize g_define_type_id__volatile = 0; + static gsize g_define_type_id_initialized = 0; - if (g_once_init_enter (&g_define_type_id__volatile)) { + if (g_once_init_enter (&g_define_type_id_initialized)) { GType g_define_type_id = g_@type@_register_static (g_intern_static_string ("@EnumName@"), @enum_name@_values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + g_once_init_leave (&g_define_type_id_initialized, g_define_type_id); } - return g_define_type_id__volatile; + return g_define_type_id_initialized; } /** @@ -51,7 +51,7 @@ guint i; for (i = 0; @enum_name@_values[i].value_nick; i++) { - if (val == @enum_name@_values[i].value) + if ((gint)val == @enum_name@_values[i].value) return @enum_name@_values[i].value_nick; } diff -Nru modemmanager-1.12.8/build-aux/mm-errors-template.c modemmanager-1.16.6/build-aux/mm-errors-template.c --- modemmanager-1.12.8/build-aux/mm-errors-template.c 2014-09-17 14:46:07.000000000 +0800 +++ modemmanager-1.16.6/build-aux/mm-errors-template.c 2021-06-06 21:40:59.000000000 +0800 @@ -12,9 +12,9 @@ GType @enum_name@_get_type (void) { - static volatile gsize g_define_type_id__volatile = 0; + static gsize g_define_type_id_initialized = 0; - if (g_once_init_enter (&g_define_type_id__volatile)) + if (g_once_init_enter (&g_define_type_id_initialized)) { static const G@Type@Value values[] = { /*** END value-header ***/ @@ -28,10 +28,10 @@ }; GType g_define_type_id = g_@type@_register_static (g_intern_static_string ("@EnumName@"), values); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + g_once_init_leave (&g_define_type_id_initialized, g_define_type_id); } - return g_define_type_id__volatile; + return g_define_type_id_initialized; } /*** END value-tail ***/ diff -Nru modemmanager-1.12.8/cli/Makefile.am modemmanager-1.16.6/cli/Makefile.am --- modemmanager-1.12.8/cli/Makefile.am 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/Makefile.am 2021-06-06 21:40:59.000000000 +0800 @@ -1,6 +1,7 @@ bin_PROGRAMS = mmcli mmcli_CPPFLAGS = \ + $(WARN_CFLAGS) \ $(MMCLI_CFLAGS) \ -I$(top_srcdir) \ -I$(top_srcdir)/include \ @@ -34,13 +35,17 @@ $(NULL) mmcli_LDADD = \ - $(MMCLI_LIBS) \ $(top_builddir)/libmm-glib/libmm-glib.la \ $(NULL) +mmcli_LDFLAGS = \ + $(WARN_LDFLAGS) \ + $(MMCLI_LIBS) \ + $(NULL) + if WITH_UDEV mmcli_CPPFLAGS += $(GUDEV_CFLAGS) -mmcli_LDADD += $(GUDEV_LIBS) +mmcli_LDFLAGS += $(GUDEV_LIBS) endif completiondir = $(datadir)/bash-completion/completions diff -Nru modemmanager-1.12.8/cli/Makefile.in modemmanager-1.16.6/cli/Makefile.in --- modemmanager-1.12.8/cli/Makefile.in 2020-03-14 17:16:02.000000000 +0800 +++ modemmanager-1.16.6/cli/Makefile.in 2021-06-06 21:43:42.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -94,14 +94,14 @@ subdir = cli ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -128,14 +128,14 @@ mmcli-mmcli-sim.$(OBJEXT) mmcli-mmcli-sms.$(OBJEXT) \ mmcli-mmcli-call.$(OBJEXT) mmcli_OBJECTS = $(am_mmcli_OBJECTS) -am__DEPENDENCIES_1 = -@WITH_UDEV_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) -mmcli_DEPENDENCIES = $(am__DEPENDENCIES_1) \ - $(top_builddir)/libmm-glib/libmm-glib.la $(am__DEPENDENCIES_2) +mmcli_DEPENDENCIES = $(top_builddir)/libmm-glib/libmm-glib.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = +mmcli_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(mmcli_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -281,6 +281,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -354,9 +356,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -401,6 +407,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -409,7 +416,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -mmcli_CPPFLAGS = $(MMCLI_CFLAGS) -I$(top_srcdir) \ +mmcli_CPPFLAGS = $(WARN_CFLAGS) $(MMCLI_CFLAGS) -I$(top_srcdir) \ -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/libmm-glib \ -I${top_srcdir}/libmm-glib/generated \ @@ -437,8 +444,11 @@ mmcli-call.c \ $(NULL) -mmcli_LDADD = $(MMCLI_LIBS) $(top_builddir)/libmm-glib/libmm-glib.la \ - $(NULL) $(am__append_2) +mmcli_LDADD = \ + $(top_builddir)/libmm-glib/libmm-glib.la \ + $(NULL) + +mmcli_LDFLAGS = $(WARN_LDFLAGS) $(MMCLI_LIBS) $(NULL) $(am__append_2) completiondir = $(datadir)/bash-completion/completions EXTRA_DIST = mmcli-completion all: all-am @@ -526,7 +536,7 @@ mmcli$(EXEEXT): $(mmcli_OBJECTS) $(mmcli_DEPENDENCIES) $(EXTRA_mmcli_DEPENDENCIES) @rm -f mmcli$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(mmcli_OBJECTS) $(mmcli_LDADD) $(LIBS) + $(AM_V_CCLD)$(mmcli_LINK) $(mmcli_OBJECTS) $(mmcli_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) diff -Nru modemmanager-1.12.8/cli/mmcli-bearer.c modemmanager-1.16.6/cli/mmcli-bearer.c --- modemmanager-1.12.8/cli/mmcli-bearer.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-bearer.c 2021-06-06 21:40:59.000000000 +0800 @@ -68,7 +68,7 @@ /* Status options */ group = g_option_group_new ("bearer", - "Bearer options", + "Bearer options:", "Show bearer options", NULL, NULL); @@ -108,7 +108,7 @@ } static void -context_free (Context *ctx) +context_free (void) { if (!ctx) return; @@ -127,7 +127,7 @@ void mmcli_bearer_shutdown (void) { - context_free (ctx); + context_free (); } static void @@ -159,24 +159,27 @@ const gchar *user = NULL; const gchar *password = NULL; const gchar *rm_protocol = NULL; + gchar *allowed_auth_str = NULL; if (properties) { - apn = mm_bearer_properties_get_apn (properties); - ip_family_str = (properties ? mm_bearer_ip_family_build_string_from_mask (mm_bearer_properties_get_ip_type (properties)) : NULL); - user = mm_bearer_properties_get_user (properties); - password = mm_bearer_properties_get_password (properties); + apn = mm_bearer_properties_get_apn (properties); + ip_family_str = (properties ? mm_bearer_ip_family_build_string_from_mask (mm_bearer_properties_get_ip_type (properties)) : NULL); + allowed_auth_str = (properties ? mm_bearer_allowed_auth_build_string_from_mask (mm_bearer_properties_get_allowed_auth (properties)) : NULL); + user = mm_bearer_properties_get_user (properties); + password = mm_bearer_properties_get_password (properties); if (mm_bearer_get_bearer_type (bearer) != MM_BEARER_TYPE_DEFAULT_ATTACH) { roaming = mm_bearer_properties_get_allow_roaming (properties) ? "allowed" : "forbidden"; rm_protocol = mm_modem_cdma_rm_protocol_get_string (mm_bearer_properties_get_rm_protocol (properties)); } } - mmcli_output_string (MMC_F_BEARER_PROPERTIES_APN, apn); - mmcli_output_string (MMC_F_BEARER_PROPERTIES_ROAMING, roaming); - mmcli_output_string_take (MMC_F_BEARER_PROPERTIES_IP_TYPE, ip_family_str); - mmcli_output_string (MMC_F_BEARER_PROPERTIES_USER, user); - mmcli_output_string (MMC_F_BEARER_PROPERTIES_PASSWORD, password); - mmcli_output_string (MMC_F_BEARER_PROPERTIES_RM_PROTOCOL, rm_protocol); + mmcli_output_string (MMC_F_BEARER_PROPERTIES_APN, apn); + mmcli_output_string (MMC_F_BEARER_PROPERTIES_ROAMING, roaming); + mmcli_output_string_take (MMC_F_BEARER_PROPERTIES_IP_TYPE, ip_family_str); + mmcli_output_string (MMC_F_BEARER_PROPERTIES_USER, user); + mmcli_output_string (MMC_F_BEARER_PROPERTIES_PASSWORD, password); + mmcli_output_string (MMC_F_BEARER_PROPERTIES_RM_PROTOCOL, rm_protocol); + mmcli_output_string_list_take (MMC_F_BEARER_PROPERTIES_ALLOWED_AUTH, allowed_auth_str); } /* IPv4 config */ @@ -248,6 +251,11 @@ gchar *duration = NULL; gchar *bytes_rx = NULL; gchar *bytes_tx = NULL; + gchar *attempts = NULL; + gchar *failed_attempts = NULL; + gchar *total_duration = NULL; + gchar *total_bytes_rx = NULL; + gchar *total_bytes_tx = NULL; if (stats) { guint64 val; @@ -261,11 +269,31 @@ val = mm_bearer_stats_get_tx_bytes (stats); if (val) bytes_tx = g_strdup_printf ("%" G_GUINT64_FORMAT, val); + val = mm_bearer_stats_get_attempts (stats); + if (val) + attempts = g_strdup_printf ("%" G_GUINT64_FORMAT, val); + val = mm_bearer_stats_get_failed_attempts (stats); + if (val) + failed_attempts = g_strdup_printf ("%" G_GUINT64_FORMAT, val); + val = mm_bearer_stats_get_total_duration (stats); + if (val) + total_duration = g_strdup_printf ("%" G_GUINT64_FORMAT, val); + val = mm_bearer_stats_get_total_rx_bytes (stats); + if (val) + total_bytes_rx = g_strdup_printf ("%" G_GUINT64_FORMAT, val); + val = mm_bearer_stats_get_total_tx_bytes (stats); + if (val) + total_bytes_tx = g_strdup_printf ("%" G_GUINT64_FORMAT, val); } - mmcli_output_string_take (MMC_F_BEARER_STATS_DURATION, duration); - mmcli_output_string_take (MMC_F_BEARER_STATS_BYTES_RX, bytes_rx); - mmcli_output_string_take (MMC_F_BEARER_STATS_BYTES_TX, bytes_tx); + mmcli_output_string_take (MMC_F_BEARER_STATS_DURATION, duration); + mmcli_output_string_take (MMC_F_BEARER_STATS_BYTES_RX, bytes_rx); + mmcli_output_string_take (MMC_F_BEARER_STATS_BYTES_TX, bytes_tx); + mmcli_output_string_take (MMC_F_BEARER_STATS_ATTEMPTS, attempts); + mmcli_output_string_take (MMC_F_BEARER_STATS_FAILED_ATTEMPTS, failed_attempts); + mmcli_output_string_take (MMC_F_BEARER_STATS_TOTAL_DURATION, total_duration); + mmcli_output_string_take (MMC_F_BEARER_STATS_TOTAL_BYTES_RX, total_bytes_rx); + mmcli_output_string_take (MMC_F_BEARER_STATS_TOTAL_BYTES_TX, total_bytes_tx); } mmcli_output_dump (); diff -Nru modemmanager-1.12.8/cli/mmcli-call.c modemmanager-1.16.6/cli/mmcli-call.c --- modemmanager-1.12.8/cli/mmcli-call.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-call.c 2021-06-06 21:40:59.000000000 +0800 @@ -94,7 +94,7 @@ /* Status options */ group = g_option_group_new ("call", - "Call options", + "Call options:", "Show call options", NULL, NULL); @@ -139,7 +139,7 @@ } static void -context_free (Context *ctx) +context_free (void) { if (!ctx) return; @@ -158,7 +158,7 @@ void mmcli_call_shutdown (void) { - context_free (ctx); + context_free (); } static void diff -Nru modemmanager-1.12.8/cli/mmcli-common.c modemmanager-1.16.6/cli/mmcli-common.c --- modemmanager-1.12.8/cli/mmcli-common.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-common.c 2021-06-06 21:40:59.000000000 +0800 @@ -111,34 +111,107 @@ } /******************************************************************************/ +/* Common to all objects */ + +#define ANY_OBJECT_STR "any" + +static void +get_object_lookup_info (const gchar *str, + const gchar *object_type, + const gchar *object_prefix, + gchar **object_path, + gchar **modem_uid, + gboolean *find_any) +{ + gboolean all_numeric; + guint i; + + /* Empty string not allowed */ + if (!str || !str[0]) { + g_printerr ("error: no %s was specified\n", object_type); + exit (EXIT_FAILURE); + } + + /* User string may come in four ways: + * a) full DBus path + * b) object index + * c) modem UID (for modem or SIM lookup only) + * d) "any" string (for modem or SIM lookup only) + */ + + *object_path = NULL; + if (modem_uid) + *modem_uid = NULL; + if (find_any) + *find_any = FALSE; + + /* If match the DBus prefix, we have a DBus object path */ + if (g_str_has_prefix (str, object_prefix)) { + g_debug ("Assuming '%s' is the full %s path", str, object_type); + *object_path = g_strdup (str); + return; + } + + /* If all numeric, we have the object index */ + all_numeric = TRUE; + for (i = 0; str[i]; i++) { + if (!g_ascii_isdigit (str[i])) { + all_numeric = FALSE; + break; + } + } + if (all_numeric) { + g_debug ("Assuming '%s' is the %s index", str, object_type); + *object_path = g_strdup_printf ("%s/%s", object_prefix, str); + return; + } + + /* If it matches the lookup keyword or any of its substrings, we have + * to look for the first available object */ + if ((find_any) && (g_ascii_strncasecmp (str, ANY_OBJECT_STR, strlen (str)) == 0)) { + g_debug ("Will look for first available %s", object_type); + *find_any = TRUE; + return; + } + + /* Otherwise we have the UID */ + if (modem_uid) { + g_debug ("Assuming '%s' is the modem UID", str); + *modem_uid = g_strdup (str); + return; + } + + /* If UID is not a valid input for the object type, error out */ + g_printerr ("error: invalid %s string specified: '%s'\n", object_type, str); + exit (EXIT_FAILURE); +} + +/******************************************************************************/ /* Modem */ static MMObject * find_modem (MMManager *manager, const gchar *modem_path, - const gchar *modem_uid) + const gchar *modem_uid, + gboolean modem_any) { GList *modems; GList *l; MMObject *found = NULL; - g_assert (modem_path || modem_uid); - g_assert (!(modem_path && modem_uid)); - modems = g_dbus_object_manager_get_objects (G_DBUS_OBJECT_MANAGER (manager)); for (l = modems; l; l = g_list_next (l)) { MMObject *obj; MMModem *modem; obj = MM_OBJECT (l->data); - modem = MM_MODEM (mm_object_get_modem (obj)); - - if (modem_path && g_str_equal (mm_object_get_path (obj), modem_path)) { - found = g_object_ref (obj); - break; - } + modem = mm_object_get_modem (obj); + if (!modem) + continue; - if (modem_uid && g_str_equal (mm_modem_get_device (modem), modem_uid)) { + if (modem_any || + (modem_path && g_str_equal (mm_object_get_path (obj), modem_path)) || + (modem_uid && g_str_equal (mm_modem_get_device (modem), modem_uid))) { found = g_object_ref (obj); break; } @@ -146,10 +219,7 @@ g_list_free_full (modems, g_object_unref); if (!found) { - if (modem_path) - g_printerr ("error: couldn't find modem at '%s'\n", modem_path); - else if (modem_uid) - g_printerr ("error: couldn't find modem identified by uid '%s'\n", modem_uid); + g_printerr ("error: couldn't find modem\n"); exit (EXIT_FAILURE); } @@ -159,8 +229,9 @@ } typedef struct { - gchar *modem_path; - gchar *modem_uid; + gchar *modem_path; + gchar *modem_uid; + gboolean modem_any; } GetModemContext; typedef struct { @@ -212,62 +283,14 @@ results = g_new (GetModemResults, 1); results->manager = mmcli_get_manager_finish (res); - results->object = find_modem (results->manager, ctx->modem_path, ctx->modem_uid); + results->object = find_modem (results->manager, ctx->modem_path, ctx->modem_uid, ctx->modem_any); g_task_return_pointer (task, results, (GDestroyNotify)get_modem_results_free); g_object_unref (task); } -static void -get_modem_path_or_uid (const gchar *str, - gchar **modem_path, - gchar **modem_uid) -{ - gboolean all_numeric; - guint i; - - /* We must have a given modem specified */ - if (!str || !str[0]) { - g_printerr ("error: no modem was specified\n"); - exit (EXIT_FAILURE); - } - - /* Modem path may come in three ways: - * a) full DBus path - * b) modem index - * c) uid - */ - - *modem_path = NULL; - *modem_uid = NULL; - - /* If we have DBus prefix, we have the modem DBus path */ - if (g_str_has_prefix (str, MM_DBUS_MODEM_PREFIX)) { - g_debug ("Assuming '%s' is the full modem path", str); - *modem_path = g_strdup (str); - return; - } - - /* If all numeric, we have the modem index */ - all_numeric = TRUE; - for (i = 0; str[i]; i++) { - if (!g_ascii_isdigit (str[i])) { - all_numeric = FALSE; - break; - } - } - if (all_numeric) { - g_debug ("Assuming '%s' is the modem index", str); - *modem_path = g_strdup_printf (MM_DBUS_MODEM_PREFIX "/%s", str); - return; - } - - /* Otherwise we have the UID */ - *modem_uid = g_strdup (str); -} - void mmcli_get_modem (GDBusConnection *connection, - const gchar *modem_str, + const gchar *str, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) @@ -278,8 +301,9 @@ task = g_task_new (connection, cancellable, callback, user_data); ctx = g_new0 (GetModemContext, 1); - get_modem_path_or_uid (modem_str, &ctx->modem_path, &ctx->modem_uid); - g_assert (ctx->modem_path || ctx->modem_uid); + get_object_lookup_info (str, "modem", MM_DBUS_MODEM_PREFIX, + &ctx->modem_path, &ctx->modem_uid, &ctx->modem_any); + g_assert (!!ctx->modem_path + !!ctx->modem_uid + ctx->modem_any == 1); g_task_set_task_data (task, ctx, (GDestroyNotify) get_modem_context_free); mmcli_get_manager (connection, @@ -290,18 +314,20 @@ MMObject * mmcli_get_modem_sync (GDBusConnection *connection, - const gchar *modem_str, + const gchar *str, MMManager **o_manager) { MMManager *manager; MMObject *found; gchar *modem_path = NULL; gchar *modem_uid = NULL; + gboolean modem_any = FALSE; manager = mmcli_get_manager_sync (connection); - get_modem_path_or_uid (modem_str, &modem_path, &modem_uid); - g_assert (modem_path || modem_uid); - found = find_modem (manager, modem_path, modem_uid); + get_object_lookup_info (str, "modem", MM_DBUS_MODEM_PREFIX, + &modem_path, &modem_uid, &modem_any); + g_assert (!!modem_path + !!modem_uid + modem_any == 1); + found = find_modem (manager, modem_path, modem_uid, modem_any); if (o_manager) *o_manager = manager; @@ -552,37 +578,9 @@ look_for_bearer_in_modem (task); } -static gchar * -get_bearer_path (const gchar *path_or_index) -{ - gchar *bearer_path; - - /* We must have a given bearer specified */ - if (!path_or_index) { - g_printerr ("error: no bearer was specified\n"); - exit (EXIT_FAILURE); - } - - /* Bearer path may come in two ways: full DBus path or just bearer index. - * If it is a bearer index, we'll need to generate the DBus path ourselves */ - if (g_str_has_prefix (path_or_index, MM_DBUS_BEARER_PREFIX)) { - g_debug ("Assuming '%s' is the full bearer path", path_or_index); - bearer_path = g_strdup (path_or_index); - } else if (g_ascii_isdigit (path_or_index[0])) { - g_debug ("Assuming '%s' is the bearer index", path_or_index); - bearer_path = g_strdup_printf (MM_DBUS_BEARER_PREFIX "/%s", path_or_index); - } else { - g_printerr ("error: invalid path or index string specified: '%s'\n", - path_or_index); - exit (EXIT_FAILURE); - } - - return bearer_path; -} - void mmcli_get_bearer (GDBusConnection *connection, - const gchar *path_or_index, + const gchar *str, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) @@ -593,7 +591,9 @@ task = g_task_new (connection, cancellable, callback, user_data); ctx = g_new0 (GetBearerContext, 1); - ctx->bearer_path = get_bearer_path (path_or_index); + get_object_lookup_info (str, "bearer", MM_DBUS_BEARER_PREFIX, + &ctx->bearer_path, NULL, NULL); + g_assert (ctx->bearer_path); g_task_set_task_data (task, ctx, (GDestroyNotify) get_bearer_context_free); mmcli_get_manager (connection, @@ -604,7 +604,7 @@ MMBearer * mmcli_get_bearer_sync (GDBusConnection *connection, - const gchar *path_or_index, + const gchar *str, MMManager **o_manager, MMObject **o_object) { @@ -612,9 +612,11 @@ GList *modems; GList *l; MMBearer *found = NULL; - gchar *bearer_path; + gchar *bearer_path = NULL; - bearer_path = get_bearer_path (path_or_index); + get_object_lookup_info (str, "bearer", MM_DBUS_BEARER_PREFIX, + &bearer_path, NULL, NULL); + g_assert (bearer_path); manager = mmcli_get_manager_sync (connection); modems = g_dbus_object_manager_get_objects (G_DBUS_OBJECT_MANAGER (manager)); @@ -695,7 +697,8 @@ typedef struct { gchar *sim_path; - gchar *sim_maybe_uid; + gchar *modem_uid; + gboolean sim_any; MMManager *manager; MMObject *current; } GetSimContext; @@ -722,7 +725,7 @@ g_object_unref (ctx->current); if (ctx->manager) g_object_unref (ctx->manager); - g_free (ctx->sim_maybe_uid); + g_free (ctx->modem_uid); g_free (ctx->sim_path); g_free (ctx); } @@ -747,6 +750,53 @@ } static void +list_sim_slots_ready (MMModem *modem, + GAsyncResult *res, + GTask *task) +{ + g_autoptr(GPtrArray) sim_slots = NULL; + GetSimContext *ctx; + GetSimResults *results = NULL; + guint i; + GError *error = NULL; + + ctx = g_task_get_task_data (task); + + sim_slots = mm_modem_list_sim_slots_finish (modem, res, &error); + if (error) { + g_printerr ("error: couldn't list SIM slots at '%s': '%s'\n", + mm_modem_get_path (modem), + error->message); + exit (EXIT_FAILURE); + } + + for (i = 0; i < sim_slots->len; i++) { + MMSim *sim; + + sim = MM_SIM (g_ptr_array_index (sim_slots, i)); + if (sim && g_str_equal (mm_sim_get_path (sim), ctx->sim_path)) { + /* Found! */ + results = g_new (GetSimResults, 1); + results->manager = g_object_ref (ctx->manager); + results->object = g_object_ref (ctx->current); + results->sim = g_object_ref (sim); + break; + } + } + + if (results) { + g_task_return_pointer (task, results, (GDestroyNotify) get_sim_results_free); + g_object_unref (task); + return; + } + + g_printerr ("error: couldn't get additional SIM '%s' at '%s'\n", + ctx->sim_path, + mm_modem_get_path (modem)); + exit (EXIT_FAILURE); +} + +static void get_sim_ready (MMModem *modem, GAsyncResult *res, GTask *task) @@ -760,7 +810,7 @@ sim = mm_modem_get_sim_finish (modem, res, &error); if (error) { - g_printerr ("error: couldn't get sim '%s' at '%s': '%s'\n", + g_printerr ("error: couldn't get SIM '%s' at '%s': '%s'\n", ctx->sim_path, mm_modem_get_path (modem), error->message); @@ -791,76 +841,69 @@ modems = g_dbus_object_manager_get_objects (G_DBUS_OBJECT_MANAGER (ctx->manager)); if (!modems) { - g_printerr ("error: couldn't find sim at '%s': 'no modems found'\n", + g_printerr ("error: couldn't find SIM at '%s': 'no modems found'\n", ctx->sim_path); exit (EXIT_FAILURE); } for (l = modems; l && !ctx->current; l = g_list_next (l)) { - MMObject *object; - MMModem *modem; + MMObject *object; + MMModem *modem; + const gchar *const *sim_slot_paths; object = MM_OBJECT (l->data); modem = mm_object_get_modem (object); - if (!ctx->sim_path) { - if (g_str_equal (ctx->sim_maybe_uid, mm_modem_get_device (modem))) + sim_slot_paths = mm_modem_get_sim_slot_paths (modem); + + /* check if we can match the first object found */ + if (ctx->sim_any) { + g_assert (!ctx->sim_path); + ctx->sim_path = g_strdup (mm_modem_get_sim_path (modem)); + } + /* check if modem UID matches */ + else if (ctx->modem_uid) { + if (g_str_equal (ctx->modem_uid, mm_modem_get_device (modem))) { + g_assert (!ctx->sim_path); ctx->sim_path = g_strdup (mm_modem_get_sim_path (modem)); - else { + } else { g_object_unref (modem); continue; } } + if (g_str_equal (ctx->sim_path, mm_modem_get_sim_path (modem))) { ctx->current = g_object_ref (object); mm_modem_get_sim (modem, g_task_get_cancellable (task), (GAsyncReadyCallback)get_sim_ready, task); + } else if (sim_slot_paths) { + guint i; + + for (i = 0; sim_slot_paths[i]; i++) { + if (g_str_equal (ctx->sim_path, sim_slot_paths[i])) { + ctx->current = g_object_ref (object); + mm_modem_list_sim_slots (modem, + g_task_get_cancellable (task), + (GAsyncReadyCallback)list_sim_slots_ready, + task); + break; + } + } } g_object_unref (modem); } g_list_free_full (modems, g_object_unref); - if (!ctx->sim_path) { - g_printerr ("error: invalid index string specified: '%s'\n", - ctx->sim_maybe_uid); - exit (EXIT_FAILURE); - } - if (!ctx->current) { - g_printerr ("error: couldn't find sim at '%s'\n", - ctx->sim_path); - exit (EXIT_FAILURE); - } -} - -static gchar * -get_sim_path (const gchar *path_or_index) -{ - gchar *sim_path = NULL; - - /* We must have a given sim specified */ - if (!path_or_index) { - g_printerr ("error: no sim was specified\n"); + g_printerr ("error: couldn't find SIM\n"); exit (EXIT_FAILURE); } - - /* Sim path may come in two ways: full DBus path or just sim index. - * If it is a sim index, we'll need to generate the DBus path ourselves */ - if (g_str_has_prefix (path_or_index, MM_DBUS_SIM_PREFIX)) { - g_debug ("Assuming '%s' is the full SIM path", path_or_index); - sim_path = g_strdup (path_or_index); - } else if (g_ascii_isdigit (path_or_index[0])) { - g_debug ("Assuming '%s' is the SIM index", path_or_index); - sim_path = g_strdup_printf (MM_DBUS_SIM_PREFIX "/%s", path_or_index); - } - - return sim_path; } void mmcli_get_sim (GDBusConnection *connection, - const gchar *path_or_index_or_uid, + const gchar *str, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) @@ -871,8 +914,9 @@ task = g_task_new (connection, cancellable, callback, user_data); ctx = g_new0 (GetSimContext, 1); - ctx->sim_path = get_sim_path (path_or_index_or_uid); - ctx->sim_maybe_uid = g_strdup (path_or_index_or_uid); + get_object_lookup_info (str, "SIM", MM_DBUS_SIM_PREFIX, + &ctx->sim_path, &ctx->modem_uid, &ctx->sim_any); + g_assert (!!ctx->sim_path + !!ctx->modem_uid + ctx->sim_any == 1); g_task_set_task_data (task, ctx, (GDestroyNotify) get_sim_context_free); mmcli_get_manager (connection, @@ -883,7 +927,7 @@ MMSim * mmcli_get_sim_sync (GDBusConnection *connection, - const gchar *path_or_index_or_uid, + const gchar *str, MMManager **o_manager, MMObject **o_object) { @@ -891,30 +935,43 @@ GList *modems; GList *l; MMSim *found = NULL; - gchar *sim_path; + gchar *sim_path = NULL; + gchar *modem_uid = NULL; + gboolean sim_any = FALSE; - sim_path = get_sim_path (path_or_index_or_uid); + get_object_lookup_info (str, "SIM", MM_DBUS_SIM_PREFIX, + &sim_path, &modem_uid, &sim_any); + g_assert (!!sim_path + !!modem_uid + sim_any == 1); manager = mmcli_get_manager_sync (connection); modems = g_dbus_object_manager_get_objects (G_DBUS_OBJECT_MANAGER (manager)); if (!modems) { - g_printerr ("error: couldn't find sim at '%s': 'no modems found'\n", + g_printerr ("error: couldn't find SIM at '%s': 'no modems found'\n", sim_path); exit (EXIT_FAILURE); } for (l = modems; !found && l; l = g_list_next (l)) { - GError *error = NULL; - MMObject *object; - MMModem *modem; + GError *error = NULL; + MMObject *object; + MMModem *modem; + const gchar *const *sim_slot_paths; object = MM_OBJECT (l->data); modem = mm_object_get_modem (object); + sim_slot_paths = mm_modem_get_sim_slot_paths (modem); - if (!sim_path) { - if (g_str_equal (path_or_index_or_uid, mm_modem_get_device (modem))) + /* check if we can match the first object found */ + if (sim_any) { + g_assert (!sim_path); + sim_path = g_strdup (mm_modem_get_sim_path (modem)); + } + /* check if modem UID matches */ + else if (modem_uid) { + if (g_str_equal (modem_uid, mm_modem_get_device (modem))) { + g_assert (!sim_path); sim_path = g_strdup (mm_modem_get_sim_path (modem)); - else { + } else { g_object_unref (modem); continue; } @@ -923,7 +980,7 @@ if (g_str_equal (sim_path, mm_modem_get_sim_path (modem))) { found = mm_modem_get_sim_sync (modem, NULL, &error); if (error) { - g_printerr ("error: couldn't get sim '%s' in modem '%s': '%s'\n", + g_printerr ("error: couldn't get SIM '%s' in modem '%s': '%s'\n", sim_path, mm_modem_get_path (modem), error->message); @@ -932,19 +989,41 @@ if (found && o_object) *o_object = g_object_ref (object); + } else if (sim_slot_paths) { + guint i; + + for (i = 0; !found && sim_slot_paths[i]; i++) { + if (g_str_equal (sim_path, sim_slot_paths[i])) { + g_autoptr(GPtrArray) sim_slots = NULL; + guint j; + + sim_slots = mm_modem_list_sim_slots_sync (modem, NULL, &error); + if (error) { + g_printerr ("error: couldn't get SIM slots in modem '%s': '%s'\n", + mm_modem_get_path (modem), + error->message); + exit (EXIT_FAILURE); + } + + for (j = 0; j < sim_slots->len; j++) { + MMSim *sim; + + sim = MM_SIM (g_ptr_array_index (sim_slots, j)); + if (sim && g_str_equal (sim_path, mm_sim_get_path (sim))) { + found = g_object_ref (sim); + if (o_object) + *o_object = g_object_ref (object); + } + } + } + } } g_object_unref (modem); } - if (!sim_path) { - g_printerr ("error: invalid index string specified: '%s'\n", - path_or_index_or_uid); - exit (EXIT_FAILURE); - } - if (!found) { - g_printerr ("error: couldn't find sim at '%s'\n", sim_path); + g_printerr ("error: couldn't find SIM\n"); exit (EXIT_FAILURE); } @@ -1027,7 +1106,7 @@ MMSms *sms = MM_SMS (l->data); if (g_str_equal (mm_sms_get_path (sms), sms_path)) { - g_debug ("Sms found at '%s'\n", sms_path); + g_debug ("SMS found at '%s'\n", sms_path); return g_object_ref (sms); } } @@ -1129,37 +1208,9 @@ look_for_sms_in_modem (task); } -static gchar * -get_sms_path (const gchar *path_or_index) -{ - gchar *sms_path; - - /* We must have a given sms specified */ - if (!path_or_index) { - g_printerr ("error: no SMS was specified\n"); - exit (EXIT_FAILURE); - } - - /* Sms path may come in two ways: full DBus path or just sms index. - * If it is a sms index, we'll need to generate the DBus path ourselves */ - if (g_str_has_prefix (path_or_index, MM_DBUS_SMS_PREFIX)) { - g_debug ("Assuming '%s' is the full SMS path", path_or_index); - sms_path = g_strdup (path_or_index); - } else if (g_ascii_isdigit (path_or_index[0])) { - g_debug ("Assuming '%s' is the SMS index", path_or_index); - sms_path = g_strdup_printf (MM_DBUS_SMS_PREFIX "/%s", path_or_index); - } else { - g_printerr ("error: invalid path or index string specified: '%s'\n", - path_or_index); - exit (EXIT_FAILURE); - } - - return sms_path; -} - void mmcli_get_sms (GDBusConnection *connection, - const gchar *path_or_index, + const gchar *str, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) @@ -1170,7 +1221,8 @@ task = g_task_new (connection, cancellable, callback, user_data); ctx = g_new0 (GetSmsContext, 1); - ctx->sms_path = get_sms_path (path_or_index); + get_object_lookup_info (str, "SMS", MM_DBUS_SMS_PREFIX, + &ctx->sms_path, NULL, NULL); g_task_set_task_data (task, ctx, (GDestroyNotify) get_sms_context_free); mmcli_get_manager (connection, @@ -1181,7 +1233,7 @@ MMSms * mmcli_get_sms_sync (GDBusConnection *connection, - const gchar *path_or_index, + const gchar *str, MMManager **o_manager, MMObject **o_object) { @@ -1189,14 +1241,15 @@ GList *modems; GList *l; MMSms *found = NULL; - gchar *sms_path; + gchar *sms_path = NULL; - sms_path = get_sms_path (path_or_index); + get_object_lookup_info (str, "SMS", MM_DBUS_SMS_PREFIX, + &sms_path, NULL, NULL); manager = mmcli_get_manager_sync (connection); modems = g_dbus_object_manager_get_objects (G_DBUS_OBJECT_MANAGER (manager)); if (!modems) { - g_printerr ("error: couldn't find sms at '%s': 'no modems found'\n", + g_printerr ("error: couldn't find SMS at '%s': 'no modems found'\n", sms_path); exit (EXIT_FAILURE); } @@ -1418,37 +1471,9 @@ look_for_call_in_modem (task); } -static gchar * -get_call_path (const gchar *path_or_index) -{ - gchar *call_path; - - /* We must have a given call specified */ - if (!path_or_index) { - g_printerr ("error: no call was specified\n"); - exit (EXIT_FAILURE); - } - - /* Call path may come in two ways: full DBus path or just call index. - * If it is a call index, we'll need to generate the DBus path ourselves */ - if (g_str_has_prefix (path_or_index, MM_DBUS_CALL_PREFIX)) { - g_debug ("Assuming '%s' is the full call path", path_or_index); - call_path = g_strdup (path_or_index); - } else if (g_ascii_isdigit (path_or_index[0])) { - g_debug ("Assuming '%s' is the call index", path_or_index); - call_path = g_strdup_printf (MM_DBUS_CALL_PREFIX "/%s", path_or_index); - } else { - g_printerr ("error: invalid path or index string specified: '%s'\n", - path_or_index); - exit (EXIT_FAILURE); - } - - return call_path; -} - void mmcli_get_call (GDBusConnection *connection, - const gchar *path_or_index, + const gchar *str, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) @@ -1459,7 +1484,8 @@ task = g_task_new (connection, cancellable, callback, user_data); ctx = g_new0 (GetCallContext, 1); - ctx->call_path = get_call_path (path_or_index); + get_object_lookup_info (str, "call", MM_DBUS_CALL_PREFIX, + &ctx->call_path, NULL, NULL); g_task_set_task_data (task, ctx, (GDestroyNotify) get_call_context_free); mmcli_get_manager (connection, @@ -1470,7 +1496,7 @@ MMCall * mmcli_get_call_sync (GDBusConnection *connection, - const gchar *path_or_index, + const gchar *str, MMManager **o_manager, MMObject **o_object) { @@ -1478,9 +1504,10 @@ GList *modems; GList *l; MMCall *found = NULL; - gchar *call_path; + gchar *call_path = NULL; - call_path = get_call_path (path_or_index); + get_object_lookup_info (str, "call", MM_DBUS_CALL_PREFIX, + &call_path, NULL, NULL); manager = mmcli_get_manager_sync (connection); modems = g_dbus_object_manager_get_objects (G_DBUS_OBJECT_MANAGER (manager)); @@ -1551,10 +1578,9 @@ return "Suspend"; case MM_MODEM_STATE_CHANGE_REASON_FAILURE: return "Failure"; + default: + g_assert_not_reached (); } - - g_warn_if_reached (); - return NULL; } /* Common options */ @@ -1566,16 +1592,16 @@ static GOptionEntry entries[] = { { "modem", 'm', 0, G_OPTION_ARG_STRING, &modem_str, - "Specify modem by path or index. Shows modem information if no action specified.", - "[PATH|INDEX]" + "Specify modem by path, index, UID or 'any'. Shows modem information if no action specified.", + "[PATH|INDEX|UID|any]" }, { "bearer", 'b', 0, G_OPTION_ARG_STRING, &bearer_str, "Specify bearer by path or index. Shows bearer information if no action specified.", "[PATH|INDEX]" }, { "sim", 'i', 0, G_OPTION_ARG_STRING, &sim_str, - "Specify SIM card by path or index. Shows SIM card information if no action specified.", - "[PATH|INDEX]" + "Specify SIM card by path, index, UID or 'any'. Shows SIM card information if no action specified.", + "[PATH|INDEX|UID|any]" }, { "sms", 's', 0, G_OPTION_ARG_STRING, &sms_str, "Specify SMS by path or index. Shows SMS information if no action specified.", diff -Nru modemmanager-1.12.8/cli/mmcli-common.h modemmanager-1.16.6/cli/mmcli-common.h --- modemmanager-1.12.8/cli/mmcli-common.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-common.h 2021-06-06 21:40:59.000000000 +0800 @@ -34,18 +34,18 @@ MMManager *mmcli_get_manager_sync (GDBusConnection *connection); void mmcli_get_modem (GDBusConnection *connection, - const gchar *modem_str, + const gchar *str, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); MMObject *mmcli_get_modem_finish (GAsyncResult *res, MMManager **o_manager); MMObject *mmcli_get_modem_sync (GDBusConnection *connection, - const gchar *modem_str, + const gchar *str, MMManager **o_manager); void mmcli_get_bearer (GDBusConnection *connection, - const gchar *path_or_index, + const gchar *str, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); @@ -53,12 +53,12 @@ MMManager **manager, MMObject **object); MMBearer *mmcli_get_bearer_sync (GDBusConnection *connection, - const gchar *path_or_index, + const gchar *str, MMManager **manager, MMObject **object); void mmcli_get_sim (GDBusConnection *connection, - const gchar *path_or_index, + const gchar *str, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); @@ -66,12 +66,12 @@ MMManager **manager, MMObject **object); MMSim *mmcli_get_sim_sync (GDBusConnection *connection, - const gchar *path_or_index, + const gchar *str, MMManager **manager, MMObject **object); void mmcli_get_sms (GDBusConnection *connection, - const gchar *path_or_index, + const gchar *str, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); @@ -79,12 +79,12 @@ MMManager **manager, MMObject **object); MMSms *mmcli_get_sms_sync (GDBusConnection *connection, - const gchar *path_or_index, + const gchar *str, MMManager **manager, MMObject **object); void mmcli_get_call (GDBusConnection *connection, - const gchar *path_or_index, + const gchar *str, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); @@ -92,7 +92,7 @@ MMManager **manager, MMObject **object); MMCall *mmcli_get_call_sync (GDBusConnection *connection, - const gchar *path_or_index, + const gchar *str, MMManager **manager, MMObject **object); diff -Nru modemmanager-1.12.8/cli/mmcli-manager.c modemmanager-1.16.6/cli/mmcli-manager.c --- modemmanager-1.12.8/cli/mmcli-manager.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-manager.c 2021-06-06 21:40:59.000000000 +0800 @@ -108,7 +108,7 @@ /* Status options */ group = g_option_group_new ("manager", - "Manager options", + "Manager options:", "Show manager options", NULL, NULL); @@ -164,7 +164,7 @@ } static void -context_free (Context *ctx) +context_free (void) { if (!ctx) return; @@ -184,7 +184,7 @@ void mmcli_manager_shutdown (void) { - context_free (ctx); + context_free (); } static void @@ -332,9 +332,14 @@ gchar *extra; const gchar *manufacturer; const gchar *model; + MMModem *modem; - manufacturer = mm_modem_get_manufacturer (mm_object_peek_modem (obj)); - model = mm_modem_get_model (mm_object_peek_modem (obj)); + modem = mm_object_peek_modem (obj); + if (!modem) + return; + + manufacturer = mm_modem_get_manufacturer (modem); + model = mm_modem_get_model (modem); extra = g_strdup_printf ("[%s] %s", manufacturer ? manufacturer : "manufacturer unknown", model ? model : "model unknown"); @@ -444,7 +449,7 @@ #if defined WITH_UDEV if (report_kernel_event_auto_scan) { - const gchar *subsys[] = { "tty", "usbmisc", "net", NULL }; + const gchar *subsys[] = { "tty", "usbmisc", "net", "rpmsg", NULL }; guint i; ctx->udev = g_udev_client_new (subsys); diff -Nru modemmanager-1.12.8/cli/mmcli-modem-3gpp.c modemmanager-1.16.6/cli/mmcli-modem-3gpp.c --- modemmanager-1.12.8/cli/mmcli-modem-3gpp.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-modem-3gpp.c 2021-06-06 21:40:59.000000000 +0800 @@ -103,7 +103,7 @@ GOptionGroup *group; group = g_option_group_new ("3gpp", - "3GPP options", + "3GPP options:", "Show 3GPP related options", NULL, NULL); @@ -154,7 +154,7 @@ } static void -context_free (Context *ctx) +context_free (void) { if (!ctx) return; @@ -207,7 +207,7 @@ void mmcli_modem_3gpp_shutdown (void) { - context_free (ctx); + context_free (); } static void @@ -624,7 +624,6 @@ /* Request to set initial EPS bearer properties? */ if (set_initial_eps_bearer_settings_str) { - GError *error = NULL; gboolean result; MMBearerProperties *config; diff -Nru modemmanager-1.12.8/cli/mmcli-modem-cdma.c modemmanager-1.16.6/cli/mmcli-modem-cdma.c --- modemmanager-1.12.8/cli/mmcli-modem-cdma.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-modem-cdma.c 2021-06-06 21:40:59.000000000 +0800 @@ -70,7 +70,7 @@ GOptionGroup *group; group = g_option_group_new ("cdma", - "CDMA options", + "CDMA options:", "Show CDMA related options", NULL, NULL); @@ -107,7 +107,7 @@ } static void -context_free (Context *ctx) +context_free (void) { if (!ctx) return; @@ -142,7 +142,7 @@ void mmcli_modem_cdma_shutdown (void) { - context_free (ctx); + context_free (); } static void diff -Nru modemmanager-1.12.8/cli/mmcli-modem-firmware.c modemmanager-1.16.6/cli/mmcli-modem-firmware.c --- modemmanager-1.12.8/cli/mmcli-modem-firmware.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-modem-firmware.c 2021-06-06 21:40:59.000000000 +0800 @@ -71,7 +71,7 @@ GOptionGroup *group; group = g_option_group_new ("firmware", - "Firmware options", + "Firmware options:", "Show Firmware options", NULL, NULL); @@ -106,7 +106,7 @@ } static void -context_free (Context *ctx) +context_free (void) { if (!ctx) return; @@ -136,7 +136,7 @@ void mmcli_modem_firmware_shutdown (void) { - context_free (ctx); + context_free (); } static void @@ -344,7 +344,6 @@ /* Request to select a given image? */ if (select_str) { gboolean result; - GError *error = NULL; g_debug ("Synchronously selecting firmware image in modem..."); result = mm_modem_firmware_select_sync (ctx->modem_firmware, diff -Nru modemmanager-1.12.8/cli/mmcli-modem-location.c modemmanager-1.16.6/cli/mmcli-modem-location.c --- modemmanager-1.12.8/cli/mmcli-modem-location.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-modem-location.c 2021-06-06 21:40:59.000000000 +0800 @@ -163,7 +163,7 @@ GOptionGroup *group; group = g_option_group_new ("location", - "Location options", + "Location options:", "Show Location options", NULL, NULL); @@ -227,7 +227,7 @@ } static void -context_free (Context *ctx) +context_free (void) { if (!ctx) return; @@ -262,7 +262,7 @@ void mmcli_modem_location_shutdown (void) { - context_free (ctx); + context_free (); } static void @@ -510,18 +510,18 @@ MMLocationCdmaBs *location_cdma_bs, const GError *error) { - gchar *nmea = NULL; - gchar *mcc = NULL; - gchar *mnc = NULL; - gchar *lac = NULL; - gchar *tac = NULL; - gchar *cid = NULL; - const gchar *gps_utc = NULL; - gchar *gps_longitude = NULL; - gchar *gps_latitude = NULL; - gchar *gps_altitude = NULL; - gchar *cdma_bs_longitude = NULL; - gchar *cdma_bs_latitude = NULL; + gchar **nmea = NULL; + gchar *mcc = NULL; + gchar *mnc = NULL; + gchar *lac = NULL; + gchar *tac = NULL; + gchar *cid = NULL; + const gchar *gps_utc = NULL; + gchar *gps_longitude = NULL; + gchar *gps_latitude = NULL; + gchar *gps_altitude = NULL; + gchar *cdma_bs_longitude = NULL; + gchar *cdma_bs_latitude = NULL; if (error) { g_printerr ("error: couldn't get location from the modem: '%s'\n", @@ -538,7 +538,7 @@ } if (location_gps_nmea) - nmea = mm_location_gps_nmea_build_full (location_gps_nmea); + nmea = mm_location_gps_nmea_get_traces (location_gps_nmea); if (location_gps_raw) { gps_utc = mm_location_gps_raw_get_utc_time (location_gps_raw); @@ -557,7 +557,7 @@ mmcli_output_string_take (MMC_F_LOCATION_3GPP_LAC, lac); mmcli_output_string_take (MMC_F_LOCATION_3GPP_TAC, tac); mmcli_output_string_take (MMC_F_LOCATION_3GPP_CID, cid); - mmcli_output_string_multiline_take (MMC_F_LOCATION_GPS_NMEA, nmea); + mmcli_output_string_array_take (MMC_F_LOCATION_GPS_NMEA, nmea, TRUE); mmcli_output_string (MMC_F_LOCATION_GPS_UTC, gps_utc); mmcli_output_string_take (MMC_F_LOCATION_GPS_LONG, gps_longitude); mmcli_output_string_take (MMC_F_LOCATION_GPS_LAT, gps_latitude); diff -Nru modemmanager-1.12.8/cli/mmcli-modem-messaging.c modemmanager-1.16.6/cli/mmcli-modem-messaging.c --- modemmanager-1.12.8/cli/mmcli-modem-messaging.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-modem-messaging.c 2021-06-06 21:40:59.000000000 +0800 @@ -82,7 +82,7 @@ GOptionGroup *group; group = g_option_group_new ("messaging", - "Messaging options", + "Messaging options:", "Show Messaging options", NULL, NULL); @@ -124,7 +124,7 @@ } static void -context_free (Context *ctx) +context_free (void) { if (!ctx) return; @@ -161,7 +161,7 @@ void mmcli_modem_messaging_shutdown (void) { - context_free (ctx); + context_free (); } static MMSmsProperties * @@ -457,7 +457,6 @@ /* Request to create a new SMS? */ if (create_str) { MMSms *sms; - GError *error = NULL; MMSmsProperties *properties; properties = build_sms_properties_from_input (create_str, diff -Nru modemmanager-1.12.8/cli/mmcli-modem-oma.c modemmanager-1.16.6/cli/mmcli-modem-oma.c --- modemmanager-1.12.8/cli/mmcli-modem-oma.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-modem-oma.c 2021-06-06 21:40:59.000000000 +0800 @@ -87,7 +87,7 @@ GOptionGroup *group; group = g_option_group_new ("oma", - "OMA options", + "OMA options:", "Show OMA options", NULL, NULL); @@ -125,7 +125,7 @@ } static void -context_free (Context *ctx) +context_free (void) { if (!ctx) return; @@ -155,7 +155,7 @@ void mmcli_modem_oma_shutdown (void) { - context_free (ctx); + context_free (); } static void @@ -439,7 +439,6 @@ /* Request to setup OMA features? */ if (setup_str) { gboolean result; - GError *error = NULL; MMOmaFeature features; features = mm_common_get_oma_features_from_string (setup_str, &error); @@ -460,7 +459,6 @@ /* Request to start session? */ if (start_str) { gboolean result; - GError *error = NULL; MMOmaSessionType session_type; session_type = mm_common_get_oma_session_type_from_string (start_str, &error); @@ -481,7 +479,6 @@ /* Request to accept or reject session? */ if (accept_str || reject_str) { gboolean result; - GError *error = NULL; guint session_id; if (!mm_get_uint_from_str (accept_str ? accept_str : reject_str, &session_id)) { diff -Nru modemmanager-1.12.8/cli/mmcli-modem-signal.c modemmanager-1.16.6/cli/mmcli-modem-signal.c --- modemmanager-1.12.8/cli/mmcli-modem-signal.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-modem-signal.c 2021-06-06 21:40:59.000000000 +0800 @@ -66,7 +66,7 @@ GOptionGroup *group; group = g_option_group_new ("signal", - "Signal options", + "Signal options:", "Show Signal options", NULL, NULL); @@ -100,7 +100,7 @@ } static void -context_free (Context *ctx) +context_free (void) { if (!ctx) return; @@ -130,7 +130,7 @@ void mmcli_modem_signal_shutdown (void) { - context_free (ctx); + context_free (); } static void @@ -153,6 +153,9 @@ gchar *lte_rsrp = NULL; gchar *lte_rsrq = NULL; gchar *lte_snr = NULL; + gchar *nr5g_rsrp = NULL; + gchar *nr5g_rsrq = NULL; + gchar *nr5g_snr = NULL; refresh_rate = g_strdup_printf ("%u", mm_modem_signal_get_rate (ctx->modem_signal)); @@ -204,6 +207,16 @@ lte_snr = g_strdup_printf ("%.2lf", value); } + signal = mm_modem_signal_peek_nr5g (ctx->modem_signal); + if (signal) { + if ((value = mm_signal_get_rsrq (signal)) != MM_SIGNAL_UNKNOWN) + nr5g_rsrq = g_strdup_printf ("%.2lf", value); + if ((value = mm_signal_get_rsrp (signal)) != MM_SIGNAL_UNKNOWN) + nr5g_rsrp = g_strdup_printf ("%.2lf", value); + if ((value = mm_signal_get_snr (signal)) != MM_SIGNAL_UNKNOWN) + nr5g_snr = g_strdup_printf ("%.2lf", value); + } + mmcli_output_string_take_typed (MMC_F_SIGNAL_REFRESH_RATE, refresh_rate, "seconds"); mmcli_output_string_take_typed (MMC_F_SIGNAL_CDMA1X_RSSI, cdma1x_rssi, "dBm"); mmcli_output_string_take_typed (MMC_F_SIGNAL_CDMA1X_ECIO, cdma1x_ecio, "dBm"); @@ -219,6 +232,9 @@ mmcli_output_string_take_typed (MMC_F_SIGNAL_LTE_RSRQ, lte_rsrq, "dB"); mmcli_output_string_take_typed (MMC_F_SIGNAL_LTE_RSRP, lte_rsrp, "dBm"); mmcli_output_string_take_typed (MMC_F_SIGNAL_LTE_SNR, lte_snr, "dB"); + mmcli_output_string_take_typed (MMC_F_SIGNAL_5G_RSRQ, nr5g_rsrq, "dB"); + mmcli_output_string_take_typed (MMC_F_SIGNAL_5G_RSRP, nr5g_rsrp, "dBm"); + mmcli_output_string_take_typed (MMC_F_SIGNAL_5G_SNR, nr5g_snr, "dB"); mmcli_output_dump (); } diff -Nru modemmanager-1.12.8/cli/mmcli-modem-simple.c modemmanager-1.16.6/cli/mmcli-modem-simple.c --- modemmanager-1.12.8/cli/mmcli-modem-simple.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-modem-simple.c 2021-06-06 21:40:59.000000000 +0800 @@ -65,7 +65,7 @@ GOptionGroup *group; group = g_option_group_new ("simple", - "Simple options", + "Simple options:", "Show Simple options", NULL, NULL); @@ -101,7 +101,7 @@ } static void -context_free (Context *ctx) +context_free (void) { if (!ctx) return; @@ -131,7 +131,7 @@ void mmcli_modem_simple_shutdown (void) { - context_free (ctx); + context_free (); } static void diff -Nru modemmanager-1.12.8/cli/mmcli-modem-time.c modemmanager-1.16.6/cli/mmcli-modem-time.c --- modemmanager-1.12.8/cli/mmcli-modem-time.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-modem-time.c 2021-06-06 21:40:59.000000000 +0800 @@ -61,7 +61,7 @@ GOptionGroup *group; group = g_option_group_new ("time", - "Time options", + "Time options:", "Show Time options", NULL, NULL); @@ -91,7 +91,7 @@ } static void -context_free (Context *ctx) +context_free (void) { if (!ctx) return; @@ -126,7 +126,7 @@ void mmcli_modem_time_shutdown (void) { - context_free (ctx); + context_free (); } static void diff -Nru modemmanager-1.12.8/cli/mmcli-modem-voice.c modemmanager-1.16.6/cli/mmcli-modem-voice.c --- modemmanager-1.12.8/cli/mmcli-modem-voice.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-modem-voice.c 2021-06-06 21:40:59.000000000 +0800 @@ -113,7 +113,7 @@ GOptionGroup *group; group = g_option_group_new ("voice", - "Voice options", + "Voice options:", "Show Voice options", NULL, NULL); @@ -156,7 +156,7 @@ } static void -context_free (Context *ctx) +context_free (void) { if (!ctx) return; @@ -188,7 +188,7 @@ void mmcli_modem_voice_shutdown (void) { - context_free (ctx); + context_free (); } static MMCallProperties * @@ -673,7 +673,6 @@ /* Request to create a new call? */ if (create_str) { MMCall *call; - GError *error = NULL; MMCallProperties *properties; properties = build_call_properties_from_input (create_str); diff -Nru modemmanager-1.12.8/cli/mmcli-modem.c modemmanager-1.16.6/cli/mmcli-modem.c --- modemmanager-1.12.8/cli/mmcli-modem.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-modem.c 2021-06-06 21:40:59.000000000 +0800 @@ -63,6 +63,7 @@ static gchar *set_allowed_modes_str; static gchar *set_preferred_mode_str; static gchar *set_current_bands_str; +static gint set_primary_sim_slot_int; static gboolean inhibit_flag; static GOptionEntry entries[] = { @@ -126,6 +127,10 @@ "Set bands to be used by a given modem.", "[BAND1|BAND2...]" }, + { "set-primary-sim-slot", 0, 0, G_OPTION_ARG_INT, &set_primary_sim_slot_int, + "Switch to the selected SIM slot", + "[SLOT NUMBER]" + }, { "inhibit", 0, 0, G_OPTION_ARG_NONE, &inhibit_flag, "Inhibit the modem", NULL @@ -140,7 +145,7 @@ /* Status options */ group = g_option_group_new ("modem", - "Modem options", + "Modem options:", "Show modem options", NULL, NULL); @@ -173,6 +178,7 @@ !!set_allowed_modes_str + !!set_preferred_mode_str + !!set_current_bands_str + + (set_primary_sim_slot_int > 0) + inhibit_flag); if (n_actions == 0 && mmcli_get_common_modem_string ()) { @@ -205,7 +211,7 @@ } static void -context_free (Context *ctx) +context_free (void) { if (!ctx) return; @@ -230,7 +236,7 @@ void mmcli_modem_shutdown (void) { - context_free (ctx); + context_free (); } static void @@ -407,7 +413,7 @@ pco_list = mm_modem_3gpp_get_pco (ctx->modem_3gpp); initial_eps_bearer_path = mm_modem_3gpp_get_initial_eps_bearer_path (ctx->modem_3gpp); - if (mm_modem_get_current_capabilities (ctx->modem) & (MM_MODEM_CAPABILITY_LTE | MM_MODEM_CAPABILITY_LTE_ADVANCED)) { + if (mm_modem_get_current_capabilities (ctx->modem) & (MM_MODEM_CAPABILITY_LTE)) { MMBearerProperties *initial_eps_bearer_properties; initial_eps_bearer_properties = mm_modem_3gpp_peek_initial_eps_bearer_settings (ctx->modem_3gpp); @@ -475,6 +481,8 @@ sim_path = mm_modem_get_sim_path (ctx->modem); mmcli_output_string (MMC_F_SIM_PATH, g_strcmp0 (sim_path, "/") != 0 ? sim_path : NULL); + mmcli_output_sim_slots (mm_modem_dup_sim_slot_paths (ctx->modem), + mm_modem_get_primary_sim_slot (ctx->modem)); bearer_paths = (const gchar **) mm_modem_get_bearer_paths (ctx->modem); mmcli_output_string_array (MMC_F_BEARER_PATHS, (bearer_paths && bearer_paths[0]) ? bearer_paths : NULL, TRUE); @@ -889,6 +897,32 @@ } static void +set_primary_sim_slot_process_reply (gboolean result, + const GError *error) +{ + if (!result) { + g_printerr ("error: couldn't request primary SIM switch: '%s'\n", + error ? error->message : "unknown error"); + exit (EXIT_FAILURE); + } + + g_print ("successfully requested primary SIM switch in modem\n"); +} + +static void +set_primary_sim_slot_ready (MMModem *modem, + GAsyncResult *result) +{ + gboolean operation_result; + g_autoptr(GError) error = NULL; + + operation_result = mm_modem_set_primary_sim_slot_finish (modem, result, &error); + set_primary_sim_slot_process_reply (operation_result, error); + + mmcli_async_operation_done (); +} + +static void state_changed (MMModem *modem, MMModemState old_state, MMModemState new_state, @@ -1130,6 +1164,16 @@ return; } + /* Request to switch SIM? */ + if (set_primary_sim_slot_int > 0) { + mm_modem_set_primary_sim_slot (ctx->modem, + set_primary_sim_slot_int, + ctx->cancellable, + (GAsyncReadyCallback)set_primary_sim_slot_ready, + NULL); + return; + } + /* Request to inhibit the modem? */ if (inhibit_flag) { gchar *uid; @@ -1294,7 +1338,6 @@ /* Request to create a new bearer? */ if (create_bearer_str) { MMBearer *bearer; - GError *error = NULL; MMBearerProperties *properties; properties = mm_bearer_properties_new_from_string (create_bearer_str, &error); @@ -1390,5 +1433,14 @@ return; } + /* Request to switch current SIM? */ + if (set_primary_sim_slot_int > 0) { + gboolean result; + + result = mm_modem_set_primary_sim_slot_sync (ctx->modem, set_primary_sim_slot_int, NULL, &error); + set_primary_sim_slot_process_reply (result, error); + return; + } + g_warn_if_reached (); } diff -Nru modemmanager-1.12.8/cli/mmcli-output.c modemmanager-1.16.6/cli/mmcli-output.c --- modemmanager-1.12.8/cli/mmcli-output.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-output.c 2021-06-06 21:40:59.000000000 +0800 @@ -57,6 +57,7 @@ [MMC_S_MODEM_SIGNAL_GSM] = { "GSM" }, [MMC_S_MODEM_SIGNAL_UMTS] = { "UMTS" }, [MMC_S_MODEM_SIGNAL_LTE] = { "LTE" }, + [MMC_S_MODEM_SIGNAL_5G] = { "5G" }, [MMC_S_MODEM_OMA] = { "OMA" }, [MMC_S_MODEM_OMA_CURRENT] = { "Current session" }, [MMC_S_MODEM_OMA_PENDING] = { "Pending sessions" }, @@ -93,7 +94,7 @@ } FieldInfo; static FieldInfo field_infos[] = { - [MMC_F_GENERAL_DBUS_PATH] = { "modem.dbus-path", "dbus path", MMC_S_MODEM_GENERAL, }, + [MMC_F_GENERAL_DBUS_PATH] = { "modem.dbus-path", "path", MMC_S_MODEM_GENERAL, }, [MMC_F_GENERAL_DEVICE_ID] = { "modem.generic.device-identifier", "device id", MMC_S_MODEM_GENERAL, }, [MMC_F_HARDWARE_MANUFACTURER] = { "modem.generic.manufacturer", "manufacturer", MMC_S_MODEM_HARDWARE, }, [MMC_F_HARDWARE_MODEL] = { "modem.generic.model", "model", MMC_S_MODEM_HARDWARE, }, @@ -130,7 +131,7 @@ [MMC_F_3GPP_REGISTRATION] = { "modem.3gpp.registration-state", "registration", MMC_S_MODEM_3GPP, }, [MMC_F_3GPP_PCO] = { "modem.3gpp.pco", "pco", MMC_S_MODEM_3GPP, }, [MMC_F_3GPP_EPS_UE_MODE] = { "modem.3gpp.eps.ue-mode-operation", "ue mode of operation", MMC_S_MODEM_3GPP_EPS, }, - [MMC_F_3GPP_EPS_INITIAL_BEARER_PATH] = { "modem.3gpp.eps.initial-bearer.dbus-path", "initial bearer dbus path", MMC_S_MODEM_3GPP_EPS, }, + [MMC_F_3GPP_EPS_INITIAL_BEARER_PATH] = { "modem.3gpp.eps.initial-bearer.dbus-path", "initial bearer path", MMC_S_MODEM_3GPP_EPS, }, [MMC_F_3GPP_EPS_BEARER_SETTINGS_APN] = { "modem.3gpp.eps.initial-bearer.settings.apn", "initial bearer apn", MMC_S_MODEM_3GPP_EPS, }, [MMC_F_3GPP_EPS_BEARER_SETTINGS_IP_TYPE] = { "modem.3gpp.eps.initial-bearer.settings.ip-type", "initial bearer ip type", MMC_S_MODEM_3GPP_EPS, }, [MMC_F_3GPP_EPS_BEARER_SETTINGS_USER] = { "modem.3gpp.eps.initial-bearer.settings.user", "initial bearer user", MMC_S_MODEM_3GPP_EPS, }, @@ -146,8 +147,10 @@ [MMC_F_CDMA_REGISTRATION_CDMA1X] = { "modem.cdma.cdma1x-registration-state", "registration cdma1x", MMC_S_MODEM_CDMA, }, [MMC_F_CDMA_REGISTRATION_EVDO] = { "modem.cdma.evdo-registration-state", "registration evdo", MMC_S_MODEM_CDMA, }, [MMC_F_CDMA_ACTIVATION] = { "modem.cdma.activation-state", "activation", MMC_S_MODEM_CDMA, }, - [MMC_F_SIM_PATH] = { "modem.generic.sim", "dbus path", MMC_S_MODEM_SIM, }, - [MMC_F_BEARER_PATHS] = { "modem.generic.bearers", "dbus path", MMC_S_MODEM_BEARER, }, + [MMC_F_SIM_PATH] = { "modem.generic.sim", "primary sim path", MMC_S_MODEM_SIM, }, + [MMC_F_SIM_PRIMARY_SLOT] = { "modem.generic.primary-sim-slot", NULL, MMC_S_MODEM_SIM, }, + [MMC_F_SIM_SLOT_PATHS] = { "modem.generic.sim-slots", "sim slot paths", MMC_S_MODEM_SIM, }, + [MMC_F_BEARER_PATHS] = { "modem.generic.bearers", "paths", MMC_S_MODEM_BEARER, }, [MMC_F_TIME_CURRENT] = { "modem.time.current", "current", MMC_S_MODEM_TIME, }, [MMC_F_TIMEZONE_CURRENT] = { "modem.timezone.current", "current", MMC_S_MODEM_TIMEZONE, }, [MMC_F_TIMEZONE_DST_OFFSET] = { "modem.time.dst-offset", "dst offset", MMC_S_MODEM_TIMEZONE, }, @@ -169,6 +172,9 @@ [MMC_F_SIGNAL_LTE_RSRQ] = { "modem.signal.lte.rsrq", "rsrq", MMC_S_MODEM_SIGNAL_LTE, }, [MMC_F_SIGNAL_LTE_RSRP] = { "modem.signal.lte.rsrp", "rsrp", MMC_S_MODEM_SIGNAL_LTE, }, [MMC_F_SIGNAL_LTE_SNR] = { "modem.signal.lte.snr", "s/n", MMC_S_MODEM_SIGNAL_LTE, }, + [MMC_F_SIGNAL_5G_RSRQ] = { "modem.signal.5g.rsrq", "rsrq", MMC_S_MODEM_SIGNAL_5G, }, + [MMC_F_SIGNAL_5G_RSRP] = { "modem.signal.5g.rsrp", "rsrp", MMC_S_MODEM_SIGNAL_5G, }, + [MMC_F_SIGNAL_5G_SNR] = { "modem.signal.5g.snr", "s/n", MMC_S_MODEM_SIGNAL_5G, }, [MMC_F_OMA_FEATURES] = { "modem.oma.features", "features", MMC_S_MODEM_OMA, }, [MMC_F_OMA_CURRENT_TYPE] = { "modem.oma.current.type", "type", MMC_S_MODEM_OMA_CURRENT, }, [MMC_F_OMA_CURRENT_STATE] = { "modem.oma.current.state", "state", MMC_S_MODEM_OMA_CURRENT, }, @@ -198,7 +204,7 @@ [MMC_F_FIRMWARE_VERSION] = { "modem.firmware.version", "version", MMC_S_MODEM_FIRMWARE, }, [MMC_F_FIRMWARE_FASTBOOT_AT] = { "modem.firmware.fastboot.at", "at command", MMC_S_MODEM_FIRMWARE_FASTBOOT, }, [MMC_F_VOICE_EMERGENCY_ONLY] = { "modem.voice.emergency-only", "emergency only", MMC_S_MODEM_VOICE, }, - [MMC_F_BEARER_GENERAL_DBUS_PATH] = { "bearer.dbus-path", "dbus path", MMC_S_BEARER_GENERAL, }, + [MMC_F_BEARER_GENERAL_DBUS_PATH] = { "bearer.dbus-path", "path", MMC_S_BEARER_GENERAL, }, [MMC_F_BEARER_GENERAL_TYPE] = { "bearer.type", "type", MMC_S_BEARER_GENERAL, }, [MMC_F_BEARER_STATUS_CONNECTED] = { "bearer.status.connected", "connected", MMC_S_BEARER_STATUS, }, [MMC_F_BEARER_STATUS_SUSPENDED] = { "bearer.status.suspended", "suspended", MMC_S_BEARER_STATUS, }, @@ -207,6 +213,7 @@ [MMC_F_BEARER_PROPERTIES_APN] = { "bearer.properties.apn", "apn", MMC_S_BEARER_PROPERTIES, }, [MMC_F_BEARER_PROPERTIES_ROAMING] = { "bearer.properties.roaming", "roaming", MMC_S_BEARER_PROPERTIES, }, [MMC_F_BEARER_PROPERTIES_IP_TYPE] = { "bearer.properties.ip-type", "ip type", MMC_S_BEARER_PROPERTIES, }, + [MMC_F_BEARER_PROPERTIES_ALLOWED_AUTH] = { "bearer.properties.allowed-auth", "allowed-auth", MMC_S_BEARER_PROPERTIES, }, [MMC_F_BEARER_PROPERTIES_USER] = { "bearer.properties.user", "user", MMC_S_BEARER_PROPERTIES, }, [MMC_F_BEARER_PROPERTIES_PASSWORD] = { "bearer.properties.password", "password", MMC_S_BEARER_PROPERTIES, }, [MMC_F_BEARER_PROPERTIES_NUMBER] = { "bearer.properties.number", "number", MMC_S_BEARER_PROPERTIES, }, @@ -226,7 +233,12 @@ [MMC_F_BEARER_STATS_DURATION] = { "bearer.stats.duration", "duration", MMC_S_BEARER_STATS, }, [MMC_F_BEARER_STATS_BYTES_RX] = { "bearer.stats.bytes-rx", "bytes rx", MMC_S_BEARER_STATS, }, [MMC_F_BEARER_STATS_BYTES_TX] = { "bearer.stats.bytes-tx", "bytes tx", MMC_S_BEARER_STATS, }, - [MMC_F_CALL_GENERAL_DBUS_PATH] = { "call.dbus-path", "dbus path", MMC_S_CALL_GENERAL, }, + [MMC_F_BEARER_STATS_ATTEMPTS] = { "bearer.stats.attempts", "attempts", MMC_S_BEARER_STATS, }, + [MMC_F_BEARER_STATS_FAILED_ATTEMPTS] = { "bearer.stats.failed-attempts", "attempts", MMC_S_BEARER_STATS, }, + [MMC_F_BEARER_STATS_TOTAL_DURATION] = { "bearer.stats.total-duration", "total-duration", MMC_S_BEARER_STATS, }, + [MMC_F_BEARER_STATS_TOTAL_BYTES_RX] = { "bearer.stats.total-bytes-rx", "total-bytes rx", MMC_S_BEARER_STATS, }, + [MMC_F_BEARER_STATS_TOTAL_BYTES_TX] = { "bearer.stats.total-bytes-tx", "total-bytes tx", MMC_S_BEARER_STATS, }, + [MMC_F_CALL_GENERAL_DBUS_PATH] = { "call.dbus-path", "path", MMC_S_CALL_GENERAL, }, [MMC_F_CALL_PROPERTIES_NUMBER] = { "call.properties.number", "number", MMC_S_CALL_PROPERTIES, }, [MMC_F_CALL_PROPERTIES_DIRECTION] = { "call.properties.direction", "direction", MMC_S_CALL_PROPERTIES, }, [MMC_F_CALL_PROPERTIES_MULTIPARTY] = { "call.properties.multiparty", "multiparty", MMC_S_CALL_PROPERTIES, }, @@ -236,7 +248,7 @@ [MMC_F_CALL_AUDIO_FORMAT_ENCODING] = { "call.audio-format.encoding", "encoding", MMC_S_CALL_AUDIO_FORMAT, }, [MMC_F_CALL_AUDIO_FORMAT_RESOLUTION] = { "call.audio-format.resolution", "resolution", MMC_S_CALL_AUDIO_FORMAT, }, [MMC_F_CALL_AUDIO_FORMAT_RATE] = { "call.audio-format.rate", "rate", MMC_S_CALL_AUDIO_FORMAT, }, - [MMC_F_SMS_GENERAL_DBUS_PATH] = { "sms.dbus-path", "dbus path", MMC_S_SMS_GENERAL, }, + [MMC_F_SMS_GENERAL_DBUS_PATH] = { "sms.dbus-path", "path", MMC_S_SMS_GENERAL, }, [MMC_F_SMS_CONTENT_NUMBER] = { "sms.content.number", "number", MMC_S_SMS_CONTENT, }, [MMC_F_SMS_CONTENT_TEXT] = { "sms.content.text", "text", MMC_S_SMS_CONTENT, }, [MMC_F_SMS_CONTENT_DATA] = { "sms.content.data", "data", MMC_S_SMS_CONTENT, }, @@ -253,9 +265,11 @@ [MMC_F_SMS_PROPERTIES_TIMESTAMP] = { "sms.properties.timestamp", "timestamp", MMC_S_SMS_PROPERTIES, }, [MMC_F_SMS_PROPERTIES_DELIVERY_STATE] = { "sms.properties.delivery-state", "delivery state", MMC_S_SMS_PROPERTIES, }, [MMC_F_SMS_PROPERTIES_DISCH_TIMESTAMP] = { "sms.properties.discharge-timestamp", "discharge timestamp", MMC_S_SMS_PROPERTIES, }, - [MMC_F_SIM_GENERAL_DBUS_PATH] = { "sim.dbus-path", "dbus path", MMC_S_SIM_GENERAL, }, + [MMC_F_SIM_GENERAL_DBUS_PATH] = { "sim.dbus-path", "path", MMC_S_SIM_GENERAL, }, + [MMC_F_SIM_PROPERTIES_ACTIVE] = { "sim.properties.active", "active", MMC_S_SIM_PROPERTIES, }, [MMC_F_SIM_PROPERTIES_IMSI] = { "sim.properties.imsi", "imsi", MMC_S_SIM_PROPERTIES, }, [MMC_F_SIM_PROPERTIES_ICCID] = { "sim.properties.iccid", "iccid", MMC_S_SIM_PROPERTIES, }, + [MMC_F_SIM_PROPERTIES_EID] = { "sim.properties.eid", "eid", MMC_S_SIM_PROPERTIES, }, [MMC_F_SIM_PROPERTIES_OPERATOR_ID] = { "sim.properties.operator-code", "operator id", MMC_S_SIM_PROPERTIES, }, [MMC_F_SIM_PROPERTIES_OPERATOR_NAME] = { "sim.properties.operator-name", "operator name", MMC_S_SIM_PROPERTIES, }, [MMC_F_SIM_PROPERTIES_EMERGENCY_NUMBERS] = { "sim.properties.emergency-numbers", "emergency numbers", MMC_S_SIM_PROPERTIES, }, @@ -332,6 +346,8 @@ g_free (((OutputItemListitem *)item)->value); g_free (((OutputItemListitem *)item)->extra); break; + default: + g_assert_not_reached (); } } @@ -557,6 +573,37 @@ } /******************************************************************************/ +/* (Custom) SIM slots output */ + +void +mmcli_output_sim_slots (gchar **sim_slot_paths, + guint primary_sim_slot) +{ + guint i; + + if (selected_type != MMC_OUTPUT_TYPE_HUMAN || !sim_slot_paths) { + mmcli_output_string_take (MMC_F_SIM_PRIMARY_SLOT, primary_sim_slot ? g_strdup_printf ("%u", primary_sim_slot) : NULL); + mmcli_output_string_array_take (MMC_F_SIM_SLOT_PATHS, sim_slot_paths ? sim_slot_paths : NULL, TRUE); + return; + } + + /* Include SIM slot number in each item */ + for (i = 0; sim_slot_paths[i]; i++) { + gchar *aux; + guint slot_number = i + 1; + + aux = g_strdup_printf ("slot %u: %s%s", + slot_number, + g_str_equal (sim_slot_paths[i], "/") ? "none" : sim_slot_paths[i], + (primary_sim_slot == slot_number) ? " (active)" : ""); + g_free (sim_slot_paths[i]); + sim_slot_paths[i] = aux; + } + + mmcli_output_string_array_take (MMC_F_SIM_SLOT_PATHS, sim_slot_paths, TRUE); +} + +/******************************************************************************/ /* (Custom) Network scan output */ static gchar * @@ -1079,6 +1126,49 @@ /******************************************************************************/ /* JSON-friendly output */ +static gchar * +json_strescape (const gchar *str) +{ + const gchar *p; + const gchar *end; + GString *output; + gsize len; + + len = strlen (str); + end = str + len; + output = g_string_sized_new (len); + + for (p = str; p < end; p++) { + if (*p == '\\' || *p == '"') { + g_string_append_c (output, '\\'); + g_string_append_c (output, *p); + } else if ((*p > 0 && *p < 0x1f) || *p == 0x7f) { + switch (*p) { + case '\b': + g_string_append (output, "\\b"); + break; + case '\f': + g_string_append (output, "\\f"); + break; + case '\n': + g_string_append (output, "\\n"); + break; + case '\r': + g_string_append (output, "\\r"); + break; + case '\t': + g_string_append (output, "\\t"); + break; + default: + g_string_append_printf (output, "\\u00%02x", (guint)*p); + break; + } + } else + g_string_append_c (output, *p); + } + return g_string_free (output, FALSE); +} + static gint list_sort_by_keys (const OutputItem *item_a, const OutputItem *item_b) @@ -1138,7 +1228,7 @@ gchar *escaped = NULL; if (single->value) - escaped = g_strescape (single->value, "\v"); + escaped = json_strescape (single->value); g_print ("\"%s\":\"%s\"", current_path[cur_dlen], escaped ? escaped : "--"); g_free (escaped); @@ -1152,7 +1242,7 @@ for (i = 0; i < n; i++) { gchar *escaped; - escaped = g_strescape (multiple->values[i], "\v"); + escaped = json_strescape (multiple->values[i]); g_print("\"%s\"", escaped); if (i < n - 1) g_print(","); @@ -1217,6 +1307,8 @@ case MMC_OUTPUT_TYPE_JSON: dump_output_json (); break; + default: + g_assert_not_reached (); } g_list_free_full (output_items, (GDestroyNotify) output_item_free); @@ -1240,6 +1332,8 @@ case MMC_OUTPUT_TYPE_JSON: dump_output_list_json (field); break; + default: + g_assert_not_reached (); } g_list_free_full (output_items, (GDestroyNotify) output_item_free); diff -Nru modemmanager-1.12.8/cli/mmcli-output.h modemmanager-1.16.6/cli/mmcli-output.h --- modemmanager-1.12.8/cli/mmcli-output.h 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-output.h 2021-06-06 21:40:59.000000000 +0800 @@ -54,6 +54,7 @@ MMC_S_MODEM_SIGNAL_GSM, MMC_S_MODEM_SIGNAL_UMTS, MMC_S_MODEM_SIGNAL_LTE, + MMC_S_MODEM_SIGNAL_5G, MMC_S_MODEM_OMA, MMC_S_MODEM_OMA_CURRENT, MMC_S_MODEM_OMA_PENDING, @@ -153,6 +154,8 @@ MMC_F_CDMA_ACTIVATION, /* SIM section */ MMC_F_SIM_PATH, + MMC_F_SIM_PRIMARY_SLOT, + MMC_F_SIM_SLOT_PATHS, /* Bearer section */ MMC_F_BEARER_PATHS, /* Time section */ @@ -179,6 +182,9 @@ MMC_F_SIGNAL_LTE_RSRQ, MMC_F_SIGNAL_LTE_RSRP, MMC_F_SIGNAL_LTE_SNR, + MMC_F_SIGNAL_5G_RSRQ, + MMC_F_SIGNAL_5G_RSRP, + MMC_F_SIGNAL_5G_SNR, /* OMA section */ MMC_F_OMA_FEATURES, MMC_F_OMA_CURRENT_TYPE, @@ -224,6 +230,7 @@ MMC_F_BEARER_PROPERTIES_APN, MMC_F_BEARER_PROPERTIES_ROAMING, MMC_F_BEARER_PROPERTIES_IP_TYPE, + MMC_F_BEARER_PROPERTIES_ALLOWED_AUTH, MMC_F_BEARER_PROPERTIES_USER, MMC_F_BEARER_PROPERTIES_PASSWORD, MMC_F_BEARER_PROPERTIES_NUMBER, @@ -243,6 +250,11 @@ MMC_F_BEARER_STATS_DURATION, MMC_F_BEARER_STATS_BYTES_RX, MMC_F_BEARER_STATS_BYTES_TX, + MMC_F_BEARER_STATS_ATTEMPTS, + MMC_F_BEARER_STATS_FAILED_ATTEMPTS, + MMC_F_BEARER_STATS_TOTAL_DURATION, + MMC_F_BEARER_STATS_TOTAL_BYTES_RX, + MMC_F_BEARER_STATS_TOTAL_BYTES_TX, MMC_F_CALL_GENERAL_DBUS_PATH, MMC_F_CALL_PROPERTIES_NUMBER, MMC_F_CALL_PROPERTIES_DIRECTION, @@ -271,8 +283,10 @@ MMC_F_SMS_PROPERTIES_DELIVERY_STATE, MMC_F_SMS_PROPERTIES_DISCH_TIMESTAMP, MMC_F_SIM_GENERAL_DBUS_PATH, + MMC_F_SIM_PROPERTIES_ACTIVE, MMC_F_SIM_PROPERTIES_IMSI, MMC_F_SIM_PROPERTIES_ICCID, + MMC_F_SIM_PROPERTIES_EID, MMC_F_SIM_PROPERTIES_OPERATOR_ID, MMC_F_SIM_PROPERTIES_OPERATOR_NAME, MMC_F_SIM_PROPERTIES_EMERGENCY_NUMBERS, @@ -327,14 +341,16 @@ /******************************************************************************/ /* Custom output management */ -void mmcli_output_signal_quality (guint value, - gboolean recent); -void mmcli_output_state (MMModemState state, - MMModemStateFailedReason reason); -void mmcli_output_scan_networks (GList *network_list); -void mmcli_output_firmware_list (GList *firmware_list, - MMFirmwareProperties *selected); -void mmcli_output_pco_list (GList *pco_list); +void mmcli_output_signal_quality (guint value, + gboolean recent); +void mmcli_output_state (MMModemState state, + MMModemStateFailedReason reason); +void mmcli_output_sim_slots (gchar **sim_slot_paths, + guint primary_sim_slot); +void mmcli_output_scan_networks (GList *network_list); +void mmcli_output_firmware_list (GList *firmware_list, + MMFirmwareProperties *selected); +void mmcli_output_pco_list (GList *pco_list); /******************************************************************************/ /* Dump output */ diff -Nru modemmanager-1.12.8/cli/mmcli-sim.c modemmanager-1.16.6/cli/mmcli-sim.c --- modemmanager-1.12.8/cli/mmcli-sim.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-sim.c 2021-06-06 21:40:59.000000000 +0800 @@ -83,7 +83,7 @@ /* Status options */ group = g_option_group_new ("sim", - "SIM options", + "SIM options:", "Show SIM options", NULL, NULL); @@ -133,7 +133,7 @@ } static void -context_free (Context *ctx) +context_free (void) { if (!ctx) return; @@ -152,15 +152,17 @@ void mmcli_sim_shutdown (void) { - context_free (ctx); + context_free (); } static void print_sim_info (MMSim *sim) { mmcli_output_string (MMC_F_SIM_GENERAL_DBUS_PATH, mm_sim_get_path (sim)); + mmcli_output_string (MMC_F_SIM_PROPERTIES_ACTIVE, mm_sim_get_active (sim) ? "yes" : "no"); mmcli_output_string (MMC_F_SIM_PROPERTIES_IMSI, mm_sim_get_imsi (sim)); mmcli_output_string (MMC_F_SIM_PROPERTIES_ICCID, mm_sim_get_identifier (sim)); + mmcli_output_string (MMC_F_SIM_PROPERTIES_EID, mm_sim_get_eid (sim)); mmcli_output_string (MMC_F_SIM_PROPERTIES_OPERATOR_ID, mm_sim_get_operator_identifier (sim)); mmcli_output_string (MMC_F_SIM_PROPERTIES_OPERATOR_NAME, mm_sim_get_operator_name (sim)); mmcli_output_string_array (MMC_F_SIM_PROPERTIES_EMERGENCY_NUMBERS, (const gchar **) mm_sim_get_emergency_numbers (sim), FALSE); diff -Nru modemmanager-1.12.8/cli/mmcli-sms.c modemmanager-1.16.6/cli/mmcli-sms.c --- modemmanager-1.12.8/cli/mmcli-sms.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli-sms.c 2021-06-06 21:40:59.000000000 +0800 @@ -78,7 +78,7 @@ /* Status options */ group = g_option_group_new ("sms", - "SMS options", + "SMS options:", "Show SMS options", NULL, NULL); @@ -123,7 +123,7 @@ } static void -context_free (Context *ctx) +context_free (void) { if (!ctx) return; @@ -142,7 +142,7 @@ void mmcli_sms_shutdown (void) { - context_free (ctx); + context_free (); } static void @@ -411,7 +411,6 @@ if (store_in_storage_str) { gboolean operation_result; MMSmsStorage storage; - GError *error = NULL; storage = mm_common_get_sms_storage_from_string (store_in_storage_str, &error); if (error) { diff -Nru modemmanager-1.12.8/cli/mmcli.c modemmanager-1.16.6/cli/mmcli.c --- modemmanager-1.12.8/cli/mmcli.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/cli/mmcli.c 2021-06-06 21:40:59.000000000 +0800 @@ -121,7 +121,6 @@ break; case G_LOG_LEVEL_CRITICAL: - case G_LOG_FLAG_FATAL: case G_LOG_LEVEL_ERROR: log_level_str = "-Error **"; break; @@ -130,9 +129,16 @@ log_level_str = "[Debug]"; break; - default: + case G_LOG_LEVEL_MESSAGE: + case G_LOG_LEVEL_INFO: log_level_str = ""; break; + + case G_LOG_FLAG_FATAL: + case G_LOG_LEVEL_MASK: + case G_LOG_FLAG_RECURSION: + default: + g_assert_not_reached (); } g_print ("[%s] %s %s\n", time_str, log_level_str, message); @@ -141,9 +147,8 @@ static void print_version_and_exit (void) { - g_print ("\n" - PROGRAM_NAME " " PROGRAM_VERSION "\n" - "Copyright (2011 - 2019) Aleksander Morgado\n" + g_print (PROGRAM_NAME " " PROGRAM_VERSION "\n" + "Copyright (2011 - 2021) Aleksander Morgado\n" "License GPLv2+: GNU GPL version 2 or later \n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -183,7 +188,8 @@ void mmcli_force_operation_timeout (GDBusProxy *proxy) { - g_dbus_proxy_set_default_timeout (proxy, timeout * 1000); + if (proxy) + g_dbus_proxy_set_default_timeout (proxy, timeout * 1000); } gint diff -Nru modemmanager-1.12.8/compile modemmanager-1.16.6/compile --- modemmanager-1.12.8/compile 2020-03-14 17:02:52.000000000 +0800 +++ modemmanager-1.16.6/compile 2021-06-06 21:43:42.000000000 +0800 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) diff -Nru modemmanager-1.12.8/config.guess modemmanager-1.16.6/config.guess --- modemmanager-1.12.8/config.guess 2020-03-14 17:02:52.000000000 +0800 +++ modemmanager-1.16.6/config.guess 2021-06-06 21:43:43.000000000 +0800 @@ -1,8 +1,8 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2018 Free Software Foundation, Inc. +# Copyright 1992-2021 Free Software Foundation, Inc. -timestamp='2018-03-08' +timestamp='2021-01-25' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,12 +27,12 @@ # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess +# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to . -me=`echo "$0" | sed -e 's,.*/,,'` +me=$(echo "$0" | sed -e 's,.*/,,') usage="\ Usage: $0 [OPTION] @@ -50,7 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2018 Free Software Foundation, Inc. +Copyright 1992-2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -84,8 +84,6 @@ exit 1 fi -trap 'exit 1' 1 2 15 - # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -96,66 +94,82 @@ # Portable tmp directory creation inspired by the Autoconf team. -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > "$dummy.c" ; - for c in cc gcc c89 c99 ; do - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 + +set_cc_for_build() { + # prevent multiple calls if $tmp is already set + test "$tmp" && return 0 + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +UNAME_MACHINE=$( (uname -m) 2>/dev/null) || UNAME_MACHINE=unknown +UNAME_RELEASE=$( (uname -r) 2>/dev/null) || UNAME_RELEASE=unknown +UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown +UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu + LIBC=unknown - eval "$set_cc_for_build" + set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc - #else + #elif defined(__GLIBC__) LIBC=gnu + #else + #include + /* First heuristic to detect musl libc. */ + #ifdef __DEFINED_va_list + LIBC=musl + #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" + eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')" - # If ldd exists, use it to detect musl libc. - if command -v ldd >/dev/null && \ - ldd --version 2>&1 | grep -q ^musl - then - LIBC=musl + # Second heuristic to detect musl libc. + if [ "$LIBC" = unknown ] && + command -v ldd >/dev/null && + ldd --version 2>&1 | grep -q ^musl; then + LIBC=musl + fi + + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + if [ "$LIBC" = unknown ]; then + LIBC=gnu fi ;; esac @@ -174,20 +188,20 @@ # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ - echo unknown)` + UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + echo unknown)) case "$UNAME_MACHINE_ARCH" in + aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) - arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` - endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,') + endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p') machine="${arch}${endian}"-unknown ;; *) machine="$UNAME_MACHINE_ARCH"-unknown ;; @@ -199,7 +213,7 @@ os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval "$set_cc_for_build" + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -218,7 +232,7 @@ case "$UNAME_MACHINE_ARCH" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` + abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr") ;; esac # The OS release @@ -231,24 +245,24 @@ release='-gnu' ;; *) - release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` + release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2) ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi}" + echo "$machine-${os}${release}${abi-}" exit ;; *:Bitrig:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//') echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//') echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//') echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" exit ;; *:MidnightBSD:*:*) @@ -260,6 +274,9 @@ *:SolidBSD:*:*) echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; + *:OS108:*:*) + echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" + exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; @@ -269,26 +286,29 @@ *:Sortix:*:*) echo "$UNAME_MACHINE"-unknown-sortix exit ;; + *:Twizzler:*:*) + echo "$UNAME_MACHINE"-unknown-twizzler + exit ;; *:Redox:*:*) echo "$UNAME_MACHINE"-unknown-redox exit ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + echo mips-dec-osf1 + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}') ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}') ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1) case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE=alpha ;; @@ -326,7 +346,7 @@ # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" + echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 @@ -360,7 +380,7 @@ exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then + if test "$( (/bin/universe) 2>/dev/null)" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd @@ -373,28 +393,28 @@ echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in + case $(/usr/bin/uname -p) in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" exit ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval "$set_cc_for_build" + set_cc_for_build SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then + if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null @@ -402,30 +422,30 @@ SUN_ARCH=x86_64 fi fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in + case "$(/usr/bin/arch -k)" in Series*|S4*) - UNAME_RELEASE=`uname -v` + UNAME_RELEASE=$(uname -v) ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" + echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')" exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null) test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "`/bin/arch`" in + case "$(/bin/arch)" in sun3) echo m68k-sun-sunos"$UNAME_RELEASE" ;; @@ -482,7 +502,7 @@ echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ @@ -505,8 +525,8 @@ } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && - dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`"$dummy" "$dummyarg"` && + dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') && + SYSTEM_NAME=$("$dummy" "$dummyarg") && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos"$UNAME_RELEASE" exit ;; @@ -533,11 +553,11 @@ exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] + UNAME_PROCESSOR=$(/usr/bin/uname -p) + if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then - if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ - [ "$TARGET_BINARY_INTERFACE"x = x ] + if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ + test "$TARGET_BINARY_INTERFACE"x = x then echo m88k-dg-dgux"$UNAME_RELEASE" else @@ -561,17 +581,17 @@ echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) - echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" + echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if test -x /usr/bin/oslevel ; then + IBM_REV=$(/usr/bin/oslevel) else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi @@ -579,7 +599,7 @@ exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include @@ -591,7 +611,7 @@ exit(0); } EOF - if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") then echo "$SYSTEM_NAME" else @@ -604,15 +624,15 @@ fi exit ;; *:AIX:*:[4567]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + IBM_CPU_ID=$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }') if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi - if [ -x /usr/bin/lslpp ] ; then - IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + if test -x /usr/bin/lslpp ; then + IBM_REV=$(/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/) else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi @@ -640,14 +660,14 @@ echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') case "$UNAME_MACHINE" in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + if test -x /usr/bin/getconf; then + sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null) + sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null) case "$sc_cpu_version" in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 @@ -659,8 +679,8 @@ esac ;; esac fi - if [ "$HP_ARCH" = "" ]; then - eval "$set_cc_for_build" + if test "$HP_ARCH" = ""; then + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE @@ -694,13 +714,13 @@ exit (0); } EOF - (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy") test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac - if [ "$HP_ARCH" = hppa2.0w ] + if test "$HP_ARCH" = hppa2.0w then - eval "$set_cc_for_build" + set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -722,11 +742,11 @@ echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) - HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` + HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int @@ -752,7 +772,7 @@ exit (0); } EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; @@ -772,7 +792,7 @@ echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then + if test -x /usr/sbin/sysversion ; then echo "$UNAME_MACHINE"-unknown-osf1mk else echo "$UNAME_MACHINE"-unknown-osf1 @@ -821,14 +841,14 @@ echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + FUJITSU_PROC=$(uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) + FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') + FUJITSU_REL=$(echo "$UNAME_RELEASE" | sed -e 's/ /_/') echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` - FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') + FUJITSU_REL=$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/') echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) @@ -840,15 +860,26 @@ *:BSD/OS:*:*) echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=$(uname -p) + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi + else + echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf + fi + exit ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=`/usr/bin/uname -p` + UNAME_PROCESSOR=$(/usr/bin/uname -p) case "$UNAME_PROCESSOR" in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" exit ;; i*:CYGWIN*:*) echo "$UNAME_MACHINE"-pc-cygwin @@ -881,21 +912,21 @@ echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin + echo x86_64-pc-cygwin exit ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" exit ;; *:GNU:*:*) # the GNU system - echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" + echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" + echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC" exit ;; - i*86:Minix:*:*) - echo "$UNAME_MACHINE"-pc-minix + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix exit ;; aarch64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" @@ -905,7 +936,7 @@ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; @@ -922,7 +953,7 @@ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then @@ -964,6 +995,9 @@ k1om:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; + loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) + echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + exit ;; m32r*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; @@ -971,23 +1005,51 @@ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build + IS_GLIBC=0 + test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el + #undef mips + #undef mipsel + #undef mips64 + #undef mips64el + #if ${IS_GLIBC} && defined(_ABI64) + LIBCABI=gnuabi64 + #else + #if ${IS_GLIBC} && defined(_ABIN32) + LIBCABI=gnuabin32 + #else + LIBCABI=${LIBC} + #endif + #endif + + #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa64r6 + #else + #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 + CPU=mipsisa32r6 + #else + #if defined(__mips64) + CPU=mips64 + #else + CPU=mips + #endif + #endif + #endif + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el + MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} + MIPS_ENDIAN= #else - CPU= + MIPS_ENDIAN= #endif #endif EOF - eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" - test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } + eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')" + test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" @@ -1006,7 +1068,7 @@ exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; *) echo hppa-unknown-linux-"$LIBC" ;; @@ -1024,7 +1086,7 @@ ppcle:Linux:*:*) echo powerpcle-unknown-linux-"$LIBC" exit ;; - riscv32:Linux:*:* | riscv64:Linux:*:*) + riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) @@ -1046,7 +1108,17 @@ echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" + set_cc_for_build + LIBCABI=$LIBC + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_X32 >/dev/null + then + LIBCABI="$LIBC"x32 + fi + fi + echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" exit ;; xtensa*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" @@ -1086,7 +1158,7 @@ echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; i*86:*:4.*:*) - UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` + UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//') if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else @@ -1095,19 +1167,19 @@ exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in + case $(/bin/uname -X | grep "^Machine") in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" + echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //')) (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 @@ -1157,7 +1229,7 @@ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ @@ -1168,7 +1240,7 @@ NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ @@ -1201,7 +1273,7 @@ exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=$( (uname -p) 2>/dev/null) echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv @@ -1235,7 +1307,7 @@ echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then + if test -d /usr/nec; then echo mips-nec-sysv"$UNAME_RELEASE" else echo mips-unknown-sysv"$UNAME_RELEASE" @@ -1283,44 +1355,48 @@ *:Rhapsody:*:*) echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; + arm64:Darwin:*:*) + echo aarch64-apple-darwin"$UNAME_RELEASE" + exit ;; *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval "$set_cc_for_build" - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc - fi - if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc - if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_PPC >/dev/null - then - UNAME_PROCESSOR=powerpc - fi + UNAME_PROCESSOR=$(uname -p) + case $UNAME_PROCESSOR in + unknown) UNAME_PROCESSOR=powerpc ;; + esac + if command -v xcode-select > /dev/null 2> /dev/null && \ + ! xcode-select --print-path > /dev/null 2> /dev/null ; then + # Avoid executing cc if there is no toolchain installed as + # cc will be a stub that puts up a graphical alert + # prompting the user to install developer tools. + CC_FOR_BUILD=no_compiler_found + else + set_cc_for_build + fi + if test "$CC_FOR_BUILD" != no_compiler_found; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc + if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ + (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_PPC >/dev/null + then + UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 + # uname -m returns i386 or x86_64 + UNAME_PROCESSOR=$UNAME_MACHINE fi echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` + UNAME_PROCESSOR=$(uname -p) if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc @@ -1358,6 +1434,7 @@ # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. + # shellcheck disable=SC2154 if test "$cputype" = 386; then UNAME_MACHINE=i386 else @@ -1387,10 +1464,10 @@ echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" + echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=$( (uname -p) 2>/dev/null) case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1400,13 +1477,13 @@ echo i386-pc-xenix exit ;; i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" + echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')" exit ;; i*86:rdos:*:*) echo "$UNAME_MACHINE"-pc-rdos exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros + *:AROS:*:*) + echo "$UNAME_MACHINE"-unknown-aros exit ;; x86_64:VMkernel:*:*) echo "$UNAME_MACHINE"-unknown-esx @@ -1414,8 +1491,148 @@ amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs exit ;; + *:Unleashed:*:*) + echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" + exit ;; esac +# No uname command or uname output not recognized. +set_cc_for_build +cat > "$dummy.c" < +#include +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#include +#if defined(_SIZE_T_) || defined(SIGLOST) +#include +#endif +#endif +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=$( (hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null); + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); +#endif + +#if defined (vax) +#if !defined (ultrix) +#include +#if defined (BSD) +#if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +#else +#if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#endif +#else + printf ("vax-dec-bsd\n"); exit (0); +#endif +#else +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname un; + uname (&un); + printf ("vax-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif +#endif +#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) +#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) +#if defined(_SIZE_T_) || defined(SIGLOST) + struct utsname *un; + uname (&un); + printf ("mips-dec-ultrix%s\n", un.release); exit (0); +#else + printf ("mips-dec-ultrix\n"); exit (0); +#endif +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=$($dummy) && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. +test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } + echo "$0: unable to guess system type" >&2 case "$UNAME_MACHINE:$UNAME_SYSTEM" in @@ -1435,9 +1652,15 @@ operating system you are using. If your script is old, overwrite *all* copies of config.guess and config.sub with the latest versions from: - https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess + https://git.savannah.gnu.org/cgit/config.git/plain/config.guess and - https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub + https://git.savannah.gnu.org/cgit/config.git/plain/config.sub +EOF + +year=$(echo $timestamp | sed 's,-.*,,') +# shellcheck disable=SC2003 +if test "$(expr "$(date +%Y)" - "$year")" -lt 3 ; then + cat >&2 </dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` +uname -m = $( (uname -m) 2>/dev/null || echo unknown) +uname -r = $( (uname -r) 2>/dev/null || echo unknown) +uname -s = $( (uname -s) 2>/dev/null || echo unknown) +uname -v = $( (uname -v) 2>/dev/null || echo unknown) + +/usr/bin/uname -p = $( (/usr/bin/uname -p) 2>/dev/null) +/bin/uname -X = $( (/bin/uname -X) 2>/dev/null) + +hostinfo = $( (hostinfo) 2>/dev/null) +/bin/universe = $( (/bin/universe) 2>/dev/null) +/usr/bin/arch -k = $( (/usr/bin/arch -k) 2>/dev/null) +/bin/arch = $( (/bin/arch) 2>/dev/null) +/usr/bin/oslevel = $( (/usr/bin/oslevel) 2>/dev/null) +/usr/convex/getsysinfo = $( (/usr/convex/getsysinfo) 2>/dev/null) UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" UNAME_SYSTEM = "$UNAME_SYSTEM" UNAME_VERSION = "$UNAME_VERSION" EOF +fi exit 1 diff -Nru modemmanager-1.12.8/config.h.in modemmanager-1.16.6/config.h.in --- modemmanager-1.12.8/config.h.in 2020-03-14 17:16:05.000000000 +0800 +++ modemmanager-1.16.6/config.h.in 2021-06-06 21:43:42.000000000 +0800 @@ -4,6 +4,123 @@ language is requested. */ #undef ENABLE_NLS +/* Define if altair-lte plugin is enabled */ +#undef ENABLE_PLUGIN_ALTAIR_LTE + +/* Define if anydata plugin is enabled */ +#undef ENABLE_PLUGIN_ANYDATA + +/* Define if broadmobi plugin is enabled */ +#undef ENABLE_PLUGIN_BROADMOBI + +/* Define if cinterion plugin is enabled */ +#undef ENABLE_PLUGIN_CINTERION + +/* Define if dell plugin is enabled */ +#undef ENABLE_PLUGIN_DELL + +/* Define if dlink plugin is enabled */ +#undef ENABLE_PLUGIN_DLINK + +/* Define if fibocom plugin is enabled */ +#undef ENABLE_PLUGIN_FIBOCOM + +/* Define if foxconn plugin is enabled */ +#undef ENABLE_PLUGIN_FOXCONN + +/* Define if generic plugin is enabled */ +#undef ENABLE_PLUGIN_GENERIC + +/* Define if gosuncn plugin is enabled */ +#undef ENABLE_PLUGIN_GOSUNCN + +/* Define if haier plugin is enabled */ +#undef ENABLE_PLUGIN_HAIER + +/* Define if huawei plugin is enabled */ +#undef ENABLE_PLUGIN_HUAWEI + +/* Define if iridium plugin is enabled */ +#undef ENABLE_PLUGIN_IRIDIUM + +/* Define if linktop plugin is enabled */ +#undef ENABLE_PLUGIN_LINKTOP + +/* Define if longcheer plugin is enabled */ +#undef ENABLE_PLUGIN_LONGCHEER + +/* Define if mbm plugin is enabled */ +#undef ENABLE_PLUGIN_MBM + +/* Define if motorola plugin is enabled */ +#undef ENABLE_PLUGIN_MOTOROLA + +/* Define if mtk plugin is enabled */ +#undef ENABLE_PLUGIN_MTK + +/* Define if nokia plugin is enabled */ +#undef ENABLE_PLUGIN_NOKIA + +/* Define if nokia-icera plugin is enabled */ +#undef ENABLE_PLUGIN_NOKIA_ICERA + +/* Define if novatel plugin is enabled */ +#undef ENABLE_PLUGIN_NOVATEL + +/* Define if novatel-lte plugin is enabled */ +#undef ENABLE_PLUGIN_NOVATEL_LTE + +/* Define if option plugin is enabled */ +#undef ENABLE_PLUGIN_OPTION + +/* Define if option-hso plugin is enabled */ +#undef ENABLE_PLUGIN_OPTION_HSO + +/* Define if pantech plugin is enabled */ +#undef ENABLE_PLUGIN_PANTECH + +/* Define if qcom-soc plugin is enabled */ +#undef ENABLE_PLUGIN_QCOM_SOC + +/* Define if quectel plugin is enabled */ +#undef ENABLE_PLUGIN_QUECTEL + +/* Define if samsung plugin is enabled */ +#undef ENABLE_PLUGIN_SAMSUNG + +/* Define if sierra plugin is enabled */ +#undef ENABLE_PLUGIN_SIERRA + +/* Define if sierra-legacy plugin is enabled */ +#undef ENABLE_PLUGIN_SIERRA_LEGACY + +/* Define if simtech plugin is enabled */ +#undef ENABLE_PLUGIN_SIMTECH + +/* Define if telit plugin is enabled */ +#undef ENABLE_PLUGIN_TELIT + +/* Define if thuraya plugin is enabled */ +#undef ENABLE_PLUGIN_THURAYA + +/* Define if tplink plugin is enabled */ +#undef ENABLE_PLUGIN_TPLINK + +/* Define if ublox plugin is enabled */ +#undef ENABLE_PLUGIN_UBLOX + +/* Define if via plugin is enabled */ +#undef ENABLE_PLUGIN_VIA + +/* Define if wavecom plugin is enabled */ +#undef ENABLE_PLUGIN_WAVECOM + +/* Define if x22x plugin is enabled */ +#undef ENABLE_PLUGIN_X22X + +/* Define if zte plugin is enabled */ +#undef ENABLE_PLUGIN_ZTE + /* Gettext package */ #undef GETTEXT_PACKAGE @@ -31,12 +148,15 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H +/* Define to 1 if you have the header file. */ +#undef HAVE_MINIX_CONFIG_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_STDIO_H + /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H @@ -55,6 +175,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if you have the header file. */ +#undef HAVE_WCHAR_H + /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR @@ -82,28 +205,96 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif +/* Enable general extensions on macOS. */ +#ifndef _DARWIN_C_SOURCE +# undef _DARWIN_C_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif -/* Enable threading extensions on Solaris. */ +/* Enable X/Open compliant socket functions that do not require linking + with -lxnet on HP-UX 11.11. */ +#ifndef _HPUX_ALT_XOPEN_SOCKET_API +# undef _HPUX_ALT_XOPEN_SOCKET_API +#endif +/* Identify the host operating system as Minix. + This macro does not affect the system headers' behavior. + A future release of Autoconf may stop defining this macro. */ +#ifndef _MINIX +# undef _MINIX +#endif +/* Enable general extensions on NetBSD. + Enable NetBSD compatibility extensions on Minix. */ +#ifndef _NETBSD_SOURCE +# undef _NETBSD_SOURCE +#endif +/* Enable OpenBSD compatibility extensions on NetBSD. + Oddly enough, this does nothing on OpenBSD. */ +#ifndef _OPENBSD_SOURCE +# undef _OPENBSD_SOURCE +#endif +/* Define to 1 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_SOURCE +# undef _POSIX_SOURCE +#endif +/* Define to 2 if needed for POSIX-compatible behavior. */ +#ifndef _POSIX_1_SOURCE +# undef _POSIX_1_SOURCE +#endif +/* Enable POSIX-compatible threading on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif +/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ +#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ +# undef __STDC_WANT_IEC_60559_BFP_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ +#ifndef __STDC_WANT_IEC_60559_DFP_EXT__ +# undef __STDC_WANT_IEC_60559_DFP_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ +#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ +# undef __STDC_WANT_IEC_60559_FUNCS_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ +# undef __STDC_WANT_IEC_60559_TYPES_EXT__ +#endif +/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ +#ifndef __STDC_WANT_LIB_EXT2__ +# undef __STDC_WANT_LIB_EXT2__ +#endif +/* Enable extensions specified by ISO/IEC 24747:2009. */ +#ifndef __STDC_WANT_MATH_SPEC_FUNCS__ +# undef __STDC_WANT_MATH_SPEC_FUNCS__ +#endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ +/* Enable X/Open extensions. Define to 500 only if necessary + to make mbstate_t available. */ +#ifndef _XOPEN_SOURCE +# undef _XOPEN_SOURCE #endif @@ -122,6 +313,27 @@ /* Define if you want QMI support */ #undef WITH_QMI +/* Define if foxconn utils are built */ +#undef WITH_SHARED_FOXCONN + +/* Define if icera utils are built */ +#undef WITH_SHARED_ICERA + +/* Define if novatel utils are built */ +#undef WITH_SHARED_NOVATEL + +/* Define if option utils are built */ +#undef WITH_SHARED_OPTION + +/* Define if sierra utils are built */ +#undef WITH_SHARED_SIERRA + +/* Define if telit utils are built */ +#undef WITH_SHARED_TELIT + +/* Define if xmm utils are built */ +#undef WITH_SHARED_XMM + /* Define if you want systemd journal support */ #undef WITH_SYSTEMD_JOURNAL @@ -130,13 +342,3 @@ /* Define if you want udev support */ #undef WITH_UDEV - -/* Define to 1 if on MINIX. */ -#undef _MINIX - -/* Define to 2 if the system does not provide POSIX.1 features except with - this defined. */ -#undef _POSIX_1_SOURCE - -/* Define to 1 if you need to in order for `stat' and other things to work. */ -#undef _POSIX_SOURCE diff -Nru modemmanager-1.12.8/config.sub modemmanager-1.16.6/config.sub --- modemmanager-1.12.8/config.sub 2020-03-14 17:02:52.000000000 +0800 +++ modemmanager-1.16.6/config.sub 2021-06-06 21:43:43.000000000 +0800 @@ -1,8 +1,8 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2018 Free Software Foundation, Inc. +# Copyright 1992-2021 Free Software Foundation, Inc. -timestamp='2018-03-08' +timestamp='2021-01-08' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: -# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub +# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases @@ -50,7 +50,7 @@ # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. -me=`echo "$0" | sed -e 's,.*/,,'` +me=$(echo "$0" | sed -e 's,.*/,,') usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS @@ -67,7 +67,7 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2018 Free Software Foundation, Inc. +Copyright 1992-2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -89,7 +89,7 @@ - ) # Use stdin as input. break ;; -* ) - echo "$me: invalid option $1$help" + echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) @@ -110,1223 +110,1169 @@ exit 1;; esac -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ - kopensolaris*-gnu* | cloudabi*-eabi* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - android-linux) - os=-linux-android - basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown - ;; - *) - basic_machine=`echo "$1" | sed 's/-[^-]*$//'` - if [ "$basic_machine" != "$1" ] - then os=`echo "$1" | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 +# Split fields of configuration type +# shellcheck disable=SC2162 +IFS="-" read field1 field2 field3 field4 <&2 + exit 1 ;; - -lynx*) - os=-lynxos + *-*-*-*) + basic_machine=$field1-$field2 + basic_os=$field3-$field4 ;; - -ptx*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` + *-*-*) + # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two + # parts + maybe_os=$field2-$field3 + case $maybe_os in + nto-qnx* | linux-* | uclinux-uclibc* \ + | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ + | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ + | storm-chaos* | os2-emx* | rtmk-nova*) + basic_machine=$field1 + basic_os=$maybe_os + ;; + android-linux) + basic_machine=$field1-unknown + basic_os=linux-android + ;; + *) + basic_machine=$field1-$field2 + basic_os=$field3 + ;; + esac ;; - -psos*) - os=-psos + *-*) + # A lone config we happen to match not fitting any pattern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + basic_os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + basic_os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + basic_os= + ;; + *) + basic_machine=$field1 + basic_os=$field2 + ;; + esac + ;; + esac ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint + *) + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + basic_os=bsd + ;; + a29khif) + basic_machine=a29k-amd + basic_os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + basic_os=scout + ;; + alliant) + basic_machine=fx80-alliant + basic_os= + ;; + altos | altos3068) + basic_machine=m68k-altos + basic_os= + ;; + am29k) + basic_machine=a29k-none + basic_os=bsd + ;; + amdahl) + basic_machine=580-amdahl + basic_os=sysv + ;; + amiga) + basic_machine=m68k-unknown + basic_os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + basic_os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + basic_os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + basic_os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + basic_os=bsd + ;; + aros) + basic_machine=i386-pc + basic_os=aros + ;; + aux) + basic_machine=m68k-apple + basic_os=aux + ;; + balance) + basic_machine=ns32k-sequent + basic_os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + basic_os=linux + ;; + cegcc) + basic_machine=arm-unknown + basic_os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + basic_os=bsd + ;; + convex-c2) + basic_machine=c2-convex + basic_os=bsd + ;; + convex-c32) + basic_machine=c32-convex + basic_os=bsd + ;; + convex-c34) + basic_machine=c34-convex + basic_os=bsd + ;; + convex-c38) + basic_machine=c38-convex + basic_os=bsd + ;; + cray) + basic_machine=j90-cray + basic_os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + basic_os= + ;; + da30) + basic_machine=m68k-da30 + basic_os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + basic_os= + ;; + delta88) + basic_machine=m88k-motorola + basic_os=sysv3 + ;; + dicos) + basic_machine=i686-pc + basic_os=dicos + ;; + djgpp) + basic_machine=i586-pc + basic_os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + basic_os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + basic_os=ose + ;; + gmicro) + basic_machine=tron-gmicro + basic_os=sysv + ;; + go32) + basic_machine=i386-pc + basic_os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + basic_os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + basic_os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + basic_os=hms + ;; + harris) + basic_machine=m88k-harris + basic_os=sysv3 + ;; + hp300 | hp300hpux) + basic_machine=m68k-hp + basic_os=hpux + ;; + hp300bsd) + basic_machine=m68k-hp + basic_os=bsd + ;; + hppaosf) + basic_machine=hppa1.1-hp + basic_os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + basic_os=proelf + ;; + i386mach) + basic_machine=i386-mach + basic_os=mach + ;; + isi68 | isi) + basic_machine=m68k-isi + basic_os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + basic_os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + basic_os=sysv + ;; + merlin) + basic_machine=ns32k-utek + basic_os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + basic_os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + basic_os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + basic_os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + basic_os=coff + ;; + morphos) + basic_machine=powerpc-unknown + basic_os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + basic_os=moxiebox + ;; + msdos) + basic_machine=i386-pc + basic_os=msdos + ;; + msys) + basic_machine=i686-pc + basic_os=msys + ;; + mvs) + basic_machine=i370-ibm + basic_os=mvs + ;; + nacl) + basic_machine=le32-unknown + basic_os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + basic_os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + basic_os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + basic_os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + basic_os=newsos + ;; + news1000) + basic_machine=m68030-sony + basic_os=newsos + ;; + necv70) + basic_machine=v70-nec + basic_os=sysv + ;; + nh3000) + basic_machine=m68k-harris + basic_os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + basic_os=cxux + ;; + nindy960) + basic_machine=i960-intel + basic_os=nindy + ;; + mon960) + basic_machine=i960-intel + basic_os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + basic_os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + basic_os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + basic_os=ose + ;; + os68k) + basic_machine=m68k-none + basic_os=os68k + ;; + paragon) + basic_machine=i860-intel + basic_os=osf + ;; + parisc) + basic_machine=hppa-unknown + basic_os=linux + ;; + psp) + basic_machine=mipsallegrexel-sony + basic_os=psp + ;; + pw32) + basic_machine=i586-unknown + basic_os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + basic_os=rdos + ;; + rdos32) + basic_machine=i386-pc + basic_os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + basic_os=coff + ;; + sa29200) + basic_machine=a29k-amd + basic_os=udi + ;; + sei) + basic_machine=mips-sei + basic_os=seiux + ;; + sequent) + basic_machine=i386-sequent + basic_os= + ;; + sps7) + basic_machine=m68k-bull + basic_os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + basic_os= + ;; + stratus) + basic_machine=i860-stratus + basic_os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + basic_os= + ;; + sun2os3) + basic_machine=m68000-sun + basic_os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + basic_os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + basic_os= + ;; + sun3os3) + basic_machine=m68k-sun + basic_os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + basic_os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + basic_os= + ;; + sun4os3) + basic_machine=sparc-sun + basic_os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + basic_os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + basic_os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + basic_os= + ;; + sv1) + basic_machine=sv1-cray + basic_os=unicos + ;; + symmetry) + basic_machine=i386-sequent + basic_os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + basic_os=unicos + ;; + t90) + basic_machine=t90-cray + basic_os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + basic_os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + basic_os=tpf + ;; + udi29k) + basic_machine=a29k-amd + basic_os=udi + ;; + ultra3) + basic_machine=a29k-nyu + basic_os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + basic_os=none + ;; + vaxv) + basic_machine=vax-dec + basic_os=sysv + ;; + vms) + basic_machine=vax-dec + basic_os=vms + ;; + vsta) + basic_machine=i386-pc + basic_os=vsta + ;; + vxworks960) + basic_machine=i960-wrs + basic_os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + basic_os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + basic_os=vxworks + ;; + xbox) + basic_machine=i686-pc + basic_os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + basic_os=unicos + ;; + *) + basic_machine=$1 + basic_os= + ;; + esac ;; esac -# Decode aliases for certain CPU-COMPANY combinations. +# Decode 1-component or ad-hoc basic machines case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ - | avr | avr32 \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) + op50n) + cpu=hppa1.1 + vendor=oki ;; - ms1) - basic_machine=mt-unknown + op60c) + cpu=hppa1.1 + vendor=oki ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown + ibm*) + cpu=i370 + vendor=ibm ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none + orion105) + cpu=clipper + vendor=highlevel ;; - xscaleeb) - basic_machine=armeb-unknown + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple ;; - - xscaleel) - basic_machine=armel-unknown + pmac | pmac-mpw) + cpu=powerpc + vendor=apple ;; - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | e2k-* | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pru-* \ - | pyramid-* \ - | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-pc - os=-bsd - ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att + cpu=m68000 + vendor=att ;; 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - asmjs) - basic_machine=asmjs-unknown - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux + cpu=we32k + vendor=att ;; bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec + cpu=powerpc + vendor=ibm + basic_os=cnk ;; decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 + cpu=pdp10 + vendor=dec + basic_os=tops10 ;; decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 + cpu=pdp10 + vendor=dec + basic_os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx + cpu=m68k + vendor=motorola ;; dpx2*) - basic_machine=m68k-bull - os=-sysv3 - ;; - e500v[12]) - basic_machine=powerpc-unknown - os=$os"spe" - ;; - e500v[12]-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=$os"spe" - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd + cpu=m68k + vendor=bull + basic_os=sysv3 ;; encore | umax | mmax) - basic_machine=ns32k-encore + cpu=ns32k + vendor=encore ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose + elxsi) + cpu=elxsi + vendor=elxsi + basic_os=${basic_os:-bsd} ;; fx2800) - basic_machine=i860-alliant + cpu=i860 + vendor=alliant ;; genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 + cpu=ns32k + vendor=ns ;; h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp + cpu=m68000 + vendor=hp ;; hp9k3[2-9][0-9]) - basic_machine=m68k-hp + cpu=m68k + vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm + cpu=hppa1.0 + vendor=hp ;; i*86v32) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv32 + cpu=$(echo "$1" | sed -e 's/86.*/86/') + vendor=pc + basic_os=sysv32 ;; i*86v4*) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv4 + cpu=$(echo "$1" | sed -e 's/86.*/86/') + vendor=pc + basic_os=sysv4 ;; i*86v) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv + cpu=$(echo "$1" | sed -e 's/86.*/86/') + vendor=pc + basic_os=sysv ;; i*86sol2) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - vsta) - basic_machine=i386-unknown - os=-vsta + cpu=$(echo "$1" | sed -e 's/86.*/86/') + vendor=pc + basic_os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + basic_os=${basic_os:-unicos} ;; iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) + cpu=mips + vendor=sgi + case $basic_os in + irix*) ;; *) - os=-irix4 + basic_os=irix4 ;; esac ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown + cpu=m68000 + vendor=convergent ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + basic_os=mint ;; news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv + cpu=mips + vendor=sony + basic_os=newsos ;; next | m*-next) - basic_machine=m68k-next - case $os in - -nextstep* ) + cpu=m68k + vendor=next + case $basic_os in + openstep*) + ;; + nextstep*) ;; - -ns2*) - os=-nextstep2 + ns2*) + basic_os=nextstep2 ;; *) - os=-nextstep3 + basic_os=nextstep3 ;; esac ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - nsv-tandem) - basic_machine=nsv-tandem - ;; - nsx-tandem) - basic_machine=nsx-tandem + cpu=np1 + vendor=gould ;; op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k + cpu=hppa1.1 + vendor=oki + basic_os=proelf ;; pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux + cpu=hppa1.1 + vendor=hitachi + basic_os=hiuxwe2 ;; pbd) - basic_machine=sparc-tti + cpu=sparc + vendor=tti ;; pbb) - basic_machine=m68k-tti + cpu=m68k + vendor=tti ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 + pc532) + cpu=ns32k + vendor=pc532 ;; - pc98) - basic_machine=i386-pc + pn) + cpu=pn + vendor=gould ;; - pc98-*) - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` + power) + cpu=power + vendor=ibm ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc + ps2) + cpu=i386 + vendor=ibm ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc + rm[46]00) + cpu=mips + vendor=siemens ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc + rtpc | rtpc-*) + cpu=romp + vendor=ibm ;; - pentium4) - basic_machine=i786-pc + sde) + cpu=mipsisa32 + vendor=sde + basic_os=${basic_os:-elf} ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` + simso-wrs) + cpu=sparclite + vendor=wrs + basic_os=vxworks ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + tower | tower-32) + cpu=m68k + vendor=ncr ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu ;; - pentium4-*) - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` + w65) + cpu=w65 + vendor=wdc ;; - pn) - basic_machine=pn-gould + w89k-*) + cpu=hppa1.1 + vendor=winbond + basic_os=proelf ;; - power) basic_machine=power-ibm + none) + cpu=none + vendor=none ;; - ppc | ppcbe) basic_machine=powerpc-unknown + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + leon-*|leon[3-9]-*) + cpu=sparc + vendor=$(echo "$basic_machine" | sed 's/-.*//') ;; - ppcle | powerpclittle) - basic_machine=powerpcle-unknown + + *-*) + # shellcheck disable=SC2162 + IFS="-" read cpu vendor <&2 - exit 1 + # Recognize the canonical CPU types that are allowed with any + # company name. + case $cpu in + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | abacus \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ + | alphapca5[67] | alpha64pca5[67] \ + | am33_2.0 \ + | amdgcn \ + | arc | arceb \ + | arm | arm[lb]e | arme[lb] | armv* \ + | avr | avr32 \ + | asmjs \ + | ba \ + | be32 | be64 \ + | bfin | bpf | bs2000 \ + | c[123]* | c30 | [cjt]90 | c4x \ + | c8051 | clipper | craynv | csky | cydra \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | elxsi | epiphany \ + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | h8300 | h8500 \ + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i*86 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | loongarch32 | loongarch64 | loongarchx32 \ + | m32c | m32r | m32rle \ + | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64eb | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mmix \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ + | none | np1 | ns16k | ns32k | nvptx \ + | open8 \ + | or1k* \ + | or32 \ + | orion \ + | picochip \ + | pdp10 | pdp11 | pj | pjl | pn | power \ + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ + | pru \ + | pyramid \ + | riscv | riscv32 | riscv32be | riscv64 | riscv64be \ + | rl78 | romp | rs6000 | rx \ + | s390 | s390x \ + | score \ + | sh | shl \ + | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ + | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ + | spu \ + | tahoe \ + | thumbv7* \ + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ + | tron \ + | ubicom32 \ + | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ + | vax \ + | visium \ + | w65 \ + | wasm32 | wasm64 \ + | we32k \ + | x86 | x86_64 | xc16x | xgate | xps100 \ + | xstormy16 | xtensa* \ + | ymp \ + | z8k | z80) + ;; + + *) + echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + exit 1 + ;; + esac ;; esac # Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` +case $vendor in + digital*) + vendor=dec ;; - *-commodore*) - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` + commodore*) + vendor=cbm ;; *) ;; @@ -1334,203 +1280,213 @@ # Decode manufacturer-specific aliases for certain operating systems. -if [ x"$os" != x"" ] +if test x$basic_os != x then + +# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just +# set os. +case $basic_os in + gnu/linux*) + kernel=linux + os=$(echo $basic_os | sed -e 's|gnu/linux|gnu|') + ;; + os2-emx) + kernel=os2 + os=$(echo $basic_os | sed -e 's|os2-emx|emx|') + ;; + nto-qnx*) + kernel=nto + os=$(echo $basic_os | sed -e 's|nto-qnx|qnx|') + ;; + *-*) + # shellcheck disable=SC2162 + IFS="-" read kernel os <&2 - exit 1 + # No normalization, but not necessarily accepted, that comes below. ;; esac + else # Here we handle the default operating systems that come with various machines. @@ -1543,254 +1499,357 @@ # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -case $basic_machine in +kernel= +case $cpu-$vendor in score-*) - os=-elf + os=elf ;; spu-*) - os=-elf + os=elf ;; *-acorn) - os=-riscix1.2 + os=riscix1.2 ;; arm*-rebel) - os=-linux + kernel=linux + os=gnu ;; arm*-semi) - os=-aout + os=aout ;; c4x-* | tic4x-*) - os=-coff + os=coff ;; c8051-*) - os=-elf + os=elf + ;; + clipper-intergraph) + os=clix ;; hexagon-*) - os=-elf + os=elf ;; tic54x-*) - os=-coff + os=coff ;; tic55x-*) - os=-coff + os=coff ;; tic6x-*) - os=-coff + os=coff ;; # This must come before the *-dec entry. pdp10-*) - os=-tops20 + os=tops20 ;; pdp11-*) - os=-none + os=none ;; *-dec | vax-*) - os=-ultrix4.2 + os=ultrix4.2 ;; m68*-apollo) - os=-domain + os=domain ;; i386-sun) - os=-sunos4.0.2 + os=sunos4.0.2 ;; m68000-sun) - os=-sunos3 + os=sunos3 ;; m68*-cisco) - os=-aout + os=aout ;; mep-*) - os=-elf + os=elf ;; mips*-cisco) - os=-elf + os=elf ;; mips*-*) - os=-elf + os=elf ;; or32-*) - os=-coff + os=coff ;; *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 + os=sysv3 ;; sparc-* | *-sun) - os=-sunos4.1.1 + os=sunos4.1.1 ;; pru-*) - os=-elf + os=elf ;; *-be) - os=-beos + os=beos ;; *-ibm) - os=-aix + os=aix ;; *-knuth) - os=-mmixware + os=mmixware ;; *-wec) - os=-proelf + os=proelf ;; *-winbond) - os=-proelf + os=proelf ;; *-oki) - os=-proelf + os=proelf ;; *-hp) - os=-hpux + os=hpux ;; *-hitachi) - os=-hiux + os=hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv + os=sysv ;; *-cbm) - os=-amigaos + os=amigaos ;; *-dg) - os=-dgux + os=dgux ;; *-dolphin) - os=-sysv3 + os=sysv3 ;; m68k-ccur) - os=-rtu + os=rtu ;; m88k-omron*) - os=-luna + os=luna ;; *-next) - os=-nextstep + os=nextstep ;; *-sequent) - os=-ptx + os=ptx ;; *-crds) - os=-unos + os=unos ;; *-ns) - os=-genix + os=genix ;; i370-*) - os=-mvs + os=mvs ;; *-gould) - os=-sysv + os=sysv ;; *-highlevel) - os=-bsd + os=bsd ;; *-encore) - os=-bsd + os=bsd ;; *-sgi) - os=-irix + os=irix ;; *-siemens) - os=-sysv4 + os=sysv4 ;; *-masscomp) - os=-rtu + os=rtu ;; f30[01]-fujitsu | f700-fujitsu) - os=-uxpv + os=uxpv ;; *-rom68k) - os=-coff + os=coff ;; *-*bug) - os=-coff + os=coff ;; *-apple) - os=-macos + os=macos ;; *-atari*) - os=-mint + os=mint + ;; + *-wrs) + os=vxworks ;; *) - os=-none + os=none ;; esac + fi +# Now, validate our (potentially fixed-up) OS. +case $os in + # Sometimes we do "kernel-libc", so those need to count as OSes. + musl* | newlib* | uclibc*) + ;; + # Likewise for "kernel-abi" + eabi* | gnueabi*) + ;; + # VxWorks passes extra cpu info in the 4th filed. + simlinux | simwindows | spe) + ;; + # Now accept the basic system types. + # The portable systems comes first. + # Each alternative MUST end in a * to match a version number. + gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ + | hiux* | abug | nacl* | netware* | windows* \ + | os9* | macos* | osx* | ios* \ + | mpw* | magic* | mmixware* | mon960* | lnews* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* | twizzler* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | mirbsd* | netbsd* | dicos* | openedition* | ose* \ + | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \ + | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | mint* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ + | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ + | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx*) + ;; + # This one is extra strict with allowed versions + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + none) + ;; + *) + echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2 + exit 1 + ;; +esac + +# As a final step for OS-related things, validate the OS-kernel combination +# (given a valid OS), if there is a kernel. +case $kernel-$os in + linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* | linux-musl* | linux-uclibc* ) + ;; + uclinux-uclibc* ) + ;; + -dietlibc* | -newlib* | -musl* | -uclibc* ) + # These are just libc implementations, not actual OSes, and thus + # require a kernel. + echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2 + exit 1 + ;; + kfreebsd*-gnu* | kopensolaris*-gnu*) + ;; + vxworks-simlinux | vxworks-simwindows | vxworks-spe) + ;; + nto-qnx*) + ;; + os2-emx) + ;; + *-eabi* | *-gnueabi*) + ;; + -*) + # Blank kernel with real OS is always fine. + ;; + *-*) + echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2 + exit 1 + ;; +esac + # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) +case $vendor in + unknown) + case $cpu-$os in + *-riscix*) vendor=acorn ;; - -sunos*) + *-sunos*) vendor=sun ;; - -cnk*|-aix*) + *-cnk* | *-aix*) vendor=ibm ;; - -beos*) + *-beos*) vendor=be ;; - -hpux*) + *-hpux*) vendor=hp ;; - -mpeix*) + *-mpeix*) vendor=hp ;; - -hiux*) + *-hiux*) vendor=hitachi ;; - -unos*) + *-unos*) vendor=crds ;; - -dgux*) + *-dgux*) vendor=dg ;; - -luna*) + *-luna*) vendor=omron ;; - -genix*) + *-genix*) vendor=ns ;; - -mvs* | -opened*) + *-clix*) + vendor=intergraph + ;; + *-mvs* | *-opened*) + vendor=ibm + ;; + *-os400*) vendor=ibm ;; - -os400*) + s390-* | s390x-*) vendor=ibm ;; - -ptx*) + *-ptx*) vendor=sequent ;; - -tpf*) + *-tpf*) vendor=ibm ;; - -vxsim* | -vxworks* | -windiss*) + *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; - -aux*) + *-aux*) vendor=apple ;; - -hms*) + *-hms*) vendor=hitachi ;; - -mpw* | -macos*) + *-mpw* | *-macos*) vendor=apple ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; - -vos*) + *-vos*) vendor=stratus ;; esac - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo "$basic_machine$os" +echo "$cpu-$vendor-${kernel:+$kernel-}$os" exit # Local variables: diff -Nru modemmanager-1.12.8/configure modemmanager-1.16.6/configure --- modemmanager-1.12.8/configure 2020-03-14 17:16:02.000000000 +0800 +++ modemmanager-1.16.6/configure 2021-06-06 21:43:42.000000000 +0800 @@ -1,11 +1,12 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for ModemManager 1.12.8. +# Generated by GNU Autoconf 2.71 for ModemManager 1.16.6. # -# Report bugs to . +# Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -16,14 +17,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -33,46 +36,46 @@ fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -81,13 +84,6 @@ fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -96,8 +92,12 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -109,30 +109,10 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -154,20 +134,22 @@ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else +else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -187,18 +169,20 @@ as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : -else +else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' @@ -206,31 +190,40 @@ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" - if (eval "$as_required") 2>/dev/null; then : + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null +then : as_have_required=yes -else +else $as_nop as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : -else +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base + as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : break 2 fi fi @@ -238,14 +231,21 @@ esac as_found=false done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi - if test "x$CONFIG_SHELL" != x; then : + if test "x$CONFIG_SHELL" != x +then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -263,22 +263,24 @@ exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: modemmanager-devel@lists.freedesktop.org about your -$0: system, including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and +$0: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues +$0: about your system, including any error possibly output +$0: before this message. Then install a modern shell, or +$0: manually run the script under such a shell if you do +$0: have one." fi exit 1 fi @@ -302,6 +304,7 @@ } as_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -319,6 +322,14 @@ as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -333,7 +344,7 @@ as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -342,7 +353,7 @@ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -381,12 +392,13 @@ # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -398,18 +410,27 @@ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -421,9 +442,9 @@ as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -450,7 +471,7 @@ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -494,7 +515,7 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -508,6 +529,10 @@ exit } + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -521,6 +546,13 @@ ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -590,52 +622,140 @@ # Identity of this package. PACKAGE_NAME='ModemManager' PACKAGE_TARNAME='ModemManager' -PACKAGE_VERSION='1.12.8' -PACKAGE_STRING='ModemManager 1.12.8' -PACKAGE_BUGREPORT='modemmanager-devel@lists.freedesktop.org' +PACKAGE_VERSION='1.16.6' +PACKAGE_STRING='ModemManager 1.16.6' +PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include +#include +#ifdef HAVE_STDIO_H +# include #endif -#ifdef STDC_HEADERS +#ifdef HAVE_STDLIB_H # include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif #endif #ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif #ifdef HAVE_UNISTD_H # include #endif" +ac_header_c_list= gt_needs= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +WITH_SHARED_FOXCONN_FALSE +WITH_SHARED_FOXCONN_TRUE +WITH_SHARED_TELIT_FALSE +WITH_SHARED_TELIT_TRUE +WITH_SHARED_XMM_FALSE +WITH_SHARED_XMM_TRUE +WITH_SHARED_NOVATEL_FALSE +WITH_SHARED_NOVATEL_TRUE +WITH_SHARED_OPTION_FALSE +WITH_SHARED_OPTION_TRUE +WITH_SHARED_SIERRA_FALSE +WITH_SHARED_SIERRA_TRUE +WITH_SHARED_ICERA_FALSE +WITH_SHARED_ICERA_TRUE +ENABLE_PLUGIN_ZTE_FALSE +ENABLE_PLUGIN_ZTE_TRUE +ENABLE_PLUGIN_X22X_FALSE +ENABLE_PLUGIN_X22X_TRUE +ENABLE_PLUGIN_WAVECOM_FALSE +ENABLE_PLUGIN_WAVECOM_TRUE +ENABLE_PLUGIN_VIA_FALSE +ENABLE_PLUGIN_VIA_TRUE +ENABLE_PLUGIN_UBLOX_FALSE +ENABLE_PLUGIN_UBLOX_TRUE +ENABLE_PLUGIN_TPLINK_FALSE +ENABLE_PLUGIN_TPLINK_TRUE +ENABLE_PLUGIN_THURAYA_FALSE +ENABLE_PLUGIN_THURAYA_TRUE +ENABLE_PLUGIN_TELIT_FALSE +ENABLE_PLUGIN_TELIT_TRUE +ENABLE_PLUGIN_SIMTECH_FALSE +ENABLE_PLUGIN_SIMTECH_TRUE +ENABLE_PLUGIN_SIERRA_FALSE +ENABLE_PLUGIN_SIERRA_TRUE +ENABLE_PLUGIN_SIERRA_LEGACY_FALSE +ENABLE_PLUGIN_SIERRA_LEGACY_TRUE +ENABLE_PLUGIN_SAMSUNG_FALSE +ENABLE_PLUGIN_SAMSUNG_TRUE +ENABLE_PLUGIN_QUECTEL_FALSE +ENABLE_PLUGIN_QUECTEL_TRUE +ENABLE_PLUGIN_QCOM_SOC_FALSE +ENABLE_PLUGIN_QCOM_SOC_TRUE +ENABLE_PLUGIN_PANTECH_FALSE +ENABLE_PLUGIN_PANTECH_TRUE +ENABLE_PLUGIN_OPTION_HSO_FALSE +ENABLE_PLUGIN_OPTION_HSO_TRUE +ENABLE_PLUGIN_OPTION_FALSE +ENABLE_PLUGIN_OPTION_TRUE +ENABLE_PLUGIN_NOVATEL_LTE_FALSE +ENABLE_PLUGIN_NOVATEL_LTE_TRUE +ENABLE_PLUGIN_NOVATEL_FALSE +ENABLE_PLUGIN_NOVATEL_TRUE +ENABLE_PLUGIN_NOKIA_ICERA_FALSE +ENABLE_PLUGIN_NOKIA_ICERA_TRUE +ENABLE_PLUGIN_NOKIA_FALSE +ENABLE_PLUGIN_NOKIA_TRUE +ENABLE_PLUGIN_MTK_FALSE +ENABLE_PLUGIN_MTK_TRUE +ENABLE_PLUGIN_MOTOROLA_FALSE +ENABLE_PLUGIN_MOTOROLA_TRUE +ENABLE_PLUGIN_MBM_FALSE +ENABLE_PLUGIN_MBM_TRUE +ENABLE_PLUGIN_LONGCHEER_FALSE +ENABLE_PLUGIN_LONGCHEER_TRUE +ENABLE_PLUGIN_LINKTOP_FALSE +ENABLE_PLUGIN_LINKTOP_TRUE +ENABLE_PLUGIN_IRIDIUM_FALSE +ENABLE_PLUGIN_IRIDIUM_TRUE +ENABLE_PLUGIN_HUAWEI_FALSE +ENABLE_PLUGIN_HUAWEI_TRUE +ENABLE_PLUGIN_HAIER_FALSE +ENABLE_PLUGIN_HAIER_TRUE +ENABLE_PLUGIN_GOSUNCN_FALSE +ENABLE_PLUGIN_GOSUNCN_TRUE +ENABLE_PLUGIN_FOXCONN_FALSE +ENABLE_PLUGIN_FOXCONN_TRUE +ENABLE_PLUGIN_FIBOCOM_FALSE +ENABLE_PLUGIN_FIBOCOM_TRUE +ENABLE_PLUGIN_DLINK_FALSE +ENABLE_PLUGIN_DLINK_TRUE +ENABLE_PLUGIN_DELL_FALSE +ENABLE_PLUGIN_DELL_TRUE +ENABLE_PLUGIN_CINTERION_FALSE +ENABLE_PLUGIN_CINTERION_TRUE +ENABLE_PLUGIN_BROADMOBI_FALSE +ENABLE_PLUGIN_BROADMOBI_TRUE +ENABLE_PLUGIN_ANYDATA_FALSE +ENABLE_PLUGIN_ANYDATA_TRUE +ENABLE_PLUGIN_ALTAIR_LTE_FALSE +ENABLE_PLUGIN_ALTAIR_LTE_TRUE +ENABLE_PLUGIN_GENERIC_FALSE +ENABLE_PLUGIN_GENERIC_TRUE QCDM_STANDALONE_FALSE QCDM_STANDALONE_TRUE QMI_LIBS @@ -656,6 +776,8 @@ WITH_SYSTEMD_JOURNAL_TRUE WITH_SYSTEMD_SUSPEND_RESUME_FALSE WITH_SYSTEMD_SUSPEND_RESUME_TRUE +LIBELOGIND_LIBS +LIBELOGIND_CFLAGS LIBSYSTEMD_LOGIN_LIBS LIBSYSTEMD_LOGIN_CFLAGS LIBSYSTEMD_LIBS @@ -693,6 +815,7 @@ CODE_COVERAGE_ENABLED CODE_COVERAGE_ENABLED_FALSE CODE_COVERAGE_ENABLED_TRUE +XSLTPROC_CHECK GDBUS_CODEGEN GLIB_MKENUMS MMCLI_LIBS @@ -709,6 +832,7 @@ LTLIBICONV LIBICONV INTL_MACOSX_LIBS +CPP XGETTEXT_EXTRA_OPTIONS MSGMERGE XGETTEXT_015 @@ -748,6 +872,9 @@ MM_MICRO_VERSION MM_MINOR_VERSION MM_MAJOR_VERSION +WARN_SCANNERFLAGS +WARN_LDFLAGS +WARN_CFLAGS LT_SYS_LIBRARY_PATH OTOOL64 OTOOL @@ -766,6 +893,8 @@ DUMPBIN LD FGREP +EGREP +GREP SED host_os host_vendor @@ -776,9 +905,6 @@ build_cpu build LIBTOOL -EGREP -GREP -CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE @@ -844,6 +970,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -878,6 +1005,8 @@ with_gnu_ld with_sysroot enable_libtool_lock +enable_compile_warnings +enable_Werror with_html_dir enable_gtk_doc enable_gtk_doc_html @@ -900,8 +1029,47 @@ with_at_command_via_dbus with_mbim with_qmi -enable_more_warnings with_dist_version +enable_all_plugins +enable_plugin_generic +enable_plugin_altair_lte +enable_plugin_anydata +enable_plugin_broadmobi +enable_plugin_cinterion +enable_plugin_dell +enable_plugin_dlink +enable_plugin_fibocom +enable_plugin_foxconn +enable_plugin_gosuncn +enable_plugin_haier +enable_plugin_huawei +enable_plugin_iridium +enable_plugin_linktop +enable_plugin_longcheer +enable_plugin_mbm +enable_plugin_motorola +enable_plugin_mtk +enable_plugin_nokia +enable_plugin_nokia_icera +enable_plugin_novatel +enable_plugin_novatel_lte +enable_plugin_option +enable_plugin_option_hso +enable_plugin_pantech +enable_plugin_qcom_soc +enable_plugin_quectel +enable_plugin_samsung +enable_plugin_sierra_legacy +enable_plugin_sierra +enable_plugin_simtech +enable_plugin_telit +enable_plugin_thuraya +enable_plugin_tplink +enable_plugin_ublox +enable_plugin_via +enable_plugin_wavecom +enable_plugin_x22x +enable_plugin_zte ' ac_precious_vars='build_alias host_alias @@ -911,13 +1079,13 @@ LDFLAGS LIBS CPPFLAGS -CPP LT_SYS_LIBRARY_PATH PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR GTKDOC_DEPS_CFLAGS GTKDOC_DEPS_LIBS +CPP MM_CFLAGS MM_LIBS LIBMM_GLIB_CFLAGS @@ -930,6 +1098,8 @@ LIBSYSTEMD_LIBS LIBSYSTEMD_LOGIN_CFLAGS LIBSYSTEMD_LOGIN_LIBS +LIBELOGIND_CFLAGS +LIBELOGIND_LIBS POLKIT_CFLAGS POLKIT_LIBS MBIM_CFLAGS @@ -974,6 +1144,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1003,8 +1174,6 @@ *) ac_optarg=yes ;; esac - # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -1045,9 +1214,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1071,9 +1240,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1226,6 +1395,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1275,9 +1453,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1291,9 +1469,9 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1337,9 +1515,9 @@ *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1355,7 +1533,7 @@ case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1363,7 +1541,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1419,7 +1597,7 @@ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | +printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1476,7 +1654,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ModemManager 1.12.8 to adapt to many kinds of systems. +\`configure' configures ModemManager 1.16.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1516,6 +1694,7 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1546,7 +1725,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ModemManager 1.12.8:";; + short | recursive ) echo "Configuration of ModemManager 1.16.6:";; esac cat <<\_ACEOF @@ -1568,6 +1747,9 @@ --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) + --enable-compile-warnings=[no/yes/error] + Enable compiler warnings and errors + --disable-Werror Unconditionally make all compiler warnings non-fatal --enable-gtk-doc use gtk-doc to build documentation [[default=no]] --enable-gtk-doc-html build documentation in html format [[default=yes]] --enable-gtk-doc-pdf build documentation in pdf format [[default=no]] @@ -1578,7 +1760,56 @@ Enable introspection for this build --enable-vala=[no/auto/yes] build Vala bindings [default=auto] - --enable-more-warnings Possible values: no/yes/error + --enable-all-plugins Build all plugins [[default=yes]] + --enable-plugin-generic Build generic plugin + --enable-plugin-altair-lte + Build altair-lte plugin + --enable-plugin-anydata Build anydata plugin + --enable-plugin-broadmobi + Build broadmobi plugin + --enable-plugin-cinterion + Build cinterion plugin + --enable-plugin-dell Build dell plugin + --enable-plugin-dlink Build dlink plugin + --enable-plugin-fibocom Build fibocom plugin + --enable-plugin-foxconn Build foxconn plugin + --enable-plugin-gosuncn Build gosuncn plugin + --enable-plugin-haier Build haier plugin + --enable-plugin-huawei Build huawei plugin + --enable-plugin-iridium Build iridium plugin + --enable-plugin-linktop Build linktop plugin + --enable-plugin-longcheer + Build longcheer plugin + --enable-plugin-mbm Build mbm plugin + --enable-plugin-motorola + Build motorola plugin + --enable-plugin-mtk Build mtk plugin + --enable-plugin-nokia Build nokia plugin + --enable-plugin-nokia-icera + Build nokia-icera plugin + --enable-plugin-novatel Build novatel plugin + --enable-plugin-novatel-lte + Build novatel-lte plugin + --enable-plugin-option Build option plugin + --enable-plugin-option-hso + Build option-hso plugin + --enable-plugin-pantech Build pantech plugin + --enable-plugin-qcom-soc + Build qcom-soc plugin + --enable-plugin-quectel Build quectel plugin + --enable-plugin-samsung Build samsung plugin + --enable-plugin-sierra-legacy + Build sierra-legacy plugin + --enable-plugin-sierra Build sierra plugin + --enable-plugin-simtech Build simtech plugin + --enable-plugin-telit Build telit plugin + --enable-plugin-thuraya Build thuraya plugin + --enable-plugin-tplink Build tplink plugin + --enable-plugin-ublox Build ublox plugin + --enable-plugin-via Build via plugin + --enable-plugin-wavecom Build wavecom plugin + --enable-plugin-x22x Build x22x plugin + --enable-plugin-zte Build zte plugin Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1627,7 +1858,6 @@ LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory - CPP C preprocessor LT_SYS_LIBRARY_PATH User-defined run-time library search path. PKG_CONFIG path to pkg-config utility @@ -1639,6 +1869,7 @@ C compiler flags for GTKDOC_DEPS, overriding pkg-config GTKDOC_DEPS_LIBS linker flags for GTKDOC_DEPS, overriding pkg-config + CPP C preprocessor MM_CFLAGS C compiler flags for MM, overriding pkg-config MM_LIBS linker flags for MM, overriding pkg-config LIBMM_GLIB_CFLAGS @@ -1659,6 +1890,10 @@ C compiler flags for LIBSYSTEMD_LOGIN, overriding pkg-config LIBSYSTEMD_LOGIN_LIBS linker flags for LIBSYSTEMD_LOGIN, overriding pkg-config + LIBELOGIND_CFLAGS + C compiler flags for LIBELOGIND, overriding pkg-config + LIBELOGIND_LIBS + linker flags for LIBELOGIND, overriding pkg-config POLKIT_CFLAGS C compiler flags for POLKIT, overriding pkg-config POLKIT_LIBS linker flags for POLKIT, overriding pkg-config @@ -1670,7 +1905,7 @@ Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . +Report bugs to . _ACEOF ac_status=$? fi @@ -1686,9 +1921,9 @@ case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1716,7 +1951,8 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1724,7 +1960,7 @@ echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1733,10 +1969,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ModemManager configure 1.12.8 -generated by GNU Autoconf 2.69 +ModemManager configure 1.16.6 +generated by GNU Autoconf 2.71 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1753,14 +1989,14 @@ ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext + rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1768,14 +2004,15 @@ cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + } && test -s conftest.$ac_objext +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1785,176 +2022,6 @@ } # ac_fn_c_try_compile -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------------------------------- ## -## Report this to modemmanager-devel@lists.freedesktop.org ## -## ------------------------------------------------------- ##" - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in @@ -1962,26 +2029,28 @@ ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -1992,14 +2061,14 @@ ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext + rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -2007,17 +2076,18 @@ cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - }; then : + } +then : ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -2038,11 +2108,12 @@ ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +printf %s "checking for $2... " >&6; } +if eval test \${$3+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. @@ -2050,16 +2121,9 @@ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif + which can conflict with char $2 (); below. */ +#include #undef $2 /* Override any GCC internal prototype to avoid an error. @@ -2077,35 +2141,137 @@ #endif int -main () +main (void) { return $2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : eval "$3=yes" -else +else $as_nop eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that +# executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +printf "%s\n" "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then : + ac_retval=0 +else $as_nop + printf "%s\n" "$as_me: program exited with status $ac_status" >&5 + printf "%s\n" "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac + cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ModemManager $as_me 1.12.8, which was -generated by GNU Autoconf 2.69. Invocation command line was +It was created by ModemManager $as_me 1.16.6, which was +generated by GNU Autoconf 2.71. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -2138,8 +2304,12 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS @@ -2174,7 +2344,7 @@ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2209,11 +2379,13 @@ # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? + # Sanitize IFS. + IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - $as_echo "## ---------------- ## + printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2224,8 +2396,8 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2249,7 +2421,7 @@ ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2257,14 +2429,14 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2272,15 +2444,15 @@ do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - $as_echo "## ----------- ## + printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2288,8 +2460,8 @@ echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2303,63 +2475,48 @@ # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -$as_echo "/* confdefs.h */" > confdefs.h +printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" + +for ac_site_file in $ac_site_files do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2369,20 +2526,437 @@ # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi +as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" +# Test code for whether the C compiler supports C89 (global declarations) +ac_c_conftest_c89_globals=' +/* Does the compiler advertise C89 conformance? + Do not test the value of __STDC__, because some compilers set it to 0 + while being otherwise adequately conformant. */ +#if !defined __STDC__ +# error "Compiler does not advertise C89 conformance" +#endif + +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ +struct buf { int x; }; +struct buf * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not \xHH hex character constants. + These do not provoke an error unfortunately, instead are silently treated + as an "x". The following induces an error, until -std is added to get + proper ANSI mode. Curiously \x00 != x always comes out true, for an + array size at least. It is necessary to write \x00 == 0 to get something + that is true only with -std. */ +int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) '\''x'\'' +int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), + int, int);' + +# Test code for whether the C compiler supports C89 (body of main). +ac_c_conftest_c89_main=' +ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); +' + +# Test code for whether the C compiler supports C99 (global declarations) +ac_c_conftest_c99_globals=' +// Does the compiler advertise C99 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L +# error "Compiler does not advertise C99 conformance" +#endif + +#include +extern int puts (const char *); +extern int printf (const char *, ...); +extern int dprintf (int, const char *, ...); +extern void *malloc (size_t); + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +// dprintf is used instead of fprintf to avoid needing to declare +// FILE and stderr. +#define debug(...) dprintf (2, __VA_ARGS__) +#define showlist(...) puts (#__VA_ARGS__) +#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +static void +test_varargs_macros (void) +{ + int x = 1234; + int y = 5678; + debug ("Flag"); + debug ("X = %d\n", x); + showlist (The first, second, and third items.); + report (x>y, "x is %d but y is %d", x, y); +} + +// Check long long types. +#define BIG64 18446744073709551615ull +#define BIG32 4294967295ul +#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +#if !BIG_OK + #error "your preprocessor is broken" +#endif +#if BIG_OK +#else + #error "your preprocessor is broken" +#endif +static long long int bignum = -9223372036854775807LL; +static unsigned long long int ubignum = BIG64; + +struct incomplete_array +{ + int datasize; + double data[]; +}; + +struct named_init { + int number; + const wchar_t *name; + double average; +}; + +typedef const char *ccp; + +static inline int +test_restrict (ccp restrict text) +{ + // See if C++-style comments work. + // Iterate through items via the restricted pointer. + // Also check for declarations in for loops. + for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) + continue; + return 0; +} + +// Check varargs and va_copy. +static bool +test_varargs (const char *format, ...) +{ + va_list args; + va_start (args, format); + va_list args_copy; + va_copy (args_copy, args); + + const char *str = ""; + int number = 0; + float fnumber = 0; + + while (*format) + { + switch (*format++) + { + case '\''s'\'': // string + str = va_arg (args_copy, const char *); + break; + case '\''d'\'': // int + number = va_arg (args_copy, int); + break; + case '\''f'\'': // float + fnumber = va_arg (args_copy, double); + break; + default: + break; + } + } + va_end (args_copy); + va_end (args); + + return *str && number && fnumber; +} +' + +# Test code for whether the C compiler supports C99 (body of main). +ac_c_conftest_c99_main=' + // Check bool. + _Bool success = false; + success |= (argc != 0); + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); + test_varargs_macros (); + + // Check flexible array members. + struct incomplete_array *ia = + malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); + ia->datasize = 10; + for (int i = 0; i < ia->datasize; ++i) + ia->data[i] = i * 1.234; + + // Check named initializers. + struct named_init ni = { + .number = 34, + .name = L"Test wide string", + .average = 543.34343, + }; + + ni.number = 58; + + int dynamic_array[ni.number]; + dynamic_array[0] = argv[0][0]; + dynamic_array[ni.number - 1] = 543; + + // work around unused variable warnings + ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' + || dynamic_array[ni.number - 1] != 543); +' + +# Test code for whether the C compiler supports C11 (global declarations) +ac_c_conftest_c11_globals=' +// Does the compiler advertise C11 conformance? +#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L +# error "Compiler does not advertise C11 conformance" +#endif + +// Check _Alignas. +char _Alignas (double) aligned_as_double; +char _Alignas (0) no_special_alignment; +extern char aligned_as_int; +char _Alignas (0) _Alignas (int) aligned_as_int; + +// Check _Alignof. +enum +{ + int_alignment = _Alignof (int), + int_array_alignment = _Alignof (int[100]), + char_alignment = _Alignof (char) +}; +_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); + +// Check _Noreturn. +int _Noreturn does_not_return (void) { for (;;) continue; } + +// Check _Static_assert. +struct test_static_assert +{ + int x; + _Static_assert (sizeof (int) <= sizeof (long int), + "_Static_assert does not work in struct"); + long int y; +}; + +// Check UTF-8 literals. +#define u8 syntax error! +char const utf8_literal[] = u8"happens to be ASCII" "another string"; + +// Check duplicate typedefs. +typedef long *long_ptr; +typedef long int *long_ptr; +typedef long_ptr long_ptr; + +// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. +struct anonymous +{ + union { + struct { int i; int j; }; + struct { int k; long int l; } w; + }; + int m; +} v1; +' + +# Test code for whether the C compiler supports C11 (body of main). +ac_c_conftest_c11_main=' + _Static_assert ((offsetof (struct anonymous, i) + == offsetof (struct anonymous, w.k)), + "Anonymous union alignment botch"); + v1.i = 2; + v1.w.k = 5; + ok |= v1.i != 5; +' + +# Test code for whether the C compiler supports C11 (complete). +ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} +${ac_c_conftest_c11_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + ${ac_c_conftest_c11_main} + return ok; +} +" + +# Test code for whether the C compiler supports C99 (complete). +ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} +${ac_c_conftest_c99_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + ${ac_c_conftest_c99_main} + return ok; +} +" + +# Test code for whether the C compiler supports C89 (complete). +ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} + +int +main (int argc, char **argv) +{ + int ok = 0; + ${ac_c_conftest_c89_main} + return ok; +} +" + +as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" +as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" +as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" +as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" +as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" +as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" +as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" +as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" +as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H" +as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H" gt_needs="$gt_needs " + +# Auxiliary files required by this configure script. +ac_aux_files="config.rpath config.guess config.sub ltmain.sh compile missing install-sh" + +# Locations in which to look for auxiliary files. +ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." + +# Search for a directory containing all of the required auxiliary files, +# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. +# If we don't find one directory that contains all the files we need, +# we report the set of missing files from the *first* directory in +# $ac_aux_dir_candidates and give up. +ac_missing_aux_files="" +ac_first_candidate=: +printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in $ac_aux_dir_candidates +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + + printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 + ac_aux_dir_found=yes + ac_install_sh= + for ac_aux in $ac_aux_files + do + # As a special case, if "install-sh" is required, that requirement + # can be satisfied by any of "install-sh", "install.sh", or "shtool", + # and $ac_install_sh is set appropriately for whichever one is found. + if test x"$ac_aux" = x"install-sh" + then + if test -f "${as_dir}install-sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 + ac_install_sh="${as_dir}install-sh -c" + elif test -f "${as_dir}install.sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 + ac_install_sh="${as_dir}install.sh -c" + elif test -f "${as_dir}shtool"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 + ac_install_sh="${as_dir}shtool install -c" + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} install-sh" + else + break + fi + fi + else + if test -f "${as_dir}${ac_aux}"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" + else + break + fi + fi + fi + done + if test "$ac_aux_dir_found" = yes; then + ac_aux_dir="$as_dir" + break + fi + ac_first_candidate=false + + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +fi + + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +if test -f "${ac_aux_dir}config.guess"; then + ac_config_guess="$SHELL ${ac_aux_dir}config.guess" +fi +if test -f "${ac_aux_dir}config.sub"; then + ac_config_sub="$SHELL ${ac_aux_dir}config.sub" +fi +if test -f "$ac_aux_dir/configure"; then + ac_configure="$SHELL ${ac_aux_dir}configure" +fi + # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -2393,12 +2967,12 @@ eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -2407,24 +2981,24 @@ ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -2434,11 +3008,12 @@ fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2453,36 +3028,9 @@ am__api_version='1.16' -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -# Find a good install program. We prefer a C program (faster), + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install @@ -2496,20 +3044,25 @@ # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +printf %s "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else +if test ${ac_cv_path_install+y} +then : + printf %s "(cached) " >&6 +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + # Account for fact that we put trailing slashes in our PATH walk. +case $as_dir in #(( + ./ | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; @@ -2519,13 +3072,13 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else @@ -2533,12 +3086,12 @@ echo one > conftest.one echo two > conftest.two mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" break 3 fi fi @@ -2554,7 +3107,7 @@ rm -rf conftest.one conftest.two conftest.dir fi - if test "${ac_cv_path_install+set}" = set; then + if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a @@ -2564,8 +3117,8 @@ INSTALL=$ac_install_sh fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +printf "%s\n" "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -2575,8 +3128,8 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 -$as_echo_n "checking whether build environment is sane... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +printf %s "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -2630,8 +3183,8 @@ as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= @@ -2650,26 +3203,23 @@ # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` +program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` + # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac + + if test x"${MISSING+set}" != xset; then + MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then @@ -2689,11 +3239,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else @@ -2701,11 +3252,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2716,11 +3271,11 @@ fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +printf "%s\n" "$STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -2729,11 +3284,12 @@ ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else @@ -2741,11 +3297,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2756,11 +3316,11 @@ fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +printf "%s\n" "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -2768,8 +3328,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -2781,25 +3341,31 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 +printf %s "checking for a race-free mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${ac_cv_path_mkdir+y} +then : + printf %s "(cached) " >&6 +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ + as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue + case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir ('*'coreutils) '* | \ + 'BusyBox '* | \ 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; esac done @@ -2810,7 +3376,7 @@ fi test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then + if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a @@ -2820,18 +3386,19 @@ MKDIR_P="$ac_install_sh -d" fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +printf "%s\n" "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AWK+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else @@ -2839,11 +3406,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -2854,24 +3425,25 @@ fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +printf "%s\n" "$AWK" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi test -n "$AWK" && break done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else +ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval test \${ac_cv_prog_make_${ac_make}_set+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -2887,12 +3459,12 @@ rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } SET_MAKE= else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2906,7 +3478,8 @@ rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : +if test ${enable_silent_rules+y} +then : enableval=$enable_silent_rules; fi @@ -2916,12 +3489,13 @@ *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +printf %s "checking whether $am_make supports nested variables... " >&6; } +if test ${am_cv_make_support_nested_variables+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 @@ -2933,8 +3507,8 @@ am_cv_make_support_nested_variables=no fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' @@ -2966,17 +3540,13 @@ # Define the identity of the package. PACKAGE='ModemManager' - VERSION='1.12.8' + VERSION='1.16.6' -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF +printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF +printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h # Some tools Automake needs. @@ -3022,29 +3592,29 @@ # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 -$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 +printf %s "checking whether UID '$am_uid' is supported by ustar format... " >&6; } if test $am_uid -le $am_max_uid; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } _am_tools=none fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 -$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 +printf %s "checking whether GID '$am_gid' is supported by ustar format... " >&6; } if test $am_gid -le $am_max_gid; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } _am_tools=none fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 -$as_echo_n "checking how to create a ustar tar archive... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 +printf %s "checking how to create a ustar tar archive... " >&6; } # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. @@ -3119,14 +3689,15 @@ done rm -rf conftest.dir - if ${am_cv_prog_tar_ustar+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${am_cv_prog_tar_ustar+y} +then : + printf %s "(cached) " >&6 +else $as_nop am_cv_prog_tar_ustar=$_am_tool fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 -$as_echo "$am_cv_prog_tar_ustar" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 +printf "%s\n" "$am_cv_prog_tar_ustar" >&6; } @@ -3176,7 +3747,8 @@ fi # Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : +if test ${enable_silent_rules+y} +then : enableval=$enable_silent_rules; fi @@ -3186,12 +3758,13 @@ *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +printf %s "checking whether $am_make supports nested variables... " >&6; } +if test ${am_cv_make_support_nested_variables+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 @@ -3203,8 +3776,8 @@ am_cv_make_support_nested_variables=no fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' @@ -3216,17 +3789,18 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +printf %s "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then : +if test ${enable_maintainer_mode+y} +then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else +else $as_nop USE_MAINTAINER_MODE=yes fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -$as_echo "$USE_MAINTAINER_MODE" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +printf "%s\n" "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' @@ -3240,7 +3814,8 @@ # Check whether --enable-silent-rules was given. -if test "${enable_silent_rules+set}" = set; then : +if test ${enable_silent_rules+y} +then : enableval=$enable_silent_rules; fi @@ -3250,12 +3825,13 @@ *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -$as_echo_n "checking whether $am_make supports nested variables... " >&6; } -if ${am_cv_make_support_nested_variables+:} false; then : - $as_echo_n "(cached) " >&6 -else - if $as_echo 'TRUE=$(BAR$(V)) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +printf %s "checking whether $am_make supports nested variables... " >&6; } +if test ${am_cv_make_support_nested_variables+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 @@ -3267,8 +3843,8 @@ am_cv_make_support_nested_variables=no fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -$as_echo "$am_cv_make_support_nested_variables" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' @@ -3284,12 +3860,21 @@ ac_config_headers="$ac_config_headers config.h" + + + + + + + + + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 -$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out @@ -3325,11 +3910,12 @@ fi done rm -f confinc.* confmf.* -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 -$as_echo "${_am_result}" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +printf "%s\n" "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : +if test ${enable_dependency_tracking+y} +then : enableval=$enable_dependency_tracking; fi @@ -3355,11 +3941,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3367,11 +3954,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3382,11 +3973,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3395,11 +3986,12 @@ ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3407,11 +3999,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3422,11 +4018,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -3434,8 +4030,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3448,11 +4044,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3460,11 +4057,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3475,11 +4076,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3488,11 +4089,12 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3501,15 +4103,19 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3525,18 +4131,18 @@ # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3547,11 +4153,12 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3559,11 +4166,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3574,11 +4185,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3591,11 +4202,12 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3603,11 +4215,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3618,11 +4234,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -3634,34 +4250,138 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi +else + CC="$ac_cv_prog_CC" fi fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion; do +for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -3671,7 +4391,7 @@ cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -3679,7 +4399,7 @@ /* end confdefs.h. */ int -main () +main (void) { ; @@ -3691,9 +4411,9 @@ # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +printf %s "checking whether the C compiler works... " >&6; } +ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -3714,11 +4434,12 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -3735,7 +4456,7 @@ # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -3751,44 +4472,46 @@ done test "$ac_cv_exeext" = no && ac_cv_exeext= -else +else $as_nop ac_file='' fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 +if test -z "$ac_file" +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +printf %s "checking for C compiler default output file name... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -3802,15 +4525,15 @@ * ) break;; esac done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -3819,7 +4542,7 @@ /* end confdefs.h. */ #include int -main () +main (void) { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -3831,8 +4554,8 @@ ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -3840,10 +4563,10 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -3851,39 +4574,40 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +printf %s "checking for suffix of object files... " >&6; } +if test ${ac_cv_objext+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -3897,11 +4621,12 @@ *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -3910,31 +4635,32 @@ break;; esac done -else - $as_echo "$as_me: failed program was:" >&5 +else $as_nop + printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -3944,29 +4670,33 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -3975,57 +4705,60 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else +else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -4040,94 +4773,144 @@ CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC - fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi fi ac_ext=c @@ -4136,21 +4919,23 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_ext=c + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +printf %s "checking whether $CC understands -c and -o together... " >&6; } +if test ${am_cv_prog_cc_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -4178,8 +4963,8 @@ rm -f core conftest* unset am_i fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. @@ -4197,11 +4982,12 @@ depcc="$CC" am_compiler_list= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +printf %s "checking dependency style of $depcc... " >&6; } +if test ${am_cv_CC_dependencies_compiler_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For @@ -4308,8 +5094,8 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -4324,463 +5110,175 @@ -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes +ac_header= ac_cache= +for ac_item in $ac_header_c_list do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - + if test $ac_cache; then + ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" + if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then + printf "%s\n" "#define $ac_item 1" >> confdefs.h + fi + ac_header= ac_cache= + elif test $ac_header; then + ac_cache=$ac_item + else + ac_header=$ac_item + fi done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - done - ac_cv_prog_CPP=$CPP -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes +then : -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_GREP" || continue -# Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac +printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_EGREP" || continue -# Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 +printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if test ${ac_cv_safe_to_define___extensions__+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#include -#include +# define __EXTENSIONS__ 1 + $ac_includes_default int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_safe_to_define___extensions__=yes +else $as_nop + ac_cv_safe_to_define___extensions__=no fi -rm -f conftest* - +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 +printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; } -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 +printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; } +if test ${ac_cv_should_define__xopen_source+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_should_define__xopen_source=no + if test $ac_cv_header_wchar_h = yes +then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : -else - ac_cv_header_stdc=no -fi -rm -f conftest* + #include + mbstate_t x; +int +main (void) +{ -fi + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) + #define _XOPEN_SOURCE 500 + #include + mbstate_t x; int -main () +main (void) { - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; + + ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_should_define__xopen_source=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi - +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 +printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; } -$as_echo "#define STDC_HEADERS 1" >>confdefs.h + printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h -fi + printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default -" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h -fi + printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h -done + printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h + printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h + printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h - ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -if test "x$ac_cv_header_minix_config_h" = xyes; then : - MINIX=yes -else - MINIX= -fi + printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h - if test "$MINIX" = yes; then + printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h -$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h -$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h -$as_echo "#define _MINIX 1" >>confdefs.h - - fi + printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h + if test $ac_cv_header_minix_config_h = yes +then : + MINIX=yes + printf "%s\n" "#define _MINIX 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 -$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if ${ac_cv_safe_to_define___extensions__+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h -# define __EXTENSIONS__ 1 - $ac_includes_default -int -main () -{ + printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_safe_to_define___extensions__=yes -else - ac_cv_safe_to_define___extensions__=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else $as_nop + MINIX= fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 -$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } - test $ac_cv_safe_to_define___extensions__ = yes && - $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h - - $as_echo "#define _ALL_SOURCE 1" >>confdefs.h - - $as_echo "#define _GNU_SOURCE 1" >>confdefs.h - - $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h + if test $ac_cv_safe_to_define___extensions__ = yes +then : + printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h - $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h +fi + if test $ac_cv_should_define__xopen_source = yes +then : + printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h +fi ac_ext=c @@ -4791,11 +5289,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4803,11 +5302,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4818,11 +5321,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4831,11 +5334,12 @@ ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -4843,11 +5347,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4858,11 +5366,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -4870,8 +5378,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -4884,11 +5392,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4896,11 +5405,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4911,11 +5424,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4924,11 +5437,12 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4937,15 +5451,19 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4961,18 +5479,18 @@ # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -4983,11 +5501,12 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4995,11 +5514,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5010,11 +5533,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5027,11 +5550,12 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -5039,11 +5563,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5054,11 +5582,11 @@ fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -5070,8 +5598,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -5079,25 +5607,129 @@ fi fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. +set dummy ${ac_tool_prefix}clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +printf "%s\n" "$CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "clang", so it can be a program name with args. +set dummy clang; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_CC+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="clang" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +printf "%s\n" "$ac_ct_CC" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +fi + + +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion; do +for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 +printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -5107,20 +5739,21 @@ cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 +printf %s "checking whether the compiler supports GNU C... " >&6; } +if test ${ac_cv_c_compiler_gnu+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { #ifndef __GNUC__ choke me @@ -5130,29 +5763,33 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_compiler_gnu=yes -else +else $as_nop ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } +ac_compiler_gnu=$ac_cv_c_compiler_gnu + if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+set} +ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +printf %s "checking whether $CC accepts -g... " >&6; } +if test ${ac_cv_prog_cc_g+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -5161,57 +5798,60 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes -else +else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : -else +else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +printf "%s\n" "$ac_cv_prog_cc_g" >&6; } +if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -5226,94 +5866,144 @@ CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no +ac_prog_cc_stdc=no +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 +printf %s "checking for $CC option to enable C11 features... " >&6; } +if test ${ac_cv_prog_cc_c11+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +$ac_c_conftest_c11_program +_ACEOF +for ac_arg in '' -std=gnu11 +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c11=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c11" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; +if test "x$ac_cv_prog_cc_c11" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c11" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } + CC="$CC $ac_cv_prog_cc_c11" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 + ac_prog_cc_stdc=c11 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 +printf %s "checking for $CC option to enable C99 features... " >&6; } +if test ${ac_cv_prog_cc_c99+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c99_program +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_prog_cc_c99=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} +if test "x$ac_cv_prog_cc_c99" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c99" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } + CC="$CC $ac_cv_prog_cc_c99" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 + ac_prog_cc_stdc=c99 +fi +fi +if test x$ac_prog_cc_stdc = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 +printf %s "checking for $CC option to enable C89 features... " >&6; } +if test ${ac_cv_prog_cc_c89+y} +then : + printf %s "(cached) " >&6 +else $as_nop + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_c_conftest_c89_program _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : + if ac_fn_c_try_compile "$LINENO" +then : ac_cv_prog_cc_c89=$ac_arg fi -rm -f core conftest.err conftest.$ac_objext +rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC - fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : +if test "x$ac_cv_prog_cc_c89" = xno +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +printf "%s\n" "unsupported" >&6; } +else $as_nop + if test "x$ac_cv_prog_cc_c89" = x +then : + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +printf "%s\n" "none needed" >&6; } +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } + CC="$CC $ac_cv_prog_cc_c89" +fi + ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 + ac_prog_cc_stdc=c89 +fi fi ac_ext=c @@ -5322,21 +6012,23 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_ext=c + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +printf %s "checking whether $CC understands -c and -o together... " >&6; } +if test ${am_cv_prog_cc_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; @@ -5364,8 +6056,8 @@ rm -f core conftest* unset am_i fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. @@ -5383,11 +6075,12 @@ depcc="$CC" am_compiler_list= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +printf %s "checking dependency style of $depcc... " >&6; } +if test ${am_cv_CC_dependencies_compiler_type+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For @@ -5494,8 +6187,8 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -5516,8 +6209,8 @@ case `pwd` in *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac @@ -5537,28 +6230,32 @@ + ltmain=$ac_aux_dir/ltmain.sh -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else + + + # Make sure we can run config.sub. +$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_build_alias=$build_alias test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` + ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; @@ -5577,21 +6274,22 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; @@ -5631,8 +6329,8 @@ ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +printf %s "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then @@ -5658,12 +6356,12 @@ } case $ECHO in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; + printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +printf "%s\n" "printf" >&6; } ;; + print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +printf "%s\n" "print -r" >&6; } ;; + *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +printf "%s\n" "cat" >&6; } ;; esac @@ -5679,11 +6377,12 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 +printf %s "checking for a sed that does not truncate output... " >&6; } +if test ${ac_cv_path_SED+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" @@ -5697,10 +6396,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in sed gsed + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + ac_path_SED="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED @@ -5709,13 +6413,13 @@ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" + printf "%s\n" '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5743,8 +6447,8 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 +printf "%s\n" "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed @@ -5761,11 +6465,154 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +printf %s "checking for grep that handles long lines and -e... " >&6; } +if test ${ac_cv_path_GREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in grep ggrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +printf "%s\n" "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +printf %s "checking for egrep... " >&6; } +if test ${ac_cv_path_EGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in egrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +printf "%s\n" "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 +printf %s "checking for fgrep... " >&6; } +if test ${ac_cv_path_FGREP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else @@ -5776,10 +6623,15 @@ for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in fgrep; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in fgrep + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" + ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP @@ -5788,13 +6640,13 @@ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 - $as_echo_n 0123456789 >"conftest.in" + printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" + printf "%s\n" 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5823,8 +6675,8 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 +printf "%s\n" "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" @@ -5849,17 +6701,18 @@ # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : +if test ${with_gnu_ld+y} +then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes -else +else $as_nop with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +printf %s "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw @@ -5888,15 +6741,16 @@ ;; esac elif test yes = "$with_gnu_ld"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +printf %s "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +printf %s "checking for non-GNU ld... " >&6; } fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else +if test ${lt_cv_path_LD+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do @@ -5925,18 +6779,19 @@ LD=$lt_cv_path_LD if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +printf %s "checking if the linker ($LD) is GNU ld... " >&6; } +if test ${lt_cv_prog_gnu_ld+y} +then : + printf %s "(cached) " >&6 +else $as_nop # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5 +printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld @@ -5959,11 +6814,12 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 +printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } +if test ${lt_cv_path_NM+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM @@ -6013,8 +6869,8 @@ : ${lt_cv_path_NM=no} fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 +printf "%s\n" "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else @@ -6027,11 +6883,12 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DUMPBIN+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else @@ -6039,11 +6896,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6054,11 +6915,11 @@ fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 +printf "%s\n" "$DUMPBIN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6071,11 +6932,12 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DUMPBIN+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else @@ -6083,11 +6945,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6098,11 +6964,11 @@ fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 +printf "%s\n" "$ac_ct_DUMPBIN" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6114,8 +6980,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN @@ -6143,11 +7009,12 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 +printf %s "checking the name lister ($NM) interface... " >&6; } +if test ${lt_cv_nm_interface+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) @@ -6163,26 +7030,27 @@ fi rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 +printf "%s\n" "$lt_cv_nm_interface" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 +printf %s "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 +printf "%s\n" "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 +printf %s "checking the maximum length of command line arguments... " >&6; } +if test ${lt_cv_sys_max_cmd_len+y} +then : + printf %s "(cached) " >&6 +else $as_nop i=0 teststring=ABCD @@ -6309,11 +7177,11 @@ fi if test -n "$lt_cv_sys_max_cmd_len"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 +printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 +printf "%s\n" "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len @@ -6357,11 +7225,12 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +printf %s "checking how to convert $build file names to $host format... " >&6; } +if test ${lt_cv_to_host_file_cmd+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $host in *-*-mingw* ) case $build in @@ -6397,18 +7266,19 @@ fi to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +printf %s "checking how to convert $build file names to toolchain format... " >&6; } +if test ${lt_cv_to_tool_file_cmd+y} +then : + printf %s "(cached) " >&6 +else $as_nop #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in @@ -6424,22 +7294,23 @@ fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +printf %s "checking for $LD option to reload object files... " >&6; } +if test ${lt_cv_ld_reload_flag+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ld_reload_flag='-r' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; @@ -6472,11 +7343,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OBJDUMP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else @@ -6484,11 +7356,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6499,11 +7375,11 @@ fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +printf "%s\n" "$OBJDUMP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6512,11 +7388,12 @@ ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OBJDUMP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else @@ -6524,11 +7401,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6539,11 +7420,11 @@ fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then @@ -6551,8 +7432,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP @@ -6571,11 +7452,12 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 +printf %s "checking how to recognize dependent libraries... " >&6; } +if test ${lt_cv_deplibs_check_method+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' @@ -6771,8 +7653,8 @@ esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 +printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no @@ -6816,11 +7698,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DLLTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else @@ -6828,11 +7711,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6843,11 +7730,11 @@ fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +printf "%s\n" "$DLLTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -6856,11 +7743,12 @@ ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DLLTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else @@ -6868,11 +7756,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6883,11 +7775,11 @@ fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then @@ -6895,8 +7787,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL @@ -6916,11 +7808,12 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +printf %s "checking how to associate runtime and link libraries... " >&6; } +if test ${lt_cv_sharedlib_from_linklib_cmd+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in @@ -6943,8 +7836,8 @@ esac fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO @@ -6959,11 +7852,12 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else @@ -6971,11 +7865,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -6986,11 +7884,11 @@ fi AR=$ac_cv_prog_AR if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +printf "%s\n" "$AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7003,11 +7901,12 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_AR+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else @@ -7015,11 +7914,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7030,11 +7933,11 @@ fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +printf "%s\n" "$ac_ct_AR" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7046,8 +7949,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR @@ -7083,30 +7986,32 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +printf %s "checking for archiver @FILE support... " >&6; } +if test ${lt_cv_ar_at_file+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_c_try_compile "$LINENO" +then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. @@ -7114,7 +8019,7 @@ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ @@ -7123,11 +8028,11 @@ rm -f conftest.* libconftest.a fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +printf "%s\n" "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= @@ -7144,11 +8049,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else @@ -7156,11 +8062,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7171,11 +8081,11 @@ fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +printf "%s\n" "$STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7184,11 +8094,12 @@ ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_STRIP+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else @@ -7196,11 +8107,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7211,11 +8126,11 @@ fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +printf "%s\n" "$ac_ct_STRIP" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -7223,8 +8138,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -7243,11 +8158,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else @@ -7255,11 +8171,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7270,11 +8190,11 @@ fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +printf "%s\n" "$RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -7283,11 +8203,12 @@ ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_RANLIB+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else @@ -7295,11 +8216,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -7310,11 +8235,11 @@ fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +printf "%s\n" "$ac_ct_RANLIB" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -7322,8 +8247,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -7412,11 +8337,12 @@ # Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 +printf %s "checking command to parse $NM output from $compiler object... " >&6; } +if test ${lt_cv_sys_global_symbol_pipe+y} +then : + printf %s "(cached) " >&6 +else $as_nop # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] @@ -7568,14 +8494,14 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then @@ -7644,7 +8570,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi @@ -7679,11 +8605,11 @@ lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 +printf "%s\n" "failed" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +printf "%s\n" "ok" >&6; } fi # Response file support. @@ -7729,13 +8655,14 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +printf %s "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : +if test ${with_sysroot+y} +then : withval=$with_sysroot; -else +else $as_nop with_sysroot=no fi @@ -7753,24 +8680,25 @@ no|'') ;; #( *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 +printf "%s\n" "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +printf "%s\n" "${lt_sysroot:-no}" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 -$as_echo_n "checking for a working dd... " >&6; } -if ${ac_cv_path_lt_DD+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 +printf %s "checking for a working dd... " >&6; } +if test ${ac_cv_path_lt_DD+y} +then : + printf %s "(cached) " >&6 +else $as_nop printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} @@ -7781,10 +8709,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in dd; do + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in dd + do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" + ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ @@ -7804,15 +8737,16 @@ rm -f conftest.i conftest2.i conftest.out fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 -$as_echo "$ac_cv_path_lt_DD" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 +printf "%s\n" "$ac_cv_path_lt_DD" >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 -$as_echo_n "checking how to truncate binary pipes... " >&6; } -if ${lt_cv_truncate_bin+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 +printf %s "checking how to truncate binary pipes... " >&6; } +if test ${lt_cv_truncate_bin+y} +then : + printf %s "(cached) " >&6 +else $as_nop printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= @@ -7823,8 +8757,8 @@ rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 -$as_echo "$lt_cv_truncate_bin" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 +printf "%s\n" "$lt_cv_truncate_bin" >&6; } @@ -7847,7 +8781,8 @@ } # Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : +if test ${enable_libtool_lock+y} +then : enableval=$enable_libtool_lock; fi @@ -7863,7 +8798,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) @@ -7883,7 +8818,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in @@ -7921,7 +8856,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in @@ -7962,7 +8897,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) @@ -8025,11 +8960,12 @@ # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 +printf %s "checking whether the C compiler needs -belf... " >&6; } +if test ${lt_cv_cc_needs_belf+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -8040,19 +8976,20 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_cv_cc_needs_belf=yes -else +else $as_nop lt_cv_cc_needs_belf=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -8061,8 +8998,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 +printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS @@ -8075,7 +9012,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) @@ -8112,11 +9049,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_MANIFEST_TOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else @@ -8124,11 +9062,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8139,11 +9081,11 @@ fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +printf "%s\n" "$MANIFEST_TOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8152,11 +9094,12 @@ ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else @@ -8164,11 +9107,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8179,11 +9126,11 @@ fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then @@ -8191,8 +9138,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL @@ -8202,11 +9149,12 @@ fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if test ${lt_cv_path_mainfest_tool+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out @@ -8216,8 +9164,8 @@ fi rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi @@ -8232,11 +9180,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_DSYMUTIL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else @@ -8244,11 +9193,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8259,11 +9212,11 @@ fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 +printf "%s\n" "$DSYMUTIL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8272,11 +9225,12 @@ ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else @@ -8284,11 +9238,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8299,11 +9257,11 @@ fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 +printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then @@ -8311,8 +9269,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL @@ -8324,11 +9282,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_NMEDIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else @@ -8336,11 +9295,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8351,11 +9314,11 @@ fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 +printf "%s\n" "$NMEDIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8364,11 +9327,12 @@ ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_NMEDIT+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else @@ -8376,11 +9340,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8391,11 +9359,11 @@ fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 +printf "%s\n" "$ac_ct_NMEDIT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then @@ -8403,8 +9371,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT @@ -8416,11 +9384,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_LIPO+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else @@ -8428,11 +9397,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8443,11 +9416,11 @@ fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 +printf "%s\n" "$LIPO" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8456,11 +9429,12 @@ ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_LIPO+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else @@ -8468,11 +9442,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8483,11 +9461,11 @@ fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 +printf "%s\n" "$ac_ct_LIPO" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then @@ -8495,8 +9473,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO @@ -8508,11 +9486,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else @@ -8520,11 +9499,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8535,11 +9518,11 @@ fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 +printf "%s\n" "$OTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8548,11 +9531,12 @@ ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OTOOL+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else @@ -8560,11 +9544,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8575,11 +9563,11 @@ fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 +printf "%s\n" "$ac_ct_OTOOL" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then @@ -8587,8 +9575,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL @@ -8600,11 +9588,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_OTOOL64+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else @@ -8612,11 +9601,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8627,11 +9620,11 @@ fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 +printf "%s\n" "$OTOOL64" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -8640,11 +9633,12 @@ ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_OTOOL64+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else @@ -8652,11 +9646,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -8667,11 +9665,11 @@ fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 +printf "%s\n" "$ac_ct_OTOOL64" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then @@ -8679,8 +9677,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 @@ -8715,11 +9713,12 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +printf %s "checking for -single_module linker flag... " >&6; } +if test ${lt_cv_apple_cc_single_mod+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override @@ -8748,14 +9747,15 @@ rm -f conftest.* fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if ${lt_cv_ld_exported_symbols_list+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +printf %s "checking for -exported_symbols_list linker flag... " >&6; } +if test ${lt_cv_ld_exported_symbols_list+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym @@ -8764,31 +9764,33 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_cv_ld_exported_symbols_list=yes -else +else $as_nop lt_cv_ld_exported_symbols_list=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 -$as_echo_n "checking for -force_load linker flag... " >&6; } -if ${lt_cv_ld_force_load+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +printf %s "checking for -force_load linker flag... " >&6; } +if test ${lt_cv_ld_force_load+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} @@ -8816,8 +9818,8 @@ rm -rf conftest.dSYM fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +printf "%s\n" "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; @@ -8888,26 +9890,22 @@ esac } -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF +if test "x$ac_cv_header_dlfcn_h" = xyes +then : + printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi -done - # Set options # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : +if test ${enable_static+y} +then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; @@ -8925,7 +9923,7 @@ IFS=$lt_save_ifs ;; esac -else +else $as_nop enable_static=no fi @@ -8945,7 +9943,8 @@ # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : +if test ${enable_shared+y} +then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; @@ -8963,7 +9962,7 @@ IFS=$lt_save_ifs ;; esac -else +else $as_nop enable_shared=yes fi @@ -8978,7 +9977,8 @@ # Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : +if test ${with_pic+y} +then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; @@ -8995,7 +9995,7 @@ IFS=$lt_save_ifs ;; esac -else +else $as_nop pic_mode=default fi @@ -9007,7 +10007,8 @@ # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : +if test ${enable_fast_install+y} +then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; @@ -9025,7 +10026,7 @@ IFS=$lt_save_ifs ;; esac -else +else $as_nop enable_fast_install=yes fi @@ -9039,11 +10040,12 @@ shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 -$as_echo_n "checking which variant of shared library versioning to provide... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 +printf %s "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. -if test "${with_aix_soname+set}" = set; then : +if test ${with_aix_soname+y} +then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; @@ -9052,18 +10054,19 @@ ;; esac lt_cv_with_aix_soname=$with_aix_soname -else - if ${lt_cv_with_aix_soname+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + if test ${lt_cv_with_aix_soname+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 -$as_echo "$with_aix_soname" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 +printf "%s\n" "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', @@ -9145,11 +10148,12 @@ setopt NO_GLOB_SUBST fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 +printf %s "checking for objdir... " >&6; } +if test ${lt_cv_objdir+y} +then : + printf %s "(cached) " >&6 +else $as_nop rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then @@ -9160,17 +10164,15 @@ fi rmdir .libs 2>/dev/null fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 +printf "%s\n" "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF +printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h @@ -9216,11 +10218,12 @@ case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 +printf %s "checking for ${ac_tool_prefix}file... " >&6; } +if test ${lt_cv_path_MAGIC_CMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. @@ -9269,11 +10272,11 @@ MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +printf "%s\n" "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9282,11 +10285,12 @@ if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 +printf %s "checking for file... " >&6; } +if test ${lt_cv_path_MAGIC_CMD+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. @@ -9335,11 +10339,11 @@ MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 +printf "%s\n" "$MAGIC_CMD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -9424,11 +10428,12 @@ lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } +if test ${lt_cv_prog_compiler_rtti_exceptions+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -9459,8 +10464,8 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" @@ -9817,26 +10822,28 @@ ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +printf %s "checking for $compiler option to produce PIC... " >&6; } +if test ${lt_cv_prog_compiler_pic+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } +if test ${lt_cv_prog_compiler_pic_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext @@ -9867,8 +10874,8 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 +printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in @@ -9896,11 +10903,12 @@ # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 +printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } +if test ${lt_cv_prog_compiler_static_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" @@ -9924,8 +10932,8 @@ LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 +printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : @@ -9939,11 +10947,12 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest @@ -9986,19 +10995,20 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 +printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } +if test ${lt_cv_prog_compiler_c_o+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest @@ -10041,8 +11051,8 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 +printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } @@ -10050,19 +11060,19 @@ hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 +printf %s "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 +printf "%s\n" "$hard_links" >&6; } if test no = "$hard_links"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 +printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else @@ -10074,8 +11084,8 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= @@ -10631,21 +11641,23 @@ if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_aix_libpath_+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -10660,7 +11672,7 @@ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib @@ -10684,21 +11696,23 @@ if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_aix_libpath_+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { @@ -10713,7 +11727,7 @@ lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib @@ -10964,11 +11978,12 @@ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +printf %s "checking if $CC understands -b... " >&6; } +if test ${lt_cv_prog_compiler__b+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" @@ -10992,8 +12007,8 @@ LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' @@ -11033,28 +12048,30 @@ # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if test ${lt_cv_irix_exported_symbol+y} +then : + printf %s "(cached) " >&6 +else $as_nop save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : lt_cv_irix_exported_symbol=yes -else +else $as_nop lt_cv_irix_exported_symbol=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi @@ -11335,8 +12352,8 @@ fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 +printf "%s\n" "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld @@ -11372,18 +12389,19 @@ # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 +printf %s "checking whether -lc should be explicitly linked in... " >&6; } +if test ${lt_cv_archive_cmds_need_lc+y} +then : + printf %s "(cached) " >&6 +else $as_nop $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest @@ -11401,7 +12419,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no @@ -11415,8 +12433,8 @@ $RM conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac @@ -11575,8 +12593,8 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 +printf %s "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in @@ -12137,9 +13155,10 @@ shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else + if test ${lt_cv_shlibpath_overrides_runpath+y} +then : + printf %s "(cached) " >&6 +else $as_nop lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir @@ -12149,19 +13168,21 @@ /* end confdefs.h. */ int -main () +main (void) { ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : +if ac_fn_c_try_link "$LINENO" +then : + if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null +then : lt_cv_shlibpath_overrides_runpath=yes fi fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir @@ -12393,8 +13414,8 @@ dynamic_linker=no ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 +printf "%s\n" "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" @@ -12515,8 +13536,8 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 +printf %s "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || @@ -12540,8 +13561,8 @@ # directories. hardcode_action=unsupported fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 +printf "%s\n" "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then @@ -12585,11 +13606,12 @@ darwin*) # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12598,32 +13620,31 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else +else $as_nop lt_cv_dlopen=dyld lt_cv_dlopen_libs= @@ -12643,14 +13664,16 @@ *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : +if test "x$ac_cv_func_shl_load" = xyes +then : lt_cv_dlopen=shl_load -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +printf %s "checking for shl_load in -ldld... " >&6; } +if test ${ac_cv_lib_dld_shl_load+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12659,41 +13682,42 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char shl_load (); int -main () +main (void) { return shl_load (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dld_shl_load=yes -else +else $as_nop ac_cv_lib_dld_shl_load=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes +then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld -else +else $as_nop ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : +if test "x$ac_cv_func_dlopen" = xyes +then : lt_cv_dlopen=dlopen -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +printf %s "checking for dlopen in -ldl... " >&6; } +if test ${ac_cv_lib_dl_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12702,37 +13726,37 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dl_dlopen=yes -else +else $as_nop ac_cv_lib_dl_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes +then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +printf %s "checking for dlopen in -lsvld... " >&6; } +if test ${ac_cv_lib_svld_dlopen+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12741,37 +13765,37 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dlopen (); int -main () +main (void) { return dlopen (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_svld_dlopen=yes -else +else $as_nop ac_cv_lib_svld_dlopen=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes +then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else +else $as_nop + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +printf %s "checking for dld_link in -ldld... " >&6; } +if test ${ac_cv_lib_dld_dld_link+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12780,30 +13804,29 @@ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif char dld_link (); int -main () +main (void) { return dld_link (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : ac_cv_lib_dld_dld_link=yes -else +else $as_nop ac_cv_lib_dld_dld_link=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes +then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi @@ -12842,11 +13865,12 @@ save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 +printf %s "checking whether a program can dlopen itself... " >&6; } +if test ${lt_cv_dlopen_self+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else @@ -12925,7 +13949,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -12943,16 +13967,17 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 +printf "%s\n" "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 +printf %s "checking whether a statically linked program can dlopen itself... " >&6; } +if test ${lt_cv_dlopen_self_static+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else @@ -13031,7 +14056,7 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? @@ -13049,8 +14074,8 @@ fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 +printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS @@ -13088,40 +14113,40 @@ striplib= old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 +printf %s "checking whether stripping libraries is possible... " >&6; } if test -z "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } else if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else case $host_os in darwin*) # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ;; freebsd*) if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi ;; *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; esac fi @@ -13139,13 +14164,13 @@ # Report what library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 +printf %s "checking if libtool supports shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 +printf "%s\n" "$can_build_shared" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 +printf %s "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and @@ -13169,15 +14194,15 @@ fi ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 +printf "%s\n" "$enable_shared" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 +printf %s "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 +printf "%s\n" "$enable_static" >&6; } @@ -13215,18 +14240,2375 @@ + + + + + + + # $is_release = (.git directory does not exist) + if test -d ${srcdir}/.git +then : + ax_is_release=no +else $as_nop + ax_is_release=yes +fi + + + +DISABLED_WARNINGS="${DISABLED_WARNINGS} -Wno-cast-function-type" + +DISABLED_WARNINGS="${DISABLED_WARNINGS} -Wno-packed" + + + # C support is enabled by default. + + + # Only enable C++ support if AC_PROG_CXX is called. The redefinition of + # AC_PROG_CXX is so that a fatal error is emitted if this macro is called + # before AC_PROG_CXX, which would otherwise cause no C++ warnings to be + # checked. + + + + + # Default value for IS-RELEASE is $ax_is_release + ax_compiler_flags_is_release=$ax_is_release + + # Check whether --enable-compile-warnings was given. +if test ${enable_compile_warnings+y} +then : + enableval=$enable_compile_warnings; +else $as_nop + if test "$ax_compiler_flags_is_release" = "yes" +then : + enable_compile_warnings="yes" +else $as_nop + enable_compile_warnings="error" +fi +fi + + # Check whether --enable-Werror was given. +if test ${enable_Werror+y} +then : + enableval=$enable_Werror; +else $as_nop + enable_Werror=maybe +fi + + + # Return the user's chosen warning level + if test "$enable_Werror" = "no" -a \ + "$enable_compile_warnings" = "error" +then : + + enable_compile_warnings="yes" + +fi + + ax_enable_compile_warnings=$enable_compile_warnings + + + + + + + + + + + # Variable names + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #ifndef __cplusplus + #error "no C++" + #endif +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ax_compiler_cxx=yes; +else $as_nop + ax_compiler_cxx=no; +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + # Always pass -Werror=unknown-warning-option to get Clang to fail on bad + # flags, otherwise they are always appended to the warn_cflags variable, and + # Clang warns on them for every compilation unit. + # If this is passed to GCC, it will explode, so the flag must be enabled + # conditionally. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Werror=unknown-warning-option" >&5 +printf %s "checking whether C compiler accepts -Werror=unknown-warning-option... " >&6; } +if test ${ax_cv_check_cflags___Werror_unknown_warning_option+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ax_cv_check_cflags___Werror_unknown_warning_option=yes +else $as_nop + ax_cv_check_cflags___Werror_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Werror_unknown_warning_option" >&5 +printf "%s\n" "$ax_cv_check_cflags___Werror_unknown_warning_option" >&6; } +if test "x$ax_cv_check_cflags___Werror_unknown_warning_option" = xyes +then : + + ax_compiler_flags_test="-Werror=unknown-warning-option" + +else $as_nop + + ax_compiler_flags_test="" + +fi + + + # Check that -Wno-suggest-attribute=format is supported + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wno-suggest-attribute=format" >&5 +printf %s "checking whether C compiler accepts -Wno-suggest-attribute=format... " >&6; } +if test ${ax_cv_check_cflags___Wno_suggest_attribute_format+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Wno-suggest-attribute=format" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ax_cv_check_cflags___Wno_suggest_attribute_format=yes +else $as_nop + ax_cv_check_cflags___Wno_suggest_attribute_format=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wno_suggest_attribute_format" >&5 +printf "%s\n" "$ax_cv_check_cflags___Wno_suggest_attribute_format" >&6; } +if test "x$ax_cv_check_cflags___Wno_suggest_attribute_format" = xyes +then : + + ax_compiler_no_suggest_attribute_flags="-Wno-suggest-attribute=format" + +else $as_nop + + ax_compiler_no_suggest_attribute_flags="" + +fi + + + # Base flags + + + + +for flag in -fno-strict-aliasing ; do + as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +printf %s "checking whether C compiler accepts $flag... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + +if test ${WARN_CFLAGS+y} +then : + + case " $WARN_CFLAGS " in #( + *" $flag "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains \$flag"; } >&5 + (: WARN_CFLAGS already contains $flag) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_CFLAGS " $flag" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + WARN_CFLAGS=$flag + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else $as_nop + : +fi + +done + + + if test "$ax_enable_compile_warnings" != "no" +then : + + if test "$ax_compiler_cxx" = "no" ; then + # C-only flags. Warn in C++ + + + + +for flag in -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -Wimplicit-function-declaration -Wold-style-definition -Wjump-misses-init ; do + as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +printf %s "checking whether C compiler accepts $flag... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + +if test ${WARN_CFLAGS+y} +then : + + case " $WARN_CFLAGS " in #( + *" $flag "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains \$flag"; } >&5 + (: WARN_CFLAGS already contains $flag) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_CFLAGS " $flag" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + WARN_CFLAGS=$flag + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else $as_nop + : +fi + +done + + fi + + # "yes" flags + + + + +for flag in -Wall -Wextra -Wundef -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wredundant-decls -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wreturn-type -Wswitch-enum -Wswitch-default -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wnull-dereference -Wdouble-promotion ; do + as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +printf %s "checking whether C compiler accepts $flag... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + +if test ${WARN_CFLAGS+y} +then : + + case " $WARN_CFLAGS " in #( + *" $flag "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains \$flag"; } >&5 + (: WARN_CFLAGS already contains $flag) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_CFLAGS " $flag" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + WARN_CFLAGS=$flag + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else $as_nop + : +fi + +done + + +fi + if test "$ax_enable_compile_warnings" = "error" +then : + + # "error" flags; -Werror has to be appended unconditionally because + # it's not possible to test for + # + # suggest-attribute=format is disabled because it gives too many false + # positives + +if test ${WARN_CFLAGS+y} +then : + + case " $WARN_CFLAGS " in #( + *" -Werror "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains -Werror"; } >&5 + (: WARN_CFLAGS already contains -Werror) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_CFLAGS " -Werror" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + WARN_CFLAGS=-Werror + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + + + + + + +for flag in $ax_compiler_no_suggest_attribute_flags ; do + as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +printf %s "checking whether C compiler accepts $flag... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + +if test ${WARN_CFLAGS+y} +then : + + case " $WARN_CFLAGS " in #( + *" $flag "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains \$flag"; } >&5 + (: WARN_CFLAGS already contains $flag) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_CFLAGS " $flag" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + WARN_CFLAGS=$flag + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else $as_nop + : +fi + +done + + +fi + + # In the flags below, when disabling specific flags, always add *both* + # -Wno-foo and -Wno-error=foo. This fixes the situation where (for example) + # we enable -Werror, disable a flag, and a build bot passes CFLAGS=-Wall, + # which effectively turns that flag back on again as an error. + for flag in $WARN_CFLAGS; do + case $flag in #( + -Wno-*=*) : + ;; #( + -Wno-*) : + + + + + +for flag in -Wno-error=$(printf "%s\n" $flag | $SED 's/^-Wno-//'); do + as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +printf %s "checking whether C compiler accepts $flag... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + +if test ${WARN_CFLAGS+y} +then : + + case " $WARN_CFLAGS " in #( + *" $flag "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains \$flag"; } >&5 + (: WARN_CFLAGS already contains $flag) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_CFLAGS " $flag" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + WARN_CFLAGS=$flag + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else $as_nop + : +fi + +done + + ;; #( + *) : + ;; +esac + done + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + # Substitute the variables + + + + + + + + + + + + + + # Variable names + + + # Always pass -Werror=unknown-warning-option to get Clang to fail on bad + # flags, otherwise they are always appended to the warn_ldflags variable, + # and Clang warns on them for every compilation unit. + # If this is passed to GCC, it will explode, so the flag must be enabled + # conditionally. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Werror=unknown-warning-option" >&5 +printf %s "checking whether C compiler accepts -Werror=unknown-warning-option... " >&6; } +if test ${ax_cv_check_cflags___Werror_unknown_warning_option+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ax_cv_check_cflags___Werror_unknown_warning_option=yes +else $as_nop + ax_cv_check_cflags___Werror_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Werror_unknown_warning_option" >&5 +printf "%s\n" "$ax_cv_check_cflags___Werror_unknown_warning_option" >&6; } +if test "x$ax_cv_check_cflags___Werror_unknown_warning_option" = xyes +then : + + ax_compiler_flags_test="-Werror=unknown-warning-option" + +else $as_nop + + ax_compiler_flags_test="" + +fi + + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,--as-needed" >&5 +printf %s "checking whether the linker accepts -Wl,--as-needed... " >&6; } +if test ${ax_cv_check_ldflags___Wl___as_needed+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,--as-needed" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ax_cv_check_ldflags___Wl___as_needed=yes +else $as_nop + ax_cv_check_ldflags___Wl___as_needed=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl___as_needed" >&5 +printf "%s\n" "$ax_cv_check_ldflags___Wl___as_needed" >&6; } +if test "x$ax_cv_check_ldflags___Wl___as_needed" = xyes +then : + + + + + +for flag in -Wl,--as-needed; do + as_CACHEVAR=`printf "%s\n" "ax_cv_check_ldflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5 +printf %s "checking whether the linker accepts $flag... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + +if test ${AM_LDFLAGS+y} +then : + + case " $AM_LDFLAGS " in #( + *" $flag "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS already contains \$flag"; } >&5 + (: AM_LDFLAGS already contains $flag) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append AM_LDFLAGS " $flag" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5 + (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + AM_LDFLAGS=$flag + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5 + (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else $as_nop + : +fi + +done + + +else $as_nop + : +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-z,relro" >&5 +printf %s "checking whether the linker accepts -Wl,-z,relro... " >&6; } +if test ${ax_cv_check_ldflags___Wl__z_relro+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-z,relro" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ax_cv_check_ldflags___Wl__z_relro=yes +else $as_nop + ax_cv_check_ldflags___Wl__z_relro=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl__z_relro" >&5 +printf "%s\n" "$ax_cv_check_ldflags___Wl__z_relro" >&6; } +if test "x$ax_cv_check_ldflags___Wl__z_relro" = xyes +then : + + + + + +for flag in -Wl,-z,relro; do + as_CACHEVAR=`printf "%s\n" "ax_cv_check_ldflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5 +printf %s "checking whether the linker accepts $flag... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + +if test ${AM_LDFLAGS+y} +then : + + case " $AM_LDFLAGS " in #( + *" $flag "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS already contains \$flag"; } >&5 + (: AM_LDFLAGS already contains $flag) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append AM_LDFLAGS " $flag" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5 + (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + AM_LDFLAGS=$flag + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5 + (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else $as_nop + : +fi + +done + + +else $as_nop + : +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-z,now" >&5 +printf %s "checking whether the linker accepts -Wl,-z,now... " >&6; } +if test ${ax_cv_check_ldflags___Wl__z_now+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-z,now" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ax_cv_check_ldflags___Wl__z_now=yes +else $as_nop + ax_cv_check_ldflags___Wl__z_now=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl__z_now" >&5 +printf "%s\n" "$ax_cv_check_ldflags___Wl__z_now" >&6; } +if test "x$ax_cv_check_ldflags___Wl__z_now" = xyes +then : + + + + + +for flag in -Wl,-z,now; do + as_CACHEVAR=`printf "%s\n" "ax_cv_check_ldflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5 +printf %s "checking whether the linker accepts $flag... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + +if test ${AM_LDFLAGS+y} +then : + + case " $AM_LDFLAGS " in #( + *" $flag "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS already contains \$flag"; } >&5 + (: AM_LDFLAGS already contains $flag) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append AM_LDFLAGS " $flag" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5 + (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + AM_LDFLAGS=$flag + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5 + (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else $as_nop + : +fi + +done + + +else $as_nop + : +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-z,noexecstack" >&5 +printf %s "checking whether the linker accepts -Wl,-z,noexecstack... " >&6; } +if test ${ax_cv_check_ldflags___Wl__z_noexecstack+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ax_cv_check_ldflags___Wl__z_noexecstack=yes +else $as_nop + ax_cv_check_ldflags___Wl__z_noexecstack=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl__z_noexecstack" >&5 +printf "%s\n" "$ax_cv_check_ldflags___Wl__z_noexecstack" >&6; } +if test "x$ax_cv_check_ldflags___Wl__z_noexecstack" = xyes +then : + + + + + +for flag in -Wl,-z,noexecstack; do + as_CACHEVAR=`printf "%s\n" "ax_cv_check_ldflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5 +printf %s "checking whether the linker accepts $flag... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + +if test ${AM_LDFLAGS+y} +then : + + case " $AM_LDFLAGS " in #( + *" $flag "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS already contains \$flag"; } >&5 + (: AM_LDFLAGS already contains $flag) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append AM_LDFLAGS " $flag" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5 + (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + AM_LDFLAGS=$flag + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : AM_LDFLAGS=\"\$AM_LDFLAGS\""; } >&5 + (: AM_LDFLAGS="$AM_LDFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else $as_nop + : +fi + +done + + +else $as_nop + : +fi + + # textonly, retpolineplt not yet + + # macOS and cygwin linker do not have --as-needed + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,--no-as-needed" >&5 +printf %s "checking whether the linker accepts -Wl,--no-as-needed... " >&6; } +if test ${ax_cv_check_ldflags___Wl___no_as_needed+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,--no-as-needed" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ax_cv_check_ldflags___Wl___no_as_needed=yes +else $as_nop + ax_cv_check_ldflags___Wl___no_as_needed=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl___no_as_needed" >&5 +printf "%s\n" "$ax_cv_check_ldflags___Wl___no_as_needed" >&6; } +if test "x$ax_cv_check_ldflags___Wl___no_as_needed" = xyes +then : + + ax_compiler_flags_as_needed_option="-Wl,--no-as-needed" + +else $as_nop + + ax_compiler_flags_as_needed_option="" + +fi + + + # macOS linker speaks with a different accent + ax_compiler_flags_fatal_warnings_option="" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,--fatal-warnings" >&5 +printf %s "checking whether the linker accepts -Wl,--fatal-warnings... " >&6; } +if test ${ax_cv_check_ldflags___Wl___fatal_warnings+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,--fatal-warnings" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ax_cv_check_ldflags___Wl___fatal_warnings=yes +else $as_nop + ax_cv_check_ldflags___Wl___fatal_warnings=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl___fatal_warnings" >&5 +printf "%s\n" "$ax_cv_check_ldflags___Wl___fatal_warnings" >&6; } +if test "x$ax_cv_check_ldflags___Wl___fatal_warnings" = xyes +then : + + ax_compiler_flags_fatal_warnings_option="-Wl,--fatal-warnings" + +else $as_nop + : +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-fatal_warnings" >&5 +printf %s "checking whether the linker accepts -Wl,-fatal_warnings... " >&6; } +if test ${ax_cv_check_ldflags___Wl__fatal_warnings+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-fatal_warnings" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + ax_cv_check_ldflags___Wl__fatal_warnings=yes +else $as_nop + ax_cv_check_ldflags___Wl__fatal_warnings=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_ldflags___Wl__fatal_warnings" >&5 +printf "%s\n" "$ax_cv_check_ldflags___Wl__fatal_warnings" >&6; } +if test "x$ax_cv_check_ldflags___Wl__fatal_warnings" = xyes +then : + + ax_compiler_flags_fatal_warnings_option="-Wl,-fatal_warnings" + +else $as_nop + : +fi + + + # Base flags + + + + +for flag in $ax_compiler_flags_as_needed_option ; do + as_CACHEVAR=`printf "%s\n" "ax_cv_check_ldflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5 +printf %s "checking whether the linker accepts $flag... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + +if test ${WARN_LDFLAGS+y} +then : + + case " $WARN_LDFLAGS " in #( + *" $flag "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_LDFLAGS already contains \$flag"; } >&5 + (: WARN_LDFLAGS already contains $flag) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_LDFLAGS " $flag" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_LDFLAGS=\"\$WARN_LDFLAGS\""; } >&5 + (: WARN_LDFLAGS="$WARN_LDFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + WARN_LDFLAGS=$flag + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_LDFLAGS=\"\$WARN_LDFLAGS\""; } >&5 + (: WARN_LDFLAGS="$WARN_LDFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else $as_nop + : +fi + +done + + + if test "$ax_enable_compile_warnings" != "no" +then : + + # "yes" flags + + + + +for flag in ; do + as_CACHEVAR=`printf "%s\n" "ax_cv_check_ldflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5 +printf %s "checking whether the linker accepts $flag... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + +if test ${WARN_LDFLAGS+y} +then : + + case " $WARN_LDFLAGS " in #( + *" $flag "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_LDFLAGS already contains \$flag"; } >&5 + (: WARN_LDFLAGS already contains $flag) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_LDFLAGS " $flag" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_LDFLAGS=\"\$WARN_LDFLAGS\""; } >&5 + (: WARN_LDFLAGS="$WARN_LDFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + WARN_LDFLAGS=$flag + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_LDFLAGS=\"\$WARN_LDFLAGS\""; } >&5 + (: WARN_LDFLAGS="$WARN_LDFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else $as_nop + : +fi + +done + + +fi + if test "$ax_enable_compile_warnings" = "error" +then : + + # "error" flags; -Werror has to be appended unconditionally because + # it's not possible to test for + # + # suggest-attribute=format is disabled because it gives too many false + # positives + + + + +for flag in $ax_compiler_flags_fatal_warnings_option ; do + as_CACHEVAR=`printf "%s\n" "ax_cv_check_ldflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts $flag" >&5 +printf %s "checking whether the linker accepts $flag... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$LDFLAGS + LDFLAGS="$LDFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + +if test ${WARN_LDFLAGS+y} +then : + + case " $WARN_LDFLAGS " in #( + *" $flag "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_LDFLAGS already contains \$flag"; } >&5 + (: WARN_LDFLAGS already contains $flag) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_LDFLAGS " $flag" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_LDFLAGS=\"\$WARN_LDFLAGS\""; } >&5 + (: WARN_LDFLAGS="$WARN_LDFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + WARN_LDFLAGS=$flag + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_LDFLAGS=\"\$WARN_LDFLAGS\""; } >&5 + (: WARN_LDFLAGS="$WARN_LDFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else $as_nop + : +fi + +done + + +fi + + # Substitute the variables + + + + + + + # Variable names + + + # Base flags + +if test ${WARN_SCANNERFLAGS+y} +then : + + case " $WARN_SCANNERFLAGS " in #( + *" "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_SCANNERFLAGS already contains "; } >&5 + (: WARN_SCANNERFLAGS already contains ) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_SCANNERFLAGS " " + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_SCANNERFLAGS=\"\$WARN_SCANNERFLAGS\""; } >&5 + (: WARN_SCANNERFLAGS="$WARN_SCANNERFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + WARN_SCANNERFLAGS= + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_SCANNERFLAGS=\"\$WARN_SCANNERFLAGS\""; } >&5 + (: WARN_SCANNERFLAGS="$WARN_SCANNERFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + + + if test "$ax_enable_compile_warnings" != "no" +then : + + # "yes" flags + +if test ${WARN_SCANNERFLAGS+y} +then : + + case " $WARN_SCANNERFLAGS " in #( + *" --warn-all "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_SCANNERFLAGS already contains --warn-all "; } >&5 + (: WARN_SCANNERFLAGS already contains --warn-all ) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_SCANNERFLAGS " --warn-all " + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_SCANNERFLAGS=\"\$WARN_SCANNERFLAGS\""; } >&5 + (: WARN_SCANNERFLAGS="$WARN_SCANNERFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + WARN_SCANNERFLAGS= --warn-all + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_SCANNERFLAGS=\"\$WARN_SCANNERFLAGS\""; } >&5 + (: WARN_SCANNERFLAGS="$WARN_SCANNERFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + + +fi + if test "$ax_enable_compile_warnings" = "error" +then : + + # "error" flags + +if test ${WARN_SCANNERFLAGS+y} +then : + + case " $WARN_SCANNERFLAGS " in #( + *" --warn-error "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_SCANNERFLAGS already contains --warn-error "; } >&5 + (: WARN_SCANNERFLAGS already contains --warn-error ) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_SCANNERFLAGS " --warn-error " + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_SCANNERFLAGS=\"\$WARN_SCANNERFLAGS\""; } >&5 + (: WARN_SCANNERFLAGS="$WARN_SCANNERFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + WARN_SCANNERFLAGS= --warn-error + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_SCANNERFLAGS=\"\$WARN_SCANNERFLAGS\""; } >&5 + (: WARN_SCANNERFLAGS="$WARN_SCANNERFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + + +fi + + # Substitute the variables + + + + + + + + + + + + + # Variable names + + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #ifndef __cplusplus + #error "no C++" + #endif +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ax_compiler_cxx=yes; +else $as_nop + ax_compiler_cxx=no; +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + + # Always pass -Werror=unknown-warning-option to get Clang to fail on bad + # flags, otherwise they are always appended to the warn_cflags variable, and + # Clang warns on them for every compilation unit. + # If this is passed to GCC, it will explode, so the flag must be enabled + # conditionally. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Werror=unknown-warning-option" >&5 +printf %s "checking whether C compiler accepts -Werror=unknown-warning-option... " >&6; } +if test ${ax_cv_check_cflags___Werror_unknown_warning_option+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Werror=unknown-warning-option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ax_cv_check_cflags___Werror_unknown_warning_option=yes +else $as_nop + ax_cv_check_cflags___Werror_unknown_warning_option=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Werror_unknown_warning_option" >&5 +printf "%s\n" "$ax_cv_check_cflags___Werror_unknown_warning_option" >&6; } +if test "x$ax_cv_check_cflags___Werror_unknown_warning_option" = xyes +then : + + ax_compiler_flags_test="-Werror=unknown-warning-option" + +else $as_nop + + ax_compiler_flags_test="" + +fi + + + # Check that -Wno-suggest-attribute=format is supported + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -Wno-suggest-attribute=format" >&5 +printf %s "checking whether C compiler accepts -Wno-suggest-attribute=format... " >&6; } +if test ${ax_cv_check_cflags___Wno_suggest_attribute_format+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS -Wno-suggest-attribute=format" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ax_cv_check_cflags___Wno_suggest_attribute_format=yes +else $as_nop + ax_cv_check_cflags___Wno_suggest_attribute_format=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___Wno_suggest_attribute_format" >&5 +printf "%s\n" "$ax_cv_check_cflags___Wno_suggest_attribute_format" >&6; } +if test "x$ax_cv_check_cflags___Wno_suggest_attribute_format" = xyes +then : + + ax_compiler_no_suggest_attribute_flags="-Wno-suggest-attribute=format" + +else $as_nop + + ax_compiler_no_suggest_attribute_flags="" + +fi + + + # Base flags + + + + +for flag in -fno-strict-aliasing ; do + as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +printf %s "checking whether C compiler accepts $flag... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + +if test ${WARN_CFLAGS+y} +then : + + case " $WARN_CFLAGS " in #( + *" $flag "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains \$flag"; } >&5 + (: WARN_CFLAGS already contains $flag) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_CFLAGS " $flag" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + WARN_CFLAGS=$flag + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else $as_nop + : +fi + +done + + + if test "$ax_enable_compile_warnings" != "no" +then : + + if test "$ax_compiler_cxx" = "no" ; then + # C-only flags. Warn in C++ + + + + +for flag in -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -Wimplicit-function-declaration -Wold-style-definition -Wjump-misses-init ; do + as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +printf %s "checking whether C compiler accepts $flag... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + +if test ${WARN_CFLAGS+y} +then : + + case " $WARN_CFLAGS " in #( + *" $flag "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains \$flag"; } >&5 + (: WARN_CFLAGS already contains $flag) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_CFLAGS " $flag" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + WARN_CFLAGS=$flag + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else $as_nop + : +fi + +done + + fi + + # "yes" flags + + + + +for flag in -Wall -Wextra -Wundef -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wno-unused-parameter -Wno-missing-field-initializers -Wformat=2 -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -Winit-self -Wredundant-decls -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wreturn-type -Wswitch-enum -Wswitch-default -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wnull-dereference -Wdouble-promotion ${DISABLED_WARNINGS} ; do + as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +printf %s "checking whether C compiler accepts $flag... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + +if test ${WARN_CFLAGS+y} +then : + + case " $WARN_CFLAGS " in #( + *" $flag "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains \$flag"; } >&5 + (: WARN_CFLAGS already contains $flag) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_CFLAGS " $flag" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + WARN_CFLAGS=$flag + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else $as_nop + : +fi + +done + + +fi + if test "$ax_enable_compile_warnings" = "error" +then : + + # "error" flags; -Werror has to be appended unconditionally because + # it's not possible to test for + # + # suggest-attribute=format is disabled because it gives too many false + # positives + +if test ${WARN_CFLAGS+y} +then : + + case " $WARN_CFLAGS " in #( + *" -Werror "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains -Werror"; } >&5 + (: WARN_CFLAGS already contains -Werror) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_CFLAGS " -Werror" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + WARN_CFLAGS=-Werror + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + + + + + + +for flag in $ax_compiler_no_suggest_attribute_flags ; do + as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +printf %s "checking whether C compiler accepts $flag... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + +if test ${WARN_CFLAGS+y} +then : + + case " $WARN_CFLAGS " in #( + *" $flag "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains \$flag"; } >&5 + (: WARN_CFLAGS already contains $flag) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_CFLAGS " $flag" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + WARN_CFLAGS=$flag + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else $as_nop + : +fi + +done + + +fi + + # In the flags below, when disabling specific flags, always add *both* + # -Wno-foo and -Wno-error=foo. This fixes the situation where (for example) + # we enable -Werror, disable a flag, and a build bot passes CFLAGS=-Wall, + # which effectively turns that flag back on again as an error. + for flag in $WARN_CFLAGS; do + case $flag in #( + -Wno-*=*) : + ;; #( + -Wno-*) : + + + + + +for flag in -Wno-error=$(printf "%s\n" $flag | $SED 's/^-Wno-//'); do + as_CACHEVAR=`printf "%s\n" "ax_cv_check_cflags_$ax_compiler_flags_test_$flag" | $as_tr_sh` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts $flag" >&5 +printf %s "checking whether C compiler accepts $flag... " >&6; } +if eval test \${$as_CACHEVAR+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + ax_check_save_flags=$CFLAGS + CFLAGS="$CFLAGS $ax_compiler_flags_test $flag" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + eval "$as_CACHEVAR=yes" +else $as_nop + eval "$as_CACHEVAR=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$ax_check_save_flags +fi +eval ac_res=\$$as_CACHEVAR + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } +if eval test \"x\$"$as_CACHEVAR"\" = x"yes" +then : + +if test ${WARN_CFLAGS+y} +then : + + case " $WARN_CFLAGS " in #( + *" $flag "*) : + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS already contains \$flag"; } >&5 + (: WARN_CFLAGS already contains $flag) 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } ;; #( + *) : + + as_fn_append WARN_CFLAGS " $flag" + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + ;; +esac + +else $as_nop + + WARN_CFLAGS=$flag + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: : WARN_CFLAGS=\"\$WARN_CFLAGS\""; } >&5 + (: WARN_CFLAGS="$WARN_CFLAGS") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + +fi + +else $as_nop + : +fi + +done + + ;; #( + *) : + ;; +esac + done + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + # Substitute the variables + + + +if test "$GCC" = "yes"; then + CFLAGS="$CFLAGS -std=gnu89" +fi + + MM_MAJOR_VERSION=1 -MM_MINOR_VERSION=12 -MM_MICRO_VERSION=8 -MM_VERSION=1.12.8 +MM_MINOR_VERSION=16 +MM_MICRO_VERSION=6 +MM_VERSION=1.16.6 -MM_GLIB_LT_CURRENT=5 +MM_GLIB_LT_CURRENT=7 MM_GLIB_LT_REVISION=0 -MM_GLIB_LT_AGE=5 +MM_GLIB_LT_AGE=7 @@ -13243,11 +16625,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. @@ -13257,11 +16640,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13273,11 +16660,11 @@ fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +printf "%s\n" "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -13286,11 +16673,12 @@ ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. @@ -13300,11 +16688,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13316,11 +16708,11 @@ fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then @@ -13328,8 +16720,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG @@ -13341,14 +16733,14 @@ fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } PKG_CONFIG="" fi fi @@ -13356,37 +16748,38 @@ gtk_doc_requires="gtk-doc >= 1.0" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk-doc" >&5 -$as_echo_n "checking for gtk-doc... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gtk-doc" >&5 +printf %s "checking for gtk-doc... " >&6; } if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gtk_doc_requires\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gtk_doc_requires\""; } >&5 ($PKG_CONFIG --exists --print-errors "$gtk_doc_requires") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then have_gtk_doc=yes else have_gtk_doc=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gtk_doc" >&5 -$as_echo "$have_gtk_doc" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_gtk_doc" >&5 +printf "%s\n" "$have_gtk_doc" >&6; } if test "$have_gtk_doc" = "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: You will not be able to create source packages with 'make dist' because $gtk_doc_requires is not found." >&5 -$as_echo "$as_me: WARNING: +printf "%s\n" "$as_me: WARNING: You will not be able to create source packages with 'make dist' because $gtk_doc_requires is not found." >&2;} fi # Extract the first word of "gtkdoc-check", so it can be a program name with args. set dummy gtkdoc-check; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_GTKDOC_CHECK+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_GTKDOC_CHECK+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$GTKDOC_CHECK"; then ac_cv_prog_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test. else @@ -13394,11 +16787,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_GTKDOC_CHECK="gtkdoc-check.test" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13409,21 +16806,22 @@ fi GTKDOC_CHECK=$ac_cv_prog_GTKDOC_CHECK if test -n "$GTKDOC_CHECK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 -$as_echo "$GTKDOC_CHECK" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 +printf "%s\n" "$GTKDOC_CHECK" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # Extract the first word of "gtkdoc-check", so it can be a program name with args. set dummy gtkdoc-check; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GTKDOC_CHECK_PATH+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_GTKDOC_CHECK_PATH+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $GTKDOC_CHECK_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_CHECK_PATH="$GTKDOC_CHECK_PATH" # Let the user override the test with a path. @@ -13433,11 +16831,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GTKDOC_CHECK_PATH="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_GTKDOC_CHECK_PATH="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13449,11 +16851,11 @@ fi GTKDOC_CHECK_PATH=$ac_cv_path_GTKDOC_CHECK_PATH if test -n "$GTKDOC_CHECK_PATH"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK_PATH" >&5 -$as_echo "$GTKDOC_CHECK_PATH" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK_PATH" >&5 +printf "%s\n" "$GTKDOC_CHECK_PATH" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -13461,11 +16863,12 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GTKDOC_REBASE+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_GTKDOC_REBASE+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $GTKDOC_REBASE in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_REBASE="$GTKDOC_REBASE" # Let the user override the test with a path. @@ -13475,11 +16878,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GTKDOC_REBASE="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_GTKDOC_REBASE="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13491,11 +16898,11 @@ fi GTKDOC_REBASE=$ac_cv_path_GTKDOC_REBASE if test -n "$GTKDOC_REBASE"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_REBASE" >&5 -$as_echo "$GTKDOC_REBASE" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_REBASE" >&5 +printf "%s\n" "$GTKDOC_REBASE" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -13505,11 +16912,12 @@ # Extract the first word of "gtkdoc-mkpdf", so it can be a program name with args. set dummy gtkdoc-mkpdf; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GTKDOC_MKPDF+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_GTKDOC_MKPDF+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $GTKDOC_MKPDF in [\\/]* | ?:[\\/]*) ac_cv_path_GTKDOC_MKPDF="$GTKDOC_MKPDF" # Let the user override the test with a path. @@ -13519,11 +16927,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GTKDOC_MKPDF="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_GTKDOC_MKPDF="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13535,20 +16947,21 @@ fi GTKDOC_MKPDF=$ac_cv_path_GTKDOC_MKPDF if test -n "$GTKDOC_MKPDF"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_MKPDF" >&5 -$as_echo "$GTKDOC_MKPDF" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_MKPDF" >&5 +printf "%s\n" "$GTKDOC_MKPDF" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # Check whether --with-html-dir was given. -if test "${with_html_dir+set}" = set; then : +if test ${with_html_dir+y} +then : withval=$with_html_dir; -else +else $as_nop with_html_dir='${datadir}/gtk-doc/html' fi @@ -13556,17 +16969,18 @@ # Check whether --enable-gtk-doc was given. -if test "${enable_gtk_doc+set}" = set; then : +if test ${enable_gtk_doc+y} +then : enableval=$enable_gtk_doc; -else +else $as_nop enable_gtk_doc=no fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 -$as_echo_n "checking whether to build gtk-doc documentation... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 -$as_echo "$enable_gtk_doc" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 +printf %s "checking whether to build gtk-doc documentation... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 +printf "%s\n" "$enable_gtk_doc" >&6; } if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then as_fn_error $? " @@ -13578,17 +16992,17 @@ if test "x$PACKAGE_NAME" != "xglib"; then pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKDOC_DEPS" >&5 -$as_echo_n "checking for GTKDOC_DEPS... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GTKDOC_DEPS" >&5 +printf %s "checking for GTKDOC_DEPS... " >&6; } if test -n "$GTKDOC_DEPS_CFLAGS"; then pkg_cv_GTKDOC_DEPS_CFLAGS="$GTKDOC_DEPS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTKDOC_DEPS_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -13602,10 +17016,10 @@ pkg_cv_GTKDOC_DEPS_LIBS="$GTKDOC_DEPS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GTKDOC_DEPS_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -13619,8 +17033,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -13637,29 +17051,31 @@ : elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } : else GTKDOC_DEPS_CFLAGS=$pkg_cv_GTKDOC_DEPS_CFLAGS GTKDOC_DEPS_LIBS=$pkg_cv_GTKDOC_DEPS_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi fi # Check whether --enable-gtk-doc-html was given. -if test "${enable_gtk_doc_html+set}" = set; then : +if test ${enable_gtk_doc_html+y} +then : enableval=$enable_gtk_doc_html; -else +else $as_nop enable_gtk_doc_html=yes fi # Check whether --enable-gtk-doc-pdf was given. -if test "${enable_gtk_doc_pdf+set}" = set; then : +if test ${enable_gtk_doc_pdf+y} +then : enableval=$enable_gtk_doc_pdf; -else +else $as_nop enable_gtk_doc_pdf=no fi @@ -13725,17 +17141,18 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 -$as_echo_n "checking whether NLS is requested... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 +printf %s "checking whether NLS is requested... " >&6; } # Check whether --enable-nls was given. -if test "${enable_nls+set}" = set; then : +if test ${enable_nls+y} +then : enableval=$enable_nls; USE_NLS=$enableval -else +else $as_nop USE_NLS=yes fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 -$as_echo "$USE_NLS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +printf "%s\n" "$USE_NLS" >&6; } @@ -13774,11 +17191,12 @@ # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_MSGFMT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_MSGFMT+y} +then : + printf %s "(cached) " >&6 +else $as_nop case "$MSGFMT" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. @@ -13806,20 +17224,21 @@ fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != ":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 -$as_echo "$MSGFMT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 +printf "%s\n" "$MSGFMT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GMSGFMT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_GMSGFMT+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. @@ -13829,11 +17248,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -13846,11 +17269,11 @@ fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 -$as_echo "$GMSGFMT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 +printf "%s\n" "$GMSGFMT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -13896,11 +17319,12 @@ # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_XGETTEXT+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_XGETTEXT+y} +then : + printf %s "(cached) " >&6 +else $as_nop case "$XGETTEXT" in [\\/]* | ?:[\\/]*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. @@ -13928,11 +17352,11 @@ fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 -$as_echo "$XGETTEXT" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 +printf "%s\n" "$XGETTEXT" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi rm -f messages.po @@ -13973,11 +17397,12 @@ # Extract the first word of "msgmerge", so it can be a program name with args. set dummy msgmerge; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_MSGMERGE+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_MSGMERGE+y} +then : + printf %s "(cached) " >&6 +else $as_nop case "$MSGMERGE" in [\\/]* | ?:[\\/]*) ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. @@ -14004,11 +17429,11 @@ fi MSGMERGE="$ac_cv_path_MSGMERGE" if test "$MSGMERGE" != ":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 -$as_echo "$MSGMERGE" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 +printf "%s\n" "$MSGMERGE" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -14040,9 +17465,10 @@ # Check whether --with-gnu-ld was given. -if test "${with_gnu_ld+set}" = set; then : +if test ${with_gnu_ld+y} +then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes -else +else $as_nop with_gnu_ld=no fi @@ -14062,8 +17488,8 @@ ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 +printf %s "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw @@ -14092,15 +17518,16 @@ ;; esac elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 +printf %s "checking for GNU ld... " >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 +printf %s "checking for non-GNU ld... " >&6; } fi -if ${acl_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else +if test ${acl_cv_path_LD+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -z "$LD"; then acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do @@ -14129,18 +17556,19 @@ LD="$acl_cv_path_LD" if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +printf "%s\n" "$LD" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${acl_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 +printf %s "checking if the linker ($LD) is GNU ld... " >&6; } +if test ${acl_cv_prog_gnu_ld+y} +then : + printf %s "(cached) " >&6 +else $as_nop # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 -$as_echo "$acl_cv_prog_gnu_ld" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 +printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 -$as_echo_n "checking for shared library run path origin... " >&6; } -if ${acl_cv_rpath+:} false; then : - $as_echo_n "(cached) " >&6 -else + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 +printf %s "checking for shared library run path origin... " >&6; } +if test ${acl_cv_rpath+y} +then : + printf %s "(cached) " >&6 +else $as_nop CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh @@ -14171,8 +17601,8 @@ acl_cv_rpath=done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 -$as_echo "$acl_cv_rpath" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 +printf "%s\n" "$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" @@ -14183,24 +17613,159 @@ acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. -if test "${enable_rpath+set}" = set; then : +if test ${enable_rpath+y} +then : enableval=$enable_rpath; : -else +else $as_nop enable_rpath=yes fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +printf %s "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test ${ac_cv_prog_CPP+y} +then : + printf %s "(cached) " >&6 +else $as_nop + # Double quotes because $CC needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +printf "%s\n" "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + +else $as_nop + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + # Broken: success on invalid input. +continue +else $as_nop + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok +then : + +else $as_nop + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + acl_libdirstem=lib acl_libdirstem2= case "$host_os" in solaris*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 -$as_echo_n "checking for 64-bit host... " >&6; } -if ${gl_cv_solaris_64bit+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 +printf %s "checking for 64-bit host... " >&6; } +if test ${gl_cv_solaris_64bit+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14210,17 +17775,18 @@ _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "sixtyfour bits" >/dev/null 2>&1; then : + $EGREP "sixtyfour bits" >/dev/null 2>&1 +then : gl_cv_solaris_64bit=yes -else +else $as_nop gl_cv_solaris_64bit=no fi -rm -f conftest* +rm -rf conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 -$as_echo "$gl_cv_solaris_64bit" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 +printf "%s\n" "$gl_cv_solaris_64bit" >&6; } if test $gl_cv_solaris_64bit = yes; then acl_libdirstem=lib/64 case "$host_cpu" in @@ -14279,7 +17845,8 @@ # Check whether --with-libiconv-prefix was given. -if test "${with_libiconv_prefix+set}" = set; then : +if test ${with_libiconv_prefix+y} +then : withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no @@ -14743,72 +18310,76 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 -$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } -if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 +printf %s "checking for CFPreferencesCopyAppValue... " >&6; } +if test ${gt_cv_func_CFPreferencesCopyAppValue+y} +then : + printf %s "(cached) " >&6 +else $as_nop gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { CFPreferencesCopyAppValue(NULL, NULL) ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : gt_cv_func_CFPreferencesCopyAppValue=yes -else +else $as_nop gt_cv_func_CFPreferencesCopyAppValue=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 -$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 +printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then -$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h +printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 -$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } -if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 +printf %s "checking for CFLocaleCopyCurrent... " >&6; } +if test ${gt_cv_func_CFLocaleCopyCurrent+y} +then : + printf %s "(cached) " >&6 +else $as_nop gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main () +main (void) { CFLocaleCopyCurrent(); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : gt_cv_func_CFLocaleCopyCurrent=yes -else +else $as_nop gt_cv_func_CFLocaleCopyCurrent=no fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 -$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 +printf "%s\n" "$gt_cv_func_CFLocaleCopyCurrent" >&6; } if test $gt_cv_func_CFLocaleCopyCurrent = yes; then -$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h +printf "%s\n" "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h fi INTL_MACOSX_LIBS= @@ -14853,11 +18424,12 @@ gt_expression_test_code= fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 -$as_echo_n "checking for GNU gettext in libc... " >&6; } -if eval \${$gt_func_gnugettext_libc+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 +printf %s "checking for GNU gettext in libc... " >&6; } +if eval test \${$gt_func_gnugettext_libc+y} +then : + printf %s "(cached) " >&6 +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14872,7 +18444,7 @@ $gt_revision_test_code int -main () +main (void) { bindtextdomain ("", ""); @@ -14882,17 +18454,18 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : eval "$gt_func_gnugettext_libc=yes" -else +else $as_nop eval "$gt_func_gnugettext_libc=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$gt_func_gnugettext_libc - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then @@ -14925,11 +18498,12 @@ done - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 -$as_echo_n "checking for iconv... " >&6; } -if ${am_cv_func_iconv+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 +printf %s "checking for iconv... " >&6; } +if test ${am_cv_func_iconv+y} +then : + printf %s "(cached) " >&6 +else $as_nop am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no @@ -14940,7 +18514,7 @@ #include int -main () +main (void) { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); @@ -14949,10 +18523,11 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : am_cv_func_iconv=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" @@ -14964,7 +18539,7 @@ #include int -main () +main (void) { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); @@ -14973,24 +18548,26 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : am_cv_lib_iconv=yes am_cv_func_iconv=yes fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 -$as_echo "$am_cv_func_iconv" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 +printf "%s\n" "$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 -$as_echo_n "checking for working iconv... " >&6; } -if ${am_cv_func_iconv_works+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 +printf %s "checking for working iconv... " >&6; } +if test ${am_cv_func_iconv_works+y} +then : + printf %s "(cached) " >&6 +else $as_nop am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then @@ -14998,12 +18575,13 @@ fi am_cv_func_iconv_works=no for ac_iconv_const in '' 'const'; do - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes +then : case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac -else +else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15015,7 +18593,7 @@ #endif int -main () +main (void) { int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful @@ -15115,7 +18693,8 @@ return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : +if ac_fn_c_try_run "$LINENO" +then : am_cv_func_iconv_works=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -15127,8 +18706,8 @@ LIBS="$am_save_LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 -$as_echo "$am_cv_func_iconv_works" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 +printf "%s\n" "$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; @@ -15138,14 +18717,14 @@ fi if test "$am_func_iconv" = yes; then -$as_echo "#define HAVE_ICONV 1" >>confdefs.h +printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h fi if test "$am_cv_lib_iconv" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 -$as_echo_n "checking how to link with libiconv... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 -$as_echo "$LIBICONV" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 +printf %s "checking how to link with libiconv... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 +printf "%s\n" "$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= @@ -15177,7 +18756,8 @@ # Check whether --with-libintl-prefix was given. -if test "${with_libintl_prefix+set}" = set; then : +if test ${with_libintl_prefix+y} +then : withval=$with_libintl_prefix; if test "X$withval" = "Xno"; then use_additional=no @@ -15616,11 +19196,12 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 -$as_echo_n "checking for GNU gettext in libintl... " >&6; } -if eval \${$gt_func_gnugettext_libintl+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 +printf %s "checking for GNU gettext in libintl... " >&6; } +if eval test \${$gt_func_gnugettext_libintl+y} +then : + printf %s "(cached) " >&6 +else $as_nop gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" @@ -15643,7 +19224,7 @@ $gt_revision_test_code int -main () +main (void) { bindtextdomain ("", ""); @@ -15653,12 +19234,13 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : eval "$gt_func_gnugettext_libintl=yes" -else +else $as_nop eval "$gt_func_gnugettext_libintl=no" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" @@ -15680,7 +19262,7 @@ $gt_revision_test_code int -main () +main (void) { bindtextdomain ("", ""); @@ -15690,21 +19272,22 @@ return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : +if ac_fn_c_try_link "$LINENO" +then : LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" eval "$gt_func_gnugettext_libintl=yes" fi -rm -f core conftest.err conftest.$ac_objext \ +rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS" fi eval ac_res=\$$gt_func_gnugettext_libintl - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +printf "%s\n" "$ac_res" >&6; } fi if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ @@ -15731,20 +19314,20 @@ if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then -$as_echo "#define ENABLE_NLS 1" >>confdefs.h +printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h else USE_NLS=no fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 -$as_echo_n "checking whether to use NLS... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 -$as_echo "$USE_NLS" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 +printf %s "checking whether to use NLS... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 +printf "%s\n" "$USE_NLS" >&6; } if test "$USE_NLS" = "yes"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 -$as_echo_n "checking where the gettext function comes from... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 +printf %s "checking where the gettext function comes from... " >&6; } if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then gt_source="external libintl" @@ -15754,18 +19337,18 @@ else gt_source="included intl directory" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 -$as_echo "$gt_source" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 +printf "%s\n" "$gt_source" >&6; } fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 -$as_echo_n "checking how to link with libintl... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 -$as_echo "$LIBINTL" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 +printf %s "checking how to link with libintl... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 +printf "%s\n" "$LIBINTL" >&6; } for element in $INCINTL; do haveit= @@ -15792,10 +19375,10 @@ fi -$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h +printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h -$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h +printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h fi @@ -15816,25 +19399,25 @@ GETTEXT_PACKAGE=ModemManager -cat >>confdefs.h <<_ACEOF -#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" -_ACEOF +printf "%s\n" "#define GETTEXT_PACKAGE \"$GETTEXT_PACKAGE\"" >>confdefs.h -GLIB_MIN_VERSION=2.36.0 -GLIB_BUILD_SYMBOLS="-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_36 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_36 -DGLIB_DISABLE_DEPRECATION_WARNINGS" +# NOTE! If using glib < 2.55.1, make sure you have backported the following patch to avoid +# the daemon leaking a lot: https://gitlab.gnome.org/GNOME/glib/commit/37d9b0c6995f97ea0f744650aaf5179081f878ba +GLIB_MIN_VERSION=2.48.0 +GLIB_BUILD_SYMBOLS="-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_48 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_48 -DGLIB_DISABLE_DEPRECATION_WARNINGS" pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MM" >&5 -$as_echo_n "checking for MM... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MM" >&5 +printf %s "checking for MM... " >&6; } if test -n "$MM_CFLAGS"; then pkg_cv_MM_CFLAGS="$MM_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_MIN_VERSION + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_MIN_VERSION gmodule-2.0 gobject-2.0 gio-2.0 @@ -15845,7 +19428,7 @@ gio-2.0 gio-unix-2.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MM_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 @@ -15863,7 +19446,7 @@ pkg_cv_MM_LIBS="$MM_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_MIN_VERSION + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_MIN_VERSION gmodule-2.0 gobject-2.0 gio-2.0 @@ -15874,7 +19457,7 @@ gio-2.0 gio-unix-2.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MM_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 @@ -15892,8 +19475,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -15931,10 +19514,10 @@ and MM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -15948,8 +19531,8 @@ else MM_CFLAGS=$pkg_cv_MM_CFLAGS MM_LIBS=$pkg_cv_MM_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi MM_CFLAGS="$MM_CFLAGS $GLIB_BUILD_SYMBOLS" @@ -15958,14 +19541,14 @@ pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBMM_GLIB" >&5 -$as_echo_n "checking for LIBMM_GLIB... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LIBMM_GLIB" >&5 +printf %s "checking for LIBMM_GLIB... " >&6; } if test -n "$LIBMM_GLIB_CFLAGS"; then pkg_cv_LIBMM_GLIB_CFLAGS="$LIBMM_GLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_MIN_VERSION + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_MIN_VERSION gobject-2.0 gio-2.0 gio-unix-2.0\""; } >&5 @@ -15974,7 +19557,7 @@ gio-2.0 gio-unix-2.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBMM_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= $GLIB_MIN_VERSION gobject-2.0 @@ -15991,7 +19574,7 @@ pkg_cv_LIBMM_GLIB_LIBS="$LIBMM_GLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_MIN_VERSION + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_MIN_VERSION gobject-2.0 gio-2.0 gio-unix-2.0\""; } >&5 @@ -16000,7 +19583,7 @@ gio-2.0 gio-unix-2.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBMM_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= $GLIB_MIN_VERSION gobject-2.0 @@ -16017,8 +19600,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -16053,10 +19636,10 @@ and LIBMM_GLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -16070,8 +19653,8 @@ else LIBMM_GLIB_CFLAGS=$pkg_cv_LIBMM_GLIB_CFLAGS LIBMM_GLIB_LIBS=$pkg_cv_LIBMM_GLIB_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi LIBMM_GLIB_CFLAGS="$LIBMM_GLIB_CFLAGS $GLIB_BUILD_SYMBOLS" @@ -16080,21 +19663,21 @@ pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MMCLI" >&5 -$as_echo_n "checking for MMCLI... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MMCLI" >&5 +printf %s "checking for MMCLI... " >&6; } if test -n "$MMCLI_CFLAGS"; then pkg_cv_MMCLI_CFLAGS="$MMCLI_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_MIN_VERSION + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_MIN_VERSION gobject-2.0 gio-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_MIN_VERSION gobject-2.0 gio-2.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MMCLI_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= $GLIB_MIN_VERSION gobject-2.0 @@ -16110,14 +19693,14 @@ pkg_cv_MMCLI_LIBS="$MMCLI_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_MIN_VERSION + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= \$GLIB_MIN_VERSION gobject-2.0 gio-2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glib-2.0 >= $GLIB_MIN_VERSION gobject-2.0 gio-2.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MMCLI_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= $GLIB_MIN_VERSION gobject-2.0 @@ -16133,8 +19716,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -16166,10 +19749,10 @@ and MMCLI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -16183,8 +19766,8 @@ else MMCLI_CFLAGS=$pkg_cv_MMCLI_CFLAGS MMCLI_LIBS=$pkg_cv_MMCLI_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } fi MMCLI_CFLAGS="$MMCLI_CFLAGS $GLIB_BUILD_SYMBOLS" @@ -16197,6 +19780,52 @@ GDBUS_CODEGEN=`$PKG_CONFIG --variable=gdbus_codegen gio-2.0` +# Extract the first word of "xsltproc", so it can be a program name with args. +set dummy xsltproc; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_XSLTPROC_CHECK+y} +then : + printf %s "(cached) " >&6 +else $as_nop + if test -n "$XSLTPROC_CHECK"; then + ac_cv_prog_XSLTPROC_CHECK="$XSLTPROC_CHECK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_prog_XSLTPROC_CHECK="yes" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +XSLTPROC_CHECK=$ac_cv_prog_XSLTPROC_CHECK +if test -n "$XSLTPROC_CHECK"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC_CHECK" >&5 +printf "%s\n" "$XSLTPROC_CHECK" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + +if test "x$ax_is_release" != "xyes" -a "x$XSLTPROC_CHECK" != "xyes"; then + as_fn_error $? "Please install xsltproc before configuring." "$LINENO" 5 +fi + @@ -16204,19 +19833,21 @@ # allow to override gcov location # Check whether --with-gcov was given. -if test "${with_gcov+set}" = set; then : +if test ${with_gcov+y} +then : withval=$with_gcov; _AX_CODE_COVERAGE_GCOV_PROG_WITH=$with_gcov -else +else $as_nop _AX_CODE_COVERAGE_GCOV_PROG_WITH=gcov fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build with code coverage support" >&5 -$as_echo_n "checking whether to build with code coverage support... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build with code coverage support" >&5 +printf %s "checking whether to build with code coverage support... " >&6; } # Check whether --enable-code-coverage was given. -if test "${enable_code_coverage+set}" = set; then : +if test ${enable_code_coverage+y} +then : enableval=$enable_code_coverage; -else +else $as_nop enable_code_coverage=no fi @@ -16231,20 +19862,22 @@ CODE_COVERAGE_ENABLED=$enable_code_coverage - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_code_coverage" >&5 -$as_echo "$enable_code_coverage" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_code_coverage" >&5 +printf "%s\n" "$enable_code_coverage" >&6; } - if test "$enable_code_coverage" = "yes" ; then : + if test "$enable_code_coverage" = "yes" +then : # check for gcov if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args. set dummy ${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_GCOV+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_GCOV+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$GCOV"; then ac_cv_prog_GCOV="$GCOV" # Let the user override the test. else @@ -16252,11 +19885,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_GCOV="${ac_tool_prefix}$_AX_CODE_COVERAGE_GCOV_PROG_WITH" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -16267,11 +19904,11 @@ fi GCOV=$ac_cv_prog_GCOV if test -n "$GCOV"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5 -$as_echo "$GCOV" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GCOV" >&5 +printf "%s\n" "$GCOV" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -16280,11 +19917,12 @@ ac_ct_GCOV=$GCOV # Extract the first word of "$_AX_CODE_COVERAGE_GCOV_PROG_WITH", so it can be a program name with args. set dummy $_AX_CODE_COVERAGE_GCOV_PROG_WITH; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_GCOV+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_ac_ct_GCOV+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$ac_ct_GCOV"; then ac_cv_prog_ac_ct_GCOV="$ac_ct_GCOV" # Let the user override the test. else @@ -16292,11 +19930,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_GCOV="$_AX_CODE_COVERAGE_GCOV_PROG_WITH" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -16307,11 +19949,11 @@ fi ac_ct_GCOV=$ac_cv_prog_ac_ct_GCOV if test -n "$ac_ct_GCOV"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GCOV" >&5 -$as_echo "$ac_ct_GCOV" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_GCOV" >&5 +printf "%s\n" "$ac_ct_GCOV" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_ct_GCOV" = x; then @@ -16319,8 +19961,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac GCOV=$ac_ct_GCOV @@ -16329,12 +19971,14 @@ GCOV="$ac_cv_prog_GCOV" fi - if test "X$GCOV" = "X:"; then : + if test "X$GCOV" = "X:" +then : as_fn_error $? "gcov is needed to do coverage" "$LINENO" 5 fi - if test "$GCC" = "no" ; then : + if test "$GCC" = "no" +then : as_fn_error $? "not compiling with gcc, which is required for gcov code coverage" "$LINENO" 5 @@ -16345,11 +19989,12 @@ # Extract the first word of "lcov", so it can be a program name with args. set dummy lcov; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LCOV+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_LCOV+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$LCOV"; then ac_cv_prog_LCOV="$LCOV" # Let the user override the test. else @@ -16357,11 +20002,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_LCOV="lcov" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -16372,21 +20021,22 @@ fi LCOV=$ac_cv_prog_LCOV if test -n "$LCOV"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5 -$as_echo "$LCOV" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LCOV" >&5 +printf "%s\n" "$LCOV" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi # Extract the first word of "genhtml", so it can be a program name with args. set dummy genhtml; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_GENHTML+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_prog_GENHTML+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test -n "$GENHTML"; then ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test. else @@ -16394,11 +20044,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_GENHTML="genhtml" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -16409,22 +20063,24 @@ fi GENHTML=$ac_cv_prog_GENHTML if test -n "$GENHTML"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5 -$as_echo "$GENHTML" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GENHTML" >&5 +printf "%s\n" "$GENHTML" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi - if test "$LCOV" ; then : + if test "$LCOV" +then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcov version" >&5 -$as_echo_n "checking for lcov version... " >&6; } -if ${ax_cv_lcov_version+:} false; then : - $as_echo_n "(cached) " >&6 -else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lcov version" >&5 +printf %s "checking for lcov version... " >&6; } +if test ${ax_cv_lcov_version+y} +then : + printf %s "(cached) " >&6 +else $as_nop ax_cv_lcov_version=invalid lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'` @@ -16435,10 +20091,10 @@ done fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lcov_version" >&5 -$as_echo "$ax_cv_lcov_version" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lcov_version" >&5 +printf "%s\n" "$ax_cv_lcov_version" >&6; } -else +else $as_nop lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list" as_fn_error $? "$lcov_msg" "$LINENO" 5 @@ -16453,7 +20109,8 @@ ;; esac - if test -z "$GENHTML" ; then : + if test -z "$GENHTML" +then : as_fn_error $? "Could not find genhtml from the lcov package" "$LINENO" 5 @@ -16556,15 +20213,16 @@ # Check whether --enable-introspection was given. -if test "${enable_introspection+set}" = set; then : +if test ${enable_introspection+y} +then : enableval=$enable_introspection; -else +else $as_nop enable_introspection=auto fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gobject-introspection" >&5 -$as_echo_n "checking for gobject-introspection... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gobject-introspection" >&5 +printf %s "checking for gobject-introspection... " >&6; } case $enable_introspection in #( no) : @@ -16572,20 +20230,20 @@ ;; #( yes) : if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : else as_fn_error $? "gobject-introspection-1.0 is not installed" "$LINENO" 5 fi if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 0.9.6\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 0.9.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0 >= 0.9.6") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then found_introspection=yes else @@ -16594,10 +20252,10 @@ ;; #( auto) : if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 0.9.6\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gobject-introspection-1.0 >= 0.9.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "gobject-introspection-1.0 >= 0.9.6") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then found_introspection=yes else @@ -16609,8 +20267,8 @@ as_fn_error $? "invalid argument passed to --enable-introspection, should be one of [no/auto/yes]" "$LINENO" 5 ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found_introspection" >&5 -$as_echo "$found_introspection" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $found_introspection" >&5 +printf "%s\n" "$found_introspection" >&6; } INTROSPECTION_SCANNER= INTROSPECTION_COMPILER= @@ -16648,22 +20306,25 @@ - if test "x" != "xyes"; then : + if test "x" != "xyes" +then : fi # Check whether --enable-vala was given. -if test "${enable_vala+set}" = set; then : +if test ${enable_vala+y} +then : enableval=$enable_vala; -else +else $as_nop - if test "x" = "x"; then : + if test "x" = "x" +then : enable_vala=auto -else +else $as_nop enable_vala= @@ -16677,7 +20338,8 @@ enable_vala=no ;; #( yes) : - if test "x" != "xyes" -a "x$found_introspection" != "xyes"; then : + if test "x" != "xyes" -a "x$found_introspection" != "xyes" +then : as_fn_error $? "Vala bindings require GObject Introspection" "$LINENO" 5 @@ -16685,7 +20347,8 @@ ;; #( auto) : - if test "x" != "xyes" -a "x$found_introspection" != "xyes"; then : + if test "x" != "xyes" -a "x$found_introspection" != "xyes" +then : enable_vala=no @@ -16697,20 +20360,22 @@ ;; esac - if test "x" = "x"; then : + if test "x" = "x" +then : vapigen_pkg_name=vapigen -else +else $as_nop vapigen_pkg_name=vapigen- fi - if test "x0.18" = "x"; then : + if test "x0.18" = "x" +then : vapigen_pkg="$vapigen_pkg_name" -else +else $as_nop vapigen_pkg="$vapigen_pkg_name >= 0.18" @@ -16727,11 +20392,12 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. @@ -16741,11 +20407,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -16757,11 +20427,11 @@ fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +printf "%s\n" "$PKG_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi @@ -16770,11 +20440,12 @@ ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} +then : + printf %s "(cached) " >&6 +else $as_nop case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. @@ -16784,11 +20455,15 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -16800,11 +20475,11 @@ fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then @@ -16812,8 +20487,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG @@ -16825,26 +20500,27 @@ fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } PKG_CONFIG="" fi fi if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$vapigen_pkg\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$vapigen_pkg\""; } >&5 ($PKG_CONFIG --exists --print-errors "$vapigen_pkg") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - if test "$enable_vala" = "auto"; then : + if test "$enable_vala" = "auto" +then : enable_vala=yes @@ -16867,19 +20543,20 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vapigen" >&5 -$as_echo_n "checking for vapigen... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for vapigen" >&5 +printf %s "checking for vapigen... " >&6; } case $enable_vala in #( yes) : VAPIGEN=`$PKG_CONFIG --variable=vapigen $vapigen_pkg_name` VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir $vapigen_pkg_name`/vala/Makefile.vapigen - if test "x" = "x"; then : + if test "x" = "x" +then : VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir $vapigen_pkg_name` -else +else $as_nop VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned $vapigen_pkg_name` @@ -16889,8 +20566,8 @@ ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_vala" >&5 -$as_echo "$enable_vala" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_vala" >&5 +printf "%s\n" "$enable_vala" >&6; } @@ -16912,7 +20589,8 @@ # Check whether --with-dbus-sys-dir was given. -if test "${with_dbus_sys_dir+set}" = set; then : +if test ${with_dbus_sys_dir+y} +then : withval=$with_dbus_sys_dir; fi @@ -16925,7 +20603,8 @@ # Check whether --with-udev-base-dir was given. -if test "${with_udev_base_dir+set}" = set; then : +if test ${with_udev_base_dir+y} +then : withval=$with_udev_base_dir; fi @@ -16938,9 +20617,10 @@ # Check whether --with-systemdsystemunitdir was given. -if test "${with_systemdsystemunitdir+set}" = set; then : +if test ${with_systemdsystemunitdir+y} +then : withval=$with_systemdsystemunitdir; -else +else $as_nop with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) fi @@ -16962,9 +20642,10 @@ # Check whether --with-udev was given. -if test "${with_udev+set}" = set; then : +if test ${with_udev+y} +then : withval=$with_udev; -else +else $as_nop with_udev=yes fi @@ -16980,17 +20661,17 @@ yes) pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUDEV" >&5 -$as_echo_n "checking for GUDEV... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GUDEV" >&5 +printf %s "checking for GUDEV... " >&6; } if test -n "$GUDEV_CFLAGS"; then pkg_cv_GUDEV_CFLAGS="$GUDEV_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gudev-1.0 >= \$GUDEV_VERSION\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gudev-1.0 >= \$GUDEV_VERSION\""; } >&5 ($PKG_CONFIG --exists --print-errors "gudev-1.0 >= $GUDEV_VERSION") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GUDEV_CFLAGS=`$PKG_CONFIG --cflags "gudev-1.0 >= $GUDEV_VERSION" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -17004,10 +20685,10 @@ pkg_cv_GUDEV_LIBS="$GUDEV_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gudev-1.0 >= \$GUDEV_VERSION\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gudev-1.0 >= \$GUDEV_VERSION\""; } >&5 ($PKG_CONFIG --exists --print-errors "gudev-1.0 >= $GUDEV_VERSION") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GUDEV_LIBS=`$PKG_CONFIG --libs "gudev-1.0 >= $GUDEV_VERSION" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -17021,8 +20702,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -17039,21 +20720,21 @@ have_gudev=no elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } have_gudev=no else GUDEV_CFLAGS=$pkg_cv_GUDEV_CFLAGS GUDEV_LIBS=$pkg_cv_GUDEV_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } have_gudev=yes fi if test "x$have_gudev" = "xno"; then as_fn_error $? "Couldn't find gudev >= $GUDEV_VERSION. Install it, or otherwise configure using --without-udev to disable udev support." "$LINENO" 5 else -$as_echo "#define WITH_UDEV 1" >>confdefs.h +printf "%s\n" "#define WITH_UDEV 1" >>confdefs.h @@ -17067,17 +20748,17 @@ pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBSYSTEMD" >&5 -$as_echo_n "checking for LIBSYSTEMD... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LIBSYSTEMD" >&5 +printf %s "checking for LIBSYSTEMD... " >&6; } if test -n "$LIBSYSTEMD_CFLAGS"; then pkg_cv_LIBSYSTEMD_CFLAGS="$LIBSYSTEMD_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBSYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -17091,10 +20772,10 @@ pkg_cv_LIBSYSTEMD_LIBS="$LIBSYSTEMD_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBSYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -17108,8 +20789,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -17126,29 +20807,29 @@ have_libsystemd=no elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } have_libsystemd=no else LIBSYSTEMD_CFLAGS=$pkg_cv_LIBSYSTEMD_CFLAGS LIBSYSTEMD_LIBS=$pkg_cv_LIBSYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } have_libsystemd=yes fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBSYSTEMD_LOGIN" >&5 -$as_echo_n "checking for LIBSYSTEMD_LOGIN... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LIBSYSTEMD_LOGIN" >&5 +printf %s "checking for LIBSYSTEMD_LOGIN... " >&6; } if test -n "$LIBSYSTEMD_LOGIN_CFLAGS"; then pkg_cv_LIBSYSTEMD_LOGIN_CFLAGS="$LIBSYSTEMD_LOGIN_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-login >= 183\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-login >= 183\""; } >&5 ($PKG_CONFIG --exists --print-errors "libsystemd-login >= 183") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBSYSTEMD_LOGIN_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-login >= 183" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -17162,10 +20843,10 @@ pkg_cv_LIBSYSTEMD_LOGIN_LIBS="$LIBSYSTEMD_LOGIN_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-login >= 183\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-login >= 183\""; } >&5 ($PKG_CONFIG --exists --print-errors "libsystemd-login >= 183") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBSYSTEMD_LOGIN_LIBS=`$PKG_CONFIG --libs "libsystemd-login >= 183" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -17179,8 +20860,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -17197,27 +20878,99 @@ have_libsystemd_login=no elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } have_libsystemd_login=no else LIBSYSTEMD_LOGIN_CFLAGS=$pkg_cv_LIBSYSTEMD_LOGIN_CFLAGS LIBSYSTEMD_LOGIN_LIBS=$pkg_cv_LIBSYSTEMD_LOGIN_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } have_libsystemd_login=yes fi +pkg_failed=no +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LIBELOGIND" >&5 +printf %s "checking for LIBELOGIND... " >&6; } + +if test -n "$LIBELOGIND_CFLAGS"; then + pkg_cv_LIBELOGIND_CFLAGS="$LIBELOGIND_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelogind >= 209\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libelogind >= 209") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBELOGIND_CFLAGS=`$PKG_CONFIG --cflags "libelogind >= 209" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBELOGIND_LIBS"; then + pkg_cv_LIBELOGIND_LIBS="$LIBELOGIND_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelogind >= 209\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libelogind >= 209") 2>&5 + ac_status=$? + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBELOGIND_LIBS=`$PKG_CONFIG --libs "libelogind >= 209" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBELOGIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libelogind >= 209" 2>&1` + else + LIBELOGIND_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libelogind >= 209" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBELOGIND_PKG_ERRORS" >&5 + + have_elogind=no +elif test $pkg_failed = untried; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + have_elogind=no +else + LIBELOGIND_CFLAGS=$pkg_cv_LIBELOGIND_CFLAGS + LIBELOGIND_LIBS=$pkg_cv_LIBELOGIND_LIBS + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + have_elogind=yes +fi + # Check whether --with-systemd-suspend-resume was given. -if test "${with_systemd_suspend_resume+set}" = set; then : +if test ${with_systemd_suspend_resume+y} +then : withval=$with_systemd_suspend_resume; -else +else $as_nop with_systemd_suspend_resume=auto fi if test "x$with_systemd_suspend_resume" = "xauto"; then - if test "x$have_libsystemd" = "xyes" || test "x$have_libsystemd_login" = "xyes"; then + if test "x$have_libsystemd" = "xyes" || test "x$have_libsystemd_login" = "xyes" || test "x$have_elogind" = "xyes"; then with_systemd_suspend_resume=yes else with_systemd_suspend_resume=no @@ -17226,11 +20979,12 @@ case $with_systemd_suspend_resume in yes) - if test "x$have_libsystemd" = "xno" && test "x$have_libsystemd_login" = "xno"; then - as_fn_error $? "libsystemd or libsystemd-login development headers are required" "$LINENO" 5 + if test "x$have_libsystemd" = "xno" && test "x$have_libsystemd_login" = "xno" && test "x$have_elogind" = "xno"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: libsystemd" >&5 +printf "%s\n" "$as_me: WARNING: libsystemd" >&2;} fi -$as_echo "#define WITH_SYSTEMD_SUSPEND_RESUME 1" >>confdefs.h +printf "%s\n" "#define WITH_SYSTEMD_SUSPEND_RESUME 1" >>confdefs.h ;; *) @@ -17250,9 +21004,10 @@ # Check whether --with-systemd-journal was given. -if test "${with_systemd_journal+set}" = set; then : +if test ${with_systemd_journal+y} +then : withval=$with_systemd_journal; -else +else $as_nop with_systemd_journal=auto fi @@ -17271,7 +21026,7 @@ as_fn_error $? "libsystemd development headers are required" "$LINENO" 5 fi -$as_echo "#define WITH_SYSTEMD_JOURNAL 1" >>confdefs.h +printf "%s\n" "#define WITH_SYSTEMD_JOURNAL 1" >>confdefs.h ;; *) @@ -17291,17 +21046,17 @@ pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for POLKIT" >&5 -$as_echo_n "checking for POLKIT... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for POLKIT" >&5 +printf %s "checking for POLKIT... " >&6; } if test -n "$POLKIT_CFLAGS"; then pkg_cv_POLKIT_CFLAGS="$POLKIT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"polkit-gobject-1 >= 0.97\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"polkit-gobject-1 >= 0.97\""; } >&5 ($PKG_CONFIG --exists --print-errors "polkit-gobject-1 >= 0.97") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_POLKIT_CFLAGS=`$PKG_CONFIG --cflags "polkit-gobject-1 >= 0.97" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -17315,10 +21070,10 @@ pkg_cv_POLKIT_LIBS="$POLKIT_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"polkit-gobject-1 >= 0.97\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"polkit-gobject-1 >= 0.97\""; } >&5 ($PKG_CONFIG --exists --print-errors "polkit-gobject-1 >= 0.97") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_POLKIT_LIBS=`$PKG_CONFIG --libs "polkit-gobject-1 >= 0.97" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -17332,8 +21087,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -17350,21 +21105,22 @@ have_polkit=no elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } have_polkit=no else POLKIT_CFLAGS=$pkg_cv_POLKIT_CFLAGS POLKIT_LIBS=$pkg_cv_POLKIT_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } have_polkit=yes fi # Check whether --with-polkit was given. -if test "${with_polkit+set}" = set; then : +if test ${with_polkit+y} +then : withval=$with_polkit; -else +else $as_nop with_polkit=auto fi @@ -17400,7 +21156,7 @@ esac -$as_echo "#define WITH_POLKIT 1" >>confdefs.h +printf "%s\n" "#define WITH_POLKIT 1" >>confdefs.h @@ -17420,27 +21176,29 @@ # Check whether --with-at_command_via_dbus was given. -if test "${with_at_command_via_dbus+set}" = set; then : +if test ${with_at_command_via_dbus+y} +then : withval=$with_at_command_via_dbus; -else +else $as_nop with_at_command_via_dbus=no fi if test "x$with_at_command_via_dbus" = "xyes"; then -$as_echo "#define WITH_AT_COMMAND_VIA_DBUS 1" >>confdefs.h +printf "%s\n" "#define WITH_AT_COMMAND_VIA_DBUS 1" >>confdefs.h fi -LIBMBIM_VERSION=1.18.0 +LIBMBIM_VERSION=1.24.0 # Check whether --with-mbim was given. -if test "${with_mbim+set}" = set; then : +if test ${with_mbim+y} +then : withval=$with_mbim; -else +else $as_nop with_mbim=yes fi @@ -17456,17 +21214,17 @@ yes) pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MBIM" >&5 -$as_echo_n "checking for MBIM... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MBIM" >&5 +printf %s "checking for MBIM... " >&6; } if test -n "$MBIM_CFLAGS"; then pkg_cv_MBIM_CFLAGS="$MBIM_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mbim-glib >= \$LIBMBIM_VERSION\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mbim-glib >= \$LIBMBIM_VERSION\""; } >&5 ($PKG_CONFIG --exists --print-errors "mbim-glib >= $LIBMBIM_VERSION") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MBIM_CFLAGS=`$PKG_CONFIG --cflags "mbim-glib >= $LIBMBIM_VERSION" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -17480,10 +21238,10 @@ pkg_cv_MBIM_LIBS="$MBIM_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mbim-glib >= \$LIBMBIM_VERSION\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"mbim-glib >= \$LIBMBIM_VERSION\""; } >&5 ($PKG_CONFIG --exists --print-errors "mbim-glib >= $LIBMBIM_VERSION") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_MBIM_LIBS=`$PKG_CONFIG --libs "mbim-glib >= $LIBMBIM_VERSION" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -17497,8 +21255,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -17515,21 +21273,21 @@ have_mbim=no elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } have_mbim=no else MBIM_CFLAGS=$pkg_cv_MBIM_CFLAGS MBIM_LIBS=$pkg_cv_MBIM_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } have_mbim=yes fi if test "x$have_mbim" = "xno"; then as_fn_error $? "Couldn't find libmbim-glib >= $LIBMBIM_VERSION. Install it, or otherwise configure using --without-mbim to disable MBIM support." "$LINENO" 5 else -$as_echo "#define WITH_MBIM 1" >>confdefs.h +printf "%s\n" "#define WITH_MBIM 1" >>confdefs.h @@ -17541,13 +21299,14 @@ esac -LIBQMI_VERSION=1.24.0 +LIBQMI_VERSION=1.28.6 # Check whether --with-qmi was given. -if test "${with_qmi+set}" = set; then : +if test ${with_qmi+y} +then : withval=$with_qmi; -else +else $as_nop with_qmi=yes fi @@ -17563,17 +21322,17 @@ yes) pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for QMI" >&5 -$as_echo_n "checking for QMI... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for QMI" >&5 +printf %s "checking for QMI... " >&6; } if test -n "$QMI_CFLAGS"; then pkg_cv_QMI_CFLAGS="$QMI_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"qmi-glib >= \$LIBQMI_VERSION\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"qmi-glib >= \$LIBQMI_VERSION\""; } >&5 ($PKG_CONFIG --exists --print-errors "qmi-glib >= $LIBQMI_VERSION") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_QMI_CFLAGS=`$PKG_CONFIG --cflags "qmi-glib >= $LIBQMI_VERSION" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -17587,10 +21346,10 @@ pkg_cv_QMI_LIBS="$QMI_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"qmi-glib >= \$LIBQMI_VERSION\""; } >&5 + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"qmi-glib >= \$LIBQMI_VERSION\""; } >&5 ($PKG_CONFIG --exists --print-errors "qmi-glib >= $LIBQMI_VERSION") 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_QMI_LIBS=`$PKG_CONFIG --libs "qmi-glib >= $LIBQMI_VERSION" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes @@ -17604,8 +21363,8 @@ if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes @@ -17622,21 +21381,21 @@ have_qmi=no elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } have_qmi=no else QMI_CFLAGS=$pkg_cv_QMI_CFLAGS QMI_LIBS=$pkg_cv_QMI_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } have_qmi=yes fi if test "x$have_qmi" = "xno"; then as_fn_error $? "Couldn't find libqmi-glib >= $LIBQMI_VERSION. Install it, or otherwise configure using --without-qmi to disable QMI support." "$LINENO" 5 else -$as_echo "#define WITH_QMI 1" >>confdefs.h +printf "%s\n" "#define WITH_QMI 1" >>confdefs.h @@ -17647,77 +21406,18 @@ ;; esac -# Check whether --enable-more-warnings was given. -if test "${enable_more_warnings+set}" = set; then : - enableval=$enable_more_warnings; set_more_warnings="$enableval" -else - set_more_warnings=error -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for more warnings" >&5 -$as_echo_n "checking for more warnings... " >&6; } -if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - CFLAGS="-Wall -std=gnu89 $CFLAGS" - - for option in -Wmissing-declarations -Wmissing-prototypes \ - -Wdeclaration-after-statement -Wstrict-prototypes \ - -Wno-unused-parameter -Wno-sign-compare \ - -Wno-deprecated-declarations -Wno-unused-function \ - -Wunused-variable -Wformat-security; do - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $option -Werror" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands $option" >&5 -$as_echo_n "checking whether gcc understands $option... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - has_option=yes -else - has_option=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $has_option = no; then - CFLAGS="$SAVE_CFLAGS" - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 -$as_echo "$has_option" >&6; } - unset has_option - unset SAVE_CFLAGS - done - unset option - if test "x$set_more_warnings" = xerror; then - CFLAGS="$CFLAGS -Werror" - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - # Check whether --with-dist-version was given. -if test "${with_dist_version+set}" = set; then : +if test ${with_dist_version+y} +then : withval=$with_dist_version; ac_distver=$withval -else +else $as_nop ac_distver="" fi if ! test x"$ac_distver" = x""; then -cat >>confdefs.h <<_ACEOF -#define MM_DIST_VERSION "$ac_distver" -_ACEOF +printf "%s\n" "#define MM_DIST_VERSION \"$ac_distver\"" >>confdefs.h fi @@ -17732,7 +21432,1046 @@ -ac_config_files="$ac_config_files Makefile data/Makefile data/ModemManager.pc data/mm-glib.pc data/tests/Makefile data/tests/org.freedesktop.ModemManager1.service include/Makefile include/ModemManager-version.h build-aux/Makefile libqcdm/Makefile libqcdm/src/Makefile libqcdm/tests/Makefile src/Makefile src/tests/Makefile plugins/Makefile test/Makefile introspection/Makefile introspection/tests/Makefile po/Makefile.in docs/Makefile docs/man/Makefile docs/reference/Makefile docs/reference/api/Makefile docs/reference/api/version.xml docs/reference/libmm-glib/Makefile docs/reference/libmm-glib/version.xml libmm-glib/Makefile libmm-glib/generated/Makefile libmm-glib/generated/tests/Makefile libmm-glib/tests/Makefile vapi/Makefile cli/Makefile examples/Makefile examples/modem-watcher-python/Makefile examples/modem-watcher-javascript/Makefile examples/sms-python/Makefile examples/network-scan-python/Makefile" +# Check whether --enable-all-plugins was given. +if test ${enable_all_plugins+y} +then : + enableval=$enable_all_plugins; +else $as_nop + enable_all_plugins=yes +fi + + + +# Check whether --enable-plugin-generic was given. +if test ${enable_plugin_generic+y} +then : + enableval=$enable_plugin_generic; +else $as_nop + enable_plugin_generic=$enable_all_plugins +fi + +if test "x$enable_plugin_generic" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_GENERIC 1" >>confdefs.h + +fi + if test "x$enable_plugin_generic" = "xyes"; then + ENABLE_PLUGIN_GENERIC_TRUE= + ENABLE_PLUGIN_GENERIC_FALSE='#' +else + ENABLE_PLUGIN_GENERIC_TRUE='#' + ENABLE_PLUGIN_GENERIC_FALSE= +fi + + + +# Check whether --enable-plugin-altair-lte was given. +if test ${enable_plugin_altair_lte+y} +then : + enableval=$enable_plugin_altair_lte; +else $as_nop + enable_plugin_altair_lte=$enable_all_plugins +fi + +if test "x$enable_plugin_altair_lte" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_ALTAIR_LTE 1" >>confdefs.h + +fi + if test "x$enable_plugin_altair_lte" = "xyes"; then + ENABLE_PLUGIN_ALTAIR_LTE_TRUE= + ENABLE_PLUGIN_ALTAIR_LTE_FALSE='#' +else + ENABLE_PLUGIN_ALTAIR_LTE_TRUE='#' + ENABLE_PLUGIN_ALTAIR_LTE_FALSE= +fi + + + +# Check whether --enable-plugin-anydata was given. +if test ${enable_plugin_anydata+y} +then : + enableval=$enable_plugin_anydata; +else $as_nop + enable_plugin_anydata=$enable_all_plugins +fi + +if test "x$enable_plugin_anydata" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_ANYDATA 1" >>confdefs.h + +fi + if test "x$enable_plugin_anydata" = "xyes"; then + ENABLE_PLUGIN_ANYDATA_TRUE= + ENABLE_PLUGIN_ANYDATA_FALSE='#' +else + ENABLE_PLUGIN_ANYDATA_TRUE='#' + ENABLE_PLUGIN_ANYDATA_FALSE= +fi + + + +# Check whether --enable-plugin-broadmobi was given. +if test ${enable_plugin_broadmobi+y} +then : + enableval=$enable_plugin_broadmobi; +else $as_nop + enable_plugin_broadmobi=$enable_all_plugins +fi + +if test "x$enable_plugin_broadmobi" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_BROADMOBI 1" >>confdefs.h + +fi + if test "x$enable_plugin_broadmobi" = "xyes"; then + ENABLE_PLUGIN_BROADMOBI_TRUE= + ENABLE_PLUGIN_BROADMOBI_FALSE='#' +else + ENABLE_PLUGIN_BROADMOBI_TRUE='#' + ENABLE_PLUGIN_BROADMOBI_FALSE= +fi + + + +# Check whether --enable-plugin-cinterion was given. +if test ${enable_plugin_cinterion+y} +then : + enableval=$enable_plugin_cinterion; +else $as_nop + enable_plugin_cinterion=$enable_all_plugins +fi + +if test "x$enable_plugin_cinterion" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_CINTERION 1" >>confdefs.h + +fi + if test "x$enable_plugin_cinterion" = "xyes"; then + ENABLE_PLUGIN_CINTERION_TRUE= + ENABLE_PLUGIN_CINTERION_FALSE='#' +else + ENABLE_PLUGIN_CINTERION_TRUE='#' + ENABLE_PLUGIN_CINTERION_FALSE= +fi + + + +# Check whether --enable-plugin-dell was given. +if test ${enable_plugin_dell+y} +then : + enableval=$enable_plugin_dell; +else $as_nop + enable_plugin_dell=$enable_all_plugins +fi + +if test "x$enable_plugin_dell" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_DELL 1" >>confdefs.h + + with_shared_sierra="yes" + with_shared_novatel="yes" + with_shared_xmm="yes" + with_shared_telit="yes" + with_shared_foxconn="yes" +fi + if test "x$enable_plugin_dell" = "xyes"; then + ENABLE_PLUGIN_DELL_TRUE= + ENABLE_PLUGIN_DELL_FALSE='#' +else + ENABLE_PLUGIN_DELL_TRUE='#' + ENABLE_PLUGIN_DELL_FALSE= +fi + + + +# Check whether --enable-plugin-dlink was given. +if test ${enable_plugin_dlink+y} +then : + enableval=$enable_plugin_dlink; +else $as_nop + enable_plugin_dlink=$enable_all_plugins +fi + +if test "x$enable_plugin_dlink" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_DLINK 1" >>confdefs.h + +fi + if test "x$enable_plugin_dlink" = "xyes"; then + ENABLE_PLUGIN_DLINK_TRUE= + ENABLE_PLUGIN_DLINK_FALSE='#' +else + ENABLE_PLUGIN_DLINK_TRUE='#' + ENABLE_PLUGIN_DLINK_FALSE= +fi + + + +# Check whether --enable-plugin-fibocom was given. +if test ${enable_plugin_fibocom+y} +then : + enableval=$enable_plugin_fibocom; +else $as_nop + enable_plugin_fibocom=$enable_all_plugins +fi + +if test "x$enable_plugin_fibocom" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_FIBOCOM 1" >>confdefs.h + + with_shared_xmm="yes" +fi + if test "x$enable_plugin_fibocom" = "xyes"; then + ENABLE_PLUGIN_FIBOCOM_TRUE= + ENABLE_PLUGIN_FIBOCOM_FALSE='#' +else + ENABLE_PLUGIN_FIBOCOM_TRUE='#' + ENABLE_PLUGIN_FIBOCOM_FALSE= +fi + + + +# Check whether --enable-plugin-foxconn was given. +if test ${enable_plugin_foxconn+y} +then : + enableval=$enable_plugin_foxconn; +else $as_nop + enable_plugin_foxconn=$enable_all_plugins +fi + +if test "x$enable_plugin_foxconn" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_FOXCONN 1" >>confdefs.h + + with_shared_foxconn="yes" +fi + if test "x$enable_plugin_foxconn" = "xyes"; then + ENABLE_PLUGIN_FOXCONN_TRUE= + ENABLE_PLUGIN_FOXCONN_FALSE='#' +else + ENABLE_PLUGIN_FOXCONN_TRUE='#' + ENABLE_PLUGIN_FOXCONN_FALSE= +fi + + + +# Check whether --enable-plugin-gosuncn was given. +if test ${enable_plugin_gosuncn+y} +then : + enableval=$enable_plugin_gosuncn; +else $as_nop + enable_plugin_gosuncn=$enable_all_plugins +fi + +if test "x$enable_plugin_gosuncn" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_GOSUNCN 1" >>confdefs.h + +fi + if test "x$enable_plugin_gosuncn" = "xyes"; then + ENABLE_PLUGIN_GOSUNCN_TRUE= + ENABLE_PLUGIN_GOSUNCN_FALSE='#' +else + ENABLE_PLUGIN_GOSUNCN_TRUE='#' + ENABLE_PLUGIN_GOSUNCN_FALSE= +fi + + + +# Check whether --enable-plugin-haier was given. +if test ${enable_plugin_haier+y} +then : + enableval=$enable_plugin_haier; +else $as_nop + enable_plugin_haier=$enable_all_plugins +fi + +if test "x$enable_plugin_haier" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_HAIER 1" >>confdefs.h + +fi + if test "x$enable_plugin_haier" = "xyes"; then + ENABLE_PLUGIN_HAIER_TRUE= + ENABLE_PLUGIN_HAIER_FALSE='#' +else + ENABLE_PLUGIN_HAIER_TRUE='#' + ENABLE_PLUGIN_HAIER_FALSE= +fi + + + +# Check whether --enable-plugin-huawei was given. +if test ${enable_plugin_huawei+y} +then : + enableval=$enable_plugin_huawei; +else $as_nop + enable_plugin_huawei=$enable_all_plugins +fi + +if test "x$enable_plugin_huawei" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_HUAWEI 1" >>confdefs.h + +fi + if test "x$enable_plugin_huawei" = "xyes"; then + ENABLE_PLUGIN_HUAWEI_TRUE= + ENABLE_PLUGIN_HUAWEI_FALSE='#' +else + ENABLE_PLUGIN_HUAWEI_TRUE='#' + ENABLE_PLUGIN_HUAWEI_FALSE= +fi + + + +# Check whether --enable-plugin-iridium was given. +if test ${enable_plugin_iridium+y} +then : + enableval=$enable_plugin_iridium; +else $as_nop + enable_plugin_iridium=$enable_all_plugins +fi + +if test "x$enable_plugin_iridium" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_IRIDIUM 1" >>confdefs.h + +fi + if test "x$enable_plugin_iridium" = "xyes"; then + ENABLE_PLUGIN_IRIDIUM_TRUE= + ENABLE_PLUGIN_IRIDIUM_FALSE='#' +else + ENABLE_PLUGIN_IRIDIUM_TRUE='#' + ENABLE_PLUGIN_IRIDIUM_FALSE= +fi + + + +# Check whether --enable-plugin-linktop was given. +if test ${enable_plugin_linktop+y} +then : + enableval=$enable_plugin_linktop; +else $as_nop + enable_plugin_linktop=$enable_all_plugins +fi + +if test "x$enable_plugin_linktop" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_LINKTOP 1" >>confdefs.h + +fi + if test "x$enable_plugin_linktop" = "xyes"; then + ENABLE_PLUGIN_LINKTOP_TRUE= + ENABLE_PLUGIN_LINKTOP_FALSE='#' +else + ENABLE_PLUGIN_LINKTOP_TRUE='#' + ENABLE_PLUGIN_LINKTOP_FALSE= +fi + + + +# Check whether --enable-plugin-longcheer was given. +if test ${enable_plugin_longcheer+y} +then : + enableval=$enable_plugin_longcheer; +else $as_nop + enable_plugin_longcheer=$enable_all_plugins +fi + +if test "x$enable_plugin_longcheer" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_LONGCHEER 1" >>confdefs.h + +fi + if test "x$enable_plugin_longcheer" = "xyes"; then + ENABLE_PLUGIN_LONGCHEER_TRUE= + ENABLE_PLUGIN_LONGCHEER_FALSE='#' +else + ENABLE_PLUGIN_LONGCHEER_TRUE='#' + ENABLE_PLUGIN_LONGCHEER_FALSE= +fi + + + +# Check whether --enable-plugin-mbm was given. +if test ${enable_plugin_mbm+y} +then : + enableval=$enable_plugin_mbm; +else $as_nop + enable_plugin_mbm=$enable_all_plugins +fi + +if test "x$enable_plugin_mbm" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_MBM 1" >>confdefs.h + +fi + if test "x$enable_plugin_mbm" = "xyes"; then + ENABLE_PLUGIN_MBM_TRUE= + ENABLE_PLUGIN_MBM_FALSE='#' +else + ENABLE_PLUGIN_MBM_TRUE='#' + ENABLE_PLUGIN_MBM_FALSE= +fi + + + +# Check whether --enable-plugin-motorola was given. +if test ${enable_plugin_motorola+y} +then : + enableval=$enable_plugin_motorola; +else $as_nop + enable_plugin_motorola=$enable_all_plugins +fi + +if test "x$enable_plugin_motorola" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_MOTOROLA 1" >>confdefs.h + +fi + if test "x$enable_plugin_motorola" = "xyes"; then + ENABLE_PLUGIN_MOTOROLA_TRUE= + ENABLE_PLUGIN_MOTOROLA_FALSE='#' +else + ENABLE_PLUGIN_MOTOROLA_TRUE='#' + ENABLE_PLUGIN_MOTOROLA_FALSE= +fi + + + +# Check whether --enable-plugin-mtk was given. +if test ${enable_plugin_mtk+y} +then : + enableval=$enable_plugin_mtk; +else $as_nop + enable_plugin_mtk=$enable_all_plugins +fi + +if test "x$enable_plugin_mtk" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_MTK 1" >>confdefs.h + +fi + if test "x$enable_plugin_mtk" = "xyes"; then + ENABLE_PLUGIN_MTK_TRUE= + ENABLE_PLUGIN_MTK_FALSE='#' +else + ENABLE_PLUGIN_MTK_TRUE='#' + ENABLE_PLUGIN_MTK_FALSE= +fi + + + +# Check whether --enable-plugin-nokia was given. +if test ${enable_plugin_nokia+y} +then : + enableval=$enable_plugin_nokia; +else $as_nop + enable_plugin_nokia=$enable_all_plugins +fi + +if test "x$enable_plugin_nokia" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_NOKIA 1" >>confdefs.h + +fi + if test "x$enable_plugin_nokia" = "xyes"; then + ENABLE_PLUGIN_NOKIA_TRUE= + ENABLE_PLUGIN_NOKIA_FALSE='#' +else + ENABLE_PLUGIN_NOKIA_TRUE='#' + ENABLE_PLUGIN_NOKIA_FALSE= +fi + + + +# Check whether --enable-plugin-nokia-icera was given. +if test ${enable_plugin_nokia_icera+y} +then : + enableval=$enable_plugin_nokia_icera; +else $as_nop + enable_plugin_nokia_icera=$enable_all_plugins +fi + +if test "x$enable_plugin_nokia_icera" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_NOKIA_ICERA 1" >>confdefs.h + + with_shared_icera="yes" +fi + if test "x$enable_plugin_nokia_icera" = "xyes"; then + ENABLE_PLUGIN_NOKIA_ICERA_TRUE= + ENABLE_PLUGIN_NOKIA_ICERA_FALSE='#' +else + ENABLE_PLUGIN_NOKIA_ICERA_TRUE='#' + ENABLE_PLUGIN_NOKIA_ICERA_FALSE= +fi + + + +# Check whether --enable-plugin-novatel was given. +if test ${enable_plugin_novatel+y} +then : + enableval=$enable_plugin_novatel; +else $as_nop + enable_plugin_novatel=$enable_all_plugins +fi + +if test "x$enable_plugin_novatel" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_NOVATEL 1" >>confdefs.h + + with_shared_novatel="yes" +fi + if test "x$enable_plugin_novatel" = "xyes"; then + ENABLE_PLUGIN_NOVATEL_TRUE= + ENABLE_PLUGIN_NOVATEL_FALSE='#' +else + ENABLE_PLUGIN_NOVATEL_TRUE='#' + ENABLE_PLUGIN_NOVATEL_FALSE= +fi + + + +# Check whether --enable-plugin-novatel-lte was given. +if test ${enable_plugin_novatel_lte+y} +then : + enableval=$enable_plugin_novatel_lte; +else $as_nop + enable_plugin_novatel_lte=$enable_all_plugins +fi + +if test "x$enable_plugin_novatel_lte" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_NOVATEL_LTE 1" >>confdefs.h + +fi + if test "x$enable_plugin_novatel_lte" = "xyes"; then + ENABLE_PLUGIN_NOVATEL_LTE_TRUE= + ENABLE_PLUGIN_NOVATEL_LTE_FALSE='#' +else + ENABLE_PLUGIN_NOVATEL_LTE_TRUE='#' + ENABLE_PLUGIN_NOVATEL_LTE_FALSE= +fi + + + +# Check whether --enable-plugin-option was given. +if test ${enable_plugin_option+y} +then : + enableval=$enable_plugin_option; +else $as_nop + enable_plugin_option=$enable_all_plugins +fi + +if test "x$enable_plugin_option" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_OPTION 1" >>confdefs.h + + with_shared_option="yes" +fi + if test "x$enable_plugin_option" = "xyes"; then + ENABLE_PLUGIN_OPTION_TRUE= + ENABLE_PLUGIN_OPTION_FALSE='#' +else + ENABLE_PLUGIN_OPTION_TRUE='#' + ENABLE_PLUGIN_OPTION_FALSE= +fi + + + +# Check whether --enable-plugin-option-hso was given. +if test ${enable_plugin_option_hso+y} +then : + enableval=$enable_plugin_option_hso; +else $as_nop + enable_plugin_option_hso=$enable_all_plugins +fi + +if test "x$enable_plugin_option_hso" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_OPTION_HSO 1" >>confdefs.h + + with_shared_option="yes" +fi + if test "x$enable_plugin_option_hso" = "xyes"; then + ENABLE_PLUGIN_OPTION_HSO_TRUE= + ENABLE_PLUGIN_OPTION_HSO_FALSE='#' +else + ENABLE_PLUGIN_OPTION_HSO_TRUE='#' + ENABLE_PLUGIN_OPTION_HSO_FALSE= +fi + + + +# Check whether --enable-plugin-pantech was given. +if test ${enable_plugin_pantech+y} +then : + enableval=$enable_plugin_pantech; +else $as_nop + enable_plugin_pantech=$enable_all_plugins +fi + +if test "x$enable_plugin_pantech" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_PANTECH 1" >>confdefs.h + +fi + if test "x$enable_plugin_pantech" = "xyes"; then + ENABLE_PLUGIN_PANTECH_TRUE= + ENABLE_PLUGIN_PANTECH_FALSE='#' +else + ENABLE_PLUGIN_PANTECH_TRUE='#' + ENABLE_PLUGIN_PANTECH_FALSE= +fi + + + +# Check whether --enable-plugin-qcom-soc was given. +if test ${enable_plugin_qcom_soc+y} +then : + enableval=$enable_plugin_qcom_soc; +else $as_nop + enable_plugin_qcom_soc="no" +fi + +if test "x$enable_plugin_qcom_soc" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_QCOM_SOC 1" >>confdefs.h + +fi + if test "x$enable_plugin_qcom_soc" = "xyes"; then + ENABLE_PLUGIN_QCOM_SOC_TRUE= + ENABLE_PLUGIN_QCOM_SOC_FALSE='#' +else + ENABLE_PLUGIN_QCOM_SOC_TRUE='#' + ENABLE_PLUGIN_QCOM_SOC_FALSE= +fi + + + +# Check whether --enable-plugin-quectel was given. +if test ${enable_plugin_quectel+y} +then : + enableval=$enable_plugin_quectel; +else $as_nop + enable_plugin_quectel=$enable_all_plugins +fi + +if test "x$enable_plugin_quectel" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_QUECTEL 1" >>confdefs.h + +fi + if test "x$enable_plugin_quectel" = "xyes"; then + ENABLE_PLUGIN_QUECTEL_TRUE= + ENABLE_PLUGIN_QUECTEL_FALSE='#' +else + ENABLE_PLUGIN_QUECTEL_TRUE='#' + ENABLE_PLUGIN_QUECTEL_FALSE= +fi + + + +# Check whether --enable-plugin-samsung was given. +if test ${enable_plugin_samsung+y} +then : + enableval=$enable_plugin_samsung; +else $as_nop + enable_plugin_samsung=$enable_all_plugins +fi + +if test "x$enable_plugin_samsung" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_SAMSUNG 1" >>confdefs.h + + with_shared_icera="yes" +fi + if test "x$enable_plugin_samsung" = "xyes"; then + ENABLE_PLUGIN_SAMSUNG_TRUE= + ENABLE_PLUGIN_SAMSUNG_FALSE='#' +else + ENABLE_PLUGIN_SAMSUNG_TRUE='#' + ENABLE_PLUGIN_SAMSUNG_FALSE= +fi + + + +# Check whether --enable-plugin-sierra-legacy was given. +if test ${enable_plugin_sierra_legacy+y} +then : + enableval=$enable_plugin_sierra_legacy; +else $as_nop + enable_plugin_sierra_legacy=$enable_all_plugins +fi + +if test "x$enable_plugin_sierra_legacy" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_SIERRA_LEGACY 1" >>confdefs.h + + with_shared_icera="yes" + with_shared_sierra="yes" +fi + if test "x$enable_plugin_sierra_legacy" = "xyes"; then + ENABLE_PLUGIN_SIERRA_LEGACY_TRUE= + ENABLE_PLUGIN_SIERRA_LEGACY_FALSE='#' +else + ENABLE_PLUGIN_SIERRA_LEGACY_TRUE='#' + ENABLE_PLUGIN_SIERRA_LEGACY_FALSE= +fi + + + +# Check whether --enable-plugin-sierra was given. +if test ${enable_plugin_sierra+y} +then : + enableval=$enable_plugin_sierra; +else $as_nop + enable_plugin_sierra=$enable_all_plugins +fi + +if test "x$enable_plugin_sierra" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_SIERRA 1" >>confdefs.h + + with_shared_xmm="yes" +fi + if test "x$enable_plugin_sierra" = "xyes"; then + ENABLE_PLUGIN_SIERRA_TRUE= + ENABLE_PLUGIN_SIERRA_FALSE='#' +else + ENABLE_PLUGIN_SIERRA_TRUE='#' + ENABLE_PLUGIN_SIERRA_FALSE= +fi + + + +# Check whether --enable-plugin-simtech was given. +if test ${enable_plugin_simtech+y} +then : + enableval=$enable_plugin_simtech; +else $as_nop + enable_plugin_simtech=$enable_all_plugins +fi + +if test "x$enable_plugin_simtech" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_SIMTECH 1" >>confdefs.h + +fi + if test "x$enable_plugin_simtech" = "xyes"; then + ENABLE_PLUGIN_SIMTECH_TRUE= + ENABLE_PLUGIN_SIMTECH_FALSE='#' +else + ENABLE_PLUGIN_SIMTECH_TRUE='#' + ENABLE_PLUGIN_SIMTECH_FALSE= +fi + + + +# Check whether --enable-plugin-telit was given. +if test ${enable_plugin_telit+y} +then : + enableval=$enable_plugin_telit; +else $as_nop + enable_plugin_telit=$enable_all_plugins +fi + +if test "x$enable_plugin_telit" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_TELIT 1" >>confdefs.h + + with_shared_telit="yes" +fi + if test "x$enable_plugin_telit" = "xyes"; then + ENABLE_PLUGIN_TELIT_TRUE= + ENABLE_PLUGIN_TELIT_FALSE='#' +else + ENABLE_PLUGIN_TELIT_TRUE='#' + ENABLE_PLUGIN_TELIT_FALSE= +fi + + + +# Check whether --enable-plugin-thuraya was given. +if test ${enable_plugin_thuraya+y} +then : + enableval=$enable_plugin_thuraya; +else $as_nop + enable_plugin_thuraya=$enable_all_plugins +fi + +if test "x$enable_plugin_thuraya" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_THURAYA 1" >>confdefs.h + +fi + if test "x$enable_plugin_thuraya" = "xyes"; then + ENABLE_PLUGIN_THURAYA_TRUE= + ENABLE_PLUGIN_THURAYA_FALSE='#' +else + ENABLE_PLUGIN_THURAYA_TRUE='#' + ENABLE_PLUGIN_THURAYA_FALSE= +fi + + + +# Check whether --enable-plugin-tplink was given. +if test ${enable_plugin_tplink+y} +then : + enableval=$enable_plugin_tplink; +else $as_nop + enable_plugin_tplink=$enable_all_plugins +fi + +if test "x$enable_plugin_tplink" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_TPLINK 1" >>confdefs.h + +fi + if test "x$enable_plugin_tplink" = "xyes"; then + ENABLE_PLUGIN_TPLINK_TRUE= + ENABLE_PLUGIN_TPLINK_FALSE='#' +else + ENABLE_PLUGIN_TPLINK_TRUE='#' + ENABLE_PLUGIN_TPLINK_FALSE= +fi + + + +# Check whether --enable-plugin-ublox was given. +if test ${enable_plugin_ublox+y} +then : + enableval=$enable_plugin_ublox; +else $as_nop + enable_plugin_ublox=$enable_all_plugins +fi + +if test "x$enable_plugin_ublox" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_UBLOX 1" >>confdefs.h + +fi + if test "x$enable_plugin_ublox" = "xyes"; then + ENABLE_PLUGIN_UBLOX_TRUE= + ENABLE_PLUGIN_UBLOX_FALSE='#' +else + ENABLE_PLUGIN_UBLOX_TRUE='#' + ENABLE_PLUGIN_UBLOX_FALSE= +fi + + + +# Check whether --enable-plugin-via was given. +if test ${enable_plugin_via+y} +then : + enableval=$enable_plugin_via; +else $as_nop + enable_plugin_via=$enable_all_plugins +fi + +if test "x$enable_plugin_via" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_VIA 1" >>confdefs.h + +fi + if test "x$enable_plugin_via" = "xyes"; then + ENABLE_PLUGIN_VIA_TRUE= + ENABLE_PLUGIN_VIA_FALSE='#' +else + ENABLE_PLUGIN_VIA_TRUE='#' + ENABLE_PLUGIN_VIA_FALSE= +fi + + + +# Check whether --enable-plugin-wavecom was given. +if test ${enable_plugin_wavecom+y} +then : + enableval=$enable_plugin_wavecom; +else $as_nop + enable_plugin_wavecom=$enable_all_plugins +fi + +if test "x$enable_plugin_wavecom" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_WAVECOM 1" >>confdefs.h + +fi + if test "x$enable_plugin_wavecom" = "xyes"; then + ENABLE_PLUGIN_WAVECOM_TRUE= + ENABLE_PLUGIN_WAVECOM_FALSE='#' +else + ENABLE_PLUGIN_WAVECOM_TRUE='#' + ENABLE_PLUGIN_WAVECOM_FALSE= +fi + + + +# Check whether --enable-plugin-x22x was given. +if test ${enable_plugin_x22x+y} +then : + enableval=$enable_plugin_x22x; +else $as_nop + enable_plugin_x22x=$enable_all_plugins +fi + +if test "x$enable_plugin_x22x" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_X22X 1" >>confdefs.h + +fi + if test "x$enable_plugin_x22x" = "xyes"; then + ENABLE_PLUGIN_X22X_TRUE= + ENABLE_PLUGIN_X22X_FALSE='#' +else + ENABLE_PLUGIN_X22X_TRUE='#' + ENABLE_PLUGIN_X22X_FALSE= +fi + + + +# Check whether --enable-plugin-zte was given. +if test ${enable_plugin_zte+y} +then : + enableval=$enable_plugin_zte; +else $as_nop + enable_plugin_zte=$enable_all_plugins +fi + +if test "x$enable_plugin_zte" = "xyes"; then + +printf "%s\n" "#define ENABLE_PLUGIN_ZTE 1" >>confdefs.h + + with_shared_icera="yes" +fi + if test "x$enable_plugin_zte" = "xyes"; then + ENABLE_PLUGIN_ZTE_TRUE= + ENABLE_PLUGIN_ZTE_FALSE='#' +else + ENABLE_PLUGIN_ZTE_TRUE='#' + ENABLE_PLUGIN_ZTE_FALSE= +fi + + + + + if test "x$with_shared_icera" = "xyes"; then + WITH_SHARED_ICERA_TRUE= + WITH_SHARED_ICERA_FALSE='#' +else + WITH_SHARED_ICERA_TRUE='#' + WITH_SHARED_ICERA_FALSE= +fi + +if test "x$with_shared_icera" = "xyes"; then + +printf "%s\n" "#define WITH_SHARED_ICERA 1" >>confdefs.h + +else + with_shared_icera="no" +fi + + if test "x$with_shared_sierra" = "xyes"; then + WITH_SHARED_SIERRA_TRUE= + WITH_SHARED_SIERRA_FALSE='#' +else + WITH_SHARED_SIERRA_TRUE='#' + WITH_SHARED_SIERRA_FALSE= +fi + +if test "x$with_shared_sierra" = "xyes"; then + +printf "%s\n" "#define WITH_SHARED_SIERRA 1" >>confdefs.h + +else + with_shared_sierra="no" +fi + + if test "x$with_shared_option" = "xyes"; then + WITH_SHARED_OPTION_TRUE= + WITH_SHARED_OPTION_FALSE='#' +else + WITH_SHARED_OPTION_TRUE='#' + WITH_SHARED_OPTION_FALSE= +fi + +if test "x$with_shared_option" = "xyes"; then + +printf "%s\n" "#define WITH_SHARED_OPTION 1" >>confdefs.h + +else + with_shared_option="no" +fi + + if test "x$with_shared_novatel" = "xyes"; then + WITH_SHARED_NOVATEL_TRUE= + WITH_SHARED_NOVATEL_FALSE='#' +else + WITH_SHARED_NOVATEL_TRUE='#' + WITH_SHARED_NOVATEL_FALSE= +fi + +if test "x$with_shared_novatel" = "xyes"; then + +printf "%s\n" "#define WITH_SHARED_NOVATEL 1" >>confdefs.h + +else + with_shared_novatel="no" +fi + + if test "x$with_shared_xmm" = "xyes"; then + WITH_SHARED_XMM_TRUE= + WITH_SHARED_XMM_FALSE='#' +else + WITH_SHARED_XMM_TRUE='#' + WITH_SHARED_XMM_FALSE= +fi + +if test "x$with_shared_xmm" = "xyes"; then + +printf "%s\n" "#define WITH_SHARED_XMM 1" >>confdefs.h + +else + with_shared_xmm="no" +fi + + if test "x$with_shared_telit" = "xyes"; then + WITH_SHARED_TELIT_TRUE= + WITH_SHARED_TELIT_FALSE='#' +else + WITH_SHARED_TELIT_TRUE='#' + WITH_SHARED_TELIT_FALSE= +fi + +if test "x$with_shared_telit" = "xyes"; then + +printf "%s\n" "#define WITH_SHARED_TELIT 1" >>confdefs.h + +else + with_shared_telit="no" +fi + + if test "x$with_shared_foxconn" = "xyes"; then + WITH_SHARED_FOXCONN_TRUE= + WITH_SHARED_FOXCONN_FALSE='#' +else + WITH_SHARED_FOXCONN_TRUE='#' + WITH_SHARED_FOXCONN_FALSE= +fi + +if test "x$with_shared_foxconn" = "xyes"; then + +printf "%s\n" "#define WITH_SHARED_FOXCONN 1" >>confdefs.h + +else + with_shared_foxconn="no" +fi + + + +ac_config_files="$ac_config_files Makefile data/Makefile data/ModemManager.pc data/mm-glib.pc data/tests/Makefile data/tests/org.freedesktop.ModemManager1.service include/Makefile include/ModemManager-version.h build-aux/Makefile libqcdm/Makefile libqcdm/src/Makefile libqcdm/tests/Makefile src/Makefile src/tests/Makefile plugins/Makefile test/Makefile tools/Makefile tools/tests/Makefile tools/tests/services/org.freedesktop.ModemManager1.service introspection/Makefile introspection/tests/Makefile po/Makefile.in docs/Makefile docs/man/Makefile docs/reference/Makefile docs/reference/api/Makefile docs/reference/api/version.xml docs/reference/libmm-glib/Makefile docs/reference/libmm-glib/version.xml libmm-glib/Makefile libmm-glib/generated/Makefile libmm-glib/generated/tests/Makefile libmm-glib/tests/Makefile vapi/Makefile cli/Makefile examples/Makefile examples/modem-watcher-python/Makefile examples/modem-watcher-javascript/Makefile examples/sms-python/Makefile examples/network-scan-python/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -17761,8 +22500,8 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -17792,15 +22531,15 @@ /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -17814,8 +22553,8 @@ fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -17832,7 +22571,7 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -17843,14 +22582,14 @@ LTLIBOBJS=$ac_ltlibobjs -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -$as_echo_n "checking that generated files are newer than configure... " >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +printf %s "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 -$as_echo "done" >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 +printf "%s\n" "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -17943,13 +22682,197 @@ as_fn_error $? "conditional \"QCDM_STANDALONE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_PLUGIN_GENERIC_TRUE}" && test -z "${ENABLE_PLUGIN_GENERIC_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_GENERIC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_ALTAIR_LTE_TRUE}" && test -z "${ENABLE_PLUGIN_ALTAIR_LTE_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_ALTAIR_LTE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_ANYDATA_TRUE}" && test -z "${ENABLE_PLUGIN_ANYDATA_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_ANYDATA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_BROADMOBI_TRUE}" && test -z "${ENABLE_PLUGIN_BROADMOBI_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_BROADMOBI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_CINTERION_TRUE}" && test -z "${ENABLE_PLUGIN_CINTERION_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_CINTERION\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_DELL_TRUE}" && test -z "${ENABLE_PLUGIN_DELL_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_DELL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_DLINK_TRUE}" && test -z "${ENABLE_PLUGIN_DLINK_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_DLINK\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_FIBOCOM_TRUE}" && test -z "${ENABLE_PLUGIN_FIBOCOM_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_FIBOCOM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_FOXCONN_TRUE}" && test -z "${ENABLE_PLUGIN_FOXCONN_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_FOXCONN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_GOSUNCN_TRUE}" && test -z "${ENABLE_PLUGIN_GOSUNCN_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_GOSUNCN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_HAIER_TRUE}" && test -z "${ENABLE_PLUGIN_HAIER_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_HAIER\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_HUAWEI_TRUE}" && test -z "${ENABLE_PLUGIN_HUAWEI_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_HUAWEI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_IRIDIUM_TRUE}" && test -z "${ENABLE_PLUGIN_IRIDIUM_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_IRIDIUM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_LINKTOP_TRUE}" && test -z "${ENABLE_PLUGIN_LINKTOP_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_LINKTOP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_LONGCHEER_TRUE}" && test -z "${ENABLE_PLUGIN_LONGCHEER_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_LONGCHEER\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_MBM_TRUE}" && test -z "${ENABLE_PLUGIN_MBM_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_MBM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_MOTOROLA_TRUE}" && test -z "${ENABLE_PLUGIN_MOTOROLA_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_MOTOROLA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_MTK_TRUE}" && test -z "${ENABLE_PLUGIN_MTK_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_MTK\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_NOKIA_TRUE}" && test -z "${ENABLE_PLUGIN_NOKIA_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_NOKIA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_NOKIA_ICERA_TRUE}" && test -z "${ENABLE_PLUGIN_NOKIA_ICERA_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_NOKIA_ICERA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_NOVATEL_TRUE}" && test -z "${ENABLE_PLUGIN_NOVATEL_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_NOVATEL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_NOVATEL_LTE_TRUE}" && test -z "${ENABLE_PLUGIN_NOVATEL_LTE_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_NOVATEL_LTE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_OPTION_TRUE}" && test -z "${ENABLE_PLUGIN_OPTION_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_OPTION\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_OPTION_HSO_TRUE}" && test -z "${ENABLE_PLUGIN_OPTION_HSO_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_OPTION_HSO\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_PANTECH_TRUE}" && test -z "${ENABLE_PLUGIN_PANTECH_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_PANTECH\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_QCOM_SOC_TRUE}" && test -z "${ENABLE_PLUGIN_QCOM_SOC_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_QCOM_SOC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_QUECTEL_TRUE}" && test -z "${ENABLE_PLUGIN_QUECTEL_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_QUECTEL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_SAMSUNG_TRUE}" && test -z "${ENABLE_PLUGIN_SAMSUNG_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_SAMSUNG\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_SIERRA_LEGACY_TRUE}" && test -z "${ENABLE_PLUGIN_SIERRA_LEGACY_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_SIERRA_LEGACY\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_SIERRA_TRUE}" && test -z "${ENABLE_PLUGIN_SIERRA_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_SIERRA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_SIMTECH_TRUE}" && test -z "${ENABLE_PLUGIN_SIMTECH_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_SIMTECH\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_TELIT_TRUE}" && test -z "${ENABLE_PLUGIN_TELIT_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_TELIT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_THURAYA_TRUE}" && test -z "${ENABLE_PLUGIN_THURAYA_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_THURAYA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_TPLINK_TRUE}" && test -z "${ENABLE_PLUGIN_TPLINK_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_TPLINK\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_UBLOX_TRUE}" && test -z "${ENABLE_PLUGIN_UBLOX_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_UBLOX\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_VIA_TRUE}" && test -z "${ENABLE_PLUGIN_VIA_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_VIA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_WAVECOM_TRUE}" && test -z "${ENABLE_PLUGIN_WAVECOM_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_WAVECOM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_X22X_TRUE}" && test -z "${ENABLE_PLUGIN_X22X_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_X22X\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${ENABLE_PLUGIN_ZTE_TRUE}" && test -z "${ENABLE_PLUGIN_ZTE_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_PLUGIN_ZTE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_SHARED_ICERA_TRUE}" && test -z "${WITH_SHARED_ICERA_FALSE}"; then + as_fn_error $? "conditional \"WITH_SHARED_ICERA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_SHARED_SIERRA_TRUE}" && test -z "${WITH_SHARED_SIERRA_FALSE}"; then + as_fn_error $? "conditional \"WITH_SHARED_SIERRA\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_SHARED_OPTION_TRUE}" && test -z "${WITH_SHARED_OPTION_FALSE}"; then + as_fn_error $? "conditional \"WITH_SHARED_OPTION\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_SHARED_NOVATEL_TRUE}" && test -z "${WITH_SHARED_NOVATEL_FALSE}"; then + as_fn_error $? "conditional \"WITH_SHARED_NOVATEL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_SHARED_XMM_TRUE}" && test -z "${WITH_SHARED_XMM_FALSE}"; then + as_fn_error $? "conditional \"WITH_SHARED_XMM\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_SHARED_TELIT_TRUE}" && test -z "${WITH_SHARED_TELIT_FALSE}"; then + as_fn_error $? "conditional \"WITH_SHARED_TELIT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WITH_SHARED_FOXCONN_TRUE}" && test -z "${WITH_SHARED_FOXCONN_FALSE}"; then + as_fn_error $? "conditional \"WITH_SHARED_FOXCONN\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -17972,14 +22895,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -17989,46 +22914,46 @@ fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -18037,13 +22962,6 @@ fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -18052,8 +22970,12 @@ for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -18065,30 +22987,10 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -18101,13 +23003,14 @@ as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -18134,18 +23037,20 @@ { eval $1=; unset $1;} } as_unset=as_fn_unset + # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -18157,12 +23062,13 @@ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -18193,7 +23099,7 @@ $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -18215,6 +23121,10 @@ as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -18228,6 +23138,12 @@ ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -18269,7 +23185,7 @@ as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -18278,7 +23194,7 @@ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -18340,8 +23256,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ModemManager $as_me 1.12.8, which was -generated by GNU Autoconf 2.69. Invocation command line was +This file was extended by ModemManager $as_me 1.16.6, which was +generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -18400,17 +23316,19 @@ Configuration commands: $config_commands -Report bugs to ." +Report bugs to ." _ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -ModemManager config.status 1.12.8 -configured by $0, generated by GNU Autoconf 2.69, +ModemManager config.status 1.16.6 +configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -18450,15 +23368,15 @@ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; + printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; + printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -18466,7 +23384,7 @@ --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -18475,7 +23393,7 @@ as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -18503,7 +23421,7 @@ if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -18517,7 +23435,7 @@ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + printf "%s\n" "$ac_log" } >&5 _ACEOF @@ -18845,6 +23763,9 @@ "src/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/tests/Makefile" ;; "plugins/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/Makefile" ;; "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; + "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; + "tools/tests/Makefile") CONFIG_FILES="$CONFIG_FILES tools/tests/Makefile" ;; + "tools/tests/services/org.freedesktop.ModemManager1.service") CONFIG_FILES="$CONFIG_FILES tools/tests/services/org.freedesktop.ModemManager1.service" ;; "introspection/Makefile") CONFIG_FILES="$CONFIG_FILES introspection/Makefile" ;; "introspection/tests/Makefile") CONFIG_FILES="$CONFIG_FILES introspection/tests/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; @@ -18877,9 +23798,9 @@ # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands + test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files + test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers + test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree @@ -19215,7 +24136,7 @@ esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -19223,17 +24144,17 @@ # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | + ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -19250,7 +24171,7 @@ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -19274,9 +24195,9 @@ case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -19338,8 +24259,8 @@ case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -19383,9 +24304,9 @@ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -19401,20 +24322,20 @@ # if test x"$ac_file" != x-; then { - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - $as_echo "/* $configure_input */" \ + printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -19434,7 +24355,7 @@ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | +printf "%s\n" X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -19454,8 +24375,8 @@ s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} + :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -19481,7 +24402,7 @@ for am_mf do # Strip MF so we end up with the name of the file. - am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` + am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line @@ -19493,7 +24414,7 @@ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$am_mf" | +printf "%s\n" X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -19515,7 +24436,7 @@ $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$am_mf" | +printf "%s\n" X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -19540,10 +24461,12 @@ (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } @@ -20085,6 +25008,7 @@ esac + ltmain=$ac_aux_dir/ltmain.sh @@ -20248,8 +25172,8 @@ $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi @@ -20261,7 +25185,10 @@ compiler: ${CC} cflags: ${CFLAGS} ldflags: ${LDFLAGS} + warn cflags: ${WARN_CFLAGS} + warn ldflags: ${WARN_LDFLAGS} maintainer mode: ${USE_MAINTAINER_MODE} + release: ${ax_is_release} System paths: prefix: ${prefix} @@ -20278,6 +25205,56 @@ systemd journal: ${with_systemd_journal} at command via dbus: ${with_at_command_via_dbus} + Shared utils: + icera: ${with_shared_icera} + sierra: ${with_shared_sierra} + option: ${with_shared_option} + novatel: ${with_shared_novatel} + xmm: ${with_shared_xmm} + telit: ${with_shared_telit} + foxconn: ${with_shared_foxconn} + + Plugins: + generic: ${enable_plugin_generic} + altair lte: ${enable_plugin_altair_lte} + anydata: ${enable_plugin_anydata} + broadmobi: ${enable_plugin_broadmobi} + cinterion: ${enable_plugin_cinterion} + dell: ${enable_plugin_dell} + dlink: ${enable_plugin_dlink} + fibocom: ${enable_plugin_fibocom} + foxconn: ${enable_plugin_foxconn} + gosuncn: ${enable_plugin_gosuncn} + haier: ${enable_plugin_haier} + huawei: ${enable_plugin_huawei} + iridium: ${enable_plugin_iridium} + linktop: ${enable_plugin_linktop} + longcheer: ${enable_plugin_longcheer} + mbm: ${enable_plugin_mbm} + motorola: ${enable_plugin_motorola} + mtk: ${enable_plugin_mtk} + nokia: ${enable_plugin_nokia} + nokia icera: ${enable_plugin_nokia_icera} + novatel: ${enable_plugin_novatel} + novatel lte: ${enable_plugin_novatel_lte} + option: ${enable_plugin_option} + option hso: ${enable_plugin_option_hso} + pantech: ${enable_plugin_pantech} + qcom-soc: ${enable_plugin_qcom_soc} + quectel: ${enable_plugin_quectel} + samsung: ${enable_plugin_samsung} + sierra legacy: ${enable_plugin_sierra_legacy} + sierra: ${enable_plugin_sierra} + simtech: ${enable_plugin_simtech} + telit: ${enable_plugin_telit} + thuraya: ${enable_plugin_thuraya} + tplink: ${enable_plugin_tplink} + ublox: ${enable_plugin_ublox} + via: ${enable_plugin_via} + wavecom: ${enable_plugin_wavecom} + x22x: ${enable_plugin_x22x} + zte: ${enable_plugin_zte} + Miscellaneous: gobject introspection: ${found_introspection} vala bindings: ${enable_vala} @@ -20288,3 +25265,4 @@ echo " code coverage ldflags: ${CODE_COVERAGE_LDFLAGS}" fi echo "" + diff -Nru modemmanager-1.12.8/configure.ac modemmanager-1.16.6/configure.ac --- modemmanager-1.12.8/configure.ac 2020-03-14 17:15:38.000000000 +0800 +++ modemmanager-1.16.6/configure.ac 2021-06-06 21:41:15.000000000 +0800 @@ -5,8 +5,8 @@ dnl m4_define([mm_major_version], [1]) -m4_define([mm_minor_version], [12]) -m4_define([mm_micro_version], [8]) +m4_define([mm_minor_version], [16]) +m4_define([mm_micro_version], [6]) m4_define([mm_version], [mm_major_version.mm_minor_version.mm_micro_version]) @@ -18,14 +18,17 @@ dnl with old code), increment a. dnl If the interface has changed in an incompatible way (that is, dnl functions have changed or been removed), then zero a. -m4_define([mm_glib_lt_current], [5]) +m4_define([mm_glib_lt_current], [7]) m4_define([mm_glib_lt_revision], [0]) -m4_define([mm_glib_lt_age], [5]) +m4_define([mm_glib_lt_age], [7]) dnl----------------------------------------------------------------------------- dnl autoconf, automake, libtool initialization dnl -AC_INIT([ModemManager],[mm_version],[modemmanager-devel@lists.freedesktop.org],[ModemManager]) +AC_INIT([ModemManager], + [mm_version], + [https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues], + [ModemManager]) AM_INIT_AUTOMAKE([1.11.2 subdir-objects tar-ustar no-dist-gzip dist-xz -Wno-portability]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -51,6 +54,33 @@ LT_INIT([disable-static]) dnl----------------------------------------------------------------------------- +dnl Compiler warnings +dnl + +dnl Make sure autoconf-archive is available +m4_pattern_forbid([^AX_(COMPILER_FLAGS|COMPILER_FLAGS_(CFLAGS|GIR|LDFLAGS))\b], + [Unexpanded AX_ macro found. Please install GNU autoconf-archive]) + +dnl Detect git or release builds +AX_IS_RELEASE([git-directory]) + +dnl Function type cast disabled: used throughout the code especially to +dnl cast GAsyncReadyCallbacks with the real object type instead of GObject +DISABLED_WARNINGS="${DISABLED_WARNINGS} -Wno-cast-function-type" + +dnl All message protocol structs are packed, never complain about it +DISABLED_WARNINGS="${DISABLED_WARNINGS} -Wno-packed" + +dnl Setup compiler checks +AX_COMPILER_FLAGS() +AX_COMPILER_FLAGS_CFLAGS(,,,[${DISABLED_WARNINGS}]) + +dnl Specify gnu89 mode +if test "$GCC" = "yes"; then + CFLAGS="$CFLAGS -std=gnu89" +fi + +dnl----------------------------------------------------------------------------- dnl Version definitions dnl @@ -93,8 +123,10 @@ dnl Build dependencies dnl -GLIB_MIN_VERSION=2.36.0 -GLIB_BUILD_SYMBOLS="-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_36 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_36 -DGLIB_DISABLE_DEPRECATION_WARNINGS" +# NOTE! If using glib < 2.55.1, make sure you have backported the following patch to avoid +# the daemon leaking a lot: https://gitlab.gnome.org/GNOME/glib/commit/37d9b0c6995f97ea0f744650aaf5179081f878ba +GLIB_MIN_VERSION=2.48.0 +GLIB_BUILD_SYMBOLS="-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_48 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_48 -DGLIB_DISABLE_DEPRECATION_WARNINGS" PKG_CHECK_MODULES(MM, glib-2.0 >= $GLIB_MIN_VERSION @@ -130,6 +162,12 @@ GDBUS_CODEGEN=`$PKG_CONFIG --variable=gdbus_codegen gio-2.0` AC_SUBST(GDBUS_CODEGEN) +dnl xsltproc required in git builds only +AC_CHECK_PROG(XSLTPROC_CHECK,xsltproc,yes) +if test "x$ax_is_release" != "xyes" -a "x$XSLTPROC_CHECK" != "xyes"; then + AC_MSG_ERROR([Please install xsltproc before configuring.]) +fi + dnl----------------------------------------------------------------------------- dnl Testing support dnl @@ -210,13 +248,14 @@ PKG_CHECK_MODULES(LIBSYSTEMD, [libsystemd >= 209],[have_libsystemd=yes],[have_libsystemd=no]) PKG_CHECK_MODULES(LIBSYSTEMD_LOGIN, [libsystemd-login >= 183],[have_libsystemd_login=yes],[have_libsystemd_login=no]) +PKG_CHECK_MODULES(LIBELOGIND, [libelogind >= 209], [have_elogind=yes], [have_elogind=no]) AC_ARG_WITH(systemd-suspend-resume, AS_HELP_STRING([--with-systemd-suspend-resume=no|yes], [Enable systemd suspend/resume support [[default=auto]]]),, [with_systemd_suspend_resume=auto]) if test "x$with_systemd_suspend_resume" = "xauto"; then - if test "x$have_libsystemd" = "xyes" || test "x$have_libsystemd_login" = "xyes"; then + if test "x$have_libsystemd" = "xyes" || test "x$have_libsystemd_login" = "xyes" || test "x$have_elogind" = "xyes"; then with_systemd_suspend_resume=yes else with_systemd_suspend_resume=no @@ -225,8 +264,8 @@ case $with_systemd_suspend_resume in yes) - if test "x$have_libsystemd" = "xno" && test "x$have_libsystemd_login" = "xno"; then - AC_MSG_ERROR(libsystemd or libsystemd-login development headers are required) + if test "x$have_libsystemd" = "xno" && test "x$have_libsystemd_login" = "xno" && test "x$have_elogind" = "xno"; then + AC_MSG_WARN(libsystemd, libsystemd-login or elogind must be available at runtime for suspend/resume support) fi AC_DEFINE(WITH_SYSTEMD_SUSPEND_RESUME, 1, [Define if you have systemd suspend-resume support]) ;; @@ -338,7 +377,7 @@ dnl MBIM support (enabled by default) dnl -LIBMBIM_VERSION=1.18.0 +LIBMBIM_VERSION=1.24.0 AC_ARG_WITH(mbim, AS_HELP_STRING([--without-mbim], [Build without MBIM support]), [], [with_mbim=yes]) AM_CONDITIONAL(WITH_MBIM, test "x$with_mbim" = "xyes") @@ -362,7 +401,7 @@ dnl QMI support (enabled by default) dnl -LIBQMI_VERSION=1.24.0 +LIBQMI_VERSION=1.28.6 AC_ARG_WITH(qmi, AS_HELP_STRING([--without-qmi], [Build without QMI support]), [], [with_qmi=yes]) AM_CONDITIONAL(WITH_QMI, test "x$with_qmi" = "xyes") @@ -382,8 +421,6 @@ ;; esac -NM_COMPILER_WARNINGS - dnl----------------------------------------------------------------------------- dnl Distribution version string dnl @@ -399,7 +436,92 @@ AM_CONDITIONAL(QCDM_STANDALONE, test "yes" = "no") dnl----------------------------------------------------------------------------- -dnl Protocol libs +dnl Plugins +dnl +dnl By default all plugins are built and installed. If the user wants to build only +dnl some specific plugins, this can be done by disabling all first and then enabling +dnl only the ones required, e.g.: +dnl $ ./configure \ +dnl --disable-all-plugins \ +dnl --enable-plugin-generic \ +dnl --enable-plugin-zte ... +dnl +dnl If the user wants all plugins except for some specific ones, those can be +dnl explicitly disabled, e.g.: +dnl $ ./configure \ +dnl --disable-plugin-generic \ +dnl --disable-plugin-zte ... +dnl + +MM_ENABLE_ALL_PLUGINS + +MM_ENABLE_PLUGIN([generic]) +MM_ENABLE_PLUGIN([altair-lte]) +MM_ENABLE_PLUGIN([anydata]) +MM_ENABLE_PLUGIN([broadmobi]) +MM_ENABLE_PLUGIN([cinterion]) +MM_ENABLE_PLUGIN([dell], + [with_shared_sierra, + with_shared_novatel, + with_shared_xmm, + with_shared_telit, + with_shared_foxconn]) +MM_ENABLE_PLUGIN([dlink]) +MM_ENABLE_PLUGIN([fibocom], + [with_shared_xmm]) +MM_ENABLE_PLUGIN([foxconn], + [with_shared_foxconn]) +MM_ENABLE_PLUGIN([gosuncn]) +MM_ENABLE_PLUGIN([haier]) +MM_ENABLE_PLUGIN([huawei]) +MM_ENABLE_PLUGIN([iridium]) +MM_ENABLE_PLUGIN([linktop]) +MM_ENABLE_PLUGIN([longcheer]) +MM_ENABLE_PLUGIN([mbm]) +MM_ENABLE_PLUGIN([motorola]) +MM_ENABLE_PLUGIN([mtk]) +MM_ENABLE_PLUGIN([nokia]) +MM_ENABLE_PLUGIN([nokia-icera], + [with_shared_icera]) +MM_ENABLE_PLUGIN([novatel], + [with_shared_novatel]) +MM_ENABLE_PLUGIN([novatel-lte]) +MM_ENABLE_PLUGIN([option], + [with_shared_option]) +MM_ENABLE_PLUGIN([option-hso], + [with_shared_option]) +MM_ENABLE_PLUGIN([pantech]) +MM_ENABLE_PLUGIN_DISABLED([qcom-soc]) +MM_ENABLE_PLUGIN([quectel]) +MM_ENABLE_PLUGIN([samsung], + [with_shared_icera]) +MM_ENABLE_PLUGIN([sierra-legacy], + [with_shared_icera, + with_shared_sierra]) +MM_ENABLE_PLUGIN([sierra], + [with_shared_xmm]) +MM_ENABLE_PLUGIN([simtech]) +MM_ENABLE_PLUGIN([telit], + [with_shared_telit]) +MM_ENABLE_PLUGIN([thuraya]) +MM_ENABLE_PLUGIN([tplink]) +MM_ENABLE_PLUGIN([ublox]) +MM_ENABLE_PLUGIN([via]) +MM_ENABLE_PLUGIN([wavecom]) +MM_ENABLE_PLUGIN([x22x]) +MM_ENABLE_PLUGIN([zte], + [with_shared_icera]) + +MM_BUILD_SHARED([icera]) +MM_BUILD_SHARED([sierra]) +MM_BUILD_SHARED([option]) +MM_BUILD_SHARED([novatel]) +MM_BUILD_SHARED([xmm]) +MM_BUILD_SHARED([telit]) +MM_BUILD_SHARED([foxconn]) + +dnl----------------------------------------------------------------------------- +dnl Output dnl AC_CONFIG_FILES([ @@ -419,6 +541,9 @@ src/tests/Makefile plugins/Makefile test/Makefile +tools/Makefile +tools/tests/Makefile +tools/tests/services/org.freedesktop.ModemManager1.service introspection/Makefile introspection/tests/Makefile po/Makefile.in @@ -451,7 +576,10 @@ compiler: ${CC} cflags: ${CFLAGS} ldflags: ${LDFLAGS} + warn cflags: ${WARN_CFLAGS} + warn ldflags: ${WARN_LDFLAGS} maintainer mode: ${USE_MAINTAINER_MODE} + release: ${ax_is_release} System paths: prefix: ${prefix} @@ -468,6 +596,56 @@ systemd journal: ${with_systemd_journal} at command via dbus: ${with_at_command_via_dbus} + Shared utils: + icera: ${with_shared_icera} + sierra: ${with_shared_sierra} + option: ${with_shared_option} + novatel: ${with_shared_novatel} + xmm: ${with_shared_xmm} + telit: ${with_shared_telit} + foxconn: ${with_shared_foxconn} + + Plugins: + generic: ${enable_plugin_generic} + altair lte: ${enable_plugin_altair_lte} + anydata: ${enable_plugin_anydata} + broadmobi: ${enable_plugin_broadmobi} + cinterion: ${enable_plugin_cinterion} + dell: ${enable_plugin_dell} + dlink: ${enable_plugin_dlink} + fibocom: ${enable_plugin_fibocom} + foxconn: ${enable_plugin_foxconn} + gosuncn: ${enable_plugin_gosuncn} + haier: ${enable_plugin_haier} + huawei: ${enable_plugin_huawei} + iridium: ${enable_plugin_iridium} + linktop: ${enable_plugin_linktop} + longcheer: ${enable_plugin_longcheer} + mbm: ${enable_plugin_mbm} + motorola: ${enable_plugin_motorola} + mtk: ${enable_plugin_mtk} + nokia: ${enable_plugin_nokia} + nokia icera: ${enable_plugin_nokia_icera} + novatel: ${enable_plugin_novatel} + novatel lte: ${enable_plugin_novatel_lte} + option: ${enable_plugin_option} + option hso: ${enable_plugin_option_hso} + pantech: ${enable_plugin_pantech} + qcom-soc: ${enable_plugin_qcom_soc} + quectel: ${enable_plugin_quectel} + samsung: ${enable_plugin_samsung} + sierra legacy: ${enable_plugin_sierra_legacy} + sierra: ${enable_plugin_sierra} + simtech: ${enable_plugin_simtech} + telit: ${enable_plugin_telit} + thuraya: ${enable_plugin_thuraya} + tplink: ${enable_plugin_tplink} + ublox: ${enable_plugin_ublox} + via: ${enable_plugin_via} + wavecom: ${enable_plugin_wavecom} + x22x: ${enable_plugin_x22x} + zte: ${enable_plugin_zte} + Miscellaneous: gobject introspection: ${found_introspection} vala bindings: ${enable_vala} diff -Nru modemmanager-1.12.8/data/Makefile.in modemmanager-1.16.6/data/Makefile.in --- modemmanager-1.12.8/data/Makefile.in 2020-03-14 17:16:02.000000000 +0800 +++ modemmanager-1.16.6/data/Makefile.in 2021-06-06 21:43:42.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -92,14 +92,14 @@ subdir = data ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -291,6 +291,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -364,9 +366,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -411,6 +417,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru modemmanager-1.12.8/data/org.freedesktop.ModemManager1.policy.in modemmanager-1.16.6/data/org.freedesktop.ModemManager1.policy.in --- modemmanager-1.12.8/data/org.freedesktop.ModemManager1.policy.in 2020-03-14 17:02:58.000000000 +0800 +++ modemmanager-1.16.6/data/org.freedesktop.ModemManager1.policy.in 2021-06-06 21:43:47.000000000 +0800 @@ -11,14 +11,17 @@ Modem Manager artalan uygulamasını denetle Kontrollera demonen för Modem Manager Ovládanie služby správcu modemov + Настроить сервис Modem Manager Controlar o daemon do ModemManager Sterowanie usługą ModemManager Valdyti modemo tvarkytuvės tarnybą Controlla il demone di «Modem Manager» - Kendalikan daemon Manajer Modem + Mengendalikan daemon Manajer Modem Modemkezelő démon vezérlése + שליטה בסוכן מנהל המודמים Controle il demoni di Modem Manager Contrôle le service Modem Manager + Hallitse Modem Manager taustaprosessia Den Modem-Manager-Daemon steuern Styr Modem Manager-dæmonen Ovládat démona pro správu modemů @@ -28,14 +31,17 @@ Sistem ilkesi Modem Manager'ı denetlemeyi engelliyor. En systempolicy förhindrar kontroll av Modem Manager. Politika systému zabraňuje ovládaniu správcu modemov. + Системная политика не позволяет управлять Modem Manager'ом. A política de sistema impede de controlar o ModemManager. Ustawienia systemu uniemożliwiają sterowanie usługą ModemManager. Sistemos politika neleidžia valdyti modemo tvarkytuvę. La politica di sistema impedisce il controllo di «Modem Manager» Kebijakan sistem mencegah pengendalian Manajer Modem. A rendszer házirendje nem teszi lehetővé a Modemkezelő vezérlését. + מדיניות מערכת מונעת שליטה במנהל המודמים. La politiche dal sisteme e impedìs il control di Modem Manager. La politique système empêche le contrôle de Modem Manager. + Järjestelmän sääntö estää Modem Managerin hallinta-asetusten muuttamisen. Die Systemrichtlinien verhindern die Steuerung von ModemManager. Systempolitikken forhindrer styring af Modem Manager. Systémová zásada brání v ovládání Správy modemů. @@ -51,14 +57,17 @@ Mobil geniş bant aygıtının kilidini aç ve denetle Lås upp och kontrollera en mobil bredbandsenhet Odomknutie a ovládanie mobilného širokopásmového zariadenia + Разблокировка и управление мобильным широкополосным устройством Desbloquear e controlar um dispositivo de banda larga móvel Odblokowanie i sterowanie urządzeniem komórkowym Atrakinti ir valdyti mobiliojo plačiajuosčio ryšio įrenginį Sblocca e controlla un dispositivo mobile a banda larga Buka kunci dan kendalikan suatu peranti data seluler Mobil széles sávú készülék feloldása és vezérlése + שחרור ושליטה במכשיר לרשת תקשורת סלולרית Sbloche e controle un dispositîf a bande largje mobile Déverrouiller et contrôler un périphérique mobile à large bande + Avaa ja hallitse mobiilia laajakaistalaitetta Ein mobiles Breitbandgerät entsperren und steuern Lås op for og styr en mobilt bredbånd-enhed Odemykat a ovládat mobilní širokopásmové zařízení @@ -68,14 +77,17 @@ Sistem ilkesi mobil geniş bant aygıtını denetlemeyi veya kilidini açmayı engelliyor. En systempolicy hindrar upplåsning eller kontroll över den mobila bredbandsenheten. Politika systému zabraňuje odomknutiu alebo ovládaniu mobilného širokopásmového zariadenia. + Системная политика предотвращает разблокировку или управление мобильным широкополосным устройством. A política de sistema impede de desbloquear ou controlar o dispositivo de banda larga móvel. Ustawienia systemu uniemożliwiają odblokowanie lub sterowanie urządzeniem komórkowym. Sistemos politika neleidžia atrakinti ir valdyti mobiliojo plačiajuosčio ryšio įrenginį. La politica di sistema impedisce di sbloccare o controllare il dispositivo mobile a banda larga. Kebijakan sistem mencegah membuka kunci atau mengendalikan peranti data seluler. A rendszer házirendje nem teszi lehetővé a mobil széles sávú készülék feloldását vagy vezérlését. + מדיניות המערכת מונעת שחרור או שליטה בהתקן רשת התקשורת האלחוטית. La politiche dal sisteme e impedìs di sblocâ o controlâ il dispositîf a bande largje mobile. La politique système empêche le verrouillage et le contrôle d’un périphérique mobile à large bande. + Järjestelmän sääntö estää avaamasta tai hallitsemasta mobiilia laajakaistalaitetta. Die Systemrichtlinien verhindern das Entsperren oder Steuern des mobilen Breitbandgerätes. Systempolitikken forhindrer oplåsning og styring af mobilt bredbånd-enheden. Systémová zásada brání v odemknutí nebo v ovládání mobilního širokopásmového zařízení. @@ -91,14 +103,17 @@ Mobil geniş bant kişileri ekle, düzenle ve sil Lägg till, ändra och ta bort mobila bredbandskontakter Pridanie, úprava a odstránenie kontaktov mobilného širokopásmového zariadenia + Добавить, изменить и удалить мобильные широкополосные контакты Adicionar, modificar e excluir contatos de banda larga móvel Dodawanie, modyfikowanie i usuwanie kontaktów urządzenia komórkowego Pridėti, modifikuoti bei ištrinti mobiliojo plačiajuosčio ryšio kontaktus Aggiunge, modifica ed elimina contatti mobili a banda larga Tambah, ubah, dan hapus kontak data seluler Névjegyek hozzáadása, módosítása és eltávolítása + ניתן להוסיף, לערוך ולמחוק אנשי קשר בהתקן רשת תקשורת אלחוטית Zonte, modifiche e elimine i contats de bande largje mobile Ajouter, modifier et supprimer des contacts de connexions mobiles + Lisää, muuta ja poista mobiilin laajakaistan yhteystietoja Kontakte für mobiles Breitband hinzufügen, ändern und löschen Tilføj, rediger og slet mobilt bredbånd-kontakter Přidávat, měnit a mazat kontakty v mobilním zařízení @@ -108,14 +123,17 @@ Sistem ilkesi bu aygıtın kişi eklemesini, düzenlemesini veya silmesini engelliyor. En systempolicy förhindrar att lägga till, ändra och ta bort denna enhets kontakter. Politika systému zabraňuje pridaniu, úprave, alebo odstráneniu kontaktov v tomto zariadení. + Системная политика запрещает добавление, изменение или удаление контактов этого устройства. A política de sistema impede de adicionar, modificar ou excluir os contatos deste dispositivo. Ustawienia systemu uniemożliwiają dodawanie, modyfikowanie lub usuwanie kontaktów tego urządzenia. Sistemos politika neleidžia pridėti, modifikuoti ar ištrinti šio įrenginio kontaktus. La politica di sistema impedisce di aggiungere, modificare o eliminare i contatti di questo dispositivo. Kebijakan sistem mencegah menambah, mengubah, atau menghapus kontak-kontak peranti ini. A rendszer házirendje nem teszi lehetővé ezen az eszközön a névjegyek hozzáadását, módosítását és eltávolítását. + מדיניות המערכת מונעת הוספה, עריכה או מחיקה של אנשי הקשר במכשיר הזה. La politiche dal sisteme e impedìs di zontâ, modificâ o eliminâ i contats di chest dispositîf. La politique système empêche l’ajout, la modification ou la suppression des contacts de cet appareil. + Järjestelmän sääntö estää lisäämästä, muuttamasta tai poistamasta tämän laitteen yhteystietoja. Die Systemrichtlinien verhindern das Hinzufügen, Ändern oder Löschen der Kontakte dieses Gerätes. Systempolitikken forhindrer tilføjelse, redigering eller sletning af enhedens kontakter. Systémová zásada brání v přidání, změně nebo smazání kontaktů v tomto zařízení. @@ -131,14 +149,17 @@ Metin ileti gönder, kaydet, düzenle ve sil Skicka, spara, ändra och ta bort meddelanden Odoslanie, uloženie, úprava a odstránenie textových správ + Отправить, сохранить, изменить и удалить текстовые сообщения Enviar, salvar, modificar e excluir mensagens de texto Wysyłanie, zapisywanie, modyfikowanie i usuwanie wiadomości SMS Siųsti, įrašyti, modifikuoti bei ištrinti tekstines žinutes Invia, salva, modifica ed elimina messaggi di testo Kirim, simpan, ubah, dan hapus pesan-pesan teks Szöveges üzenetek küldése, mentése, módosítása és törlése + שליחה, שמירה, עריכה ומחיקה של הודעות טקסט Invie, salve, modifiche e elimine i messaçs di test Envoyer, enregistrer, modifier et supprimer des messages textuels + Lähetä, talleta, muuta ja poista tekstiviestejä Textnachrichten senden, speichern, bearbeiten und löschen Send, gem, rediger og slet tekstbeskeder Odesílat, ukládat, měnit a mazat textové zprávy @@ -148,14 +169,17 @@ Sistem ilkesi bu aygıtın metin iletiler göndermesini veya işlemesini engelliyor. En systempolicy förhindrar att skicka eller ändra denna enhets textmeddelanden. Politika systému zabraňuje odoslaniu, alebo manipulácii textových správ v tomto zariadení. + Системная политика запрещает отправку или манипулирование текстовыми сообщениями этого устройства. A política de sistema impede de enviar ou manipular as mensagens de texto deste dispositivo. Ustawienia systemu uniemożliwiają wysyłanie lub manipulowanie wiadomościami SMS tego urządzenia. Sistemos politika neleidžia siųsti ar valdyti šio įrenginio tekstines žinutes. La politica di sistema impedisce di inviare o manipolare i messaggi di testo di questo dispositivo. Kebijakan sistem mencegah pengiriman atau manipulasi pesan-pesan teks peranti ini. A rendszer házirendje nem teszi lehetővé a szöveges üzenetek küldését vagy kezelését. + מדיניות המערכת מונעת שליחה או עריכה של המסרונים בהתקן הזה. La politiche dal sisteme e impedìs di inviâ o manipolâ i messaçs di test di chest dispositîf. La politique système empêche l’envoi ou la manipulation des messages textuels ce cet appareil. + Järjestelmän sääntö estää lähettämästä tai muokkaamasta tämän laitteen tekstiviestejä. Systempolitikken forhindrer afsendelse eller manipulering af enhedens tekstbeskeder. Systémová zásada brání v odesílání nebo v manipulaci s textovými zprávami na tomto zařízení. @@ -170,14 +194,17 @@ Gelen sesli çağrıları kabul et veya giden sesli çağrılar başlat. Acceptera inkommande röstsamtal eller påbörja utgående röstsamtal. Prijatie prichádzajúcich hovorov, alebo zahájenie odchádzajúcich hlasových hovorov. + Принимать входящие голосовые звонки или начать исходящие голосовые звонки. Aceitar chamadas de voz recebidas ou iniciar chamadas de voz de saída. Przyjmowanie połączeń przychodzących lub dzwonienie Atsiliepti į gaunamus balso skambučius ar inicijuoti išsiunčiamuosius balso skambučius. Accetta chiamate vocali in arrivo o avvia chiamate vocali. Terima panggilan suara masuk atau mulai pemanggilan suara keluar. Bejövő hívások fogadása vagy kimenő hívások indítása. + לקבל שיחות נכנסות או להוציא שיחות. Acete lis clamadis vocâls in jentrade o tacâ clamadis vocâls in jessude. Accepter des appels vocaux entrants ou initier des appels vocaux sortants. + Hyväksy tulevat puhelut tai aloita (ääni)puheluita. Accepter indkommende stemmeopkald eller start udgående stemmeopkald. Přijímat příchozí hovory nebo začínat odchozí hovory System policy prevents voice calls. @@ -186,14 +213,17 @@ Sistem ilkesi sesli çağrıları engelliyor. En systempolicy förhindrar röstsamtal. Politika systému zabraňuje hlasovým hovorom. + Системная политика запрещает голосовые звонки. A política de sistema impede chamadas de voz. Ustawienia systemu uniemożliwiają dzwonienie. Sistemos politika neleidžia balso skambučių. La politica di sistema impedisce di effettuare chiamate vocali. Kebijakan sistem mencegah panggilan suara. A rendszer házirendje nem teszi lehetővé a hívásokat. + מדיניות המערכת מונעת שיחות קוליות. La politiche dal sisteme e impedìs lis clamadis vocâls. La politique système empêche les appels vocaux. + Järjestelmän sääntö estää äänipuhelut. Systempolitikken forhindrer stemmeopkald. Systémová zásada brání v hlasových hovorech. @@ -205,13 +235,27 @@ Query network time and timezone information Надсилання запиту щодо часу і часового поясу мережі Ağ zaman ve saat dilimi bilgisini sorgula + Fråga efter nätverkstid och tidzonsinformation + Požadovanie informácií o sieťovom čase a časovej zóne + Запрос информации о времени и часовых поясах в сети Consultar informações de hora e fuso horário da rede Odpytywanie informacji o czasie sieciowym i strefie czasowej + Interroga le informazioni sull'ora di rete e sul fuso orario + Tanyakan waktu jaringan dan informasi zona waktu + לתשאל את פרטי השעה ואזור הזמן מהרשת + Tarkista verkon aika ja aikavyöhyketiedot System policy prevents querying network time information. Правила системи забороняють надсилання запитів щодо часу мережі. Sistem ilkesi ağ zaman bilgisini sorgulamayı engelliyor. + En systempolicy förhindrar frågande av nätverkstidsinformation. + Politika systému zabraňuje požadovaniu informácií o sieťovom čase. + Системная политика запрещает запрашивать информацию о времени в сети. A política de sistema impede de consultar informações de horário da rede. Ustawienia systemu uniemożliwiają odpytywanie informacji o czasie sieciowym. + La politica di sistema impedisce di interrogare le informazioni sull'ora di rete + Kebijakan sistem mencegah kuiri informasi waktu jaringan. + מדיניות מערכת מונעת תשאול פרטי זמן מהרשת. + Järjestelmän sääntö estää tarkastamasta verkon aikaa ja aikavyöhyketietoja. no @MM_DEFAULT_USER_POLICY@ @@ -224,14 +268,17 @@ Coğrafi konum ve konumlandırma bilgisini etkinleştir ve gör Aktivera och visa geografisk plats samt positioneringsinformation Povolenie a zobrazenie geografickej polohy a informácií o pozícii + Включить и просмотреть географическое местоположение и информацию о местоположении Habilitar e ver informações de posicionamento e localização geográfica Włączanie i wyświetlanie informacji o położeniu geograficznym i pozycjonowaniu Įjungti ir rodyti geografinės vietos bei pozicionavimo informaciją Abilita e visualizza informazioni di geolocalizzazione e posizionamento Fungsikan dan tilik lokasi geografis dan informasi posisi Földrajzi helyzetmeghatározás bekapcsolása és az információk megtekintése + להפעיל ולהציג פרטי מיקום גאוגרפי Abilite e viôt la posizion gjeografiche e lis informazions su la posizion Activer et voir les informations de position géographique + Salli ja katso sijainti- ja paikkatiedot Informationen zum geografischen Standort und Positionierung aktivieren und anzeigen Aktivér og vis information om geografisk placering og positition Povolovat sdělování a zobrazování geografické polohy a informací o pozici @@ -241,14 +288,17 @@ Sistem ilkesi coğrafi konum bilgisini etkinleştirmeyi ve göstermeyi engelliyor. En systempolicy förhindrar aktivering eller visning av geografisk platsinformation. Politika systému zabraňuje povoleniu, alebo zobrazeniu informácií o geografickej polohe. + Системная политика запрещает включение или просмотр информации о географическом местоположении. A política de sistema impede de habilitar ou ver informações de localização geográfica. Ustawienia systemu uniemożliwiają włączanie lub wyświetlanie informacji o położeniu geograficznym. Sistemos politika neleidžia įjungti ar rodyti geografinės vietos informaciją. La politica di sistema impedisce di abilitare o visualizzare informazioni di geolocalizzazione. Kebijakan sistem mencegah memfungsikan atau menilik informasi lokasi geografis. A rendszer házirendje nem teszi lehetővé a földrajzi helyzetmeghatározás bekapcsolását vagy az információk megtekintését. + מדיניות מערכת מונעת הפעלה או הצגה של פרטי מיקום גאוגרפי. La politiche dal sisteme e impedìs di abilitâ o viodi lis informazions su la posizion gjeografiche. La politique système empêche d’activer ou de voir les informations de position géographique. + Järjestelmän sääntö estää sallimasta tai katsomasta sijainti- ja paikkatietoja Die Systemrichtlinien verhindern das Aktivieren oder Ändern der Informationen zum geografischen Standort. Systempolitikken forhindrer aktivering og visning af information geografisk placering. Systémová zásada brání v povolení sdělování a v zobrazení informací o geografické poloze. @@ -262,16 +312,19 @@ 查询和利用网络信息和服务 Надіслати запит і використати дані щодо мережі і служби Ağ bilgisi ve hizmetleri sorgula ve yararlan - Fråga och nyttja nätverksinformation och tjänster + Fråga efter och nyttja nätverksinformation och tjänster Požadovanie a spracovanie sieťových informácií a služieb + Запрос, использование сетевой информации и услуг Consultar ou utilizar serviços e informações de rede. Odpytywanie i używanie informacji i usług sieciowych Užklausti ir panaudoti tinklo informacija bei paslaugas Interroga e utilizza informazioni e servizi della rete - Kueri dan manfaatkan layanan dan informasi jaringan + Kuiri dan manfaatkan layanan dan informasi jaringan Hálózati információk és szolgáltatások lekérdezése és használata + תשאול ושימוש בשירותי ומידע על הרשת Interoghe e dopre lis informazions di rêt e i servizis Interroger et utiliser les informations et services du réseau + Tarkista ja käytä verkon tietoja ja palveluita Netzwerkinformationen und -dienste abfragen und nutzen Forespørg og anvend netværksinformation og -tjenester Dotazovat se na informace o síti a na služby a využívat je @@ -281,14 +334,17 @@ Sistem ilkesi ağ bilgisini ve hizmetleri sorgulamayı veya yararlanmayı engelliyor. En systempolicy förhindrar frågande och nyttjande av nätverksinformation och tjänster. Politika systému zabraňuje požadovaniu, alebo spracovaniu sieťových informácií a službám. + Системная политика не позволяет запрашивать или использовать сетевую информацию и сервисы. A política de sistema impede de consultar ou utilizar serviços e informações de rede. Ustawienia systemu uniemożliwiają odpytywanie lub używanie informacji i usług sieciowych. Sistemos politika neleidžia užklausti ar panaudoti tinklo informacija ir paslaugas. La politica di sistema impedisce di interrogare o di utilizzare le informazioni e i servizi della rete. - Kebijakan sistem mencegah kueri atau pemanfaatan layanan dan informasi jaringan. + Kebijakan sistem mencegah kuiri atau pemanfaatan layanan dan informasi jaringan. A rendszer házirendje nem teszi lehetővé a hálózati információk és szolgáltatások lekérdezését és használatát. + מדיניות המערכת מונעת תשאול או שימוש במידע על הרשת או שירותים שלה. La politiche dal sisteme e impedìs la interogazion e la utilizazion di informazions di rêt e servizis. La politique système empêche l’interrogation et l’utilisation des informations et des services du réseau. + Järjestelmän sääntö estää tarkistamasta tai käyttämästä verkon tietoja ja palveluita. Die Systemrichtlinien verhindern die Abfrage der Netzwerkinformationen und -dienste. Systempolitikken forhindrer forespørgsel eller anvendelse af netværksinformation og -tjenester. Systémová zásada brání v dotazování na informace o síti a na služby, nebo brání v jejich využívání. @@ -302,16 +358,19 @@ 在移动宽带设备上查询和管理固件 Опитування та керування мікропрограмою на пристрої мобільної широкосмугової мережі Mobil geniş bant aygıtındaki donanım yazılımını sorgula ve yönet - Fråga och hantera fast programvara för en mobil bredbandsenhet + Fråga efter och hantera fast programvara för en mobil bredbandsenhet Požadovanie a správa firmvéru mobilného širokopásmového zariadenia + Запрос и управление прошивкой на мобильном широкополосном устройстве Consultar e gerenciar firmware em um dispositivo de banda larga móvel Odpytywanie i zarządzanie oprogramowaniem sprzętowym urządzenia komórkowego Užklausti ir tvarkyti programinę aparatinę įrangą mobiliojo plačiajuosčio ryšio įrenginyje Interroga e gestisce il firmware su un dispositivo mobile a banda larga - Kueri dan kelola firmware pada suatu peranti data seluler + Kuiri dan kelola firmware pada suatu peranti data seluler Firmware lekérdezése és kezelése a mobil széles sávú eszközön + תשאול וניהול קושחה על התקן רשת תקשורת סלולרית Interoghe e gjestìs il firmware suntun dispositîf a bande largje mobile Interroger et gérer le matériel d’un périphérique mobile à large bande + Tarkista ja hallitse mobiilin laajakaistalaitteen laiteohjelmistoa Firmware auf mobilen Breitbandgeräten abfragen und verwalten Forespørg og håndter firmware på en mobilt bredbånd-enhed Dotazovat se na firmware a spravovat jej na mobilním širokopásmovém zařízení @@ -321,14 +380,17 @@ Sistem ilkesi bu aygıtın donanım yazılımını sorgulamayı veya yönetmeyi engelliyor. En systempolicy förhindrar att fråga och hantera denna enhets fasta programvara. Politika systému zabraňuje požadovaniu, alebo správe firmvéru tohto zariadenia. + Системная политика не позволяет запрашивать или управлять прошивкой этого устройства. A política de sistema impede de consultar ou gerenciar o firmware do dispositivo. Ustawienia systemu uniemożliwiają odpytywanie lub zarządzanie oprogramowaniem sprzętowym tego urządzenia. Sistemos politika neleidžia užklausti ar tvarkyti šio įrenginio programinę aparatinę įrangą. La politica di sistema impedisce di interrogare o gestire il firmware di questo dispositivo. - Kebijakan sistem mencegah kueri atau pengelolaan firmware peranti ini. + Kebijakan sistem mencegah kuiri atau pengelolaan firmware peranti ini. A rendszer lekérdezése és használata lehetővé a firmware lekérdezését és kezelését az eszközön. + מדיניות המערכת מונעת תשאול או ניהול של קושחת ההתקן הזה. La politiche dal sisteme e impedìs di interogâ o gjestî il firmware di chest dispositîf. La politique système empêche l’interrogation et la gestion du matériel de ce périphérique. + Järjestelmän sääntö estää tarkistamasta ja hallitsemasta tämän laitteen laiteohjelmistoa. Die Systemrichtlinien verhindern die Abfrage oder Verwaltung der Firmware dieses Gerätes. Systempolitikken forhindrer forespørgsel og håndtering af enhedens firmware. Systémová zásada brání v dotázání na firmware nebo brání v jeho správě na tomto zařízení. diff -Nru modemmanager-1.12.8/data/tests/Makefile.in modemmanager-1.16.6/data/tests/Makefile.in --- modemmanager-1.12.8/data/tests/Makefile.in 2020-03-14 17:16:02.000000000 +0800 +++ modemmanager-1.16.6/data/tests/Makefile.in 2021-06-06 21:43:42.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,14 +90,14 @@ subdir = data/tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -195,6 +195,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -268,9 +270,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -315,6 +321,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru modemmanager-1.12.8/debian/changelog modemmanager-1.16.6/debian/changelog --- modemmanager-1.12.8/debian/changelog 2020-04-10 23:34:03.000000000 +0800 +++ modemmanager-1.16.6/debian/changelog 2021-07-07 10:10:02.000000000 +0800 @@ -1,3 +1,109 @@ +modemmanager (1.16.6-2~20.04.2) focal; urgency=medium + + * Non-maintainer upload. + * Backport to focal. (LP: #1934286) + + -- Jerry Lee Wed, 07 Jul 2021 10:10:02 +0800 + +modemmanager (1.16.6-2) experimental; urgency=medium + + * debian/control: include python build-depends for tests + + -- Sebastien Bacher Fri, 25 Jun 2021 15:32:16 +0200 + +modemmanager (1.16.6-1) experimental; urgency=medium + + * New upstream version + * debian/control.in: + - updated libqmi requirement + * debian/libmm-glib0.symbols: + - updated for the new version + + -- Sebastien Bacher Fri, 25 Jun 2021 11:30:20 +0200 + +modemmanager (1.14.12-0.1) unstable; urgency=medium + + * Non-maintainer upload. + * New upstream version, bug fixes only, no new features. + - MBIM: + - Plug memleak in disconnection logic. + - Don't fail IPv4v6 connection attempt if only IPv4 succeeds. + - QMI: + - Fix network registration cancellation logic with asserts disabled. + + [ Helmut Grohne ] + * Annotate dbus dependency . (Closes: #980827) + + -- Martin Fri, 12 Mar 2021 18:09:44 +0000 + +modemmanager (1.14.10-0.1) unstable; urgency=medium + + * Non-maintainer upload. + * New upstream version. + * Add upstream signing key. + + -- Martin Sat, 16 Jan 2021 17:23:28 +0000 + +modemmanager (1.14.8-0.1) unstable; urgency=medium + + * Non-maintainer upload. + * New upstream version. + + -- Martin Mon, 16 Nov 2020 12:22:26 +0000 + +modemmanager (1.14.6-0.1) unstable; urgency=medium + + * Non-maintainer upload. + * New upstream version. + + -- Martin Wed, 14 Oct 2020 15:11:13 +0000 + +modemmanager (1.14.2-0.1) unstable; urgency=medium + + * Non-maintainer upload. + * New upstream version. + + -- Martin Wed, 19 Aug 2020 17:43:57 +0000 + +modemmanager (1.14.0-0.1) unstable; urgency=medium + + * Non-maintainer upload. + * New upstream version. + + -- Martin Tue, 23 Jun 2020 18:16:49 +0000 + +modemmanager (1.13.900-0.1) experimental; urgency=medium + + * Non-maintainer upload. + * New upstream version. + * debian/libmm-glib0.symbols: 13 additional symbols, + mm_common_build_capability_combinations_any was not part of API, + no soname bump necessary. + + -- Martin Fri, 12 Jun 2020 08:23:35 +0000 + +modemmanager (1.12.10-0.2) unstable; urgency=medium + + * Non-maintainer upload. + * Apply upstream patch to fix problem with wavecom modems. + + -- Martin Sun, 07 Jun 2020 11:01:26 +0000 + +modemmanager (1.12.10-0.1) unstable; urgency=medium + + * Non-maintainer upload. + * New upstream version. + + -- Martin Tue, 26 May 2020 22:39:43 +0000 + +modemmanager (1.12.8-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Update Vcs-* to salsa. + * Use Rules-Requires-Root: no + + -- Martin Thu, 30 Apr 2020 00:44:37 +0000 + modemmanager (1.12.8-1) unstable; urgency=medium * New upstream version diff -Nru modemmanager-1.12.8/debian/compat modemmanager-1.16.6/debian/compat --- modemmanager-1.12.8/debian/compat 2020-04-10 23:33:52.000000000 +0800 +++ modemmanager-1.16.6/debian/compat 1970-01-01 08:00:00.000000000 +0800 @@ -1 +0,0 @@ -10 diff -Nru modemmanager-1.12.8/debian/control modemmanager-1.16.6/debian/control --- modemmanager-1.12.8/debian/control 2020-04-10 23:33:52.000000000 +0800 +++ modemmanager-1.16.6/debian/control 2021-06-25 21:32:16.000000000 +0800 @@ -2,7 +2,7 @@ Section: net Priority: optional Maintainer: Mathieu Trudel-Lapierre -Build-Depends: debhelper (>= 10), +Build-Depends: debhelper-compat (= 10), automake, libtool, intltool, @@ -14,14 +14,17 @@ libgudev-1.0-dev (>= 147), libsystemd-dev (>= 209), libpolkit-gobject-1-dev (>= 0.97), - libqmi-glib-dev (>= 1.24), - libmbim-glib-dev (>= 1.18.0), + libqmi-glib-dev (>= 1.28.6~), + libmbim-glib-dev (>= 1.24.0~), libglib2.0-doc, + python3-dbus, + python3-gi, valac (>= 0.22), - dbus + dbus , Standards-Version: 4.2.1 -Vcs-Git: https://salsa.debian.org/cyphermox-guest/modemmanager.git -Vcs-Browser: https://salsa.debian.org/cyphermox-guest/modemmanager +Rules-Requires-Root: no +Vcs-Git: https://salsa.debian.org/debian/modemmanager.git +Vcs-Browser: https://salsa.debian.org/debian/modemmanager Homepage: https://www.freedesktop.org/wiki/Software/ModemManager/ Package: modemmanager @@ -56,6 +59,7 @@ Package: modemmanager-doc Section: doc Architecture: all +Multi-Arch: foreign Depends: ${misc:Depends} Suggests: devhelp Description: D-Bus service for managing modems - documentation files @@ -108,6 +112,7 @@ Package: libmm-glib-doc Architecture: all +Multi-Arch: foreign Section: doc Depends: ${misc:Depends} Suggests: devhelp diff -Nru modemmanager-1.12.8/debian/libmm-glib0.symbols modemmanager-1.16.6/debian/libmm-glib0.symbols --- modemmanager-1.12.8/debian/libmm-glib0.symbols 2020-04-10 23:33:52.000000000 +0800 +++ modemmanager-1.16.6/debian/libmm-glib0.symbols 2021-06-25 21:32:16.000000000 +0800 @@ -68,15 +68,25 @@ mm_bearer_properties_set_password@Base 0.7.991 mm_bearer_properties_set_rm_protocol@Base 0.7.991 mm_bearer_properties_set_user@Base 0.7.991 + mm_bearer_stats_get_attempts@Base 1.13.900 mm_bearer_stats_get_dictionary@Base 1.5.993 mm_bearer_stats_get_duration@Base 1.5.993 + mm_bearer_stats_get_failed_attempts@Base 1.13.900 mm_bearer_stats_get_rx_bytes@Base 1.5.993 + mm_bearer_stats_get_total_duration@Base 1.13.900 + mm_bearer_stats_get_total_rx_bytes@Base 1.13.900 + mm_bearer_stats_get_total_tx_bytes@Base 1.13.900 mm_bearer_stats_get_tx_bytes@Base 1.5.993 mm_bearer_stats_get_type@Base 1.5.993 mm_bearer_stats_new@Base 1.5.993 mm_bearer_stats_new_from_dictionary@Base 1.5.993 + mm_bearer_stats_set_attempts@Base 1.13.900 mm_bearer_stats_set_duration@Base 1.5.993 + mm_bearer_stats_set_failed_attempts@Base 1.13.900 mm_bearer_stats_set_rx_bytes@Base 1.5.993 + mm_bearer_stats_set_total_duration@Base 1.13.900 + mm_bearer_stats_set_total_rx_bytes@Base 1.13.900 + mm_bearer_stats_set_total_tx_bytes@Base 1.13.900 mm_bearer_stats_set_tx_bytes@Base 1.5.993 mm_bearer_type_get_string@Base 1.10.0 mm_bearer_type_get_type@Base 1.10.0 @@ -182,7 +192,7 @@ mm_common_build_bands_string@Base 0.7.991 mm_common_build_bands_unknown@Base 0.7.991 mm_common_build_capabilities_string@Base 0.7.991 - mm_common_build_capability_combinations_any@Base 0.7.991 +#MISSING: 1.13.900# mm_common_build_capability_combinations_any@Base 0.7.991 mm_common_build_capability_combinations_none@Base 0.7.991 mm_common_build_mode_combinations_default@Base 0.7.991 mm_common_build_mode_combinations_string@Base 0.7.991 @@ -480,6 +490,9 @@ mm_gdbus_modem_call_set_power_state@Base 0.7.991 mm_gdbus_modem_call_set_power_state_finish@Base 0.7.991 mm_gdbus_modem_call_set_power_state_sync@Base 0.7.991 + mm_gdbus_modem_call_set_primary_sim_slot@Base 1.16.6 + mm_gdbus_modem_call_set_primary_sim_slot_finish@Base 1.16.6 + mm_gdbus_modem_call_set_primary_sim_slot_sync@Base 1.16.6 mm_gdbus_modem_cdma_call_activate@Base 0.7.991 mm_gdbus_modem_cdma_call_activate_finish@Base 0.7.991 mm_gdbus_modem_cdma_call_activate_manual@Base 0.7.991 @@ -528,6 +541,7 @@ mm_gdbus_modem_complete_set_current_capabilities@Base 0.7.991 mm_gdbus_modem_complete_set_current_modes@Base 0.7.991 mm_gdbus_modem_complete_set_power_state@Base 0.7.991 + mm_gdbus_modem_complete_set_primary_sim_slot@Base 1.16.6 mm_gdbus_modem_dup_bearers@Base 1.2.0 mm_gdbus_modem_dup_carrier_configuration@Base 1.10.4 mm_gdbus_modem_dup_carrier_configuration_revision@Base 1.10.4 @@ -547,6 +561,7 @@ mm_gdbus_modem_dup_revision@Base 0.7.991 mm_gdbus_modem_dup_signal_quality@Base 0.7.991 mm_gdbus_modem_dup_sim@Base 0.7.991 + mm_gdbus_modem_dup_sim_slots@Base 1.16.6 mm_gdbus_modem_dup_supported_bands@Base 0.7.991 mm_gdbus_modem_dup_supported_capabilities@Base 0.7.991 mm_gdbus_modem_dup_supported_modes@Base 0.7.991 @@ -596,9 +611,11 @@ mm_gdbus_modem_get_ports@Base 1.0.0 mm_gdbus_modem_get_power_state@Base 0.7.991 mm_gdbus_modem_get_primary_port@Base 0.7.991 + mm_gdbus_modem_get_primary_sim_slot@Base 1.16.6 mm_gdbus_modem_get_revision@Base 0.7.991 mm_gdbus_modem_get_signal_quality@Base 0.7.991 mm_gdbus_modem_get_sim@Base 0.7.991 + mm_gdbus_modem_get_sim_slots@Base 1.16.6 mm_gdbus_modem_get_state@Base 0.7.991 mm_gdbus_modem_get_state_failed_reason@Base 0.7.991 mm_gdbus_modem_get_supported_bands@Base 0.7.991 @@ -761,9 +778,11 @@ mm_gdbus_modem_set_ports@Base 1.0.0 mm_gdbus_modem_set_power_state@Base 0.7.991 mm_gdbus_modem_set_primary_port@Base 0.7.991 + mm_gdbus_modem_set_primary_sim_slot@Base 1.16.6 mm_gdbus_modem_set_revision@Base 0.7.991 mm_gdbus_modem_set_signal_quality@Base 0.7.991 mm_gdbus_modem_set_sim@Base 0.7.991 + mm_gdbus_modem_set_sim_slots@Base 1.16.6 mm_gdbus_modem_set_state@Base 0.7.991 mm_gdbus_modem_set_state_failed_reason@Base 0.7.991 mm_gdbus_modem_set_supported_bands@Base 0.7.991 @@ -780,11 +799,13 @@ mm_gdbus_modem_signal_dup_evdo@Base 1.2.0 mm_gdbus_modem_signal_dup_gsm@Base 1.2.0 mm_gdbus_modem_signal_dup_lte@Base 1.2.0 + mm_gdbus_modem_signal_dup_nr5g@Base 1.16.6 mm_gdbus_modem_signal_dup_umts@Base 1.2.0 mm_gdbus_modem_signal_get_cdma@Base 1.2.0 mm_gdbus_modem_signal_get_evdo@Base 1.2.0 mm_gdbus_modem_signal_get_gsm@Base 1.2.0 mm_gdbus_modem_signal_get_lte@Base 1.2.0 + mm_gdbus_modem_signal_get_nr5g@Base 1.16.6 mm_gdbus_modem_signal_get_rate@Base 1.2.0 mm_gdbus_modem_signal_get_type@Base 1.2.0 mm_gdbus_modem_signal_get_umts@Base 1.2.0 @@ -801,6 +822,7 @@ mm_gdbus_modem_signal_set_evdo@Base 1.2.0 mm_gdbus_modem_signal_set_gsm@Base 1.2.0 mm_gdbus_modem_signal_set_lte@Base 1.2.0 + mm_gdbus_modem_signal_set_nr5g@Base 1.16.6 mm_gdbus_modem_signal_set_rate@Base 1.2.0 mm_gdbus_modem_signal_set_umts@Base 1.2.0 mm_gdbus_modem_signal_skeleton_get_type@Base 1.2.0 @@ -1002,11 +1024,14 @@ mm_gdbus_sim_complete_enable_pin@Base 0.7.991 mm_gdbus_sim_complete_send_pin@Base 0.7.991 mm_gdbus_sim_complete_send_puk@Base 0.7.991 + mm_gdbus_sim_dup_eid@Base 1.16.6 mm_gdbus_sim_dup_emergency_numbers@Base 1.12.6 mm_gdbus_sim_dup_imsi@Base 0.7.991 mm_gdbus_sim_dup_operator_identifier@Base 0.7.991 mm_gdbus_sim_dup_operator_name@Base 0.7.991 mm_gdbus_sim_dup_sim_identifier@Base 0.7.991 + mm_gdbus_sim_get_active@Base 1.16.6 + mm_gdbus_sim_get_eid@Base 1.16.6 mm_gdbus_sim_get_emergency_numbers@Base 1.12.6 mm_gdbus_sim_get_imsi@Base 0.7.991 mm_gdbus_sim_get_operator_identifier@Base 0.7.991 @@ -1022,6 +1047,8 @@ mm_gdbus_sim_proxy_new_for_bus_finish@Base 0.7.991 mm_gdbus_sim_proxy_new_for_bus_sync@Base 0.7.991 mm_gdbus_sim_proxy_new_sync@Base 0.7.991 + mm_gdbus_sim_set_active@Base 1.16.6 + mm_gdbus_sim_set_eid@Base 1.16.6 mm_gdbus_sim_set_emergency_numbers@Base 1.12.6 mm_gdbus_sim_set_imsi@Base 0.7.991 mm_gdbus_sim_set_operator_identifier@Base 0.7.991 @@ -1093,9 +1120,11 @@ mm_get_int_from_match_info@Base 0.7.991 mm_get_int_from_str@Base 0.7.991 mm_get_string_unquoted_from_match_info@Base 0.7.991 + mm_get_u64_from_hex_match_info@Base 1.13.900 mm_get_u64_from_hex_str@Base 1.12.6 mm_get_u64_from_match_info@Base 1.12.6 mm_get_u64_from_str@Base 1.12.6 + mm_get_uint_from_hex_match_info@Base 1.13.900 mm_get_uint_from_hex_str@Base 1.7.990 mm_get_uint_from_match_info@Base 0.7.991 mm_get_uint_from_str@Base 0.7.991 @@ -1138,6 +1167,7 @@ mm_location_gps_nmea_build_full@Base 0.7.991 mm_location_gps_nmea_get_string_variant@Base 0.7.991 mm_location_gps_nmea_get_trace@Base 0.7.991 + mm_location_gps_nmea_get_traces@Base 1.13.900 mm_location_gps_nmea_get_type@Base 0.7.991 mm_location_gps_nmea_new@Base 0.7.991 mm_location_gps_nmea_new_from_string_variant@Base 0.7.991 @@ -1305,6 +1335,7 @@ mm_modem_dup_primary_port@Base 0.7.991 mm_modem_dup_revision@Base 0.7.991 mm_modem_dup_sim_path@Base 0.7.991 + mm_modem_dup_sim_slot_paths@Base 1.16.6 mm_modem_enable@Base 0.7.991 mm_modem_enable_finish@Base 0.7.991 mm_modem_enable_sync@Base 0.7.991 @@ -1347,11 +1378,13 @@ mm_modem_get_ports@Base 1.0.0 mm_modem_get_power_state@Base 0.7.991 mm_modem_get_primary_port@Base 0.7.991 + mm_modem_get_primary_sim_slot@Base 1.16.6 mm_modem_get_revision@Base 0.7.991 mm_modem_get_signal_quality@Base 0.7.991 mm_modem_get_sim@Base 0.7.991 mm_modem_get_sim_finish@Base 0.7.991 mm_modem_get_sim_path@Base 0.7.991 + mm_modem_get_sim_slot_paths@Base 1.16.6 mm_modem_get_sim_sync@Base 0.7.991 mm_modem_get_state@Base 0.7.991 mm_modem_get_state_failed_reason@Base 0.7.991 @@ -1365,6 +1398,9 @@ mm_modem_list_bearers@Base 0.7.991 mm_modem_list_bearers_finish@Base 0.7.991 mm_modem_list_bearers_sync@Base 0.7.991 + mm_modem_list_sim_slots@Base 1.16.6 + mm_modem_list_sim_slots_finish@Base 1.16.6 + mm_modem_list_sim_slots_sync@Base 1.16.6 mm_modem_location_assistance_data_type_build_string_from_mask@Base 1.10.0 mm_modem_location_assistance_data_type_get_type@Base 1.10.0 mm_modem_location_dup_assistance_data_servers@Base 1.10.0 @@ -1472,11 +1508,15 @@ mm_modem_set_power_state@Base 0.7.991 mm_modem_set_power_state_finish@Base 0.7.991 mm_modem_set_power_state_sync@Base 0.7.991 + mm_modem_set_primary_sim_slot@Base 1.16.6 + mm_modem_set_primary_sim_slot_finish@Base 1.16.6 + mm_modem_set_primary_sim_slot_sync@Base 1.16.6 mm_modem_signal_dup_path@Base 1.2.0 mm_modem_signal_get_cdma@Base 1.2.0 mm_modem_signal_get_evdo@Base 1.2.0 mm_modem_signal_get_gsm@Base 1.2.0 mm_modem_signal_get_lte@Base 1.2.0 + mm_modem_signal_get_nr5g@Base 1.16.6 mm_modem_signal_get_path@Base 1.2.0 mm_modem_signal_get_rate@Base 1.2.0 mm_modem_signal_get_type@Base 1.2.0 @@ -1485,6 +1525,7 @@ mm_modem_signal_peek_evdo@Base 1.2.0 mm_modem_signal_peek_gsm@Base 1.2.0 mm_modem_signal_peek_lte@Base 1.2.0 + mm_modem_signal_peek_nr5g@Base 1.16.6 mm_modem_signal_peek_umts@Base 1.2.0 mm_modem_signal_setup@Base 1.2.0 mm_modem_signal_setup_finish@Base 1.2.0 @@ -1631,6 +1672,7 @@ mm_sim_disable_pin@Base 0.7.991 mm_sim_disable_pin_finish@Base 0.7.991 mm_sim_disable_pin_sync@Base 0.7.991 + mm_sim_dup_eid@Base 1.16.6 mm_sim_dup_emergency_numbers@Base 1.12.6 mm_sim_dup_identifier@Base 0.7.991 mm_sim_dup_imsi@Base 0.7.991 @@ -1640,6 +1682,8 @@ mm_sim_enable_pin@Base 0.7.991 mm_sim_enable_pin_finish@Base 0.7.991 mm_sim_enable_pin_sync@Base 0.7.991 + mm_sim_get_active@Base 1.16.6 + mm_sim_get_eid@Base 1.16.6 mm_sim_get_emergency_numbers@Base 1.12.6 mm_sim_get_identifier@Base 0.7.991 mm_sim_get_imsi@Base 0.7.991 @@ -1663,6 +1707,7 @@ mm_simple_connect_properties_get_operator_id@Base 0.7.991 mm_simple_connect_properties_get_password@Base 0.7.991 mm_simple_connect_properties_get_pin@Base 0.7.991 + mm_simple_connect_properties_get_rm_protocol@Base 1.16.6 mm_simple_connect_properties_get_type@Base 0.7.991 mm_simple_connect_properties_get_user@Base 0.7.991 mm_simple_connect_properties_new@Base 0.7.991 @@ -1676,6 +1721,7 @@ mm_simple_connect_properties_set_operator_id@Base 0.7.991 mm_simple_connect_properties_set_password@Base 0.7.991 mm_simple_connect_properties_set_pin@Base 0.7.991 + mm_simple_connect_properties_set_rm_protocol@Base 1.16.6 mm_simple_connect_properties_set_user@Base 0.7.991 mm_simple_status_get_3gpp_operator_code@Base 0.7.991 mm_simple_status_get_3gpp_operator_name@Base 0.7.991 diff -Nru modemmanager-1.12.8/debian/patches/default_strict_probing_policy.patch modemmanager-1.16.6/debian/patches/default_strict_probing_policy.patch --- modemmanager-1.12.8/debian/patches/default_strict_probing_policy.patch 2020-04-10 23:34:03.000000000 +0800 +++ modemmanager-1.16.6/debian/patches/default_strict_probing_policy.patch 1970-01-01 08:00:00.000000000 +0800 @@ -1,19 +0,0 @@ -From: Mathieu Trudel-Lapierre -Subject: Default to strict probing filter policy. -Bug-Debian: https://bugs.debian.org/683839 -Last-Update: 2018-03-01 -Forwarded: not-needed - -Index: modemmanager-1.12.8/data/ModemManager.service.in -=================================================================== ---- modemmanager-1.12.8.orig/data/ModemManager.service.in -+++ modemmanager-1.12.8/data/ModemManager.service.in -@@ -6,7 +6,7 @@ Requires=@MM_POLKIT_SERVICE@ - [Service] - Type=dbus - BusName=org.freedesktop.ModemManager1 --ExecStart=@sbindir@/ModemManager -+ExecStart=@sbindir@/ModemManager --filter-policy=strict - StandardError=null - Restart=on-abort - CapabilityBoundingSet=CAP_SYS_ADMIN diff -Nru modemmanager-1.12.8/debian/patches/series modemmanager-1.16.6/debian/patches/series --- modemmanager-1.12.8/debian/patches/series 2020-04-10 23:33:52.000000000 +0800 +++ modemmanager-1.16.6/debian/patches/series 1970-01-01 08:00:00.000000000 +0800 @@ -1 +0,0 @@ -default_strict_probing_policy.patch diff -Nru modemmanager-1.12.8/debian/upstream/signing-key.asc modemmanager-1.16.6/debian/upstream/signing-key.asc --- modemmanager-1.12.8/debian/upstream/signing-key.asc 1970-01-01 08:00:00.000000000 +0800 +++ modemmanager-1.16.6/debian/upstream/signing-key.asc 2021-06-25 21:32:16.000000000 +0800 @@ -0,0 +1,40 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQGiBElVP3gRBADLxXlEnz7zt/hlWuqMIY7EmH1jkvyqFNkG3O7KrN09Kq7X6ovb +Kg14Ou4E6hdaTdvnaDinOU33e0SD1IDIQUjindd0iSEi7K61qD9oQH1LVkNK5Kww +DOfxuEi3K3PkESrHbZ6y/5WjNo5FDRgByJ/Eyh9RMWEMnLp0Zo+HZ7tZtwCgho2F +VFUlAWk91Owg/idPC7lf9gcEALzx2VBFE86YAv4wbCjuuIdqjl9ceUvIOLZWTlrY +c4KFdBEF6NZ0BPP1Ck0AjKoJyZk3NcCGfNwqbtxxVyaMdcI/PDSuSWO5aC/ZuTUv +Sr8cjh4i7Sqa5YXQOwOXHXImvHhFwo2lW2sdIaAeDwJxIfaDUyFuVKvY/sK+Ajxr +PQ1QA/44JVKaxqLYL3rf43EwE0cnSbVThAAa/F5pKXcSYwAG0WxSERzEWvnFk1ea +y766n7yIrylwoaHeTirXxyRTXvY0VTpKEPkROuKKv7nLC6SEvyH8Z8W7a999Ctw0 +gCjtB6dEuFYRdS2fSZ88cQeEjBBLiJCDpG9Fvwb4g+y7gl5+h7QtQWxla3NhbmRl +ciBNb3JnYWRvIDxhbGVrc2FuZGVyQGFsZWtzYW5kZXIuZXM+iGAEExECACAFAklV +P3gCGyMGCwkIBwMCBBUCCAMEFgIDAQIeAQIXgAAKCRA8rVM5iXP/+vWXAJ4hViyk +is1lA7YBUISNEor/erPEkgCfWO5AuVhh5nZNM5GUwCtwOovSui65BA0ESVU/eBAQ +ALmjzgIjhR/Ppv0aQIxKtE9HiGWMoDF1SSpz99DEYnTwNgXBM+vMTxCGyoMl1nFQ +mY+rIoMBTAE8r50eDP6zBYNgrNVx0yl0cCWX4n8WbAxF2iQ2oIetzugaQlU20TwN +ccqF4w0QdkDCLedlsxKhiXyx57LIzWGCTcOVbIZB9C2gFqWUSyM2zT6LgQ6NKjWk +VZVJCUvwZGrh4VPIG8TVDC/oXujIazdMTwfjyPHLVTNFQSuhRKfWop/sKkm0JrC2 +4Keo7Eg9f9hdIysqHv3PCYa3oX15agUALldmVCdiDmLd+vuN1Ivpo78KZ/nh9t2/ +DN24HFUi6yArPzNwJqg4WNW5ef0q7/np+vIY1sr382c9/2GF2Ir+d0TkTVz+kKaj +58qcKxMxVgytR2jVr7Z/elLSxm+Oo0piFN9ExJyGT/x57899tEavtJk/f/lV8VTW +MrqgbooP1HinXbOKOVOPwASUGJ89FILNxriFGt9o9GoJirr4cIMcb6WVirwgJe7+ +UUYg+51OC8xkQS63QHircaKL1U1d5iXy2P6Vm1zp2p2ZGvybHg5Ucy3HXa82FrE7 +TA+AfyljMoMpUdHWPU9fqW+NhQbfwzDnYJZzi1V/XbTHcAUHD66+QDihwKsgZz4R +gL+Iv6lzdXz2Is/F9WvS2WR+K5teMXq4cCOATYzZO9qPAAMFEACMNPM1M2nTS93K +eEwmr2eKhR1PRGOyRdlvicaHZiqCYX8km7NhSD3SEKdX553HGN/8Te5QQc3XagPi +4dDX7uPZjg5ueZwg0aDOtnLzlopCgfYZOLyn1LdPFKZ+bEkpbtLI3WbPRvQXjPLI ++Cuq7CWCUJSY9qruks21qu3Yhjay8wYZIGqYYd1lh+Aiqy7RUeNDfdPjMZD4et4n +unKcBW4S5uQ2QyMHYNEbY4BpR4Tc88Sn1/PshNaRKqTeRi/FEgmnu8TwHkMQhVM2 +wxrrFKC8V1XUlIHOKY0ictodwd3ysUcFwXTqwqvgxV+UlMFiRWcT7XY1c+LuexFq +jF9IxbY5oMMP8GgS59yR5bk21ikk9swIfbSx70JXWL99H9vNPgh99cUS110xJKg9 +NShEjWdCdGj3TdsUJ2NEjJYjKO6VTnkjLGdZxvm5p9lFLMDbWdvwllDAT41txfF5 +0qhTwHNSpHMBO545Jeot5OUCk8hq9gnAISxubRT4zClr3IQqZVhkdr3+3bkywLTd +TetzCP/wqy6RpEtSOc5bYQQ4P44mlMfASqI1Bi09hlM64F/je/yhjPqVHBcSy00v +H+ctRQNxLGBQmJtRn3iqqfM0qa02k2PzDMQHbvgHZcjNTk9VPLVHhRAD36VHNMfz +iZSvJJW5xiQg9DqbQ9TaO3uBTTyJQ4hJBBgRAgAJBQJJVT94AhsMAAoJEDytUzmJ +c//6dfsAoIEOqluSj6fzW8+q9jPLT6719QaeAJ9MlO1jXSCeQ7z95/Lun1+jWn2j +sg== +=J+xH +-----END PGP PUBLIC KEY BLOCK----- diff -Nru modemmanager-1.12.8/debian/watch modemmanager-1.16.6/debian/watch --- modemmanager-1.12.8/debian/watch 2020-04-10 23:33:52.000000000 +0800 +++ modemmanager-1.16.6/debian/watch 2021-06-25 21:32:16.000000000 +0800 @@ -1,2 +1,3 @@ version=3 +opts=pgpmode=auto \ https://www.freedesktop.org/software/ModemManager/ModemManager-(.*)\.tar\.xz diff -Nru modemmanager-1.12.8/depcomp modemmanager-1.16.6/depcomp --- modemmanager-1.12.8/depcomp 2020-03-14 17:02:53.000000000 +0800 +++ modemmanager-1.16.6/depcomp 2021-06-06 21:43:43.000000000 +0800 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru modemmanager-1.12.8/docs/Makefile.in modemmanager-1.16.6/docs/Makefile.in --- modemmanager-1.12.8/docs/Makefile.in 2020-03-14 17:16:02.000000000 +0800 +++ modemmanager-1.16.6/docs/Makefile.in 2021-06-06 21:43:42.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,14 +90,14 @@ subdir = docs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -254,6 +254,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -327,9 +329,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -374,6 +380,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru modemmanager-1.12.8/docs/man/Makefile.in modemmanager-1.16.6/docs/man/Makefile.in --- modemmanager-1.12.8/docs/man/Makefile.in 2020-03-14 17:16:02.000000000 +0800 +++ modemmanager-1.16.6/docs/man/Makefile.in 2021-06-06 21:43:42.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,14 +90,14 @@ subdir = docs/man ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -226,6 +226,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -299,9 +301,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -346,6 +352,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru modemmanager-1.12.8/docs/man/mmcli.1 modemmanager-1.16.6/docs/man/mmcli.1 --- modemmanager-1.12.8/docs/man/mmcli.1 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/docs/man/mmcli.1 2021-06-06 21:40:59.000000000 +0800 @@ -229,9 +229,6 @@ \fBCOMMAND\fR could be 'AT+GMM' to probe for phone model information. This operation is only available when ModemManager is run in debug mode. .TP -.B \-\-list\-bearers -List packet data bearers that are available for the given modem. -.TP .B \-\-create\-bearer=['KEY1=VALUE1,KEY2=VALUE2,...'] Create a new packet data bearer for a given modem. The \fBKEY\fRs and some \fBVALUE\fRs are listed below: @@ -284,6 +281,12 @@ An example would be: 'egsm|dcs|pcs|g850' to select all the GSM frequency bands. .TP +.B \-\-set\-primary\-sim\-slot=[SLOT] +Request to switch the primary SIM slot. + +The given \fBSLOT\fR must be a valid slot number in the [1,N] range, where +N is the amount of SIM slots available in the system. +.TP .B \-\-inhibit Inhibit the specific modem from being used by ModemManager. This method is completely equivalent to \fB\-\-inhibit\-device\fR, with the only diff -Nru modemmanager-1.12.8/docs/reference/Makefile.in modemmanager-1.16.6/docs/reference/Makefile.in --- modemmanager-1.12.8/docs/reference/Makefile.in 2020-03-14 17:16:02.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/Makefile.in 2021-06-06 21:43:42.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,14 +90,14 @@ subdir = docs/reference ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -254,6 +254,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -327,9 +329,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -374,6 +380,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru modemmanager-1.12.8/docs/reference/api/Makefile.in modemmanager-1.16.6/docs/reference/api/Makefile.in --- modemmanager-1.12.8/docs/reference/api/Makefile.in 2020-03-14 17:16:02.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/Makefile.in 2021-06-06 21:43:42.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,6 +15,24 @@ @SET_MAKE@ # -*- mode: makefile -*- +# +# gtk-doc.make - make rules for gtk-doc +# Copyright (C) 2003 James Henstridge +# 2004-2007 Damon Chaplin +# 2007-2017 Stefan Sauer +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . #################################### # Everything below here is generic # @@ -96,14 +114,14 @@ subdir = docs/reference/api ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -201,6 +219,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -274,9 +294,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -321,6 +345,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -493,34 +518,34 @@ @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp #### setup #### -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_$(V)) -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_@AM_V@) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_@AM_DEFAULT_V@) @ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SETUP_0 = @echo " DOC Preparing build"; #### scan #### -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_$(V)) -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_@AM_V@) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_@AM_DEFAULT_V@) @ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SCAN_0 = @echo " DOC Scanning header files"; -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_$(V)) -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_@AM_V@) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_@AM_DEFAULT_V@) @ENABLE_GTK_DOC_TRUE@GTK_DOC_V_INTROSPECT_0 = @echo " DOC Introspecting gobjects"; #### xml #### -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XML = $(GTK_DOC_V_XML_$(V)) -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XML = $(GTK_DOC_V_XML_@AM_V@) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_@AM_DEFAULT_V@) @ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XML_0 = @echo " DOC Building XML"; #### html #### -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_$(V)) -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_@AM_V@) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_@AM_DEFAULT_V@) @ENABLE_GTK_DOC_TRUE@GTK_DOC_V_HTML_0 = @echo " DOC Building HTML"; -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_$(V)) -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_@AM_V@) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_@AM_DEFAULT_V@) @ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XREF_0 = @echo " DOC Fixing cross-references"; #### pdf #### -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_$(V)) -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_@AM_V@) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_@AM_DEFAULT_V@) @ENABLE_GTK_DOC_TRUE@GTK_DOC_V_PDF_0 = @echo " DOC Building PDF"; all: all-am @@ -643,10 +668,10 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@ENABLE_GTK_DOC_FALSE@distclean-local: @ENABLE_GTK_DOC_FALSE@maintainer-clean-local: @ENABLE_GTK_DOC_FALSE@uninstall-local: @ENABLE_GTK_DOC_FALSE@clean-local: +@ENABLE_GTK_DOC_FALSE@distclean-local: @ENABLE_GTK_DOC_FALSE@install-data-local: clean: clean-am @@ -750,38 +775,38 @@ @ENABLE_GTK_DOC_TRUE@setup-build.stamp: @ENABLE_GTK_DOC_TRUE@ -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ -@ENABLE_GTK_DOC_TRUE@ files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ -@ENABLE_GTK_DOC_TRUE@ if test "x$$files" != "x" ; then \ -@ENABLE_GTK_DOC_TRUE@ for file in $$files ; do \ -@ENABLE_GTK_DOC_TRUE@ destdir=`dirname $(abs_builddir)/$$file`; \ -@ENABLE_GTK_DOC_TRUE@ test -d "$$destdir" || mkdir -p "$$destdir"; \ -@ENABLE_GTK_DOC_TRUE@ test -f $(abs_srcdir)/$$file && \ -@ENABLE_GTK_DOC_TRUE@ cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ -@ENABLE_GTK_DOC_TRUE@ done; \ -@ENABLE_GTK_DOC_TRUE@ fi; \ +@ENABLE_GTK_DOC_TRUE@ files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ +@ENABLE_GTK_DOC_TRUE@ if test "x$$files" != "x" ; then \ +@ENABLE_GTK_DOC_TRUE@ for file in $$files ; do \ +@ENABLE_GTK_DOC_TRUE@ destdir=`dirname $(abs_builddir)/$$file`; \ +@ENABLE_GTK_DOC_TRUE@ test -d "$$destdir" || mkdir -p "$$destdir"; \ +@ENABLE_GTK_DOC_TRUE@ test -f $(abs_srcdir)/$$file && \ +@ENABLE_GTK_DOC_TRUE@ cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ +@ENABLE_GTK_DOC_TRUE@ done; \ +@ENABLE_GTK_DOC_TRUE@ fi; \ @ENABLE_GTK_DOC_TRUE@ fi @ENABLE_GTK_DOC_TRUE@ $(AM_V_at)touch setup-build.stamp @ENABLE_GTK_DOC_TRUE@scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) @ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_SCAN)_source_dir='' ; \ @ENABLE_GTK_DOC_TRUE@ for i in $(DOC_SOURCE_DIR) ; do \ -@ENABLE_GTK_DOC_TRUE@ _source_dir="$${_source_dir} --source-dir=$$i" ; \ +@ENABLE_GTK_DOC_TRUE@ _source_dir="$${_source_dir} --source-dir=$$i" ; \ @ENABLE_GTK_DOC_TRUE@ done ; \ @ENABLE_GTK_DOC_TRUE@ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) @ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ -@ENABLE_GTK_DOC_TRUE@ scanobj_options=""; \ -@ENABLE_GTK_DOC_TRUE@ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ -@ENABLE_GTK_DOC_TRUE@ if test "$$?" = "0"; then \ -@ENABLE_GTK_DOC_TRUE@ if test "x$(V)" = "x1"; then \ -@ENABLE_GTK_DOC_TRUE@ scanobj_options="--verbose"; \ -@ENABLE_GTK_DOC_TRUE@ fi; \ +@ENABLE_GTK_DOC_TRUE@ scanobj_options=""; \ +@ENABLE_GTK_DOC_TRUE@ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ +@ENABLE_GTK_DOC_TRUE@ if test "$$?" = "0"; then \ +@ENABLE_GTK_DOC_TRUE@ if test "x$(V)" = "x1"; then \ +@ENABLE_GTK_DOC_TRUE@ scanobj_options="--verbose"; \ @ENABLE_GTK_DOC_TRUE@ fi; \ -@ENABLE_GTK_DOC_TRUE@ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ -@ENABLE_GTK_DOC_TRUE@ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ +@ENABLE_GTK_DOC_TRUE@ fi; \ +@ENABLE_GTK_DOC_TRUE@ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ +@ENABLE_GTK_DOC_TRUE@ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ @ENABLE_GTK_DOC_TRUE@ else \ -@ENABLE_GTK_DOC_TRUE@ for i in $(SCANOBJ_FILES) ; do \ -@ENABLE_GTK_DOC_TRUE@ test -f $$i || touch $$i ; \ -@ENABLE_GTK_DOC_TRUE@ done \ +@ENABLE_GTK_DOC_TRUE@ for i in $(SCANOBJ_FILES) ; do \ +@ENABLE_GTK_DOC_TRUE@ test -f $$i || touch $$i ; \ +@ENABLE_GTK_DOC_TRUE@ done \ @ENABLE_GTK_DOC_TRUE@ fi @ENABLE_GTK_DOC_TRUE@ $(AM_V_at)touch scan-build.stamp @@ -791,7 +816,7 @@ @ENABLE_GTK_DOC_TRUE@sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent @ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_XML)_source_dir='' ; \ @ENABLE_GTK_DOC_TRUE@ for i in $(DOC_SOURCE_DIR) ; do \ -@ENABLE_GTK_DOC_TRUE@ _source_dir="$${_source_dir} --source-dir=$$i" ; \ +@ENABLE_GTK_DOC_TRUE@ _source_dir="$${_source_dir} --source-dir=$$i" ; \ @ENABLE_GTK_DOC_TRUE@ done ; \ @ENABLE_GTK_DOC_TRUE@ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) @ENABLE_GTK_DOC_TRUE@ $(AM_V_at)touch sgml-build.stamp @@ -799,6 +824,9 @@ @ENABLE_GTK_DOC_TRUE@sgml.stamp: sgml-build.stamp @ENABLE_GTK_DOC_TRUE@ @true +@ENABLE_GTK_DOC_TRUE@$(DOC_MAIN_SGML_FILE): sgml-build.stamp +@ENABLE_GTK_DOC_TRUE@ @true + @ENABLE_GTK_DOC_TRUE@xml/gtkdocentities.ent: Makefile @ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ @ENABLE_GTK_DOC_TRUE@ echo ""; \ @@ -826,12 +854,9 @@ @ENABLE_GTK_DOC_TRUE@ cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) @ENABLE_GTK_DOC_TRUE@ -@test "x$(HTML_IMAGES)" = "x" || \ @ENABLE_GTK_DOC_TRUE@ for file in $(HTML_IMAGES) ; do \ -@ENABLE_GTK_DOC_TRUE@ if test -f $(abs_srcdir)/$$file ; then \ -@ENABLE_GTK_DOC_TRUE@ cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ -@ENABLE_GTK_DOC_TRUE@ fi; \ -@ENABLE_GTK_DOC_TRUE@ if test -f $(abs_builddir)/$$file ; then \ -@ENABLE_GTK_DOC_TRUE@ cp $(abs_builddir)/$$file $(abs_builddir)/html; \ -@ENABLE_GTK_DOC_TRUE@ fi; \ +@ENABLE_GTK_DOC_TRUE@ test -f $(abs_srcdir)/$$file && cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ +@ENABLE_GTK_DOC_TRUE@ test -f $(abs_builddir)/$$file && cp $(abs_builddir)/$$file $(abs_builddir)/html; \ +@ENABLE_GTK_DOC_TRUE@ test -f $$file && cp $$file $(abs_builddir)/html; \ @ENABLE_GTK_DOC_TRUE@ done; @ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @ENABLE_GTK_DOC_TRUE@ $(AM_V_at)touch html-build.stamp @@ -898,7 +923,6 @@ @ENABLE_GTK_DOC_TRUE@ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ @ENABLE_GTK_DOC_TRUE@ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ @ENABLE_GTK_DOC_TRUE@ fi; \ -@ENABLE_GTK_DOC_TRUE@ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ @ENABLE_GTK_DOC_TRUE@ fi @ENABLE_GTK_DOC_TRUE@uninstall-local: diff -Nru modemmanager-1.12.8/docs/reference/api/ModemManager-docs.xml modemmanager-1.16.6/docs/reference/api/ModemManager-docs.xml --- modemmanager-1.12.8/docs/reference/api/ModemManager-docs.xml 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/ModemManager-docs.xml 2021-06-06 21:40:59.000000000 +0800 @@ -15,6 +15,8 @@ For ModemManager version &version; + The latest version of this documentation can be found on-line at + https://www.freedesktop.org/software/ModemManager/doc/latest/ModemManager/. @@ -51,6 +53,8 @@ 2017 2018 2019 + 2020 + 2021 The ModemManager Authors @@ -138,4 +142,8 @@ Index of new symbols in 1.12 + + Index of new symbols in 1.16 + + diff -Nru modemmanager-1.12.8/docs/reference/api/ModemManager-overview.xml modemmanager-1.16.6/docs/reference/api/ModemManager-overview.xml --- modemmanager-1.12.8/docs/reference/api/ModemManager-overview.xml 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/ModemManager-overview.xml 2021-06-06 21:40:59.000000000 +0800 @@ -159,10 +159,10 @@ - MM_FILTER_RULE_CDC_WDM + MM_FILTER_RULE_USBMISC - This filter will automatically flag as allowed all cdc-wdm ports exposed by - devices. Unless there is a will to explicitly forbid the cdc-wdm ports exposed + This filter will automatically flag as allowed all cdc-wdm ports exposed in the + usbmisc subsystem. Unless there is a will to explicitly forbid the cdc-wdm ports exposed by qmi_wwan, cdc_mbim or huawei-cdc-ncm kernel drivers, this filter should always be enabled. @@ -254,7 +254,7 @@ MM_FILTER_RULE_EXPLICIT_BLACKLIST MM_FILTER_RULE_VIRTUAL MM_FILTER_RULE_NET - MM_FILTER_RULE_CDC_WDM + MM_FILTER_RULE_USBMISC MM_FILTER_RULE_TTY MM_FILTER_RULE_TTY_BLACKLIST MM_FILTER_RULE_TTY_MANUAL_SCAN_ONLY @@ -280,7 +280,7 @@ MM_FILTER_RULE_EXPLICIT_BLACKLIST MM_FILTER_RULE_VIRTUAL MM_FILTER_RULE_NET - MM_FILTER_RULE_CDC_WDM + MM_FILTER_RULE_USBMISC MM_FILTER_RULE_TTY MM_FILTER_RULE_TTY_PLATFORM_DRIVER MM_FILTER_RULE_TTY_DRIVER @@ -307,7 +307,7 @@ MM_FILTER_RULE_EXPLICIT_BLACKLIST MM_FILTER_RULE_VIRTUAL MM_FILTER_RULE_NET - MM_FILTER_RULE_CDC_WDM + MM_FILTER_RULE_USBMISC MM_FILTER_RULE_TTY MM_FILTER_RULE_TTY_BLACKLIST MM_FILTER_RULE_TTY_MANUAL_SCAN_ONLY @@ -339,7 +339,7 @@ net and cdc-wdm ports forbidden completely: # MM_FILTER_RULE_NET=0 \ - MM_FILTER_RULE_CDC_WDM=0 \ + MM_FILTER_RULE_USBMISC=0 \ /usr/sbin/ModemManager --filter-policy=DEFAULT @@ -348,7 +348,7 @@ net ports (e.g. 'lo') are also being allowed. # MM_FILTER_RULE_NET=1 \ - MM_FILTER_RULE_CDC_WDM=1 \ + MM_FILTER_RULE_USBMISC=1 \ /usr/sbin/ModemManager --filter-policy=WHITELIST-ONLY diff -Nru modemmanager-1.12.8/docs/reference/api/ModemManager-sections.txt modemmanager-1.16.6/docs/reference/api/ModemManager-sections.txt --- modemmanager-1.12.8/docs/reference/api/ModemManager-sections.txt 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/ModemManager-sections.txt 2021-06-06 21:45:11.000000000 +0800 @@ -140,9 +140,11 @@ MM_MODEM_BAND_CDMA_BC18_US_PS_700 MM_MODEM_BAND_CDMA_BC19_US_LOWER_700 MM_MODEM_LOCATION_SOURCE_AGPS +MM_MODEM_CAPABILITY_LTE_ADVANCED MMModemBandDeprecated MMModemLocationSourceDeprecated +MMModemCapabilityDeprecated MM_DEPRECATED @@ -162,6 +164,8 @@ ID_MM_PORT_TYPE_GPS ID_MM_PORT_TYPE_QCDM ID_MM_PORT_TYPE_AUDIO +ID_MM_PORT_TYPE_QMI +ID_MM_PORT_TYPE_MBIM ID_MM_TTY_BAUDRATE ID_MM_TTY_FLOW_CONTROL diff -Nru modemmanager-1.12.8/docs/reference/api/html/ModemManager-API-break-replacements.html modemmanager-1.16.6/docs/reference/api/html/ModemManager-API-break-replacements.html --- modemmanager-1.12.8/docs/reference/api/html/ModemManager-API-break-replacements.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ModemManager-API-break-replacements.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -303,6 +303,10 @@ #define MM_MODEM_LOCATION_SOURCE_AGPS + +#define +MM_MODEM_CAPABILITY_LTE_ADVANCED + @@ -1109,9 +1113,20 @@

A-GPS location requested.

Since: 1.6

+
+
+

MM_MODEM_CAPABILITY_LTE_ADVANCED

+
#define MM_MODEM_CAPABILITY_LTE_ADVANCED ((MMModemCapabilityDeprecated)(1 << 4))
+
+

MM_MODEM_CAPABILITY_LTE_ADVANCED has been deprecated since version 1.14.0. and should not be used in newly-written code.

+

Modem has LTE Advanced data capability.

+

This value is deprecated because it is not used anywhere. LTE Advanced +capable devices are reported as LTE capable.

+

Since: 1.0

+
+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ModemManager-Common-udev-tags.html modemmanager-1.16.6/docs/reference/api/html/ModemManager-Common-udev-tags.html --- modemmanager-1.12.8/docs/reference/api/html/ModemManager-Common-udev-tags.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ModemManager-Common-udev-tags.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -93,6 +93,14 @@ #define +ID_MM_PORT_TYPE_QMI + + +#define +ID_MM_PORT_TYPE_MBIM + + +#define ID_MM_TTY_BAUDRATE @@ -268,6 +276,30 @@
+

ID_MM_PORT_TYPE_QMI

+
#define ID_MM_PORT_TYPE_QMI "ID_MM_PORT_TYPE_QMI"
+
+

This is a port-specific tag applied to generic ports that we know in advance +are QMI ports.

+

This tag will also prevent other types of probing (e.g. AT, MBIM) on the +port.

+

This tag is not required for QMI ports exposed by the qmi_wwan driver.

+

Since: 1.16

+
+
+
+

ID_MM_PORT_TYPE_MBIM

+
#define ID_MM_PORT_TYPE_MBIM "ID_MM_PORT_TYPE_MBIM"
+
+

This is a port-specific tag applied to generic ports that we know in advance +are MBIM ports.

+

This tag will also prevent other types of probing (e.g. AT, QMI) on the +port.

+

This tag is not required for MBIM ports exposed by the cdc_mbim driver.

+

Since: 1.16

+
+
+

ID_MM_TTY_BAUDRATE

#define ID_MM_TTY_BAUDRATE "ID_MM_TTY_BAUDRATE"
 
@@ -297,6 +329,6 @@
+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ModemManager-Errors.html modemmanager-1.16.6/docs/reference/api/html/ModemManager-Errors.html --- modemmanager-1.12.8/docs/reference/api/html/ModemManager-Errors.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ModemManager-Errors.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -1195,6 +1195,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ModemManager-Flags-and-Enumerations.html modemmanager-1.16.6/docs/reference/api/html/ModemManager-Flags-and-Enumerations.html --- modemmanager-1.12.8/docs/reference/api/html/ModemManager-Flags-and-Enumerations.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ModemManager-Flags-and-Enumerations.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -955,6 +955,13 @@   + +

MM_MODEM_3GPP_REGISTRATION_STATE_ATTACHED_RLOS

+ +

Attached for access to Restricted Local Operator Services (applicable only when on LTE). Since 1.14.

+ +  + @@ -1186,6 +1193,13 @@   +

MM_MODEM_ACCESS_TECHNOLOGY_5GNR

+ +

5GNR (ETSI 27.007: "NG-RAN"). Since 1.14.

+ +  + +

MM_MODEM_ACCESS_TECHNOLOGY_ANY

Mask specifying all access technologies.

@@ -2126,16 +2140,16 @@   -

MM_MODEM_CAPABILITY_LTE_ADVANCED

+

MM_MODEM_CAPABILITY_IRIDIUM

-

Modem has LTE Advanced data capability.

+

Modem has Iridium capabilities.

  -

MM_MODEM_CAPABILITY_IRIDIUM

+

MM_MODEM_CAPABILITY_5GNR

-

Modem has Iridium capabilities.

+

Modem has 5GNR capabilities. Since 1.14.

  @@ -2649,6 +2663,13 @@   +

MM_MODEM_MODE_5G

+ +

5GNR. Since 1.14.

+ +  + +

MM_MODEM_MODE_ANY

Any mode can be used (only this value allowed for POTS modems).

@@ -2979,6 +3000,13 @@   + +

MM_MODEM_PORT_TYPE_IGNORED

+ +

Ignored port. Since 1.16.

+ +  + @@ -4522,6 +4550,6 @@ +
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ModemManager-Version-checks.html modemmanager-1.16.6/docs/reference/api/html/ModemManager-Version-checks.html --- modemmanager-1.12.8/docs/reference/api/html/ModemManager-Version-checks.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ModemManager-Version-checks.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -127,7 +127,7 @@

MM_MINOR_VERSION

-
#define MM_MINOR_VERSION (12)
+
#define MM_MINOR_VERSION (16)
 

Evaluates to the minor version number of ModemManager which this source is compiled against.

@@ -136,7 +136,7 @@

MM_MICRO_VERSION

-
#define MM_MICRO_VERSION (8)
+
#define MM_MICRO_VERSION (6)
 

Evaluates to the micro version number of ModemManager which this source compiled against.

@@ -145,6 +145,6 @@
+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ModemManager.devhelp2 modemmanager-1.16.6/docs/reference/api/html/ModemManager.devhelp2 --- modemmanager-1.12.8/docs/reference/api/html/ModemManager.devhelp2 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ModemManager.devhelp2 2021-06-06 21:45:11.000000000 +0800 @@ -1,5 +1,5 @@ - + @@ -91,6 +91,7 @@ + @@ -158,6 +159,8 @@ + + @@ -175,9 +178,12 @@ + + + @@ -289,6 +295,7 @@ + @@ -313,8 +320,10 @@ + + @@ -418,6 +427,7 @@ + @@ -490,6 +500,7 @@ + @@ -515,6 +526,7 @@ + @@ -644,8 +656,8 @@ - + @@ -698,6 +710,7 @@ + @@ -732,6 +745,7 @@ + diff -Nru modemmanager-1.12.8/docs/reference/api/html/api-index-1-0.html modemmanager-1.16.6/docs/reference/api/html/api-index-1-0.html --- modemmanager-1.12.8/docs/reference/api/html/api-index-1-0.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/api-index-1-0.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -418,6 +418,10 @@ MM_MODEM_BAND_U900, macro in API break replacements
+
+MM_MODEM_CAPABILITY_LTE_ADVANCED, macro in API break replacements +
+

S

MMSerialError, enum in Errors @@ -445,6 +449,6 @@
+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/api-index-1-10.html modemmanager-1.16.6/docs/reference/api/html/api-index-1-10.html --- modemmanager-1.12.8/docs/reference/api/html/api-index-1-10.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/api-index-1-10.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -91,6 +91,6 @@
+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/api-index-1-12.html modemmanager-1.16.6/docs/reference/api/html/api-index-1-12.html --- modemmanager-1.12.8/docs/reference/api/html/api-index-1-12.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/api-index-1-12.html 2021-06-06 21:45:11.000000000 +0800 @@ -7,7 +7,8 @@ - + + @@ -16,7 +17,7 @@ Home Prev - +Next

@@ -36,6 +37,6 @@

+
Generated by GTK-Doc V1.33.1
\ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/api-index-1-16.html modemmanager-1.16.6/docs/reference/api/html/api-index-1-16.html --- modemmanager-1.12.8/docs/reference/api/html/api-index-1-16.html 1970-01-01 08:00:00.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/api-index-1-16.html 2021-06-06 21:45:11.000000000 +0800 @@ -0,0 +1,37 @@ + + + + +Index of new symbols in 1.16: ModemManager Reference Manual + + + + + + + + + + + + + + + +
+

+Index of new symbols in 1.16

+

I

+
+ID_MM_PORT_TYPE_MBIM, macro in Common udev tags +
+
+
+ID_MM_PORT_TYPE_QMI, macro in Common udev tags +
+
+
+ + + \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/api-index-1-2.html modemmanager-1.16.6/docs/reference/api/html/api-index-1-2.html --- modemmanager-1.12.8/docs/reference/api/html/api-index-1-2.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/api-index-1-2.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -59,6 +59,6 @@
+
Generated by GTK-Doc V1.33.1
\ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/api-index-1-4.html modemmanager-1.16.6/docs/reference/api/html/api-index-1-4.html --- modemmanager-1.12.8/docs/reference/api/html/api-index-1-4.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/api-index-1-4.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -29,6 +29,6 @@
+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/api-index-1-6.html modemmanager-1.16.6/docs/reference/api/html/api-index-1-6.html --- modemmanager-1.12.8/docs/reference/api/html/api-index-1-6.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/api-index-1-6.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -44,6 +44,6 @@
+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/api-index-1-8.html modemmanager-1.16.6/docs/reference/api/html/api-index-1-8.html --- modemmanager-1.12.8/docs/reference/api/html/api-index-1-8.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/api-index-1-8.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -29,6 +29,6 @@
+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/api-index-deprecated.html modemmanager-1.16.6/docs/reference/api/html/api-index-deprecated.html --- modemmanager-1.12.8/docs/reference/api/html/api-index-deprecated.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/api-index-deprecated.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -284,11 +284,15 @@
+MM_MODEM_CAPABILITY_LTE_ADVANCED, macro in API break replacements +
+
+
MM_MODEM_LOCATION_SOURCE_AGPS, macro in API break replacements
+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/api-index-full.html modemmanager-1.16.6/docs/reference/api/html/api-index-full.html --- modemmanager-1.12.8/docs/reference/api/html/api-index-full.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/api-index-full.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -127,10 +127,18 @@
+ID_MM_PORT_TYPE_MBIM, macro in Common udev tags +
+
+
ID_MM_PORT_TYPE_QCDM, macro in Common udev tags
+ID_MM_PORT_TYPE_QMI, macro in Common udev tags +
+
+
ID_MM_TTY_BAUDRATE, macro in Common udev tags
@@ -520,6 +528,10 @@
+MM_MODEM_CAPABILITY_LTE_ADVANCED, macro in API break replacements +
+
+
MM_MODEM_LOCATION_SOURCE_AGPS, macro in API break replacements
@@ -575,6 +587,6 @@
+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ch02s02.html modemmanager-1.16.6/docs/reference/api/html/ch02s02.html --- modemmanager-1.12.8/docs/reference/api/html/ch02s02.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ch02s02.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -36,6 +36,6 @@

+
Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ch03s02.html modemmanager-1.16.6/docs/reference/api/html/ch03s02.html --- modemmanager-1.12.8/docs/reference/api/html/ch03s02.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ch03s02.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -43,7 +43,7 @@
  • MM_FILTER_RULE_EXPLICIT_BLACKLIST
  • MM_FILTER_RULE_VIRTUAL
  • MM_FILTER_RULE_NET
  • -
  • MM_FILTER_RULE_CDC_WDM
  • +
  • MM_FILTER_RULE_USBMISC
  • MM_FILTER_RULE_TTY
  • MM_FILTER_RULE_TTY_BLACKLIST
  • MM_FILTER_RULE_TTY_MANUAL_SCAN_ONLY
  • @@ -71,7 +71,7 @@
  • MM_FILTER_RULE_EXPLICIT_BLACKLIST
  • MM_FILTER_RULE_VIRTUAL
  • MM_FILTER_RULE_NET
  • -
  • MM_FILTER_RULE_CDC_WDM
  • +
  • MM_FILTER_RULE_USBMISC
  • MM_FILTER_RULE_TTY
  • MM_FILTER_RULE_TTY_PLATFORM_DRIVER
  • MM_FILTER_RULE_TTY_DRIVER
  • @@ -100,7 +100,7 @@
  • MM_FILTER_RULE_EXPLICIT_BLACKLIST
  • MM_FILTER_RULE_VIRTUAL
  • MM_FILTER_RULE_NET
  • -
  • MM_FILTER_RULE_CDC_WDM
  • +
  • MM_FILTER_RULE_USBMISC
  • MM_FILTER_RULE_TTY
  • MM_FILTER_RULE_TTY_BLACKLIST
  • MM_FILTER_RULE_TTY_MANUAL_SCAN_ONLY
  • @@ -133,7 +133,7 @@

     # MM_FILTER_RULE_NET=0 \
    -  MM_FILTER_RULE_CDC_WDM=0 \
    +  MM_FILTER_RULE_USBMISC=0 \
       /usr/sbin/ModemManager --filter-policy=DEFAULT

    @@ -144,7 +144,7 @@

     # MM_FILTER_RULE_NET=1 \
    -  MM_FILTER_RULE_CDC_WDM=1 \
    +  MM_FILTER_RULE_USBMISC=1 \
       /usr/sbin/ModemManager --filter-policy=WHITELIST-ONLY

    @@ -154,6 +154,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ch04s02.html modemmanager-1.16.6/docs/reference/api/html/ch04s02.html --- modemmanager-1.12.8/docs/reference/api/html/ch04s02.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ch04s02.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -109,6 +109,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ch04s03.html modemmanager-1.16.6/docs/reference/api/html/ch04s03.html --- modemmanager-1.12.8/docs/reference/api/html/ch04s03.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ch04s03.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -95,6 +95,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ch04s04.html modemmanager-1.16.6/docs/reference/api/html/ch04s04.html --- modemmanager-1.12.8/docs/reference/api/html/ch04s04.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ch04s04.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -54,7 +54,7 @@ 24 25
    G_MODULE_EXPORT MMPlugin *
    -mm_plugin_create (void)
    +mm_plugin_create (void)
     {
         static const gchar *subsystems[] = { "tty", NULL };
         static const guint16 vendor_ids[] = { 0xabcd, 0 };
    @@ -113,7 +113,7 @@
     21
     22
    G_MODULE_EXPORT MMPlugin *
    -mm_plugin_create (void)
    +mm_plugin_create (void)
     {
         static const gchar *subsystems[] = { "tty", NULL };
         static const gchar *vendor_strings[] = { "vendor", NULL };
    @@ -212,7 +212,7 @@
     };
     
     G_MODULE_EXPORT MMPlugin *
    -mm_plugin_create (void)
    +mm_plugin_create (void)
     {
         static const gchar *subsystems[] = { "tty", NULL };
         static const guint16 vendor_ids[] = { 0xabcd, 0 };
    @@ -241,6 +241,6 @@
     
    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ch06s02.html modemmanager-1.16.6/docs/reference/api/html/ch06s02.html --- modemmanager-1.12.8/docs/reference/api/html/ch06s02.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ch06s02.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -77,6 +77,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ch06s03.html modemmanager-1.16.6/docs/reference/api/html/ch06s03.html --- modemmanager-1.12.8/docs/reference/api/html/ch06s03.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ch06s03.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -41,6 +41,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ch06s04.html modemmanager-1.16.6/docs/reference/api/html/ch06s04.html --- modemmanager-1.12.8/docs/reference/api/html/ch06s04.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ch06s04.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -81,6 +81,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ch16.html modemmanager-1.16.6/docs/reference/api/html/ch16.html --- modemmanager-1.12.8/docs/reference/api/html/ch16.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ch16.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -59,6 +59,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ch16s02.html modemmanager-1.16.6/docs/reference/api/html/ch16s02.html --- modemmanager-1.12.8/docs/reference/api/html/ch16s02.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ch16s02.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -46,6 +46,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ch16s03.html modemmanager-1.16.6/docs/reference/api/html/ch16s03.html --- modemmanager-1.12.8/docs/reference/api/html/ch16s03.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ch16s03.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -64,6 +64,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ch16s04.html modemmanager-1.16.6/docs/reference/api/html/ch16s04.html --- modemmanager-1.12.8/docs/reference/api/html/ch16s04.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ch16s04.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -55,6 +55,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Bearer.html modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Bearer.html --- modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Bearer.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Bearer.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -169,7 +169,7 @@

    If the bearer specifies configuration via PPP or DHCP, only the - "method" item will be present. + "method" item is guaranteed to be present.

    Additional items which are only applicable when using the MM_BEARER_IP_METHOD_STATIC @@ -346,12 +346,16 @@

     Stats  readable   a{sv}
     
    -

    If the modem supports it, this property will show statistics of the - ongoing connection. +

    If the modem supports it, this property will show statistics associated + to the bearer. +

    +

    There are two main different statistic types reported: either applicable + to the ongoing connection, or otherwise compiled for all connections + that have been done on this bearer object.

    When the connection is disconnected automatically or explicitly by the - user, the values in this property will show the last values cached. - The statistics are reset + user, the values applicable to the ongoing connection will show the last + values cached.

    The following items may appear in the list of statistics:

    @@ -364,19 +368,63 @@

    "rx-bytes"

    - Number of bytes received without error, given as an unsigned 64-bit integer value (signature "t"). + Number of bytes received without error in the ongoing connection, + given as an unsigned 64-bit integer value (signature + "t").

    "tx-bytes"

    - Number bytes transmitted without error, given as an unsigned 64-bit integer value (signature "t"). + Number of bytes transmitted without error in the ongoing + connection, given as an unsigned 64-bit integer value (signature + "t").

    "duration"

    - Duration of the connection, in seconds, given as an unsigned integer value (signature "u"). + Duration of the ongoing connection, in seconds, given as an + unsigned integer value (signature "u"). + + + +

    "attempts"

    + + Total number of connection attempts done with this bearer, given + as an unsigned integer value (signature "u"). + + + +

    "failed-attempts"

    + + Number of failed connection attempts done with this bearer, + given as an unsigned integer value (signature + "u"). + + + +

    "total-rx-bytes"

    + + Total number of bytes received without error in all the successful + connection establishments, given as an unsigned 64-bit integer + value (signature "t"). + + + +

    "total-tx-bytes"

    + + Total number of bytes transmitted without error in all the + successful connection establishments, given as an unsigned 64-bit + integer value (signature "t"). + + + +

    "total-duration"

    + + Total duration of all the successful connection establishments, in + seconds, given as an unsigned integer value (signature + "u"). @@ -414,6 +462,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Call.html modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Call.html --- modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Call.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Call.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -341,6 +341,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Firmware.html modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Firmware.html --- modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Firmware.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Firmware.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -285,6 +285,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Location.html modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Location.html --- modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Location.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Location.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -78,18 +78,26 @@ IN b signal_location);

    Configure the location sources to use when gathering location - information. Also enable or disable location information gathering. - This method may require the client to authenticate itself. + information. Adding new location sources may require to enable them + in the device (e.g. the GNSS engine will need to be started explicitly + if a GPS source is requested by the user). In the same way, removing + location sources may require to disable them in the device (e.g. when + no GPS sources are requested by the user, the GNSS engine will need + to be stopped explicitly).

    -

    When signals are emitted, any client application (including malicious - ones!) can listen for location updates unless D-Bus permissions restrict - these signals from certain users. If further security is desired, the +

    This method may require the client to authenticate itself. +

    +

    When location signaling is enabled by the user, any client application (including + malicious ones!) would be able to use the "Location" + property to receive location updates. If further security is desired, the signal_location argument can be set to FALSE to disable location updates via D-Bus signals and require applications to call - authenticated APIs (like - GetLocation() - ) to get - location information. + authenticated APIs (like GetLocation()) + to get the location information. +

    +

    By default location signaling is disabled, and therefore the + "Location" property will not + be usable until explicitly enabled by the user.

    The optional MM_MODEM_LOCATION_SOURCE_AGPS_MSA @@ -172,14 +180,20 @@

     InjectAssistanceData (IN  ay data);
     
    -

    Inject assistance data to the GNSS module. - The data files should be downloaded using external means from the URLs specified in - the AssistanceDataServers property. +

    Inject assistance data to the GNSS module, which will allow it to have a more + accurate positioning information.

    -

    The user does not need to specify the assistance data type being given. +

    The data files should be downloaded using external means from the URLs specified in + the AssistanceDataServers property. The + user does not need to specify the assistance data type being given.

    There is no maximum data size limit specified, default DBus system bus limits apply.

    +

    This method may be used when the device does not have a mobile network connection by + itself, and therefore it cannot use any A-GPS server to improve the accuracy of the + position. In this case, the user can instead download the assistance data files using + a WiFi or LAN network, and inject them to the GNSS engine manually. +

    @@ -271,9 +285,16 @@ gathering is enabled. If the modem supports multiple location types it may return more than one here.

    -

    Note that if the device was told not to emit updated location - information when location information gathering was initially enabled, - this property may not return any location information for security reasons. +

    For security reasons, the location information updates via this + property are disabled by default. Users can use this property to monitor + location updates only if the location signals are enabled with + Setup(), + but considering that enabling the location signals would allow all users + to receive property updates as well, not just the process that enabled them. + For a finer grained access control, the user can use the + GetLocation() + method instead, which may require the client to authenticate itself on every + call.

    This dictionary is composed of a MMModemLocationSource @@ -524,6 +545,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Messaging.html modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Messaging.html --- modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Messaging.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Messaging.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -237,6 +237,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd.html modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd.html --- modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Modem3gpp.Ussd.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -173,6 +173,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Modem3gpp.html modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Modem3gpp.html --- modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Modem3gpp.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Modem3gpp.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -329,7 +329,27 @@
     Pco  readable   a(ubay)
     
    -

    The raw PCOs received from the network. +

    The raw PCOs received from the network, given as array of PCO + elements (signature "a(ubay)"). +

    +

    Each PCO is defined as a sequence of 3 fields: +

    +
      +
    1. + The session ID associated with the PCO, given as an + unsigned integer value (signature "u"). +
    2. +
    3. + The flag that indicates whether the PCO data contains the + complete PCO structure received from the network, given as + a boolean value (signature "b"). +
    4. +
    5. + The raw PCO data, given as an array of bytes (signature + "ay"). +
    6. +
    +


    @@ -352,8 +372,9 @@

    The network may decide to use different settings during the actual device attach procedure, e.g. if the device is roaming or no explicit settings were requested, - so the properties shown in the org.freedesktop.ModemManager1.Modem.Modem3gpp.InitialEpsBearer:InitialEpsBearer - may be totally different. + so the values shown in the + "InitialEpsBearer" + bearer object may be totally different.

    This is a read-only property, updating these settings should be done using the SetInitialEpsBearerSettings() @@ -363,6 +384,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.ModemCdma.html modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.ModemCdma.html --- modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.ModemCdma.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.ModemCdma.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -202,7 +202,7 @@ - +

    a{sv} status_changes:

    Properties that have changed as a result of this activation state chage, including "mdn" and "min". The dictionary may be empty if the changed properties are unknown.

    Properties that have changed as a result of this activation state change, including "mdn" and "min". The dictionary may be empty if the changed properties are unknown.

    @@ -289,6 +289,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Oma.html modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Oma.html --- modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Oma.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Oma.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -250,6 +250,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Signal.html modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Signal.html --- modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Signal.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Signal.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -47,6 +47,7 @@ Gsm readable a{sv} Umts readable a{sv} Lte readable a{sv} +Nr5g readable a{sv}
    @@ -307,9 +308,54 @@

    +
    +
    +

    The "Nr5g" property

    +
    +Nr5g  readable   a{sv}
    +
    +

    Dictionary of available signal information for the 5G access + technology. +

    +

    This dictionary is composed of a string key, with an associated data + which contains type-specific information. +

    +

    +
    ++++ + + + + + + + + + + + + + + +

    "rsrq"

    + The 5G RSRQ (Reference Signal Received Quality), in dB, given as + a floating point value (signature "d"). +

    "rsrp"

    + The 5G (Reference Signal Received Power), in dBm, given as + a floating point value (signature "d"). +

    "snr"

    + The 5G S/R ratio, in dB, given as + a floating point value (signature "d"). +

    +

    +

    +
    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Simple.html modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Simple.html --- modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Simple.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Simple.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -134,8 +134,9 @@

    "number"

    - For POTS devices the number to dial,, + Number to dial for the data connection, given as a string value (signature "s"). + Deprecated since version 1.10.0. @@ -237,7 +238,7 @@ -

    "access-technology"

    +

    "access-technologies"

    A MMModemAccessTechnology value, given only when registered, as an unsigned integer value @@ -317,6 +318,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Time.html modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Time.html --- modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Time.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Time.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -157,6 +157,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Voice.html modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Voice.html --- modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Voice.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.Voice.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -326,6 +326,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.html modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.html --- modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Modem.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -47,6 +47,7 @@ SetCurrentCapabilities (IN u capabilities); SetCurrentModes (IN (uu) modes); SetCurrentBands (IN au bands); +SetPrimarySimSlot (IN u sim_slot); Command (IN s cmd, IN u timeout, OUT s response); @@ -64,6 +65,8 @@

    Properties

     Sim                           readable   o
    +SimSlots                      readable   ao
    +PrimarySimSlot                readable   u
     Bearers                       readable   ao
     SupportedCapabilities         readable   au
     CurrentCapabilities           readable   u
    @@ -205,7 +208,7 @@
     
     
     

    "number"

    -

    Telephone number to dial, given as a string value (signature "s"). Required in POTS.

    +

    Number to dial for the data connection, given as a string value (signature "s"). Deprecated since version 1.10.0.

    @@ -223,7 +226,7 @@

    IN a{sv} properties:

    -

    List of properties to assign to the bearer after creating it.

    +

    Dictionary of properties needed to get the bearer connected.

    OUT o path:

    @@ -317,7 +320,12 @@
     SetCurrentCapabilities (IN  u capabilities);
     
    -

    Set the capabilities of the device. A restart of the modem may be required. +

    Set the capabilities of the device. +

    +

    The given bitmask should be supported by the modem, as specified in the + "SupportedCapabilities" property. +

    +

    This command may power-cycle the device.

    @@ -375,13 +383,45 @@
    +

    The SetPrimarySimSlot() method

    +
    +SetPrimarySimSlot (IN  u sim_slot);
    +
    +

    Selects which SIM slot to be considered as primary, on devices that expose + multiple slots in the "SimSlots" property. +

    +

    When the switch happens the modem may require a full device reprobe, so the modem + object in DBus will get removed, and recreated once the selected SIM slot is in + use. +

    +

    There is no limitation on which SIM slot to select, so the user may also set as + primary a slot that doesn't currently have any valid SIM card inserted. +

    +
    ++++ + + + + +

    IN u sim_slot:

    SIM slot number to set as primary.

    + +
    +

    The Command() method

     Command (IN  s cmd,
              IN  u timeout,
              OUT s response);
     
    -

    +

    Send an arbitrary AT command to a modem and get the response. +

    +

    Note that using this interface call is only allowed when running + ModemManager in debug mode or if the project was built using + the with-at-command-via-dbus configure option. +

    @@ -390,15 +430,15 @@ - + - + - +

    IN s cmd:

    The command string, e.g. "AT+GCAP" or "+GCAP" (leading AT is inserted if necessary).

    IN u timeout:

    The number of seconds to wait for a response.

    OUT s response:

    The modem's response.

    @@ -444,7 +484,56 @@
     Sim  readable   o
     
    -

    The path of the SIM object available in this device, if any. +

    The path of the primary active SIM object available in this device, + if any. +

    +

    This SIM object is the one used for network registration and data + connection setup. +

    +

    If multiple org.freedesktop.ModemManager1.Modem.SimSlots are + supported, the org.freedesktop.ModemManager1.Modem.PrimarySimSlot + index value specifies which is the slot number where this SIM card + is available. +

    +
    +
    +
    +

    The "SimSlots" property

    +
    +SimSlots  readable   ao
    +
    +

    The list of SIM slots available in the system, including the SIM object + paths if the cards are present. If a given SIM slot at a given index + doesn't have a SIM card available, an empty object path will be given. +

    +

    The length of this array of objects will be equal to the amount of + available SIM slots in the system, and the index in the array is the + slot index. +

    +

    This list includes the SIM object considered as primary active SIM slot + (org.freedesktop.ModemManager1.Modem.Sim) at index + org.freedesktop.ModemManager1.Modem.ActiveSimSlot. +

    +
    +
    +
    +

    The "PrimarySimSlot" property

    +
    +PrimarySimSlot  readable   u
    +
    +

    The index of the primary active SIM slot in the + org.freedesktop.ModemManager1.Modem.SimSlots array, given in the [1,N] + range. +

    +

    If multiple SIM slots aren't supported, this property will report + value 0. +

    +

    In a Multi SIM Single Standby setup, this index identifies the only SIM + that is currently active. All the remaining slots will be inactive. +

    +

    In a Multi SIM Multi Standby setup, this index identifies the active SIM + that is considered primary, i.e. the one that will be used when a data + connection is setup.


    @@ -467,12 +556,16 @@ SupportedCapabilities readable au

    List of MMModemCapability - values, specifying the combinations of generic family of access + bitmasks, specifying the combinations of generic family of access technologies the modem supports.

    -

    If the modem doesn't allow changing the current capabilities, a single entry with - MM_MODEM_CAPABILITY_ANY - will be given. +

    If the modem doesn't allow changing the current capabilities, the + list will report one single entry with the same bitmask as in + "CurrentCapabilities". +

    +

    Only multimode devices implementing both 3GPP (GSM/UMTS/LTE/5GNR) and + 3GPP2 (CDMA/EVDO) specs will report more than one combination of + capabilities.


    @@ -482,8 +575,11 @@ CurrentCapabilities readable u

    Bitmask of MMModemCapability - values, specifying the generic family of access technologies the modem - currently supports without a firmware reload or reinitialization. + values, specifying the currently used generic family of access + technologies. +

    +

    This bitmask will be one of the ones listed in + "SupportedCapabilities".


    @@ -846,6 +942,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Sim.html modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Sim.html --- modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Sim.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Sim.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -47,8 +47,10 @@

    Properties

    +Active              readable   b
     SimIdentifier       readable   s
     Imsi                readable   s
    +Eid                 readable   s
     OperatorIdentifier  readable   s
     OperatorName        readable   s
     EmergencyNumbers    readable   as
    @@ -162,6 +164,21 @@
     

    Property Details

    +

    The "Active" property

    +
    +Active  readable   b
    +
    +

    Boolean indicating whether the SIM is currently active. +

    +

    On systems that support Multi SIM Single Standby, only one SIM may be + active at any given time, which will be the one considered primary. +

    +

    On systems that support Multi SIM Multi Standby, more than one SIM may + be active at any given time, but only one of them is considered primary. +

    +
    +
    +

    The "SimIdentifier" property

     SimIdentifier  readable   s
    @@ -183,6 +200,15 @@
     

    +

    The "Eid" property

    +
    +Eid  readable   s
    +
    +

    The EID of the SIM card, if any. +

    +
    +
    +

    The "OperatorIdentifier" property

     OperatorIdentifier  readable   s
    @@ -213,6 +239,6 @@
     
    +
    Generated by GTK-Doc V1.33.1
    \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Sms.html modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Sms.html --- modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Sms.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.Sms.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -310,6 +310,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.html modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.html --- modemmanager-1.12.8/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/gdbus-org.freedesktop.ModemManager1.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -226,6 +226,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/index.html modemmanager-1.16.6/docs/reference/api/html/index.html --- modemmanager-1.12.8/docs/reference/api/html/index.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/index.html 2021-06-06 21:45:11.000000000 +0800 @@ -6,7 +6,7 @@ - + @@ -36,10 +36,12 @@

    - For ModemManager version 1.12.8 + For ModemManager version 1.16.6 + The latest version of this documentation can be found on-line at + https://www.freedesktop.org/software/ModemManager/doc/latest/ModemManager/.

    -
    +

    Permission is granted to copy, distribute and/or modify this @@ -203,9 +205,10 @@

    Index of new symbols in 1.8
    Index of new symbols in 1.10
    Index of new symbols in 1.12
    +
    Index of new symbols in 1.16
    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-common-types.html modemmanager-1.16.6/docs/reference/api/html/ref-common-types.html --- modemmanager-1.12.8/docs/reference/api/html/ref-common-types.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-common-types.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -38,6 +38,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-compat.html modemmanager-1.16.6/docs/reference/api/html/ref-compat.html --- modemmanager-1.12.8/docs/reference/api/html/ref-compat.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-compat.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -30,6 +30,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-dbus-bus-name.html modemmanager-1.16.6/docs/reference/api/html/ref-dbus-bus-name.html --- modemmanager-1.12.8/docs/reference/api/html/ref-dbus-bus-name.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-dbus-bus-name.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -32,6 +32,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-dbus-object-bearer.html modemmanager-1.16.6/docs/reference/api/html/ref-dbus-object-bearer.html --- modemmanager-1.12.8/docs/reference/api/html/ref-dbus-object-bearer.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-dbus-object-bearer.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -33,6 +33,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-dbus-object-call.html modemmanager-1.16.6/docs/reference/api/html/ref-dbus-object-call.html --- modemmanager-1.12.8/docs/reference/api/html/ref-dbus-object-call.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-dbus-object-call.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -32,6 +32,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-dbus-object-manager.html modemmanager-1.16.6/docs/reference/api/html/ref-dbus-object-manager.html --- modemmanager-1.12.8/docs/reference/api/html/ref-dbus-object-manager.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-dbus-object-manager.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -40,6 +40,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-dbus-object-modem.html modemmanager-1.16.6/docs/reference/api/html/ref-dbus-object-modem.html --- modemmanager-1.12.8/docs/reference/api/html/ref-dbus-object-modem.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-dbus-object-modem.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -94,6 +94,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-dbus-object-sim.html modemmanager-1.16.6/docs/reference/api/html/ref-dbus-object-sim.html --- modemmanager-1.12.8/docs/reference/api/html/ref-dbus-object-sim.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-dbus-object-sim.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -33,6 +33,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-dbus-object-sms.html modemmanager-1.16.6/docs/reference/api/html/ref-dbus-object-sms.html --- modemmanager-1.12.8/docs/reference/api/html/ref-dbus-object-sms.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-dbus-object-sms.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -32,6 +32,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-dbus-standard-interfaces-introspectables.html modemmanager-1.16.6/docs/reference/api/html/ref-dbus-standard-interfaces-introspectables.html --- modemmanager-1.12.8/docs/reference/api/html/ref-dbus-standard-interfaces-introspectables.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-dbus-standard-interfaces-introspectables.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -37,6 +37,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-dbus-standard-interfaces-objectmanager.html modemmanager-1.16.6/docs/reference/api/html/ref-dbus-standard-interfaces-objectmanager.html --- modemmanager-1.12.8/docs/reference/api/html/ref-dbus-standard-interfaces-objectmanager.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-dbus-standard-interfaces-objectmanager.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -36,6 +36,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-dbus-standard-interfaces.html modemmanager-1.16.6/docs/reference/api/html/ref-dbus-standard-interfaces.html --- modemmanager-1.12.8/docs/reference/api/html/ref-dbus-standard-interfaces.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-dbus-standard-interfaces.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -53,6 +53,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-dbus.html modemmanager-1.16.6/docs/reference/api/html/ref-dbus.html --- modemmanager-1.12.8/docs/reference/api/html/ref-dbus.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-dbus.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -95,6 +95,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-migrating.html modemmanager-1.16.6/docs/reference/api/html/ref-migrating.html --- modemmanager-1.12.8/docs/reference/api/html/ref-migrating.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-migrating.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -49,6 +49,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-overview-introduction.html modemmanager-1.16.6/docs/reference/api/html/ref-overview-introduction.html --- modemmanager-1.12.8/docs/reference/api/html/ref-overview-introduction.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-overview-introduction.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -57,6 +57,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-overview-modem-detection.html modemmanager-1.16.6/docs/reference/api/html/ref-overview-modem-detection.html --- modemmanager-1.12.8/docs/reference/api/html/ref-overview-modem-detection.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-overview-modem-detection.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -44,6 +44,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-overview-modem-filter.html modemmanager-1.16.6/docs/reference/api/html/ref-overview-modem-filter.html --- modemmanager-1.12.8/docs/reference/api/html/ref-overview-modem-filter.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-overview-modem-filter.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -96,10 +96,10 @@

  • -

    MM_FILTER_RULE_CDC_WDM

    +

    MM_FILTER_RULE_USBMISC

    - This filter will automatically flag as allowed all cdc-wdm ports exposed by - devices. Unless there is a will to explicitly forbid the cdc-wdm ports exposed + This filter will automatically flag as allowed all cdc-wdm ports exposed in the + usbmisc subsystem. Unless there is a will to explicitly forbid the cdc-wdm ports exposed by qmi_wwan, cdc_mbim or huawei-cdc-ncm kernel drivers, this filter should always be enabled.

    @@ -171,6 +171,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-overview-modem-object-creation.html modemmanager-1.16.6/docs/reference/api/html/ref-overview-modem-object-creation.html --- modemmanager-1.12.8/docs/reference/api/html/ref-overview-modem-object-creation.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-overview-modem-object-creation.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -34,6 +34,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-overview-modem-port-probing.html modemmanager-1.16.6/docs/reference/api/html/ref-overview-modem-port-probing.html --- modemmanager-1.12.8/docs/reference/api/html/ref-overview-modem-port-probing.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-overview-modem-port-probing.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -133,6 +133,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-overview-modem-state-machine.html modemmanager-1.16.6/docs/reference/api/html/ref-overview-modem-state-machine.html --- modemmanager-1.12.8/docs/reference/api/html/ref-overview-modem-state-machine.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-overview-modem-state-machine.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -117,6 +117,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-overview-plugin-specific-modems.html modemmanager-1.16.6/docs/reference/api/html/ref-overview-plugin-specific-modems.html --- modemmanager-1.12.8/docs/reference/api/html/ref-overview-plugin-specific-modems.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-overview-plugin-specific-modems.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -70,6 +70,6 @@

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-overview.html modemmanager-1.16.6/docs/reference/api/html/ref-overview.html --- modemmanager-1.12.8/docs/reference/api/html/ref-overview.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-overview.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -56,6 +56,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/ref-udev.html modemmanager-1.16.6/docs/reference/api/html/ref-udev.html --- modemmanager-1.12.8/docs/reference/api/html/ref-udev.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/ref-udev.html 2021-06-06 21:45:11.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -30,6 +30,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/api/html/style.css modemmanager-1.16.6/docs/reference/api/html/style.css --- modemmanager-1.12.8/docs/reference/api/html/style.css 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/api/html/style.css 2021-06-06 21:45:11.000000000 +0800 @@ -61,18 +61,6 @@ color: #729fcf; } -div.informaltable table -{ - border-collapse: separate; - border-spacing: 1em 0.3em; - border: none; -} - -div.informaltable table td, div.informaltable table th -{ - vertical-align: top; -} - .function_type, .variable_type, .property_type, @@ -127,6 +115,7 @@ margin: 0.25em; } +div.informaltable table[border="1"], div.table table { border-collapse: collapse; @@ -135,6 +124,8 @@ border: solid 1px #babdb6; } +div.informaltable table[border="1"] td, +div.informaltable table th, div.table table td, div.table table th { /* tango:aluminium 3 */ @@ -143,6 +134,7 @@ vertical-align: top; } +div.informaltable table[border="1"] th, div.table table th { /* tango:aluminium 2 */ @@ -463,6 +455,11 @@ } } +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .hll { background-color: #ffffcc } .c { color: #408080; font-style: italic } /* Comment */ .err { border: 1px solid #FF0000 } /* Error */ diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/Makefile.am modemmanager-1.16.6/docs/reference/libmm-glib/Makefile.am --- modemmanager-1.12.8/docs/reference/libmm-glib/Makefile.am 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/Makefile.am 2021-06-06 21:40:59.000000000 +0800 @@ -86,6 +86,7 @@ $(DOC_MODULE).interfaces \ $(DOC_MODULE).prerequisites \ $(DOC_MODULE).signals \ + $(DOC_MODULE).actions \ *.stamp \ -rf xml html tmpl \ $(NULL) diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/Makefile.in modemmanager-1.16.6/docs/reference/libmm-glib/Makefile.in --- modemmanager-1.12.8/docs/reference/libmm-glib/Makefile.in 2020-03-14 17:16:02.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/Makefile.in 2021-06-06 21:43:42.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,6 +15,24 @@ @SET_MAKE@ # -*- mode: makefile -*- +# +# gtk-doc.make - make rules for gtk-doc +# Copyright (C) 2003 James Henstridge +# 2004-2007 Damon Chaplin +# 2007-2017 Stefan Sauer +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . #################################### # Everything below here is generic # @@ -96,14 +114,14 @@ subdir = docs/reference/libmm-glib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -201,6 +219,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -274,9 +294,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -321,6 +345,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -448,7 +473,8 @@ @ENABLE_GTK_DOC_FALSE@ $(DOC_MODULE).hierarchy \ @ENABLE_GTK_DOC_FALSE@ $(DOC_MODULE).interfaces \ @ENABLE_GTK_DOC_FALSE@ $(DOC_MODULE).prerequisites \ -@ENABLE_GTK_DOC_FALSE@ $(DOC_MODULE).signals *.stamp -rf xml \ +@ENABLE_GTK_DOC_FALSE@ $(DOC_MODULE).signals \ +@ENABLE_GTK_DOC_FALSE@ $(DOC_MODULE).actions *.stamp -rf xml \ @ENABLE_GTK_DOC_FALSE@ html tmpl $(NULL) @ENABLE_GTK_DOC_TRUE@CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) \ @ENABLE_GTK_DOC_TRUE@ $(DOC_STAMPS) gtkdoc-check.test \ @@ -463,7 +489,8 @@ @ENABLE_GTK_DOC_TRUE@ $(DOC_MODULE).hierarchy \ @ENABLE_GTK_DOC_TRUE@ $(DOC_MODULE).interfaces \ @ENABLE_GTK_DOC_TRUE@ $(DOC_MODULE).prerequisites \ -@ENABLE_GTK_DOC_TRUE@ $(DOC_MODULE).signals *.stamp -rf xml \ +@ENABLE_GTK_DOC_TRUE@ $(DOC_MODULE).signals \ +@ENABLE_GTK_DOC_TRUE@ $(DOC_MODULE).actions *.stamp -rf xml \ @ENABLE_GTK_DOC_TRUE@ html tmpl $(NULL) @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp @@ -471,34 +498,34 @@ @ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp #### setup #### -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_$(V)) -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_@AM_V@) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_@AM_DEFAULT_V@) @ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SETUP_0 = @echo " DOC Preparing build"; #### scan #### -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_$(V)) -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_@AM_V@) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_@AM_DEFAULT_V@) @ENABLE_GTK_DOC_TRUE@GTK_DOC_V_SCAN_0 = @echo " DOC Scanning header files"; -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_$(V)) -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_@AM_V@) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_@AM_DEFAULT_V@) @ENABLE_GTK_DOC_TRUE@GTK_DOC_V_INTROSPECT_0 = @echo " DOC Introspecting gobjects"; #### xml #### -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XML = $(GTK_DOC_V_XML_$(V)) -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XML = $(GTK_DOC_V_XML_@AM_V@) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_@AM_DEFAULT_V@) @ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XML_0 = @echo " DOC Building XML"; #### html #### -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_$(V)) -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_@AM_V@) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_@AM_DEFAULT_V@) @ENABLE_GTK_DOC_TRUE@GTK_DOC_V_HTML_0 = @echo " DOC Building HTML"; -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_$(V)) -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_@AM_V@) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_@AM_DEFAULT_V@) @ENABLE_GTK_DOC_TRUE@GTK_DOC_V_XREF_0 = @echo " DOC Fixing cross-references"; #### pdf #### -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_$(V)) -@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_@AM_V@) +@ENABLE_GTK_DOC_TRUE@GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_@AM_DEFAULT_V@) @ENABLE_GTK_DOC_TRUE@GTK_DOC_V_PDF_0 = @echo " DOC Building PDF"; all: all-am @@ -621,11 +648,11 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@ENABLE_GTK_DOC_FALSE@distclean-local: +@ENABLE_GTK_DOC_FALSE@clean-local: @ENABLE_GTK_DOC_FALSE@uninstall-local: @ENABLE_GTK_DOC_FALSE@maintainer-clean-local: @ENABLE_GTK_DOC_FALSE@install-data-local: -@ENABLE_GTK_DOC_FALSE@clean-local: +@ENABLE_GTK_DOC_FALSE@distclean-local: clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am @@ -728,38 +755,38 @@ @ENABLE_GTK_DOC_TRUE@setup-build.stamp: @ENABLE_GTK_DOC_TRUE@ -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ -@ENABLE_GTK_DOC_TRUE@ files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ -@ENABLE_GTK_DOC_TRUE@ if test "x$$files" != "x" ; then \ -@ENABLE_GTK_DOC_TRUE@ for file in $$files ; do \ -@ENABLE_GTK_DOC_TRUE@ destdir=`dirname $(abs_builddir)/$$file`; \ -@ENABLE_GTK_DOC_TRUE@ test -d "$$destdir" || mkdir -p "$$destdir"; \ -@ENABLE_GTK_DOC_TRUE@ test -f $(abs_srcdir)/$$file && \ -@ENABLE_GTK_DOC_TRUE@ cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ -@ENABLE_GTK_DOC_TRUE@ done; \ -@ENABLE_GTK_DOC_TRUE@ fi; \ +@ENABLE_GTK_DOC_TRUE@ files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ +@ENABLE_GTK_DOC_TRUE@ if test "x$$files" != "x" ; then \ +@ENABLE_GTK_DOC_TRUE@ for file in $$files ; do \ +@ENABLE_GTK_DOC_TRUE@ destdir=`dirname $(abs_builddir)/$$file`; \ +@ENABLE_GTK_DOC_TRUE@ test -d "$$destdir" || mkdir -p "$$destdir"; \ +@ENABLE_GTK_DOC_TRUE@ test -f $(abs_srcdir)/$$file && \ +@ENABLE_GTK_DOC_TRUE@ cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ +@ENABLE_GTK_DOC_TRUE@ done; \ +@ENABLE_GTK_DOC_TRUE@ fi; \ @ENABLE_GTK_DOC_TRUE@ fi @ENABLE_GTK_DOC_TRUE@ $(AM_V_at)touch setup-build.stamp @ENABLE_GTK_DOC_TRUE@scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) @ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_SCAN)_source_dir='' ; \ @ENABLE_GTK_DOC_TRUE@ for i in $(DOC_SOURCE_DIR) ; do \ -@ENABLE_GTK_DOC_TRUE@ _source_dir="$${_source_dir} --source-dir=$$i" ; \ +@ENABLE_GTK_DOC_TRUE@ _source_dir="$${_source_dir} --source-dir=$$i" ; \ @ENABLE_GTK_DOC_TRUE@ done ; \ @ENABLE_GTK_DOC_TRUE@ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) @ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ -@ENABLE_GTK_DOC_TRUE@ scanobj_options=""; \ -@ENABLE_GTK_DOC_TRUE@ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ -@ENABLE_GTK_DOC_TRUE@ if test "$$?" = "0"; then \ -@ENABLE_GTK_DOC_TRUE@ if test "x$(V)" = "x1"; then \ -@ENABLE_GTK_DOC_TRUE@ scanobj_options="--verbose"; \ -@ENABLE_GTK_DOC_TRUE@ fi; \ +@ENABLE_GTK_DOC_TRUE@ scanobj_options=""; \ +@ENABLE_GTK_DOC_TRUE@ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ +@ENABLE_GTK_DOC_TRUE@ if test "$$?" = "0"; then \ +@ENABLE_GTK_DOC_TRUE@ if test "x$(V)" = "x1"; then \ +@ENABLE_GTK_DOC_TRUE@ scanobj_options="--verbose"; \ @ENABLE_GTK_DOC_TRUE@ fi; \ -@ENABLE_GTK_DOC_TRUE@ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ -@ENABLE_GTK_DOC_TRUE@ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ +@ENABLE_GTK_DOC_TRUE@ fi; \ +@ENABLE_GTK_DOC_TRUE@ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ +@ENABLE_GTK_DOC_TRUE@ gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ @ENABLE_GTK_DOC_TRUE@ else \ -@ENABLE_GTK_DOC_TRUE@ for i in $(SCANOBJ_FILES) ; do \ -@ENABLE_GTK_DOC_TRUE@ test -f $$i || touch $$i ; \ -@ENABLE_GTK_DOC_TRUE@ done \ +@ENABLE_GTK_DOC_TRUE@ for i in $(SCANOBJ_FILES) ; do \ +@ENABLE_GTK_DOC_TRUE@ test -f $$i || touch $$i ; \ +@ENABLE_GTK_DOC_TRUE@ done \ @ENABLE_GTK_DOC_TRUE@ fi @ENABLE_GTK_DOC_TRUE@ $(AM_V_at)touch scan-build.stamp @@ -769,7 +796,7 @@ @ENABLE_GTK_DOC_TRUE@sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent @ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_XML)_source_dir='' ; \ @ENABLE_GTK_DOC_TRUE@ for i in $(DOC_SOURCE_DIR) ; do \ -@ENABLE_GTK_DOC_TRUE@ _source_dir="$${_source_dir} --source-dir=$$i" ; \ +@ENABLE_GTK_DOC_TRUE@ _source_dir="$${_source_dir} --source-dir=$$i" ; \ @ENABLE_GTK_DOC_TRUE@ done ; \ @ENABLE_GTK_DOC_TRUE@ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) @ENABLE_GTK_DOC_TRUE@ $(AM_V_at)touch sgml-build.stamp @@ -777,6 +804,9 @@ @ENABLE_GTK_DOC_TRUE@sgml.stamp: sgml-build.stamp @ENABLE_GTK_DOC_TRUE@ @true +@ENABLE_GTK_DOC_TRUE@$(DOC_MAIN_SGML_FILE): sgml-build.stamp +@ENABLE_GTK_DOC_TRUE@ @true + @ENABLE_GTK_DOC_TRUE@xml/gtkdocentities.ent: Makefile @ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ @ENABLE_GTK_DOC_TRUE@ echo ""; \ @@ -804,12 +834,9 @@ @ENABLE_GTK_DOC_TRUE@ cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) @ENABLE_GTK_DOC_TRUE@ -@test "x$(HTML_IMAGES)" = "x" || \ @ENABLE_GTK_DOC_TRUE@ for file in $(HTML_IMAGES) ; do \ -@ENABLE_GTK_DOC_TRUE@ if test -f $(abs_srcdir)/$$file ; then \ -@ENABLE_GTK_DOC_TRUE@ cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ -@ENABLE_GTK_DOC_TRUE@ fi; \ -@ENABLE_GTK_DOC_TRUE@ if test -f $(abs_builddir)/$$file ; then \ -@ENABLE_GTK_DOC_TRUE@ cp $(abs_builddir)/$$file $(abs_builddir)/html; \ -@ENABLE_GTK_DOC_TRUE@ fi; \ +@ENABLE_GTK_DOC_TRUE@ test -f $(abs_srcdir)/$$file && cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ +@ENABLE_GTK_DOC_TRUE@ test -f $(abs_builddir)/$$file && cp $(abs_builddir)/$$file $(abs_builddir)/html; \ +@ENABLE_GTK_DOC_TRUE@ test -f $$file && cp $$file $(abs_builddir)/html; \ @ENABLE_GTK_DOC_TRUE@ done; @ENABLE_GTK_DOC_TRUE@ $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) @ENABLE_GTK_DOC_TRUE@ $(AM_V_at)touch html-build.stamp @@ -876,7 +903,6 @@ @ENABLE_GTK_DOC_TRUE@ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ @ENABLE_GTK_DOC_TRUE@ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ @ENABLE_GTK_DOC_TRUE@ fi; \ -@ENABLE_GTK_DOC_TRUE@ $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ @ENABLE_GTK_DOC_TRUE@ fi @ENABLE_GTK_DOC_TRUE@uninstall-local: diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMBearer.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMBearer.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMBearer.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMBearer.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -97,7 +97,7 @@ -MMBearerType +MMBearerType mm_bearer_get_bearer_type () @@ -277,7 +277,7 @@

    Returns

    The DBus path of the MMBearer object.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -306,7 +306,7 @@

    Returns

    The DBus path of the MMBearer object. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -341,7 +341,7 @@

    Returns

    The name of the interface, or NULL if it couldn't be retrieved.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -372,7 +372,7 @@

    Returns

    The name of the interface, or NULL if it couldn't be retrieved. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -463,7 +463,7 @@

    mm_bearer_get_bearer_type ()

    -
    MMBearerType
    +
    MMBearerType
     mm_bearer_get_bearer_type (MMBearer *self);

    Gets the type of bearer.

    @@ -483,7 +483,7 @@

    Returns

    -

    a MMBearerType.

    +

    a MMBearerType.

    Since: 1.0

    @@ -518,7 +518,7 @@

    A MMBearerIpConfig. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -552,7 +552,7 @@

    Returns

    A MMBearerIpConfig that must be freed with g_object_unref() or NULL if unknown.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -587,7 +587,7 @@

    A MMBearerIpConfig. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -621,7 +621,7 @@

    Returns

    A MMBearerIpConfig that must be freed with g_object_unref() or NULL if unknown.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -656,7 +656,7 @@

    A MMBearerProperties. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -690,7 +690,7 @@

    Returns

    A MMBearerProperties that must be freed with g_object_unref() or NULL if unknown.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -725,7 +725,7 @@

    A MMBearerStats. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.6

    @@ -759,7 +759,7 @@

    Returns

    A MMBearerStats that must be freed with g_object_unref() or NULL if unknown.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.6

    @@ -1053,6 +1053,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMBearerIpConfig.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMBearerIpConfig.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMBearerIpConfig.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMBearerIpConfig.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -42,7 +42,7 @@ -MMBearerIpMethod +MMBearerIpMethod mm_bearer_ip_config_get_method () @@ -119,7 +119,7 @@

    Functions

    mm_bearer_ip_config_get_method ()

    -
    MMBearerIpMethod
    +
    MMBearerIpMethod
     mm_bearer_ip_config_get_method (MMBearerIpConfig *self);

    Gets the IP method to be used with this bearer.

    @@ -139,7 +139,7 @@

    Since: 1.0

    @@ -225,7 +225,7 @@

    a NULL-terminated array of strings. Do not free the returned value, it is owned by self .

    -

    [transfer none][array zero-terminated=1]

    +

    [transfer none][array zero-terminated=1]

    Since: 1.0

    @@ -297,6 +297,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMBearerProperties.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMBearerProperties.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMBearerProperties.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMBearerProperties.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -65,7 +65,7 @@ -MMBearerAllowedAuth +MMBearerAllowedAuth mm_bearer_properties_get_allowed_auth () @@ -111,7 +111,7 @@ -MMBearerIpFamily +MMBearerIpFamily mm_bearer_properties_get_ip_type () @@ -158,7 +158,7 @@ -MMModemCdmaRmProtocol +MMModemCdmaRmProtocol mm_bearer_properties_get_rm_protocol () @@ -211,7 +211,7 @@

    Returns

    a MMBearerProperties. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -241,7 +241,7 @@

    the access point, or NULL if not set. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -279,7 +279,7 @@

    mm_bearer_properties_get_allowed_auth ()

    -
    MMBearerAllowedAuth
    +
    MMBearerAllowedAuth
     mm_bearer_properties_get_allowed_auth (MMBearerProperties *self);

    Gets the authentication methods allowed in the connection.

    @@ -299,8 +299,8 @@

    Returns

    -

    a bitmask of MMBearerAllowedAuth values, or -MM_BEARER_ALLOWED_AUTH_UNKNOWN to request the modem-default method.

    +

    a bitmask of MMBearerAllowedAuth values, or +MM_BEARER_ALLOWED_AUTH_UNKNOWN to request the modem-default method.

    Since: 1.0

    @@ -309,7 +309,7 @@

    mm_bearer_properties_set_allowed_auth ()

    void
     mm_bearer_properties_set_allowed_auth (MMBearerProperties *self,
    -                                       MMBearerAllowedAuth allowed_auth);
    + MMBearerAllowedAuth allowed_auth);

    Sets the authentication method to use.

    Parameters

    @@ -327,8 +327,8 @@

    allowed_auth

    -

    a bitmask of MMBearerAllowedAuth values. -MM_BEARER_ALLOWED_AUTH_UNKNOWN may be given to request the modem-default +

    a bitmask of MMBearerAllowedAuth values. +MM_BEARER_ALLOWED_AUTH_UNKNOWN may be given to request the modem-default method.

      @@ -363,7 +363,7 @@

    the username, or NULL if not set. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -424,7 +424,7 @@

    the password, or NULL if not set. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -462,7 +462,7 @@

    mm_bearer_properties_get_ip_type ()

    -
    MMBearerIpFamily
    +
    MMBearerIpFamily
     mm_bearer_properties_get_ip_type (MMBearerProperties *self);

    Sets the IP type to use.

    @@ -482,7 +482,7 @@

    Since: 1.0

    @@ -491,7 +491,7 @@

    mm_bearer_properties_set_ip_type ()

    void
     mm_bearer_properties_set_ip_type (MMBearerProperties *self,
    -                                  MMBearerIpFamily ip_type);
    + MMBearerIpFamily ip_type);

    Sets the IP type to use.

    Parameters

    @@ -509,7 +509,7 @@

    ip_type

    -

    a MMBearerIpFamily.

    +

    a MMBearerIpFamily.

      @@ -609,7 +609,7 @@

    the number, or NULL if not set. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -652,7 +652,7 @@

    mm_bearer_properties_get_rm_protocol ()

    -
    MMModemCdmaRmProtocol
    +
    MMModemCdmaRmProtocol
     mm_bearer_properties_get_rm_protocol (MMBearerProperties *self);

    Gets the RM protocol requested to use in the CDMA connection.

    @@ -672,7 +672,7 @@

    Since: 1.0

    @@ -681,7 +681,7 @@

    mm_bearer_properties_set_rm_protocol ()

    void
     mm_bearer_properties_set_rm_protocol (MMBearerProperties *self,
    -                                      MMModemCdmaRmProtocol protocol);
    + MMModemCdmaRmProtocol protocol);

    Sets the RM protocol to use in the CDMA connection.

    Parameters

    @@ -699,7 +699,7 @@

    protocol

    -

    a MMModemCdmaRmProtocol.

    +

    a MMModemCdmaRmProtocol.

      @@ -719,6 +719,6 @@
    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMBearerStats.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMBearerStats.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMBearerStats.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMBearerStats.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -64,6 +64,46 @@ mm_bearer_stats_get_tx_bytes () + + +guint + + +mm_bearer_stats_get_attempts () + + + + +guint + + +mm_bearer_stats_get_failed_attempts () + + + + +guint + + +mm_bearer_stats_get_total_duration () + + + + +guint64 + + +mm_bearer_stats_get_total_rx_bytes () + + + + +guint64 + + +mm_bearer_stats_get_total_tx_bytes () + + @@ -175,6 +215,143 @@

    Since: 1.6

    +
    +
    +

    mm_bearer_stats_get_attempts ()

    +
    guint
    +mm_bearer_stats_get_attempts (MMBearerStats *self);
    +

    Gets the number of connection attempts done with this bearer.

    +
    +

    Parameters

    +
    +++++ + + + + + +

    self

    a MMBearerStats.

     
    +
    +
    +

    Returns

    +

    a guint.

    +
    +

    Since: 1.14

    +
    +
    +
    +

    mm_bearer_stats_get_failed_attempts ()

    +
    guint
    +mm_bearer_stats_get_failed_attempts (MMBearerStats *self);
    +

    Gets the number of failed connection attempts done with this bearer.

    +
    +

    Parameters

    +
    +++++ + + + + + +

    self

    a MMBearerStats.

     
    +
    +
    +

    Returns

    +

    a guint.

    +
    +

    Since: 1.14

    +
    +
    +
    +

    mm_bearer_stats_get_total_duration ()

    +
    guint
    +mm_bearer_stats_get_total_duration (MMBearerStats *self);
    +

    Gets the total duration of all the connections of this bearer.

    +
    +

    Parameters

    +
    +++++ + + + + + +

    self

    a MMBearerStats.

     
    +
    +
    +

    Returns

    +

    a guint.

    +
    +

    Since: 1.14

    +
    +
    +
    +

    mm_bearer_stats_get_total_rx_bytes ()

    +
    guint64
    +mm_bearer_stats_get_total_rx_bytes (MMBearerStats *self);
    +

    Gets the total number of bytes received without error during all the +connections of this bearer.

    +
    +

    Parameters

    +
    +++++ + + + + + +

    self

    a MMBearerStats.

     
    +
    +
    +

    Returns

    +

    a guint64.

    +
    +

    Since: 1.14

    +
    +
    +
    +

    mm_bearer_stats_get_total_tx_bytes ()

    +
    guint64
    +mm_bearer_stats_get_total_tx_bytes (MMBearerStats *self);
    +

    Gets the total number of bytes transmitted without error during all the +connections of this bearer.

    +
    +

    Parameters

    +
    +++++ + + + + + +

    self

    a MMBearerStats.

     
    +
    +
    +

    Returns

    +

    a guint64.

    +
    +

    Since: 1.14

    +

    Types and Values

    @@ -187,6 +364,6 @@
    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMCall.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMCall.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMCall.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMCall.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -73,7 +73,7 @@ -MMCallDirection +MMCallDirection mm_call_get_direction () @@ -81,7 +81,7 @@ -MMCallState +MMCallState mm_call_get_state () @@ -89,7 +89,7 @@ -MMCallStateReason +MMCallStateReason mm_call_get_state_reason () @@ -364,7 +364,7 @@

    Returns

    The DBus path of the MMCall object.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.6

    @@ -393,7 +393,7 @@

    Returns

    The DBus path of the MMCall object. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.6

    @@ -426,7 +426,7 @@

    Returns

    The number, or NULL if it couldn't be retrieved.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.6

    @@ -456,14 +456,14 @@

    Returns

    The number, or NULL if it couldn't be retrieved. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.6


    mm_call_get_direction ()

    -
    MMCallDirection
    +
    MMCallDirection
     mm_call_get_direction (MMCall *self);

    Gets the call direction.

    @@ -483,14 +483,14 @@

    Returns

    -

    a MMCallDirection.

    +

    a MMCallDirection.

    Since: 1.6


    mm_call_get_state ()

    -
    MMCallState
    +
    MMCallState
     mm_call_get_state (MMCall *self);

    Gets the current state of call.

    @@ -510,14 +510,14 @@

    Returns

    -

    a MMCallState.

    +

    a MMCallState.

    Since: 1.6


    mm_call_get_state_reason ()

    -
    MMCallStateReason
    +
    MMCallStateReason
     mm_call_get_state_reason (MMCall *self);

    Gets the reason of why the call changes its state.

    @@ -537,7 +537,7 @@

    Since: 1.6

    @@ -566,7 +566,7 @@

    Returns

    The audio port, or NULL if call audio is not routed via the host or couldn't be retrieved.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.10

    @@ -595,7 +595,7 @@

    Returns

    The audio port, or NULL if call audio is not routed via the host or couldn't be retrieved.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.10

    @@ -629,7 +629,7 @@

    Returns

    A MMCallAudioFormat that must be freed with g_object_unref() or NULL if unknown.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.10

    @@ -664,7 +664,7 @@

    A MMCallAudioFormat. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.10

    @@ -1707,6 +1707,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMCallAudioFormat.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMCallAudioFormat.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMCallAudioFormat.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMCallAudioFormat.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -192,6 +192,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMCallProperties.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMCallProperties.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMCallProperties.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMCallProperties.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -65,7 +65,7 @@ -MMCallDirection +MMCallDirection mm_call_properties_get_direction () @@ -81,7 +81,7 @@ -MMCallState +MMCallState mm_call_properties_get_state () @@ -97,7 +97,7 @@ -MMCallStateReason +MMCallStateReason mm_call_properties_get_state_reason () @@ -151,7 +151,7 @@

    Returns

    a MMCallProperties. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.6

    @@ -218,7 +218,7 @@

    mm_call_properties_get_direction ()

    -
    MMCallDirection
    +
    MMCallDirection
     mm_call_properties_get_direction (MMCallProperties *self);

    mm_call_properties_get_direction has been deprecated since version 1.12 and should not be used in newly-written code.

    @@ -253,7 +253,7 @@

    mm_call_properties_set_direction ()

    void
     mm_call_properties_set_direction (MMCallProperties *self,
    -                                  MMCallDirection direction);
    + MMCallDirection direction);

    mm_call_properties_set_direction has been deprecated since version 1.12 and should not be used in newly-written code.

    the user should not specify the direction of the call, as @@ -288,7 +288,7 @@


    mm_call_properties_get_state ()

    -
    MMCallState
    +
    MMCallState
     mm_call_properties_get_state (MMCallProperties *self);

    mm_call_properties_get_state has been deprecated since version 1.12 and should not be used in newly-written code.

    @@ -323,7 +323,7 @@

    mm_call_properties_set_state ()

    void
     mm_call_properties_set_state (MMCallProperties *self,
    -                              MMCallState state);
    + MMCallState state);

    mm_call_properties_set_state has been deprecated since version 1.12 and should not be used in newly-written code.

    the user should not specify the state of the call before @@ -358,7 +358,7 @@


    mm_call_properties_get_state_reason ()

    -
    MMCallStateReason
    +
    MMCallStateReason
     mm_call_properties_get_state_reason (MMCallProperties *self);

    mm_call_properties_get_state_reason has been deprecated since version 1.12 and should not be used in newly-written code.

    @@ -393,7 +393,7 @@

    mm_call_properties_set_state_reason ()

    void
     mm_call_properties_set_state_reason (MMCallProperties *self,
    -                                     MMCallStateReason state_reason);
    + MMCallStateReason state_reason);

    mm_call_properties_set_state_reason has been deprecated since version 1.12 and should not be used in newly-written code.

    the user should not specify the state reason of the call @@ -437,6 +437,6 @@

    +
    Generated by GTK-Doc V1.33.1
    \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMCdmaManualActivationProperties.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMCdmaManualActivationProperties.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMCdmaManualActivationProperties.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMCdmaManualActivationProperties.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -217,7 +217,7 @@

    Returns

    A MMCdmaManualActivationProperties. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.2

    @@ -248,7 +248,7 @@

    The SPC. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.2

    @@ -382,7 +382,7 @@

    The MDN. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.2

    @@ -456,7 +456,7 @@

    The MIN. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.2

    @@ -530,7 +530,7 @@

    The MN-HA key. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.2

    @@ -604,7 +604,7 @@

    The MN-AAA key. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.2

    @@ -687,7 +687,7 @@

    The PRL. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.2

    @@ -718,7 +718,7 @@

    A GByteArray with the PRL, or NULL if it doesn't contain any. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.2

    @@ -748,7 +748,7 @@

    Returns

    A GByteArray with the PRL, or NULL if it doesn't contain any. The returned value should be freed with g_byte_array_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.2

    @@ -859,6 +859,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMFirmwareProperties.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMFirmwareProperties.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMFirmwareProperties.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMFirmwareProperties.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -42,7 +42,7 @@ -MMFirmwareImageType +MMFirmwareImageType mm_firmware_properties_get_image_type () @@ -123,7 +123,7 @@

    Functions

    mm_firmware_properties_get_image_type ()

    -
    MMFirmwareImageType
    +
    MMFirmwareImageType
     mm_firmware_properties_get_image_type (MMFirmwareProperties *self);

    Gets the type of the firmare image.

    @@ -143,7 +143,7 @@

    Returns

    -

    A MMFirmwareImageType specifying The type of the image.

    +

    A MMFirmwareImageType specifying The type of the image.

    Since: 1.0

    @@ -173,7 +173,7 @@

    The ID of the image. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -183,7 +183,7 @@
    const gchar *
     mm_firmware_properties_get_gobi_pri_version
                                    (MMFirmwareProperties *self);
    -

    Gets the PRI version of a firmware image of type MM_FIRMWARE_IMAGE_TYPE_GOBI.

    +

    Gets the PRI version of a firmware image of type MM_FIRMWARE_IMAGE_TYPE_GOBI.

    Parameters

    @@ -213,7 +213,7 @@
    const gchar *
     mm_firmware_properties_get_gobi_pri_info
                                    (MMFirmwareProperties *self);
    -

    Gets the PRI info of a firmware image of type MM_FIRMWARE_IMAGE_TYPE_GOBI.

    +

    Gets the PRI info of a firmware image of type MM_FIRMWARE_IMAGE_TYPE_GOBI.

    Parameters

    @@ -244,7 +244,7 @@ mm_firmware_properties_get_gobi_boot_version (MMFirmwareProperties *self);

    Gets the boot version of a firmware image of type -MM_FIRMWARE_IMAGE_TYPE_GOBI.

    +MM_FIRMWARE_IMAGE_TYPE_GOBI.

    Parameters

    @@ -275,7 +275,7 @@ mm_firmware_properties_get_gobi_pri_unique_id (MMFirmwareProperties *self);

    Gets the PRI unique ID of a firmware image of type -MM_FIRMWARE_IMAGE_TYPE_GOBI.

    +MM_FIRMWARE_IMAGE_TYPE_GOBI.

    Parameters

    @@ -306,7 +306,7 @@ mm_firmware_properties_get_gobi_modem_unique_id (MMFirmwareProperties *self);

    Gets the MODEM unique ID of a firmware image of type -MM_FIRMWARE_IMAGE_TYPE_GOBI.

    +MM_FIRMWARE_IMAGE_TYPE_GOBI.

    Parameters

    @@ -342,6 +342,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMFirmwareUpdateSettings.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMFirmwareUpdateSettings.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMFirmwareUpdateSettings.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMFirmwareUpdateSettings.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -49,7 +49,7 @@ + + + + + + + + + + + + @@ -313,7 +336,7 @@

    Returns

    The DBus path of the MMSim object.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -342,12 +365,39 @@

    Returns

    The DBus path of the MMSim object. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0


    +

    mm_sim_get_active ()

    +
    gboolean
    +mm_sim_get_active (MMSim *self);
    +

    Checks whether the MMSim is currently active.

    +
    +

    Parameters

    +
    -MMModemFirmwareUpdateMethod +MMModemFirmwareUpdateMethod mm_firmware_update_settings_get_method () @@ -106,7 +106,7 @@

    Gets the AT command that should be sent to the module to trigger a reset into fastboot mode.

    Only applicable if the update method includes -MM_MODEM_FIRMWARE_UPDATE_METHOD_FASTBOOT.

    +MM_MODEM_FIRMWARE_UPDATE_METHOD_FASTBOOT.

    Parameters

    @@ -133,7 +133,7 @@

    mm_firmware_update_settings_get_method ()

    -
    MMModemFirmwareUpdateMethod
    +
    MMModemFirmwareUpdateMethod
     mm_firmware_update_settings_get_method
                                    (MMFirmwareUpdateSettings *self);

    Gets the methods to use during the firmware update operation.

    @@ -154,7 +154,7 @@

    Returns

    -

    a bitmask of MMModemFirmwareUpdateMethod values.

    +

    a bitmask of MMModemFirmwareUpdateMethod values.

    Since: 1.10

    @@ -186,7 +186,7 @@

    The list of device ids, or NULL if unknown. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.10

    @@ -232,6 +232,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMKernelEventProperties.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMKernelEventProperties.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMKernelEventProperties.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMKernelEventProperties.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -148,7 +148,7 @@

    Returns

    a MMKernelEventProperties. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.8

    @@ -178,7 +178,7 @@

    The action. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.8

    @@ -239,7 +239,7 @@

    The name. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.8

    @@ -301,7 +301,7 @@

    The subsystem. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.8

    @@ -363,7 +363,7 @@

    The uid. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.8

    @@ -410,6 +410,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMLocation3gpp.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMLocation3gpp.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMLocation3gpp.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMLocation3gpp.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -265,6 +265,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMLocationCdmaBs.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMLocationCdmaBs.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMLocationCdmaBs.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMLocationCdmaBs.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -153,6 +153,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMLocationGpsNmea.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMLocationGpsNmea.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMLocationGpsNmea.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMLocationGpsNmea.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -49,6 +49,14 @@ + + + + - + @@ -3282,11 +3750,11 @@

    mm_modem_set_power_state_sync ()

    gboolean
     mm_modem_set_power_state_sync (MMModem *self,
    -                               MMModemPowerState state,
    +                               MMModemPowerState state,
                                    GCancellable *cancellable,
                                    GError **error);

    Synchronously sets the power state of the device. This method can only be -used while the modem is in MM_MODEM_STATE_DISABLED state.

    +used while the modem is in MM_MODEM_STATE_DISABLED state.

    The calling thread is blocked until a reply is received. See mm_modem_set_power_state() for the asynchronous version of this method.

    @@ -3305,8 +3773,8 @@
    - + @@ -3335,8 +3803,8 @@

    mm_modem_set_current_modes ()

    void
     mm_modem_set_current_modes (MMModem *self,
    -                            MMModemMode modes,
    -                            MMModemMode preferred,
    +                            MMModemMode modes,
    +                            MMModemMode preferred,
                                 GCancellable *cancellable,
                                 GAsyncReadyCallback callback,
                                 gpointer user_data);
    @@ -3364,14 +3832,14 @@ - + - +is the preferred one, or MM_MODEM_MODE_NONE if none.

    @@ -3444,8 +3912,8 @@

    mm_modem_set_current_modes_sync ()

    gboolean
     mm_modem_set_current_modes_sync (MMModem *self,
    -                                 MMModemMode modes,
    -                                 MMModemMode preferred,
    +                                 MMModemMode modes,
    +                                 MMModemMode preferred,
                                      GCancellable *cancellable,
                                      GError **error);

    Synchronously sets the access technologies (e.g. 2G/3G/4G preference) the @@ -3468,14 +3936,14 @@

    - + - +is the preferred one, or MM_MODEM_MODE_NONE if none.

    @@ -3503,7 +3971,7 @@

    mm_modem_set_current_bands ()

    void
     mm_modem_set_current_bands (MMModem *self,
    -                            const MMModemBand *bands,
    +                            const MMModemBand *bands,
                                 guint n_bands,
                                 GCancellable *cancellable,
                                 GAsyncReadyCallback callback,
    @@ -3532,7 +4000,7 @@
     
    - + @@ -3611,7 +4079,7 @@

    mm_modem_set_current_bands_sync ()

    gboolean
     mm_modem_set_current_bands_sync (MMModem *self,
    -                                 const MMModemBand *bands,
    +                                 const MMModemBand *bands,
                                      guint n_bands,
                                      GCancellable *cancellable,
                                      GError **error);
    @@ -3635,7 +4103,7 @@ - + @@ -3669,7 +4137,7 @@

    mm_modem_set_current_capabilities ()

    void
     mm_modem_set_current_capabilities (MMModem *self,
    -                                   MMModemCapability capabilities,
    +                                   MMModemCapability capabilities,
                                        GCancellable *cancellable,
                                        GAsyncReadyCallback callback,
                                        gpointer user_data);
    @@ -3698,7 +4166,7 @@ - + @@ -3774,7 +4242,7 @@
    gboolean
     mm_modem_set_current_capabilities_sync
                                    (MMModem *self,
    -                                MMModemCapability capabilities,
    +                                MMModemCapability capabilities,
                                     GCancellable *cancellable,
                                     GError **error);

    Synchronously sets the capabilities of the device. A restart of the modem may @@ -3798,7 +4266,7 @@

    - + @@ -4206,7 +4674,7 @@

    The list of MMBearer objects, or NULL if either none found or if error is set.

    -

    [transfer full][element-type ModemManager.Bearer]

    +

    [transfer full][element-type ModemManager.Bearer]

    Since: 1.0

    @@ -4252,7 +4720,7 @@

    The list of MMBearer objects, or NULL if either none found or if error is set.

    -

    [transfer full][element-type ModemManager.Bearer]

    +

    [transfer full][element-type ModemManager.Bearer]

    Since: 1.0

    @@ -4269,7 +4737,7 @@

    This request may fail if the modem does not support additional bearers, if too many bearers are already defined, or if properties are invalid.

    -

    See CreateBearer +

    See CreateBearer to check which properties may be passed.

    When the operation is finished, callback will be invoked in the

    @@ -4359,7 +4827,7 @@

    A newly created MMBearer, or NULL if error is set.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -4375,7 +4843,7 @@

    This request may fail if the modem does not support additional bearers, if too many bearers are already defined, or if properties are invalid.

    -

    See CreateBearer +

    See CreateBearer to check which properties may be passed.

    The calling thread is blocked until a reply is received. See mm_modem_create_bearer() for the asynchronous version of this method.

    @@ -4416,7 +4884,7 @@

    A newly created MMBearer, or NULL if error is set.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -4675,7 +5143,7 @@ command, or NULL if error is set. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -4734,7 +5202,7 @@ command, or NULL if error is set. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -4787,7 +5255,7 @@ MMModemMode preferred; }; -

    MMModemModeCombination is a simple struct holding a pair of MMModemMode +

    MMModemModeCombination is a simple struct holding a pair of MMModemMode values.

    Members

    @@ -4799,13 +5267,13 @@
    - - + + - - + + @@ -4837,8 +5305,8 @@ - - + + @@ -4849,6 +5317,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModem3gpp.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModem3gpp.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModem3gpp.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModem3gpp.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -64,7 +64,7 @@ - + @@ -1655,7 +1656,7 @@
    gboolean
     mm_modem_3gpp_set_eps_ue_mode_operation_sync
                                    (MMModem3gpp *self,
    -                                MMModem3gppEpsUeModeOperation mode,
    +                                MMModem3gppEpsUeModeOperation mode,
                                     GCancellable *cancellable,
                                     GError **error);

    Synchronously requests to update the EPS UE mode of operation.

    @@ -1678,7 +1679,7 @@ - + @@ -1874,6 +1875,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModem3gppUssd.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModem3gppUssd.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModem3gppUssd.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModem3gppUssd.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -58,7 +58,7 @@ - + - + @@ -356,14 +356,14 @@ - + - + @@ -569,7 +569,7 @@

    Returns

    A MMFirmwareUpdateSettings that must be freed with g_object_unref() or NULL if unknown.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.10

    @@ -605,7 +605,7 @@

    A MMFirmwareUpdateSettings. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.10

    @@ -621,6 +621,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModemLocation.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModemLocation.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModemLocation.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModemLocation.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -58,7 +58,7 @@ - @@ -829,7 +829,7 @@

    mm_modem_location_setup_sync ()

    gboolean
     mm_modem_location_setup_sync (MMModemLocation *self,
    -                              MMModemLocationSource sources,
    +                              MMModemLocationSource sources,
                                   gboolean signal_location,
                                   GCancellable *cancellable,
                                   GError **error);
    @@ -853,7 +853,7 @@ - @@ -1457,7 +1457,7 @@

    Returns

    A MMLocation3gpp, or NULL if not available. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -1502,7 +1502,7 @@

    Returns

    A MMLocation3gpp, or NULL if not available. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -1597,7 +1597,7 @@

    Returns

    A MMLocationGpsNmea, or NULL if not available. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -1642,7 +1642,7 @@

    Returns

    A MMLocationGpsNmea, or NULL if not available. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -1737,7 +1737,7 @@

    Returns

    A MMLocationGpsRaw, or NULL if not available. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -1782,7 +1782,7 @@

    Returns

    A MMLocationGpsRaw, or NULL if not available. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -1877,7 +1877,7 @@

    Returns

    A MMLocationCdmaBs, or NULL if not available. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -1922,7 +1922,7 @@

    Returns

    A MMLocationCdmaBs, or NULL if not available. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -2008,28 +2008,28 @@ - + - + - + - + @@ -2085,28 +2085,28 @@ - + - + - + - + @@ -2166,6 +2166,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModemMessaging.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModemMessaging.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModemMessaging.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModemMessaging.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -74,7 +74,7 @@ - @@ -300,7 +300,7 @@
    gboolean
     mm_modem_messaging_get_supported_storages
                                    (MMModemMessaging *self,
    -                                MMSmsStorage **storages,
    +                                MMSmsStorage **storages,
                                     guint *n_storages);

    Gets the list of SMS storages supported by the MMModem.

    @@ -320,7 +320,7 @@
    @@ -344,7 +344,7 @@

    mm_modem_messaging_get_default_storage ()

    -
    MMSmsStorage
    +
    MMSmsStorage
     mm_modem_messaging_get_default_storage
                                    (MMModemMessaging *self);

    Gets the default SMS storage used when storing or receiving SMS messages.

    @@ -365,7 +365,7 @@

    Returns

    -

    the default MMSmsStorage.

    +

    the default MMSmsStorage.

    Since: 1.0

    @@ -467,7 +467,7 @@

    A newly created MMSms, or NULL if error is set. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -519,7 +519,7 @@

    A newly created MMSms, or NULL if error is set. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -767,7 +767,7 @@ is set. The returned value should be freed with g_list_free_full() using g_object_unref() as GDestroyNotify function.

    -

    [element-type ModemManager.Sms][transfer full]

    +

    [element-type ModemManager.Sms][transfer full]

    Since: 1.0

    @@ -815,7 +815,7 @@ is set. The returned value should be freed with g_list_free_full() using g_object_unref() as GDestroyNotify function.

    -

    [element-type ModemManager.Sms][transfer full]

    +

    [element-type ModemManager.Sms][transfer full]

    Since: 1.0

    @@ -831,6 +831,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModemOma.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModemOma.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModemOma.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModemOma.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -154,7 +154,7 @@ - + @@ -399,7 +399,7 @@

    mm_modem_oma_setup_sync ()

    gboolean
     mm_modem_oma_setup_sync (MMModemOma *self,
    -                         MMOmaFeature features,
    +                         MMOmaFeature features,
                              GCancellable *cancellable,
                              GError **error);

    Synchronously sets up the OMA device management service.

    @@ -421,7 +421,7 @@ - + @@ -450,7 +450,7 @@
    void
     mm_modem_oma_start_client_initiated_session
                                    (MMModemOma *self,
    -                                MMOmaSessionType session_type,
    +                                MMOmaSessionType session_type,
                                     GCancellable *cancellable,
                                     GAsyncReadyCallback callback,
                                     gpointer user_data);
    @@ -478,7 +478,7 @@ - + @@ -554,7 +554,7 @@
    gboolean
     mm_modem_oma_start_client_initiated_session_sync
                                    (MMModemOma *self,
    -                                MMOmaSessionType session_type,
    +                                MMOmaSessionType session_type,
                                     GCancellable *cancellable,
                                     GError **error);

    Synchronously starts a client-initiated OMA device management session.

    @@ -577,7 +577,7 @@ - + @@ -909,7 +909,7 @@

    mm_modem_oma_get_features ()

    -
    MMOmaFeature
    +
    MMOmaFeature
     mm_modem_oma_get_features (MMModemOma *self);

    Gets the currently enabled OMA features.

    @@ -929,14 +929,14 @@

    Returns

    -

    a bitmask of MMOmaFeature values.

    +

    a bitmask of MMOmaFeature values.

    Since: 1.2


    mm_modem_oma_get_session_type ()

    -
    MMOmaSessionType
    +
    MMOmaSessionType
     mm_modem_oma_get_session_type (MMModemOma *self);

    Gets the type of the current OMA device management session.

    @@ -956,14 +956,14 @@

    Since: 1.2


    mm_modem_oma_get_session_state ()

    -
    MMOmaSessionState
    +
    MMOmaSessionState
     mm_modem_oma_get_session_state (MMModemOma *self);

    Gets the state of the current OMA device management session.

    @@ -983,7 +983,7 @@

    Since: 1.2

    @@ -1111,8 +1111,8 @@ - - + + @@ -1128,6 +1128,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModemSignal.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModemSignal.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModemSignal.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModemSignal.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -146,6 +146,22 @@ + + + + + + + + - + @@ -323,7 +323,7 @@

    A MMBearer, or FALSE if error is set. The returned value must be freed with g_object_ref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -356,7 +356,7 @@ - + @@ -376,7 +376,7 @@

    A MMBearer, or FALSE if error is set. The returned value must be freed with g_object_ref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -626,7 +626,7 @@

    A MMSimpleStatus, or FALSE if error is set. The returned value must be freed with g_object_ref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -672,7 +672,7 @@

    A MMSimpleStatus, or FALSE if error is set. The returned value must be freed with g_object_ref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -688,6 +688,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModemTime.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModemTime.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModemTime.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModemTime.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -157,7 +157,7 @@

    Returns

    The DBus path of the MMObject object.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -187,7 +187,7 @@

    Returns

    The DBus path of the MMObject. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -220,7 +220,7 @@

    A MMNetworkTimezone. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -253,7 +253,7 @@

    Returns

    A MMNetworkTimezone that must be freed with g_object_unref() or NULL if unknown.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -349,7 +349,7 @@

    A string containing the network time, or NULL if error is set. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -395,7 +395,7 @@

    A string containing the network time, or NULL if error is set. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -411,6 +411,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModemVoice.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModemVoice.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModemVoice.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModemVoice.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -341,7 +341,7 @@

    Returns

    The DBus path of the MMObject object.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.6

    @@ -371,7 +371,7 @@

    Returns

    The DBus path of the MMObject. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.6

    @@ -500,7 +500,7 @@

    A newly created MMCall, or NULL if error is set. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.6

    @@ -552,7 +552,7 @@

    A newly created MMCall, or NULL if error is set. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.6

    @@ -800,7 +800,7 @@ is set. The returned value should be freed with g_list_free_full() using g_object_unref() as GDestroyNotify function.

    -

    [element-type ModemManager.Call][transfer full]

    +

    [element-type ModemManager.Call][transfer full]

    Since: 1.6

    @@ -848,7 +848,7 @@ is set. The returned value should be freed with g_list_free_full() using g_object_unref() as GDestroyNotify function.

    -

    [element-type ModemManager.Call][transfer full]

    +

    [element-type ModemManager.Call][transfer full]

    Since: 1.6

    @@ -1732,6 +1732,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMNetworkTimezone.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMNetworkTimezone.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMNetworkTimezone.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMNetworkTimezone.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -215,6 +215,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMObject.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMObject.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMObject.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMObject.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -311,7 +311,7 @@

    Returns

    The DBus path of the MMObject object.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -340,7 +340,7 @@

    Returns

    The DBus path of the MMObject. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -375,7 +375,7 @@ does not implement the interface. Do not free the returned object, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -407,7 +407,7 @@

    A MMModem that must be freed with g_object_unref() or NULL if self does not implement the interface.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -442,7 +442,7 @@ does not implement the interface. Do not free the returned object, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -474,7 +474,7 @@

    A MMModem3gpp that must be freed with g_object_unref() or NULL if self does not implement the interface.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -510,7 +510,7 @@ implement the interface. Do not free the returned object, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -542,7 +542,7 @@

    A MMModem3gppUssd that must be freed with g_object_unref() or NULL if self does not implement the interface.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -577,7 +577,7 @@ does not implement the interface. Do not free the returned object, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -609,7 +609,7 @@

    A MMModemCdma that must be freed with g_object_unref() or NULL if self does not implement the interface.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -645,7 +645,7 @@ implement the interface. Do not free the returned object, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -677,7 +677,7 @@

    A MMModemLocation that must be freed with g_object_unref() or NULL if self does not implement the interface.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -713,7 +713,7 @@ implement the interface. Do not free the returned object, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -745,7 +745,7 @@

    A MMModemMessaging that must be freed with g_object_unref() or NULL if self does not implement the interface.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -780,7 +780,7 @@ does not implement the interface. Do not free the returned object, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -812,7 +812,7 @@

    A MMModemTime that must be freed with g_object_unref() or NULL if self does not implement the interface.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -848,7 +848,7 @@ implement the interface. Do not free the returned object, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -880,7 +880,7 @@

    A MMModemFirmware that must be freed with g_object_unref() or NULL if self does not implement the interface.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -915,7 +915,7 @@ does not implement the interface. Do not free the returned object, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.2

    @@ -947,7 +947,7 @@

    A MMModemOma that must be freed with g_object_unref() or NULL if self does not implement the interface.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.2

    @@ -983,7 +983,7 @@ implement the interface. Do not free the returned object, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -1015,7 +1015,7 @@

    A MMModemSimple that must be freed with g_object_unref() or NULL if self does not implement the interface.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -1051,7 +1051,7 @@ implement the interface. Do not free the returned object, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.2

    @@ -1083,7 +1083,7 @@

    A MMModemSignal that must be freed with g_object_unref() or NULL if self does not implement the interface.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.2

    @@ -1119,7 +1119,7 @@ implement the interface. Do not free the returned object, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.6

    @@ -1151,7 +1151,7 @@

    A MMModemVoice that must be freed with g_object_unref() or NULL if self does not implement the interface.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.6

    @@ -1167,6 +1167,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMPco.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMPco.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMPco.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMPco.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -188,7 +188,7 @@

    Returns

    the PCO data, or NULL if it doesn't contain any.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.10

    @@ -215,7 +215,7 @@ - +
    +gchar ** + +mm_location_gps_nmea_get_traces () +
    gchar * @@ -126,10 +134,44 @@
    +

    mm_location_gps_nmea_get_traces ()

    +
    gchar **
    +mm_location_gps_nmea_get_traces (MMLocationGpsNmea *self);
    +

    Gets all cached traces.

    +
    +

    Parameters

    +
    +++++ + + + + + +

    self

    a MMLocationGpsNmea.

     
    +
    +
    +

    Returns

    +

    The list of traces, or NULL if none available. The returned value should be freed with g_strfreev().

    +

    [transfer full]

    +
    +

    Since: 1.14

    +
    +
    +

    mm_location_gps_nmea_build_full ()

    gchar *
     mm_location_gps_nmea_build_full (MMLocationGpsNmea *self);
    -

    Gets a compilation of all cached traces.

    +
    +

    mm_location_gps_nmea_build_full has been deprecated since version 1.14 and should not be used in newly-written code.

    +

    user should use mm_location_gps_nmea_get_traces() instead, +which provides a much more generic interface to the full list of traces.

    +
    +

    Gets a compilation of all cached traces, in a single string. +Traces are separated by '\r\n'.

    Parameters

    @@ -149,7 +191,7 @@

    Returns

    a string containing all traces, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -165,6 +207,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMLocationGpsRaw.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMLocationGpsRaw.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMLocationGpsRaw.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMLocationGpsRaw.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -224,6 +224,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMManager.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMManager.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMManager.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMManager.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -274,7 +274,7 @@ , or NULL if none. Do not free the returned object, it is owned by manager .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -305,7 +305,7 @@

    The GDBusProxy interface of manager , or NULL if none. The returned object must be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -400,7 +400,7 @@

    The constructed object manager client or NULL if error is set.

    -

    [transfer full][type MMManager]

    +

    [transfer full][type MMManager]

    Since: 1.0

    @@ -452,7 +452,7 @@

    The constructed object manager client or NULL if error is set.

    -

    [transfer full][type MMManager]

    +

    [transfer full][type MMManager]

    Since: 1.0

    @@ -483,7 +483,7 @@

    The version, or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -1270,6 +1270,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModem.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModem.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModem.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModem.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -58,7 +58,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -860,7 +931,7 @@

    The DBus path of the MMObject object. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -890,14 +961,14 @@

    Returns

    The DBus path of the MMObject. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0


    mm_modem_get_state ()

    -
    MMModemState
    +
    MMModemState
     mm_modem_get_state (MMModem *self);

    Gets the overall state of the MMModem.

    @@ -917,16 +988,16 @@

    Returns

    -

    A MMModemState value.

    +

    A MMModemState value.

    Since: 1.0


    mm_modem_get_state_failed_reason ()

    -
    MMModemStateFailedReason
    +
    MMModemStateFailedReason
     mm_modem_get_state_failed_reason (MMModem *self);
    -

    Gets the reason specifying why the modem is in MM_MODEM_STATE_FAILED state.

    +

    Gets the reason specifying why the modem is in MM_MODEM_STATE_FAILED state.

    Parameters

    -MMModemState +MMModemState mm_modem_get_state () @@ -66,7 +66,7 @@
    -MMModemStateFailedReason +MMModemStateFailedReason mm_modem_get_state_failed_reason () @@ -74,7 +74,7 @@
    -MMModemPowerState +MMModemPowerState mm_modem_get_power_state () @@ -98,7 +98,7 @@
    -MMModemCapability +MMModemCapability mm_modem_get_current_capabilities () @@ -302,7 +302,7 @@
    -MMModemLock +MMModemLock mm_modem_get_unlock_required () @@ -428,7 +428,7 @@
    -MMBearerIpFamily +MMBearerIpFamily mm_modem_get_supported_ip_families () @@ -444,7 +444,7 @@
    -MMModemAccessTechnology +MMModemAccessTechnology mm_modem_get_access_technologies () @@ -490,6 +490,77 @@
    const gchar * const * + +mm_modem_get_sim_slot_paths () +
    +gchar ** + +mm_modem_dup_sim_slot_paths () +
    +guint + +mm_modem_get_primary_sim_slot () +
    +void + +mm_modem_list_sim_slots () +
    +GPtrArray * + +mm_modem_list_sim_slots_finish () +
    +GPtrArray * + +mm_modem_list_sim_slots_sync () +
    +void + +mm_modem_set_primary_sim_slot () +
    +gboolean + +mm_modem_set_primary_sim_slot_finish () +
    +gboolean + +mm_modem_set_primary_sim_slot_sync () +
    void
    @@ -944,14 +1015,14 @@

    Returns

    -

    A MMModemStateFailedReason value.

    +

    A MMModemStateFailedReason value.

    Since: 1.0


    mm_modem_get_power_state ()

    -
    MMModemPowerState
    +
    MMModemPowerState
     mm_modem_get_power_state (MMModem *self);

    Gets the power state of the MMModem.

    @@ -971,7 +1042,7 @@

    Returns

    -

    A MMModemPowerState value.

    +

    A MMModemPowerState value.

    Since: 1.0

    @@ -980,7 +1051,7 @@

    mm_modem_peek_supported_capabilities ()

    gboolean
     mm_modem_peek_supported_capabilities (MMModem *self,
    -                                      const MMModemCapability **capabilities,
    +                                      const MMModemCapability **capabilities,
                                           guint *n_capabilities);

    Gets the list of combinations of generic families of access technologies supported by this MMModem.

    @@ -1001,7 +1072,7 @@ @@ -1030,7 +1101,7 @@

    mm_modem_get_supported_capabilities ()

    gboolean
     mm_modem_get_supported_capabilities (MMModem *self,
    -                                     MMModemCapability **capabilities,
    +                                     MMModemCapability **capabilities,
                                          guint *n_capabilities);

    Gets the list of combinations of generic families of access technologies supported by this MMModem.

    @@ -1051,7 +1122,7 @@ @@ -1077,7 +1148,7 @@

    mm_modem_get_current_capabilities ()

    -
    MMModemCapability
    +
    MMModemCapability
     mm_modem_get_current_capabilities (MMModem *self);

    Gets the list of generic families of access technologies supported by this MMModem without a firmware reload or reinitialization.

    @@ -1098,7 +1169,7 @@

    Returns

    -

    A bitmask of MMModemCapability flags.

    +

    A bitmask of MMModemCapability flags.

    Since: 1.0

    @@ -1131,7 +1202,7 @@

    The equipment manufacturer, or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -1160,7 +1231,7 @@

    Returns

    The equipment manufacturer, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -1193,7 +1264,7 @@

    The equipment model, or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -1222,7 +1293,7 @@

    Returns

    The equipment model, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -1255,7 +1326,7 @@

    The equipment revision, or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -1284,7 +1355,7 @@

    Returns

    The equipment revision, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -1318,7 +1389,7 @@

    The carrier configuration, or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.12

    @@ -1348,7 +1419,7 @@

    Returns

    The carrier configuration, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.12

    @@ -1383,7 +1454,7 @@

    The carrier configuration revision, or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.12

    @@ -1414,7 +1485,7 @@

    Returns

    The carrier configuration revision, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.12

    @@ -1447,7 +1518,7 @@

    The equipment hardware revision, or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.8

    @@ -1476,7 +1547,7 @@

    Returns

    The equipment hardware revision, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.8

    @@ -1510,7 +1581,7 @@

    The drivers, or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -1540,7 +1611,7 @@

    Returns

    The drivers, or NULL if none available. The returned value should be freed with g_strfreev().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -1573,7 +1644,7 @@

    The name of the plugin, or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -1602,7 +1673,7 @@

    Returns

    The name of the plugin, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -1635,7 +1706,7 @@

    The name of the primary port. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -1664,7 +1735,7 @@

    Returns

    The name of the primary port. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -1696,7 +1767,7 @@ array of MMModemPortInfo values. Do not free the returned value, it is owned by self .

    - + @@ -1791,7 +1862,7 @@

    The device, or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -1821,7 +1892,7 @@

    Returns

    The device, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -1856,7 +1927,7 @@

    The equipment identifier, or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -1887,7 +1958,7 @@

    Returns

    The equipment identifier, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -1927,7 +1998,7 @@

    The device identifier, or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -1964,14 +2035,14 @@

    Returns

    The device identifier, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0


    mm_modem_get_unlock_required ()

    -
    MMModemLock
    +
    MMModemLock
     mm_modem_get_unlock_required (MMModem *self);

    Gets current lock state of the MMModem.

    @@ -1991,7 +2062,7 @@

    Returns

    -

    A MMModemLock value, specifying the current lock state.

    +

    A MMModemLock value, specifying the current lock state.

    Since: 1.0

    @@ -2001,7 +2072,7 @@
    MMUnlockRetries *
     mm_modem_peek_unlock_retries (MMModem *self);

    Gets a MMUnlockRetries object, which provides, for each

    -MMModemLock handled by the modem, the +MMModemLock handled by the modem, the

    number of PIN tries remaining before the code becomes blocked (requiring a PUK) or permanently blocked.

    The returned value is only valid until the property changes so it is @@ -2027,7 +2098,7 @@

    A MMUnlockRetries. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -2037,7 +2108,7 @@
    MMUnlockRetries *
     mm_modem_get_unlock_retries (MMModem *self);

    Gets a MMUnlockRetries object, which provides, for each

    -MMModemLock handled by the modem, the +MMModemLock handled by the modem, the

    number of PIN tries remaining before the code becomes blocked (requiring a PUK) or permanently blocked.

    The values reported by self are not updated when the values in the @@ -2063,7 +2134,7 @@

    Returns

    A MMUnlockRetries that must be freed with g_object_unref() or NULL if unknown.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -2161,7 +2232,7 @@ MMModem, or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -2191,7 +2262,7 @@

    The DBus paths of the MMBearer handled in this MMModem, or NULL if none available. The returned value should be freed with g_strfreev().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -2226,7 +2297,7 @@

    The list of own numbers or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -2256,7 +2327,7 @@

    Returns

    The list of own numbers or NULL if none is available. The returned value should be freed with g_strfreev().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -2358,8 +2429,8 @@

    mm_modem_get_current_modes ()

    gboolean
     mm_modem_get_current_modes (MMModem *self,
    -                            MMModemMode *allowed,
    -                            MMModemMode *preferred);
    + MMModemMode *allowed, + MMModemMode *preferred);

    Gets the list of modes specifying the access technologies (eg 2G/3G/4G) the MMModem is currently allowed to use when connecting to a network, as well as the preferred one, if any.

    @@ -2379,12 +2450,12 @@ - + - + @@ -2403,11 +2474,11 @@

    mm_modem_peek_supported_bands ()

    gboolean
     mm_modem_peek_supported_bands (MMModem *self,
    -                               const MMModemBand **bands,
    +                               const MMModemBand **bands,
                                    guint *n_bands);

    Gets the list of radio frequency and technology bands supported by the MMModem.

    -

    For POTS devices, only MM_MODEM_BAND_ANY will be returned in bands +

    For POTS devices, only MM_MODEM_BAND_ANY will be returned in bands .

    Parameters

    @@ -2426,7 +2497,7 @@
    @@ -2452,11 +2523,11 @@

    mm_modem_get_supported_bands ()

    gboolean
     mm_modem_get_supported_bands (MMModem *self,
    -                              MMModemBand **bands,
    +                              MMModemBand **bands,
                                   guint *n_bands);

    Gets the list of radio frequency and technology bands supported by the MMModem.

    -

    For POTS devices, only MM_MODEM_BAND_ANY will be returned in bands +

    For POTS devices, only MM_MODEM_BAND_ANY will be returned in bands .

    Parameters

    @@ -2475,7 +2546,7 @@
    @@ -2501,11 +2572,11 @@

    mm_modem_peek_current_bands ()

    gboolean
     mm_modem_peek_current_bands (MMModem *self,
    -                             const MMModemBand **bands,
    +                             const MMModemBand **bands,
                                  guint *n_bands);

    Gets the list of radio frequency and technology bands the MMModem is currently using when connecting to a network.

    -

    For POTS devices, only the MM_MODEM_BAND_ANY band is supported.

    +

    For POTS devices, only the MM_MODEM_BAND_ANY band is supported.

    Parameters

    capabilities

    Return location for the -array of MMModemCapability values. Do not free the returned array, it is +array of MMModemCapability values. Do not free the returned array, it is owned by self .

    [out][array length=n_capabilities]

    capabilities

    Return location for the -array of MMModemCapability values. The returned array should be freed with +array of MMModemCapability values. The returned array should be freed with g_free() when no longer needed.

    [out][array length=n_capabilities]
    [out][array length=n_ports][transfer none][out][array length=n_ports][transfer none]

    n_ports

    allowed

    Return location for a bitmask of MMModemMode values.

    Return location for a bitmask of MMModemMode values.

    [out]

    preferred

    Return location for a MMModemMode value.

    Return location for a MMModemMode value.

    [out]

    bands

    Return location for the array of -MMModemBand values. Do not free the returned array, it is owned by self +MMModemBand values. Do not free the returned array, it is owned by self .

    [out][array length=n_bands]

    bands

    Return location for the array of -MMModemBand values. The returned array should be freed with g_free() when +MMModemBand values. The returned array should be freed with g_free() when no longer needed.

    [out][array length=n_bands]
    @@ -2523,7 +2594,7 @@ @@ -2549,11 +2620,11 @@

    mm_modem_get_current_bands ()

    gboolean
     mm_modem_get_current_bands (MMModem *self,
    -                            MMModemBand **bands,
    +                            MMModemBand **bands,
                                 guint *n_bands);

    Gets the list of radio frequency and technology bands the MMModem is currently using when connecting to a network.

    -

    For POTS devices, only the MM_MODEM_BAND_ANY band is supported.

    +

    For POTS devices, only the MM_MODEM_BAND_ANY band is supported.

    Parameters

    bands

    Return location for the array of -MMModemBand values. Do not free the returned value, it is owned by self +MMModemBand values. Do not free the returned value, it is owned by self .

    [out][array length=n_bands]
    @@ -2571,7 +2642,7 @@ @@ -2595,7 +2666,7 @@

    mm_modem_get_supported_ip_families ()

    -
    MMBearerIpFamily
    +
    MMBearerIpFamily
     mm_modem_get_supported_ip_families (MMModem *self);

    Gets the list of supported IP families.

    @@ -2615,7 +2686,7 @@

    Returns

    -

    A bitmask of MMBearerIpFamily values.

    +

    A bitmask of MMBearerIpFamily values.

    Since: 1.0

    @@ -2660,7 +2731,7 @@

    mm_modem_get_access_technologies ()

    -
    MMModemAccessTechnology
    +
    MMModemAccessTechnology
     mm_modem_get_access_technologies (MMModem *self);

    Gets the current network access technology used by the MMModem to communicate with the network.

    @@ -2681,7 +2752,7 @@

    Returns

    -

    A #MMModemAccessTechnology value.

    +

    A #MMModemAccessTechnology value.

    Since: 1.0

    @@ -2716,7 +2787,7 @@ MMModem, or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -2746,7 +2817,7 @@

    The DBus path of the MMSim handled in this MMModem, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -2842,7 +2913,7 @@

    a MMSim or NULL if error is set. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -2888,12 +2959,409 @@

    a MMSim or NULL if error is set. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0


    +

    mm_modem_get_sim_slot_paths ()

    +
    const gchar * const *
    +mm_modem_get_sim_slot_paths (MMModem *self);
    +

    Gets the DBus paths of the MMSim objects available in the different SIM +slots handled in this MMModem. If a given SIM slot at a given index doesn't +have a SIM card available, an empty object path will be given. This list +includes the currently active SIM object path.

    +
    The returned value is only valid until the property changes so it is +only safe to use this function on the thread where self was constructed. Use +mm_modem_dup_sim_slot_paths() if on another thread.
    +
    +

    Parameters

    +

    bands

    Return location for the array of -MMModemBand values. The returned array should be freed with g_free() when +MMModemBand values. The returned array should be freed with g_free() when no longer needed.

    [out][array length=n_bands]
    +++++ + + + + + +

    self

    A MMModem.

     
    +
    +
    +

    Returns

    +

    The DBus paths of the MMSim objects handled in +this MMModem, or NULL if none available. Do not free the returned value, it +belongs to self +.

    +

    [transfer none]

    +
    +

    Since: 1.16

    +
    +
    +
    +

    mm_modem_dup_sim_slot_paths ()

    +
    gchar **
    +mm_modem_dup_sim_slot_paths (MMModem *self);
    +

    Gets a copy of the DBus paths of the MMSim objects available in the +different SIM slots handled in this MMModem. If a given SIM slot at a given +index doesn't have a SIM card available, an empty object path will be given. +This list includes the currently active SIM object path.

    +
    +

    Parameters

    +
    +++++ + + + + + +

    self

    A MMModem.

     
    +
    +
    +

    Returns

    +

    The DBus paths of the MMSim objects handled in +this MMModem, or NULL if none available. The returned value should be +freed with g_strfreev().

    +

    [transfer full]

    +
    +

    Since: 1.16

    +
    +
    +
    +

    mm_modem_get_primary_sim_slot ()

    +
    guint
    +mm_modem_get_primary_sim_slot (MMModem *self);
    +

    Gets the SIM slot number of the primary active SIM.

    +
    +

    Parameters

    +
    +++++ + + + + + +

    self

    A MMModem.

     
    +
    +
    +

    Returns

    +

    slot number, in the [1,N] range.

    +
    +

    Since: 1.16

    +
    +
    +
    +

    mm_modem_list_sim_slots ()

    +
    void
    +mm_modem_list_sim_slots (MMModem *self,
    +                         GCancellable *cancellable,
    +                         GAsyncReadyCallback callback,
    +                         gpointer user_data);
    +

    Asynchronously lists the SIM slots available in the MMModem.

    +

    The returned array contains one element per slot available in the system; +a MMSim in each of the slots that contains a valid SIM card or NULL if +no SIM card is found.

    +

    When the operation is finished, callback + will be invoked in the

    +thread-default main loop

    of the thread you are calling this method from. You can then call +mm_modem_list_sim_slots_finish() to get the result of the operation.

    +

    See mm_modem_list_sim_slots_sync() for the synchronous, blocking version of +this method.

    +
    +

    Parameters

    +
    +++++ + + + + + + + + + + + + + + + + + + + + + + +

    self

    A MMModem.

     

    cancellable

    A GCancellable or NULL.

    [allow-none]

    callback

    A GAsyncReadyCallback to call when the request is satisfied or +NULL.

     

    user_data

    User data to pass to callback +.

     
    +
    +

    Since: 1.16

    +
    +
    +
    +

    mm_modem_list_sim_slots_finish ()

    +
    GPtrArray *
    +mm_modem_list_sim_slots_finish (MMModem *self,
    +                                GAsyncResult *res,
    +                                GError **error);
    +

    Finishes an operation started with mm_modem_list_sim_slots().

    +
    +

    Parameters

    +
    +++++ + + + + + + + + + + + + + + + + + +

    self

    A MMModem.

     

    res

    The GAsyncResult obtained from the GAsyncReadyCallback passed to +mm_modem_list_sim_slots().

     

    error

    Return location for error or NULL.

     
    +
    +
    +

    Returns

    +

    The array of +MMSim objects, or NULL if error +is set.

    +

    [transfer full][element-type ModemManager.Sim]

    +
    +

    Since: 1.16

    +
    +
    +
    +

    mm_modem_list_sim_slots_sync ()

    +
    GPtrArray *
    +mm_modem_list_sim_slots_sync (MMModem *self,
    +                              GCancellable *cancellable,
    +                              GError **error);
    +

    Synchronously lists the SIM slots available in the MMModem.

    +

    The returned array contains one element per slot available in the system; +a MMSim in each of the slots that contains a valid SIM card or NULL if +no SIM card is found.

    +

    The calling thread is blocked until a reply is received. See +mm_modem_list_sim_slots() for the asynchronous version of this method.

    +
    +

    Parameters

    +
    +++++ + + + + + + + + + + + + + + + + + +

    self

    A MMModem.

     

    cancellable

    A GCancellable or NULL.

    [allow-none]

    error

    Return location for error or NULL.

     
    +
    +
    +

    Returns

    +

    The array of +MMSim objects, or NULL if error +is set.

    +

    [transfer full][element-type ModemManager.Sim]

    +
    +

    Since: 1.16

    +
    +
    +
    +

    mm_modem_set_primary_sim_slot ()

    +
    void
    +mm_modem_set_primary_sim_slot (MMModem *self,
    +                               guint sim_slot,
    +                               GCancellable *cancellable,
    +                               GAsyncReadyCallback callback,
    +                               gpointer user_data);
    +

    Asynchronously requests to select which SIM slot to be considered as primary.

    +

    When the operation is finished, callback + will be invoked in the

    +thread-default main loop

    of the thread you are calling this method from. You can then call +mm_modem_set_primary_sim_slot_finish() to get the result of the operation.

    +

    See mm_modem_set_primary_sim_slot_sync() for the synchronous, blocking version of +this method.

    +
    +

    Parameters

    +
    +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    self

    A MMModem.

     

    sim_slot

    SIM slot number.

     

    cancellable

    A GCancellable or NULL.

    [allow-none]

    callback

    A GAsyncReadyCallback to call when the request is satisfied or +NULL.

     

    user_data

    User data to pass to callback +.

     
    +
    +

    Since: 1.16

    +
    +
    +
    +

    mm_modem_set_primary_sim_slot_finish ()

    +
    gboolean
    +mm_modem_set_primary_sim_slot_finish (MMModem *self,
    +                                      GAsyncResult *res,
    +                                      GError **error);
    +

    Finishes an operation started with mm_modem_set_primary_sim_slot().

    +
    +

    Parameters

    +
    +++++ + + + + + + + + + + + + + + + + + +

    self

    A MMModem.

     

    res

    The GAsyncResult obtained from the GAsyncReadyCallback passed to +mm_modem_set_primary_sim_slot().

     

    error

    Return location for error or NULL.

     
    +
    +
    +

    Returns

    +

    TRUE if the SIM slot switch has been successfully requested, FALSE if +error +is set.

    +
    +

    Since: 1.16

    +
    +
    +
    +

    mm_modem_set_primary_sim_slot_sync ()

    +
    gboolean
    +mm_modem_set_primary_sim_slot_sync (MMModem *self,
    +                                    guint sim_slot,
    +                                    GCancellable *cancellable,
    +                                    GError **error);
    +

    Synchronously requests to select which SIM slot to be considered as primary.

    +

    The calling thread is blocked until a reply is received. See +mm_modem_set_primary_sim_slot() for the asynchronous version of this method.

    +
    +

    Parameters

    +
    +++++ + + + + + + + + + + + + + + + + + + + + + + +

    self

    A MMModem.

     

    sim_slot

    SIM slot number.

     

    cancellable

    A GCancellable or NULL.

    [allow-none]

    error

    Return location for error or NULL.

     
    +
    +
    +

    Returns

    +

    TRUE if the SIM slot switch has been successfully requested, FALSE if +error +is set.

    +
    +

    Since: 1.16

    +
    +
    +

    mm_modem_enable ()

    void
     mm_modem_enable (MMModem *self,
    @@ -3179,12 +3647,12 @@
     

    mm_modem_set_power_state ()

    void
     mm_modem_set_power_state (MMModem *self,
    -                          MMModemPowerState state,
    +                          MMModemPowerState state,
                               GCancellable *cancellable,
                               GAsyncReadyCallback callback,
                               gpointer user_data);

    Asynchronously sets the power state of the device. This method can only be -used while the modem is in MM_MODEM_STATE_DISABLED state.

    +used while the modem is in MM_MODEM_STATE_DISABLED state.

    When the operation is finished, callback will be invoked in the

    thread-default main loop

    of the thread you are calling this method from. You can then call @@ -3207,8 +3675,8 @@

    state

    Either MM_MODEM_POWER_STATE_LOW or MM_MODEM_POWER_STATE_ON. Every -other MMModemPowerState value is not allowed.

    Either MM_MODEM_POWER_STATE_LOW or MM_MODEM_POWER_STATE_ON. Every +other MMModemPowerState value is not allowed.

     

    state

    Either MM_MODEM_POWER_STATE_LOW or MM_MODEM_POWER_STATE_ON. Every -other MMModemPowerState value is not allowed.

    Either MM_MODEM_POWER_STATE_LOW or MM_MODEM_POWER_STATE_ON. Every +other MMModemPowerState value is not allowed.

     

    modes

    Mask of MMModemMode values specifying which modes are allowed.

    Mask of MMModemMode values specifying which modes are allowed.

     

    preferred

    A MMModemMode value specifying which of the modes given in +

    A MMModemMode value specifying which of the modes given in modes -is the preferred one, or MM_MODEM_MODE_NONE if none.

     

    modes

    Mask of MMModemMode values specifying which modes are allowed.

    Mask of MMModemMode values specifying which modes are allowed.

     

    preferred

    A MMModemMode value specifying which of the modes given in +

    A MMModemMode value specifying which of the modes given in modes -is the preferred one, or MM_MODEM_MODE_NONE if none.

     

    bands

    An array of MMModemBand values specifying which bands are allowed.

    An array of MMModemBand values specifying which bands are allowed.

     

    bands

    An array of MMModemBand values specifying which bands are allowed.

    An array of MMModemBand values specifying which bands are allowed.

     

    capabilities

    A MMModemCapability mask.

    A MMModemCapability mask.

     

    capabilities

    A MMModemCapability mask.

    A MMModemCapability mask.

     

    MMModemMode allowed;

    Mask of MMModemMode values specifying allowed modes.

    MMModemMode allowed;

    Mask of MMModemMode values specifying allowed modes.

     

    MMModemMode preferred;

    A single MMModemMode value specifying the preferred mode.

    MMModemMode preferred;

    A single MMModemMode value specifying the preferred mode.

     
     

    MMModemPortType type;

    A MMModemPortType value.

    MMModemPortType type;

    A MMModemPortType value.

     
    -MMModemAccessTechnology +MMModemAccessTechnology mm_modem_3gpp_network_get_access_technology () @@ -72,7 +72,7 @@
    -MMModem3gppNetworkAvailability +MMModem3gppNetworkAvailability mm_modem_3gpp_network_get_availability () @@ -148,7 +148,7 @@
    -MMModem3gppFacility +MMModem3gppFacility mm_modem_3gpp_get_enabled_facility_locks () @@ -156,7 +156,7 @@
    -MMModem3gppRegistrationState +MMModem3gppRegistrationState mm_modem_3gpp_get_registration_state () @@ -164,7 +164,7 @@
    -MMModem3gppSubscriptionState +MMModem3gppSubscriptionState mm_modem_3gpp_get_subscription_state () @@ -180,7 +180,7 @@
    -MMModem3gppEpsUeModeOperation +MMModem3gppEpsUeModeOperation mm_modem_3gpp_get_eps_ue_mode_operation () @@ -380,7 +380,8 @@

    The MMModem3gpp is an object providing access to the methods, signals and properties of the 3GPP interface.

    The 3GPP interface is exposed whenever a modem has any of the 3GPP -capabilities (MM_MODEM_CAPABILITY_GSM_UMTS, MM_MODEM_CAPABILITY_LTE or MM_MODEM_CAPABILITY_LTE_ADVANCED).

    +capabilities (MM_MODEM_CAPABILITY_GSM_UMTS, MM_MODEM_CAPABILITY_LTE +or MM_MODEM_CAPABILITY_5GNR).

    Functions

    @@ -408,7 +409,7 @@

    Returns

    The operator code, or NULL if none available.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -437,7 +438,7 @@

    Returns

    The long operator name, or NULL if none available.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -466,14 +467,14 @@

    Returns

    The long operator name, or NULL if none available.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0


    mm_modem_3gpp_network_get_access_technology ()

    -
    MMModemAccessTechnology
    +
    MMModemAccessTechnology
     mm_modem_3gpp_network_get_access_technology
                                    (const MMModem3gppNetwork *network);

    Get the technology used to access the 3GPP network.

    @@ -494,14 +495,14 @@

    Since: 1.0


    mm_modem_3gpp_network_get_availability ()

    -
    MMModem3gppNetworkAvailability
    +
    MMModem3gppNetworkAvailability
     mm_modem_3gpp_network_get_availability
                                    (const MMModem3gppNetwork *network);

    Get availability of the 3GPP network.

    @@ -522,7 +523,7 @@

    Since: 1.0

    @@ -573,7 +574,7 @@

    Returns

    The DBus path of the MMObject object.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -603,7 +604,7 @@

    Returns

    The DBus path of the MMObject. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -636,7 +637,7 @@

    Returns

    The IMEI, or NULL if none available.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -666,7 +667,7 @@

    Returns

    The IMEI, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -705,7 +706,7 @@

    Returns

    The operator code, or NULL if none available.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -739,7 +740,7 @@

    Returns

    The operator code, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -772,7 +773,7 @@

    Returns

    The operator name, or NULL if none available.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -802,14 +803,14 @@

    Returns

    The operator name, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0


    mm_modem_3gpp_get_enabled_facility_locks ()

    -
    MMModem3gppFacility
    +
    MMModem3gppFacility
     mm_modem_3gpp_get_enabled_facility_locks
                                    (MMModem3gpp *self);

    Get the list of facilities for which PIN locking is enabled.

    @@ -830,7 +831,7 @@

    Returns

    -

    A bitmask of MMModem3gppFacility flags, specifying which facilities +

    A bitmask of MMModem3gppFacility flags, specifying which facilities have locks enabled.

    Since: 1.0

    @@ -838,7 +839,7 @@

    mm_modem_3gpp_get_registration_state ()

    -
    MMModem3gppRegistrationState
    +
    MMModem3gppRegistrationState
     mm_modem_3gpp_get_registration_state (MMModem3gpp *self);

    Get the the mobile registration status as defined in 3GPP TS 27.007 section 10.1.19.

    @@ -859,7 +860,7 @@

    Returns

    -

    A MMModem3gppRegistrationState value, specifying the current +

    A MMModem3gppRegistrationState value, specifying the current registration state.

    Since: 1.0

    @@ -867,7 +868,7 @@

    mm_modem_3gpp_get_subscription_state ()

    -
    MMModem3gppSubscriptionState
    +
    MMModem3gppSubscriptionState
     mm_modem_3gpp_get_subscription_state (MMModem3gpp *self);

    mm_modem_3gpp_get_subscription_state has been deprecated since version 1.10.0. and should not be used in newly-written code.

    @@ -897,7 +898,7 @@

    Returns

    -

    A MMModem3gppSubscriptionState value, specifying the current +

    A MMModem3gppSubscriptionState value, specifying the current subscription state.

    Since: 1.0

    @@ -929,14 +930,14 @@ objects, or NULL if error is set. The returned value should be freed with g_list_free_full() using g_object_unref() as GDestroyNotify function.

    -

    [transfer full][element-type ModemManager.Pco]

    +

    [transfer full][element-type ModemManager.Pco]

    Since: 1.10


    mm_modem_3gpp_get_eps_ue_mode_operation ()

    -
    MMModem3gppEpsUeModeOperation
    +
    MMModem3gppEpsUeModeOperation
     mm_modem_3gpp_get_eps_ue_mode_operation
                                    (MMModem3gpp *self);

    Get the UE mode of operation for EPS.

    @@ -957,7 +958,7 @@

    Since: 1.8

    @@ -993,7 +994,7 @@

    The DBus path of the MMBearer, or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.10

    @@ -1024,7 +1025,7 @@

    Returns

    The DBus path of the MMBearer, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.10

    @@ -1123,7 +1124,7 @@

    a MMSim or NULL if error is set. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.10

    @@ -1172,7 +1173,7 @@

    a MMBearer or NULL if error is set. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.10

    @@ -1207,7 +1208,7 @@

    Returns

    A MMBearerProperties that must be freed with g_object_unref() or NULL if unknown.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.10

    @@ -1243,7 +1244,7 @@

    A MMBearerProperties. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.10

    @@ -1493,7 +1494,7 @@ is set. The returned value should be freed with g_list_free_full() using mm_modem_3gpp_network_free() as GDestroyNotify function.

    -

    [transfer full][element-type ModemManager.Modem3gppNetwork]

    +

    [transfer full][element-type ModemManager.Modem3gppNetwork]

    Since: 1.0

    @@ -1541,7 +1542,7 @@ is set. The returned value should be freed with g_list_free_full() using mm_modem_3gpp_network_free() as GDestroyNotify function.

    -

    [transfer full][element-type ModemManager.Modem3gppNetwork]

    +

    [transfer full][element-type ModemManager.Modem3gppNetwork]

    Since: 1.0

    @@ -1551,7 +1552,7 @@
    void
     mm_modem_3gpp_set_eps_ue_mode_operation
                                    (MMModem3gpp *self,
    -                                MMModem3gppEpsUeModeOperation mode,
    +                                MMModem3gppEpsUeModeOperation mode,
                                     GCancellable *cancellable,
                                     GAsyncReadyCallback callback,
                                     gpointer user_data);
    @@ -1580,7 +1581,7 @@

    mode

    A MMModem3gppEpsUeModeOperation.

    A MMModem3gppEpsUeModeOperation.

     

    mode

    A MMModem3gppEpsUeModeOperation.

    A MMModem3gppEpsUeModeOperation.

     
    -MMModem3gppUssdSessionState +MMModem3gppUssdSessionState mm_modem_3gpp_ussd_get_state () @@ -227,7 +227,7 @@

    Returns

    The DBus path of the MMObject object.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -257,14 +257,14 @@

    Returns

    The DBus path of the MMObject. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0


    mm_modem_3gpp_ussd_get_state ()

    -
    MMModem3gppUssdSessionState
    +
    MMModem3gppUssdSessionState
     mm_modem_3gpp_ussd_get_state (MMModem3gppUssd *self);

    Get the state of the ongoing USSD session, if any.

    @@ -284,7 +284,7 @@

    Returns

    -

    A MMModem3gppUssdSessionState value, specifying the current state.

    +

    A MMModem3gppUssdSessionState value, specifying the current state.

    Since: 1.0

    @@ -317,7 +317,7 @@

    Returns

    The network request, or NULL if none available.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -347,7 +347,7 @@

    Returns

    The network request, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -381,7 +381,7 @@

    Returns

    The network notification, or NULL if none available.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -412,7 +412,7 @@

    Returns

    The network notification, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -886,6 +886,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModemCdma.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModemCdma.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModemCdma.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModemCdma.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -104,7 +104,7 @@
    -MMModemCdmaRegistrationState +MMModemCdmaRegistrationState mm_modem_cdma_get_cdma1x_registration_state () @@ -112,7 +112,7 @@
    -MMModemCdmaRegistrationState +MMModemCdmaRegistrationState mm_modem_cdma_get_evdo_registration_state () @@ -120,7 +120,7 @@
    -MMModemCdmaActivationState +MMModemCdmaActivationState mm_modem_cdma_get_activation_state () @@ -219,7 +219,7 @@

    The MMModemCdma is an object providing access to the methods, signals and properties of the CDMA interface.

    The CDMA interface is exposed whenever a modem has CDMA capabilities -(MM_MODEM_CAPABILITY_CDMA_EVDO).

    +(MM_MODEM_CAPABILITY_CDMA_EVDO).

    Functions

    @@ -246,7 +246,7 @@

    Returns

    The DBus path of the MMObject object.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -276,7 +276,7 @@

    Returns

    The DBus path of the MMObject. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -310,7 +310,7 @@

    Returns

    The ESN, or NULL if none available.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -342,7 +342,7 @@

    Returns

    The ESN, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -375,7 +375,7 @@

    Returns

    The MEID, or NULL if none available.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -406,7 +406,7 @@

    Returns

    The MEID, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -471,7 +471,7 @@

    mm_modem_cdma_get_cdma1x_registration_state ()

    -
    MMModemCdmaRegistrationState
    +
    MMModemCdmaRegistrationState
     mm_modem_cdma_get_cdma1x_registration_state
                                    (MMModemCdma *self);

    Gets the state of the registration in the CDMA 1x network.

    @@ -492,14 +492,14 @@

    Since: 1.0


    mm_modem_cdma_get_evdo_registration_state ()

    -
    MMModemCdmaRegistrationState
    +
    MMModemCdmaRegistrationState
     mm_modem_cdma_get_evdo_registration_state
                                    (MMModemCdma *self);

    Gets the state of the registration in the EV-DO network.

    @@ -520,14 +520,14 @@

    Since: 1.0


    mm_modem_cdma_get_activation_state ()

    -
    MMModemCdmaActivationState
    +
    MMModemCdmaActivationState
     mm_modem_cdma_get_activation_state (MMModemCdma *self);

    Gets the state of the activation in the 3GPP2 network.

    @@ -547,7 +547,7 @@

    Since: 1.0

    @@ -880,6 +880,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModemFirmware.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModemFirmware.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModemFirmware.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModemFirmware.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -181,7 +181,7 @@

    Returns

    The DBus path of the MMObject object.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -211,7 +211,7 @@

    Returns

    The DBus path of the MMObject. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -295,14 +295,14 @@

    The selected firmware slot, or NULL if no slot is selected (such as if all slots are empty, or no slots exist). The returned value should be freed with g_object_unref().

    [out][allow-none][transfer full][out][allow-none][transfer full]

    installed

    A list of MMFirmwareProperties objects specifying the installed images. The returned value should be freed with g_list_free_full() using g_object_unref() as GDestroyNotify.

    [out][allow-none][transfer full][element-type ModemManager.FirmwareProperties][out][allow-none][transfer full][element-type ModemManager.FirmwareProperties]

    res

    The selected firmware slot, or NULL if no slot is selected (such as if all slots are empty, or no slots exist). The returned value should be freed with g_object_unref().

    [out][allow-none][transfer full][out][allow-none][transfer full]

    installed

    A list of MMFirmwareProperties objects specifying the installed images. The returned value should be freed with g_list_free_full() using g_object_unref() as GDestroyNotify.

    [out][allow-none][transfer full][element-type ModemManager.FirmwareProperties][out][allow-none][transfer full][element-type ModemManager.FirmwareProperties]

    cancellable

    -MMModemLocationSource +MMModemLocationSource mm_modem_location_get_capabilities () @@ -66,7 +66,7 @@
    -MMModemLocationSource +MMModemLocationSource mm_modem_location_get_enabled () @@ -105,7 +105,7 @@
    -MMModemLocationAssistanceDataType +MMModemLocationAssistanceDataType mm_modem_location_get_supported_assistance_data () @@ -417,7 +417,7 @@

    Returns

    The DBus path of the MMObject object.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -447,14 +447,14 @@

    Returns

    The DBus path of the MMObject. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0


    mm_modem_location_get_capabilities ()

    -
    MMModemLocationSource
    +
    MMModemLocationSource
     mm_modem_location_get_capabilities (MMModemLocation *self);

    Gets a bitmask of the location capabilities supported by this MMModemLocation.

    @@ -475,14 +475,14 @@

    Since: 1.0


    mm_modem_location_get_enabled ()

    -
    MMModemLocationSource
    +
    MMModemLocationSource
     mm_modem_location_get_enabled (MMModemLocation *self);

    Gets a bitmask of the location capabilities which are enabled in this MMModemLocation.

    @@ -502,7 +502,7 @@

    Since: 1.0

    @@ -586,7 +586,7 @@

    Returns

    The SUPL server address, or NULL if none available. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.6

    @@ -619,14 +619,14 @@

    The SUPL server address, or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.6


    mm_modem_location_get_supported_assistance_data ()

    -
    MMModemLocationAssistanceDataType
    +
    MMModemLocationAssistanceDataType
     mm_modem_location_get_supported_assistance_data
                                    (MMModemLocation *self);

    Gets a bitmask of the supported assistance data types.

    @@ -647,7 +647,7 @@

    Since: 1.10

    @@ -678,7 +678,7 @@

    a NULL-terminated array of server addresses, or NULL if none available. The returned value should be freed with g_strfreev().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.10

    @@ -713,7 +713,7 @@

    a NULL-terminated array of server addresses, or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.10

    @@ -722,7 +722,7 @@

    mm_modem_location_setup ()

    void
     mm_modem_location_setup (MMModemLocation *self,
    -                         MMModemLocationSource sources,
    +                         MMModemLocationSource sources,
                              gboolean signal_location,
                              GCancellable *cancellable,
                              GAsyncReadyCallback callback,
    @@ -751,7 +751,7 @@
     

    sources

    Bitmask of MMModemLocationSource values specifying which locations +

    Bitmask of MMModemLocationSource values specifying which locations should get enabled.

     

    sources

    Bitmask of MMModemLocationSource values specifying which locations +

    Bitmask of MMModemLocationSource values specifying which locations should get enabled.

     

    Return location for a MMLocation3gpp if 3GPP location is requested, or NULL if not required. The returned value should be freed with g_object_unref().

    [out][allow-none][transfer full][out][allow-none][transfer full]

    location_gps_nmea

    Return location for a MMLocationGpsNmea if GPS NMEA location is requested, or NULL if not required. The returned value should be freed with g_object_unref().

    [out][allow-none][transfer full][out][allow-none][transfer full]

    location_gps_raw

    Return location for a MMLocationGpsRaw if GPS raw location is requested, or NULL if not required. The returned value should be freed with g_object_unref().

    [out][allow-none][transfer full][out][allow-none][transfer full]

    location_cdma_bs

    Return location for a MMLocationCdmaBs if CDMA Base Station location is requested, or NULL if not required. The returned value should be freed with g_object_unref().

    [out][allow-none][transfer full][out][allow-none][transfer full]

    res

    Return location for a MMLocation3gpp if 3GPP location is requested, or NULL if not required. The returned value should be freed with g_object_unref().

    [out][allow-none][transfer full][out][allow-none][transfer full]

    location_gps_nmea

    Return location for a MMLocationGpsNmea if GPS NMEA location is requested, or NULL if not required. The returned value should be freed with g_object_unref().

    [out][allow-none][transfer full][out][allow-none][transfer full]

    location_gps_raw

    Return location for a MMLocationGpsRaw if GPS raw location is requested, or NULL if not required. The returned value should be freed with g_object_unref().

    [out][allow-none][transfer full][out][allow-none][transfer full]

    location_cdma_bs

    Return location for a MMLocationCdmaBs if CDMA Base Station location is requested, or NULL if not required. The returned value should be freed with g_object_unref().

    [out][allow-none][transfer full][out][allow-none][transfer full]

    cancellable

    -MMSmsStorage +MMSmsStorage mm_modem_messaging_get_default_storage () @@ -213,7 +213,7 @@

    Returns

    The DBus path of the MMObject object.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -243,7 +243,7 @@

    Returns

    The DBus path of the MMObject. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -253,7 +253,7 @@
    gboolean
     mm_modem_messaging_peek_supported_storages
                                    (MMModemMessaging *self,
    -                                const MMSmsStorage **storages,
    +                                const MMSmsStorage **storages,
                                     guint *n_storages);

    Gets the list of SMS storages supported by the MMModem.

    @@ -272,7 +272,7 @@

    storages

    Return location for the array of MMSmsStorage values. Do +

    Return location for the array of MMSmsStorage values. Do not free the returned array, it is owned by self .

    [out]

    storages

    Return location for the array of -MMSmsStorage values. The returned array should be freed with g_free() when +MMSmsStorage values. The returned array should be freed with g_free() when no longer needed.

    [out][array length=n_storages]
    -MMOmaFeature +MMOmaFeature mm_modem_oma_get_features () @@ -162,7 +162,7 @@
    -MMOmaSessionType +MMOmaSessionType mm_modem_oma_get_session_type () @@ -170,7 +170,7 @@
    -MMOmaSessionState +MMOmaSessionState mm_modem_oma_get_session_state () @@ -260,7 +260,7 @@

    Returns

    The DBus path of the MMObject object.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.2

    @@ -290,7 +290,7 @@

    Returns

    The DBus path of the MMObject. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.2

    @@ -299,7 +299,7 @@

    mm_modem_oma_setup ()

    void
     mm_modem_oma_setup (MMModemOma *self,
    -                    MMOmaFeature features,
    +                    MMOmaFeature features,
                         GCancellable *cancellable,
                         GAsyncReadyCallback callback,
                         gpointer user_data);
    @@ -326,7 +326,7 @@

    features

    Mask of MMOmaFeature values to enable.

    Mask of MMOmaFeature values to enable.

     

    features

    Mask of MMOmaFeature values to enable.

    Mask of MMOmaFeature values to enable.

     

    session_type

    A MMOmaSessionType.

    A MMOmaSessionType.

     

    session_type

    A MMOmaSessionType.

    A MMOmaSessionType.

     

    MMOmaSessionType session_type;

    A MMOmaSessionType.

    MMOmaSessionType session_type;

    A MMOmaSessionType.

     
    +MMSignal * + +mm_modem_signal_peek_nr5g () +
    +MMSignal * + +mm_modem_signal_get_nr5g () +
    void @@ -230,7 +246,7 @@

    Returns

    The DBus path of the MMObject object.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.2

    @@ -260,7 +276,7 @@

    Returns

    The DBus path of the MMObject. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.2

    @@ -320,7 +336,7 @@

    A MMSignal. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.2

    @@ -353,7 +369,7 @@

    Returns

    A MMSignal that must be freed with g_object_unref() or NULL if unknown.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.2

    @@ -386,7 +402,7 @@

    A MMSignal. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.2

    @@ -419,7 +435,7 @@

    Returns

    A MMSignal that must be freed with g_object_unref() or NULL if unknown.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.2

    @@ -452,7 +468,7 @@

    A MMSignal. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.2

    @@ -485,7 +501,7 @@

    Returns

    A MMSignal that must be freed with g_object_unref() or NULL if unknown.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.2

    @@ -518,7 +534,7 @@

    A MMSignal. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.2

    @@ -551,7 +567,7 @@

    Returns

    A MMSignal that must be freed with g_object_unref() or NULL if unknown.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.2

    @@ -584,7 +600,7 @@

    A MMSignal. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.2

    @@ -617,12 +633,78 @@

    Returns

    A MMSignal that must be freed with g_object_unref() or NULL if unknown.

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.2


    +

    mm_modem_signal_peek_nr5g ()

    +
    MMSignal *
    +mm_modem_signal_peek_nr5g (MMModemSignal *self);
    +

    Gets a MMSignal object specifying the 5G signal information.

    +
    The returned value is only valid until the property changes so it is +only safe to use this function on the thread where self was constructed. Use +mm_modem_signal_get_nr5g() if on another thread.
    +
    +

    Parameters

    +
    +++++ + + + + + +

    self

    A MMModem.

     
    +
    +
    +

    Returns

    +

    A MMSignal. Do not free the returned value, it +belongs to self +.

    +

    [transfer none]

    +
    +

    Since: 1.16

    +
    +
    +
    +

    mm_modem_signal_get_nr5g ()

    +
    MMSignal *
    +mm_modem_signal_get_nr5g (MMModemSignal *self);
    +

    Gets a MMSignal object specifying the 5G signal information.

    +
    The values reported by self are not updated when the values in the +interface change. Instead, the client is expected to call +mm_modem_signal_get_nr5g() again to get a new MMSignal with the new values. +
    +
    +

    Parameters

    +
    +++++ + + + + + +

    self

    A MMModem.

     
    +
    +
    +

    Returns

    +

    A MMSignal that must be freed with +g_object_unref() or NULL if unknown.

    +

    [transfer full]

    +
    +

    Since: 1.16

    +
    +
    +

    mm_modem_signal_setup ()

    void
     mm_modem_signal_setup (MMModemSignal *self,
    @@ -783,6 +865,6 @@
     
    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModemSimple.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModemSimple.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMModemSimple.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMModemSimple.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -163,7 +163,7 @@

    The MMModemSimple is an object providing access to the methods, signals and properties of the Simple interface.

    The Simple interface is exposed on modems which are not in -MM_MODEM_STATE_FAILED state.

    +MM_MODEM_STATE_FAILED state.

    Functions

    @@ -190,7 +190,7 @@

    Returns

    The DBus path of the MMObject object.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -220,7 +220,7 @@

    Returns

    The DBus path of the MMObject. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -258,7 +258,7 @@

    properties

    A MMSimpleConnectProperties bundle.

    [transfer none][transfer none]

    cancellable

    properties

    A MMSimpleConnectProperties bundle.

    [transfer none][transfer none]

    cancellable

    pco_list

    a GList of MMPco.

    [transfer full][element-type ModemManager.Pco][transfer full][element-type ModemManager.Pco]
    @@ -233,6 +233,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMSignal.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMSignal.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMSignal.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMSignal.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -380,6 +380,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMSim.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMSim.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMSim.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMSim.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -57,6 +57,14 @@
    +gboolean + +mm_sim_get_active () +
    const gchar * @@ -90,6 +98,21 @@ const gchar * +mm_sim_get_eid () +
    +gchar * + +mm_sim_dup_eid () +
    const gchar * + mm_sim_get_operator_identifier ()
    +++++ + + + + + +

    self

    A MMSim.

     
    +
    +
    +

    Returns

    +

    TRUE if the SIM is active, FALSE otherwise.

    +
    +

    Since: 1.16

    + +
    +

    mm_sim_get_identifier ()

    const gchar *
     mm_sim_get_identifier (MMSim *self);
    @@ -374,7 +424,7 @@

    Returns

    The unique identifier of the MMSim object, or NULL if it couldn't be retrieved.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -404,7 +454,7 @@

    The unique identifier of the MMSim object, or NULL if it couldn't be retrieved. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -437,7 +487,7 @@

    Returns

    The IMSI of the MMSim object, or NULL if it couldn't be retrieved.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -467,12 +517,73 @@

    Returns

    The IMSI of the MMSim object, or NULL if it couldn't be retrieved. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0


    +

    mm_sim_get_eid ()

    +
    const gchar *
    +mm_sim_get_eid (MMSim *self);
    +

    Gets the Embedded UICC ID (or EID) of the MMSim object.

    +
    The returned value is only valid until the property changes so it is +only safe to use this function on the thread where self was constructed. Use +mm_sim_dup_eid() if on another thread.
    +
    +

    Parameters

    +
    +++++ + + + + + +

    self

    A MMSim.

     
    +
    +
    +

    Returns

    +

    The EID of the MMSim object, or NULL if it +couldn't be retrieved.

    +

    [transfer none]

    +
    +

    Since: 1.16

    +
    +
    +
    +

    mm_sim_dup_eid ()

    +
    gchar *
    +mm_sim_dup_eid (MMSim *self);
    +

    Gets a copy of the Embedded UICC ID (EID) of the MMSim object.

    +
    +

    Parameters

    +
    +++++ + + + + + +

    self

    A MMSim.

     
    +
    +
    +

    Returns

    +

    The EID of the MMSim object, or NULL if it +couldn't be retrieved. The returned value should be freed with g_free().

    +

    [transfer full]

    +
    +

    Since: 1.16

    +
    +
    +

    mm_sim_get_operator_identifier ()

    const gchar *
     mm_sim_get_operator_identifier (MMSim *self);
    @@ -499,7 +610,7 @@

    Returns

    The Operator Identifier of the MMSim object, or NULL if it couldn't be retrieved.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -529,7 +640,7 @@

    The Operator Identifier of the MMSim object, or NULL if it couldn't be retrieved. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -561,7 +672,7 @@

    Returns

    The Operator Name of the MMSim object, or NULL if it couldn't be retrieved.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -590,7 +701,7 @@

    Returns

    The Operator Name of the MMSim object, or NULL if it couldn't be retrieved. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -623,7 +734,7 @@

    The emergency numbers, or NULL if none available. Do not free the returned value, it belongs to self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.12

    @@ -652,7 +763,7 @@

    Returns

    The emergency numbers, or NULL if none available. The returned value should be freed with g_strfreev().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.12

    @@ -1442,6 +1553,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMSimpleConnectProperties.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMSimpleConnectProperties.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMSimpleConnectProperties.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMSimpleConnectProperties.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -95,7 +95,7 @@ -MMBearerAllowedAuth +MMBearerAllowedAuth mm_simple_connect_properties_get_allowed_auth () @@ -141,7 +141,7 @@ -MMBearerIpFamily +MMBearerIpFamily mm_simple_connect_properties_get_ip_type () @@ -172,6 +172,22 @@ + +MMModemCdmaRmProtocol + + +mm_simple_connect_properties_get_rm_protocol () + + + + +void + + +mm_simple_connect_properties_set_rm_protocol () + + + const gchar * @@ -225,7 +241,7 @@

    Returns

    a MMSimpleConnectProperties. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -255,7 +271,7 @@

    the PIN, or NULL if not set. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -317,7 +333,7 @@

    the operator ID, or NULL if not set. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -379,7 +395,7 @@

    the access point, or NULL if not set. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -417,7 +433,7 @@

    mm_simple_connect_properties_get_allowed_auth ()

    -
    MMBearerAllowedAuth
    +
    MMBearerAllowedAuth
     mm_simple_connect_properties_get_allowed_auth
                                    (MMSimpleConnectProperties *self);

    Gets the authentication methods allowed in the connection.

    @@ -438,8 +454,8 @@

    Returns

    -

    a bitmask of MMBearerAllowedAuth values, or -MM_BEARER_ALLOWED_AUTH_UNKNOWN to request the modem-default method.

    +

    a bitmask of MMBearerAllowedAuth values, or +MM_BEARER_ALLOWED_AUTH_UNKNOWN to request the modem-default method.

    Since: 1.0

    @@ -449,7 +465,7 @@
    void
     mm_simple_connect_properties_set_allowed_auth
                                    (MMSimpleConnectProperties *self,
    -                                MMBearerAllowedAuth allowed_auth);
    + MMBearerAllowedAuth allowed_auth);

    Sets the authentication method to use.

    Parameters

    @@ -467,8 +483,8 @@

    allowed_auth

    -

    a bitmask of MMBearerAllowedAuth values. -MM_BEARER_ALLOWED_AUTH_UNKNOWN may be given to request the modem-default method.

    +

    a bitmask of MMBearerAllowedAuth values. +MM_BEARER_ALLOWED_AUTH_UNKNOWN may be given to request the modem-default method.

      @@ -502,7 +518,7 @@

    the username, or NULL if not set. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -564,7 +580,7 @@

    the password, or NULL if not set. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -603,7 +619,7 @@

    mm_simple_connect_properties_get_ip_type ()

    -
    MMBearerIpFamily
    +
    MMBearerIpFamily
     mm_simple_connect_properties_get_ip_type
                                    (MMSimpleConnectProperties *self);

    Sets the IP type to use.

    @@ -624,7 +640,7 @@

    Since: 1.0

    @@ -634,7 +650,7 @@
    void
     mm_simple_connect_properties_set_ip_type
                                    (MMSimpleConnectProperties *self,
    -                                MMBearerIpFamily ip_type);
    + MMBearerIpFamily ip_type);

    Sets the IP type to use.

    Parameters

    @@ -652,7 +668,7 @@

    ip_type

    -

    a MMBearerIpFamily.

    +

    a MMBearerIpFamily.

      @@ -723,6 +739,66 @@

    +

    mm_simple_connect_properties_get_rm_protocol ()

    +
    MMModemCdmaRmProtocol
    +mm_simple_connect_properties_get_rm_protocol
    +                               (MMSimpleConnectProperties *self);
    +

    Get the RM protocol requested by the user.

    +
    +

    Parameters

    +
    +++++ + + + + + +

    self

    a MMSimpleConnectProperties.

     
    +
    +
    +

    Returns

    +

    a MMModemCdmaRmProtocol.

    +
    +

    Since: 1.16

    +
    +
    +
    +

    mm_simple_connect_properties_set_rm_protocol ()

    +
    void
    +mm_simple_connect_properties_set_rm_protocol
    +                               (MMSimpleConnectProperties *self,
    +                                MMModemCdmaRmProtocol protocol);
    +

    Sets the RM protocol requested by the user.

    +
    +

    Parameters

    +
    +++++ + + + + + + + + + + + + +

    self

    a MMSimpleConnectProperties.

     

    protocol

    a MMModemCdmaRmProtocol.

     
    +
    +

    Since: 1.16

    +
    +
    +

    mm_simple_connect_properties_get_number ()

    const gchar *
     mm_simple_connect_properties_get_number
    @@ -753,7 +829,7 @@
     

    the number, or NULL if not set. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -806,6 +882,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMSimpleStatus.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMSimpleStatus.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMSimpleStatus.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMSimpleStatus.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -43,7 +43,7 @@ -MMModemState +MMModemState mm_simple_status_get_state () @@ -59,7 +59,7 @@ -MMModemAccessTechnology +MMModemAccessTechnology mm_simple_status_get_access_technologies () @@ -75,7 +75,7 @@ -MMModem3gppRegistrationState +MMModem3gppRegistrationState mm_simple_status_get_3gpp_registration_state () @@ -97,7 +97,7 @@ -MMModem3gppSubscriptionState +MMModem3gppSubscriptionState mm_simple_status_get_3gpp_subscription_state () @@ -105,7 +105,7 @@ -MMModemCdmaRegistrationState +MMModemCdmaRegistrationState mm_simple_status_get_cdma_cdma1x_registration_state () @@ -113,7 +113,7 @@ -MMModemCdmaRegistrationState +MMModemCdmaRegistrationState mm_simple_status_get_cdma_evdo_registration_state () @@ -148,17 +148,17 @@ -MMModemAccessTechnology +MMModemAccessTechnology access-technologies Read / Write -MMModemCdmaRegistrationState +MMModemCdmaRegistrationState cdma-cdma1x-registration-state Read / Write -MMModemCdmaRegistrationState +MMModemCdmaRegistrationState cdma-evdo-registration-state Read / Write @@ -180,23 +180,23 @@ -gchar * +char * m3gpp-operator-code Read / Write -gchar * +char * m3gpp-operator-name Read / Write -MMModem3gppRegistrationState +MMModem3gppRegistrationState m3gpp-registration-state Read / Write -MMModem3gppSubscriptionState +MMModem3gppSubscriptionState m3gpp-subscription-state Read / Write @@ -207,7 +207,7 @@ Read / Write -MMModemState +MMModemState state Read / Write @@ -244,7 +244,7 @@

    Functions

    mm_simple_status_get_state ()

    -
    MMModemState
    +
    MMModemState
     mm_simple_status_get_state (MMSimpleStatus *self);

    Gets the state of the modem.

    @@ -264,7 +264,7 @@

    Returns

    -

    a MMModemState.

    +

    a MMModemState.

    Since: 1.0

    @@ -307,7 +307,7 @@

    mm_simple_status_get_access_technologies ()

    -
    MMModemAccessTechnology
    +
    MMModemAccessTechnology
     mm_simple_status_get_access_technologies
                                    (MMSimpleStatus *self);

    Gets the currently used access technologies.

    @@ -328,7 +328,7 @@

    Returns

    -

    a bitmask of MMModemAccessTechnology values.

    +

    a bitmask of MMModemAccessTechnology values.

    Since: 1.0

    @@ -337,7 +337,7 @@

    mm_simple_status_get_current_bands ()

    void
     mm_simple_status_get_current_bands (MMSimpleStatus *self,
    -                                    const MMModemBand **bands,
    +                                    const MMModemBand **bands,
                                         guint *n_bands);

    Gets the currently used frequency bands.

    @@ -356,7 +356,7 @@

    bands

    -

    location for an array of MMModemBand values. Do not free the +

    location for an array of MMModemBand values. Do not free the returned value, it is owned by self .

    [out] @@ -375,7 +375,7 @@

    mm_simple_status_get_3gpp_registration_state ()

    -
    MMModem3gppRegistrationState
    +
    MMModem3gppRegistrationState
     mm_simple_status_get_3gpp_registration_state
                                    (MMSimpleStatus *self);

    Gets the current state of the registration in the 3GPP network.

    @@ -396,7 +396,7 @@

    Since: 1.0

    @@ -465,7 +465,7 @@

    mm_simple_status_get_3gpp_subscription_state ()

    -
    MMModem3gppSubscriptionState
    +
    MMModem3gppSubscriptionState
     mm_simple_status_get_3gpp_subscription_state
                                    (MMSimpleStatus *self);
    @@ -492,14 +492,14 @@

    Since: 1.0


    mm_simple_status_get_cdma_cdma1x_registration_state ()

    -
    MMModemCdmaRegistrationState
    +
    MMModemCdmaRegistrationState
     mm_simple_status_get_cdma_cdma1x_registration_state
                                    (MMSimpleStatus *self);

    Gets the current state of the registration in the CDMA-1x network.

    @@ -520,14 +520,14 @@

    Since: 1.0


    mm_simple_status_get_cdma_evdo_registration_state ()

    -
    MMModemCdmaRegistrationState
    +
    MMModemCdmaRegistrationState
     mm_simple_status_get_cdma_evdo_registration_state
                                    (MMSimpleStatus *self);

    Gets the current state of the registration in the EV-DO network.

    @@ -548,7 +548,7 @@

    Since: 1.0

    @@ -620,7 +620,7 @@

    Property Details

    The “access-technologies” property

    -
      “access-technologies”      MMModemAccessTechnology
    +
      “access-technologies”      MMModemAccessTechnology

    Access technologies used by the modem.

    Owner: MMSimpleStatus

    Flags: Read / Write

    @@ -628,7 +628,7 @@

    The “cdma-cdma1x-registration-state” property

    -
      “cdma-cdma1x-registration-state” MMModemCdmaRegistrationState
    +
      “cdma-cdma1x-registration-state” MMModemCdmaRegistrationState

    Registration state in the CDMA1x network.

    Owner: MMSimpleStatus

    Flags: Read / Write

    @@ -637,7 +637,7 @@

    The “cdma-evdo-registration-state” property

    -
      “cdma-evdo-registration-state” MMModemCdmaRegistrationState
    +
      “cdma-evdo-registration-state” MMModemCdmaRegistrationState

    Registration state in the EV-DO network.

    Owner: MMSimpleStatus

    Flags: Read / Write

    @@ -676,7 +676,7 @@

    The “m3gpp-operator-code” property

    -
      “m3gpp-operator-code”      gchar *
    +
      “m3gpp-operator-code”      char *

    Code of the current operator in the 3GPP network.

    Owner: MMSimpleStatus

    Flags: Read / Write

    @@ -685,7 +685,7 @@

    The “m3gpp-operator-name” property

    -
      “m3gpp-operator-name”      gchar *
    +
      “m3gpp-operator-name”      char *

    Name of the current operator in the 3GPP network.

    Owner: MMSimpleStatus

    Flags: Read / Write

    @@ -694,7 +694,7 @@

    The “m3gpp-registration-state” property

    -
      “m3gpp-registration-state” MMModem3gppRegistrationState
    +
      “m3gpp-registration-state” MMModem3gppRegistrationState

    Registration state in the 3GPP network.

    Owner: MMSimpleStatus

    Flags: Read / Write

    @@ -703,7 +703,7 @@

    The “m3gpp-subscription-state” property

    -
      “m3gpp-subscription-state” MMModem3gppSubscriptionState
    +
      “m3gpp-subscription-state” MMModem3gppSubscriptionState

    Subscription state of the account (deprecated).

    Owner: MMSimpleStatus

    Flags: Read / Write

    @@ -722,7 +722,7 @@

    The “state” property

    -
      “state”                    MMModemState
    +
      “state”                    MMModemState

    State of the modem.

    Owner: MMSimpleStatus

    Flags: Read / Write

    @@ -731,6 +731,6 @@
    +
    Generated by GTK-Doc V1.33.1
    \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMSms.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMSms.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMSms.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMSms.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -58,7 +58,7 @@ -MMSmsState +MMSmsState mm_sms_get_state () @@ -66,7 +66,7 @@ -MMSmsPduType +MMSmsPduType mm_sms_get_pdu_type () @@ -74,7 +74,7 @@ -MMSmsStorage +MMSmsStorage mm_sms_get_storage () @@ -158,7 +158,7 @@ -MMSmsCdmaTeleserviceId +MMSmsCdmaTeleserviceId mm_sms_get_teleservice_id () @@ -166,7 +166,7 @@ -MMSmsCdmaServiceCategory +MMSmsCdmaServiceCategory mm_sms_get_service_category () @@ -174,7 +174,7 @@ -MMSmsValidityType +MMSmsValidityType mm_sms_get_validity_type () @@ -344,7 +344,7 @@

    Returns

    The DBus path of the MMSms object.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -373,14 +373,14 @@

    Returns

    The DBus path of the MMSms object. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0


    mm_sms_get_state ()

    -
    MMSmsState
    +
    MMSmsState
     mm_sms_get_state (MMSms *self);

    Gets the state of this SMS.

    @@ -400,14 +400,14 @@

    Returns

    -

    A MMSmsState specifying the state.

    +

    A MMSmsState specifying the state.

    Since: 1.0


    mm_sms_get_pdu_type ()

    -
    MMSmsPduType
    +
    MMSmsPduType
     mm_sms_get_pdu_type (MMSms *self);

    Gets the PDU type on which this SMS is based.

    @@ -427,14 +427,14 @@

    Returns

    -

    A MMSmsPduType specifying the PDU type.

    +

    A MMSmsPduType specifying the PDU type.

    Since: 1.0


    mm_sms_get_storage ()

    -
    MMSmsStorage
    +
    MMSmsStorage
     mm_sms_get_storage (MMSms *self);

    Gets the storage in which this SMS is kept.

    @@ -454,7 +454,7 @@

    Returns

    -

    A MMSmsStorage specifying the storage.

    +

    A MMSmsStorage specifying the storage.

    Since: 1.0

    @@ -486,7 +486,7 @@

    Returns

    The message text, or NULL if it doesn't contain any (e.g. contains data instead).

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -516,7 +516,7 @@

    The message text, or NULL if it doesn't contain any (e.g. contains data instead). The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -554,7 +554,7 @@

    The message data, or NULL if it doesn't contain any (e.g. contains text instead).

    -

    [transfer none][array length=data_len][element-type guint8]

    +

    [transfer none][array length=data_len][element-type guint8]

    Since: 1.0

    @@ -592,7 +592,7 @@

    The message data, or NULL if it doesn't contain any (e.g. contains text instead). The returned value should be freed with g_free().

    -

    [transfer full][array length=data_len][element-type guint8]

    +

    [transfer full][array length=data_len][element-type guint8]

    Since: 1.0

    @@ -623,7 +623,7 @@

    Returns

    The number, or NULL if it couldn't be retrieved.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -652,7 +652,7 @@

    Returns

    The number, or NULL if it couldn't be retrieved. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -684,7 +684,7 @@

    Returns

    The number of the SMSC, or NULL if it couldn't be retrieved.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -713,7 +713,7 @@

    Returns

    The number of the SMSC, or NULL if it couldn't be retrieved. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -723,7 +723,7 @@
    guint
     mm_sms_get_message_reference (MMSms *self);

    Gets the message reference of the last PDU sent/received within this SMS.

    -

    If the PDU type is MM_SMS_PDU_TYPE_STATUS_REPORT, this field identifies the +

    If the PDU type is MM_SMS_PDU_TYPE_STATUS_REPORT, this field identifies the message reference of the PDU associated to the status report.

    Parameters

    @@ -776,7 +776,7 @@

    mm_sms_get_teleservice_id ()

    -
    MMSmsCdmaTeleserviceId
    +
    MMSmsCdmaTeleserviceId
     mm_sms_get_teleservice_id (MMSms *self);

    Gets the 3GPP2 Teleservice ID.

    @@ -796,14 +796,14 @@

    Since: 1.2


    mm_sms_get_service_category ()

    -
    MMSmsCdmaServiceCategory
    +
    MMSmsCdmaServiceCategory
     mm_sms_get_service_category (MMSms *self);

    Gets the 3GPP2 Service Category.

    @@ -823,14 +823,14 @@

    Since: 1.2


    mm_sms_get_validity_type ()

    -
    MMSmsValidityType
    +
    MMSmsValidityType
     mm_sms_get_validity_type (MMSms *self);

    Gets the type of validity information in the SMS.

    @@ -850,7 +850,7 @@

    Returns

    -

    the validity type or MM_SMS_VALIDITY_TYPE_UNKNOWN.

    +

    the validity type or MM_SMS_VALIDITY_TYPE_UNKNOWN.

    Since: 1.0

    @@ -860,7 +860,7 @@
    guint
     mm_sms_get_validity_relative (MMSms *self);

    Gets the length of the validity period, in minutes.

    -

    Only applicable if the type of validity is MM_SMS_VALIDITY_TYPE_RELATIVE.

    +

    Only applicable if the type of validity is MM_SMS_VALIDITY_TYPE_RELATIVE.

    Parameters

    @@ -889,8 +889,8 @@ mm_sms_get_timestamp (MMSms *self);

    Gets the time when the first PDU of the SMS message arrived the SMSC, in

    ISO8601

    format.

    -

    This field is only applicable if the PDU type is MM_SMS_PDU_TYPE_DELIVER or -MM_SMS_PDU_TYPE_STATUS_REPORT.

    +

    This field is only applicable if the PDU type is MM_SMS_PDU_TYPE_DELIVER or +MM_SMS_PDU_TYPE_STATUS_REPORT.

    The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use mm_sms_dup_timestamp() if on another thread.
    @@ -913,7 +913,7 @@

    Returns

    The timestamp, or NULL if it couldn't be retrieved.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -924,8 +924,8 @@ mm_sms_dup_timestamp (MMSms *self);

    Gets the time when the first PDU of the SMS message arrived the SMSC, in

    ISO8601

    format.

    -

    This field is only applicable if the PDU type is MM_SMS_PDU_TYPE_DELIVER or -MM_SMS_PDU_TYPE_STATUS_REPORT.

    +

    This field is only applicable if the PDU type is MM_SMS_PDU_TYPE_DELIVER or +MM_SMS_PDU_TYPE_STATUS_REPORT.

    Parameters

    @@ -945,7 +945,7 @@

    Returns

    The timestamp, or NULL if it couldn't be retrieved. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -957,7 +957,7 @@

    Gets the time when the first PDU of the SMS message left the SMSC, in

    ISO8601

    format.

    This field is only applicable if the PDU type is -MM_SMS_PDU_TYPE_STATUS_REPORT.

    +MM_SMS_PDU_TYPE_STATUS_REPORT.

    The returned value is only valid until the property changes so it is only safe to use this function on the thread where self was constructed. Use mm_sms_dup_discharge_timestamp() if on another thread.
    @@ -980,7 +980,7 @@

    Returns

    The timestamp, or NULL if it couldn't be retrieved.

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -992,7 +992,7 @@

    Gets the time when the first PDU of the SMS message left the SMSC, in

    ISO8601

    format.

    This field is only applicable if the PDU type is -MM_SMS_PDU_TYPE_STATUS_REPORT.

    +MM_SMS_PDU_TYPE_STATUS_REPORT.

    Parameters

    @@ -1012,7 +1012,7 @@

    Returns

    The timestamp, or NULL if it couldn't be retrieved. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -1023,7 +1023,7 @@ mm_sms_get_delivery_state (MMSms *self);

    Gets the delivery state of this SMS.

    This field is only applicable if the PDU type is -MM_SMS_PDU_TYPE_STATUS_REPORT.

    +MM_SMS_PDU_TYPE_STATUS_REPORT.

    Parameters

    @@ -1041,7 +1041,7 @@

    Returns

    -

    A MMSmsDeliveryState specifying the delivery state.

    +

    A MMSmsDeliveryState specifying the delivery state.

    Since: 1.0

    @@ -1216,7 +1216,7 @@

    mm_sms_store ()

    void
     mm_sms_store (MMSms *self,
    -              MMSmsStorage storage,
    +              MMSmsStorage storage,
                   GCancellable *cancellable,
                   GAsyncReadyCallback callback,
                   gpointer user_data);
    @@ -1243,8 +1243,8 @@ - + @@ -1317,7 +1317,7 @@

    mm_sms_store_sync ()

    gboolean
     mm_sms_store_sync (MMSms *self,
    -                   MMSmsStorage storage,
    +                   MMSmsStorage storage,
                        GCancellable *cancellable,
                        GError **error);

    Synchronoulsy requests to store the message in the device if not already @@ -1341,8 +1341,8 @@

    - + @@ -1377,6 +1377,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMSmsProperties.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMSmsProperties.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMSmsProperties.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMSmsProperties.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -134,7 +134,7 @@ - + @@ -824,7 +824,7 @@

    mm_sms_properties_get_teleservice_id ()

    -
    MMSmsCdmaTeleserviceId
    +
    MMSmsCdmaTeleserviceId
     mm_sms_properties_get_teleservice_id (MMSmsProperties *self);

    Gets the CDMA teleservice ID of the SMS.

    @@ -853,7 +853,7 @@

    mm_sms_properties_set_teleservice_id ()

    void
     mm_sms_properties_set_teleservice_id (MMSmsProperties *self,
    -                                      MMSmsCdmaTeleserviceId teleservice_id);
    + MMSmsCdmaTeleserviceId teleservice_id);

    Sets the CDMA teleservice ID of the SMS.

    Parameters

    @@ -882,7 +882,7 @@

    mm_sms_properties_get_service_category ()

    -
    MMSmsCdmaServiceCategory
    +
    MMSmsCdmaServiceCategory
     mm_sms_properties_get_service_category
                                    (MMSmsProperties *self);

    Gets the CDMA message service category of the SMS.

    @@ -913,7 +913,7 @@
    void
     mm_sms_properties_set_service_category
                                    (MMSmsProperties *self,
    -                                MMSmsCdmaServiceCategory service_category);
    + MMSmsCdmaServiceCategory service_category);

    Sets the CDMA service category of the SMS.

    Parameters

    @@ -951,6 +951,6 @@
    +
    Generated by GTK-Doc V1.33.1
    \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MMUnlockRetries.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MMUnlockRetries.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MMUnlockRetries.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MMUnlockRetries.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -95,7 +95,7 @@

    Description

    The MMUnlockRetries is an object exposing the unlock retry counts for -different MMModemLock values.

    +different MMModemLock values.

    This object is retrieved from the MMModem object with either mm_modem_get_unlock_retries() or mm_modem_peek_unlock_retries().

    @@ -105,7 +105,7 @@

    mm_unlock_retries_get ()

    guint
     mm_unlock_retries_get (MMUnlockRetries *self,
    -                       MMModemLock lock);
    + MMModemLock lock);

    Gets the unlock retries for the given lock .

    @@ -124,7 +124,7 @@
    - + @@ -140,7 +140,7 @@

    MMUnlockRetriesForeachCb ()

    void
    -(*MMUnlockRetriesForeachCb) (MMModemLock lock,
    +(*MMUnlockRetriesForeachCb) (MMModemLock lock,
                                  guint count,
                                  gpointer user_data);

    Specifies the type of function passed to mm_unlock_retries_foreach().

    @@ -155,7 +155,7 @@
    - + @@ -235,6 +235,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusBearer.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusBearer.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusBearer.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusBearer.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -227,7 +227,7 @@ +char * @@ -337,7 +337,7 @@

    mm_gdbus_bearer_get_interface ()

    const gchar *
     mm_gdbus_bearer_get_interface (MmGdbusBearer *object);
    -

    Gets the value of the "Interface" D-Bus property.

    +

    Gets the value of the "Interface" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_bearer_dup_interface() if on another thread.

    @@ -361,7 +361,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -369,7 +369,7 @@

    mm_gdbus_bearer_dup_interface ()

    gchar *
     mm_gdbus_bearer_dup_interface (MmGdbusBearer *object);
    -

    Gets a copy of the "Interface" D-Bus property.

    +

    Gets a copy of the "Interface" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -390,7 +390,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -398,7 +398,7 @@

    mm_gdbus_bearer_get_ip4_config ()

    GVariant *
     mm_gdbus_bearer_get_ip4_config (MmGdbusBearer *object);
    -

    Gets the value of the "Ip4Config" D-Bus property.

    +

    Gets the value of the "Ip4Config" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_bearer_dup_ip4_config() if on another thread.

    @@ -422,7 +422,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -430,7 +430,7 @@

    mm_gdbus_bearer_dup_ip4_config ()

    GVariant *
     mm_gdbus_bearer_dup_ip4_config (MmGdbusBearer *object);
    -

    Gets a copy of the "Ip4Config" D-Bus property.

    +

    Gets a copy of the "Ip4Config" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -451,7 +451,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -459,7 +459,7 @@

    mm_gdbus_bearer_get_ip6_config ()

    GVariant *
     mm_gdbus_bearer_get_ip6_config (MmGdbusBearer *object);
    -

    Gets the value of the "Ip6Config" D-Bus property.

    +

    Gets the value of the "Ip6Config" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_bearer_dup_ip6_config() if on another thread.

    @@ -483,7 +483,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -491,7 +491,7 @@

    mm_gdbus_bearer_dup_ip6_config ()

    GVariant *
     mm_gdbus_bearer_dup_ip6_config (MmGdbusBearer *object);
    -

    Gets a copy of the "Ip6Config" D-Bus property.

    +

    Gets a copy of the "Ip6Config" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -512,7 +512,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -520,7 +520,7 @@

    mm_gdbus_bearer_get_ip_timeout ()

    guint
     mm_gdbus_bearer_get_ip_timeout (MmGdbusBearer *object);
    -

    Gets the value of the "IpTimeout" D-Bus property.

    +

    Gets the value of the "IpTimeout" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -548,7 +548,7 @@

    mm_gdbus_bearer_get_properties ()

    GVariant *
     mm_gdbus_bearer_get_properties (MmGdbusBearer *object);
    -

    Gets the value of the "Properties" D-Bus property.

    +

    Gets the value of the "Properties" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_bearer_dup_properties() if on another thread.

    @@ -572,7 +572,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -580,7 +580,7 @@

    mm_gdbus_bearer_dup_properties ()

    GVariant *
     mm_gdbus_bearer_dup_properties (MmGdbusBearer *object);
    -

    Gets a copy of the "Properties" D-Bus property.

    +

    Gets a copy of the "Properties" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -601,7 +601,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -609,7 +609,7 @@

    mm_gdbus_bearer_get_connected ()

    gboolean
     mm_gdbus_bearer_get_connected (MmGdbusBearer *object);
    -

    Gets the value of the "Connected" D-Bus property.

    +

    Gets the value of the "Connected" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -637,7 +637,7 @@

    mm_gdbus_bearer_get_suspended ()

    gboolean
     mm_gdbus_bearer_get_suspended (MmGdbusBearer *object);
    -

    Gets the value of the "Suspended" D-Bus property.

    +

    Gets the value of the "Suspended" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -665,7 +665,7 @@

    mm_gdbus_bearer_get_bearer_type ()

    guint
     mm_gdbus_bearer_get_bearer_type (MmGdbusBearer *object);
    -

    Gets the value of the "BearerType" D-Bus property.

    +

    Gets the value of the "BearerType" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -693,7 +693,7 @@

    mm_gdbus_bearer_get_stats ()

    GVariant *
     mm_gdbus_bearer_get_stats (MmGdbusBearer *object);
    -

    Gets the value of the "Stats" D-Bus property.

    +

    Gets the value of the "Stats" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_bearer_dup_stats() if on another thread.

    @@ -717,7 +717,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -725,7 +725,7 @@

    mm_gdbus_bearer_dup_stats ()

    GVariant *
     mm_gdbus_bearer_dup_stats (MmGdbusBearer *object);
    -

    Gets a copy of the "Stats" D-Bus property.

    +

    Gets a copy of the "Stats" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -746,7 +746,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -757,7 +757,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Connect() D-Bus method on proxy +

    Asynchronously invokes the Connect() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -834,7 +834,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -846,7 +846,7 @@ mm_gdbus_bearer_call_connect_sync (MmGdbusBearer *proxy, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Connect() D-Bus method on proxy +

    Synchronously invokes the Connect() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_bearer_call_connect() for the asynchronous version of this method.

    @@ -878,7 +878,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -891,7 +891,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Disconnect() D-Bus method on proxy +

    Asynchronously invokes the Disconnect() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -969,7 +969,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -981,7 +981,7 @@ mm_gdbus_bearer_call_disconnect_sync (MmGdbusBearer *proxy, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Disconnect() D-Bus method on proxy +

    Synchronously invokes the Disconnect() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_bearer_call_disconnect() for the asynchronous version of this method.

    @@ -1013,7 +1013,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1139,7 +1139,7 @@

    The “bearer-type” property

      “bearer-type”              guint
    -

    Represents the D-Bus property "BearerType".

    +

    Represents the D-Bus property "BearerType".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusBearer

    Flags: Read / Write

    @@ -1149,7 +1149,7 @@

    The “connected” property

      “connected”                gboolean
    -

    Represents the D-Bus property "Connected".

    +

    Represents the D-Bus property "Connected".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusBearer

    Flags: Read / Write

    @@ -1158,8 +1158,8 @@

    The “interface” property

    -
      “interface”                gchar *
    -

    Represents the D-Bus property "Interface".

    +
      “interface”                char *
    +

    Represents the D-Bus property "Interface".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusBearer

    Flags: Read / Write

    @@ -1169,7 +1169,7 @@

    The “ip-timeout” property

      “ip-timeout”               guint
    -

    Represents the D-Bus property "IpTimeout".

    +

    Represents the D-Bus property "IpTimeout".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusBearer

    Flags: Read / Write

    @@ -1179,7 +1179,7 @@

    The “ip4-config” property

      “ip4-config”               GVariant *
    -

    Represents the D-Bus property "Ip4Config".

    +

    Represents the D-Bus property "Ip4Config".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusBearer

    Flags: Read / Write

    @@ -1190,7 +1190,7 @@

    The “ip6-config” property

      “ip6-config”               GVariant *
    -

    Represents the D-Bus property "Ip6Config".

    +

    Represents the D-Bus property "Ip6Config".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusBearer

    Flags: Read / Write

    @@ -1201,7 +1201,7 @@

    The “properties” property

      “properties”               GVariant *
    -

    Represents the D-Bus property "Properties".

    +

    Represents the D-Bus property "Properties".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusBearer

    Flags: Read / Write

    @@ -1212,7 +1212,7 @@

    The “stats” property

      “stats”                    GVariant *
    -

    Represents the D-Bus property "Stats".

    +

    Represents the D-Bus property "Stats".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusBearer

    Flags: Read / Write

    @@ -1223,7 +1223,7 @@

    The “suspended” property

      “suspended”                gboolean
    -

    Represents the D-Bus property "Suspended".

    +

    Represents the D-Bus property "Suspended".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusBearer

    Flags: Read / Write

    @@ -1238,7 +1238,7 @@ user_function (MmGdbusBearer *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the Connect() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Connect() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_bearer_complete_connect() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1270,7 +1270,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1281,7 +1281,7 @@ user_function (MmGdbusBearer *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the Disconnect() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Disconnect() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_bearer_complete_disconnect() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1313,13 +1313,13 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    +
    Generated by GTK-Doc V1.33.1
    \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusBearerProxy.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusBearerProxy.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusBearerProxy.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusBearerProxy.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -222,7 +222,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusBearerProxy]

    +

    [transfer full][type MmGdbusBearerProxy]


    @@ -324,7 +324,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusBearerProxy]

    +

    [transfer full][type MmGdbusBearerProxy]


    @@ -387,7 +387,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusBearerProxy]

    +

    [transfer full][type MmGdbusBearerProxy]


    @@ -450,7 +450,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusBearerProxy]

    +

    [transfer full][type MmGdbusBearerProxy]

    @@ -464,6 +464,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusBearerSkeleton.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusBearerSkeleton.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusBearerSkeleton.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusBearerSkeleton.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -89,7 +89,7 @@

    Returns

    The skeleton object.

    -

    [transfer full][type MmGdbusBearerSkeleton]

    +

    [transfer full][type MmGdbusBearerSkeleton]

    @@ -103,6 +103,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusCall.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusCall.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusCall.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusCall.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -310,12 +310,12 @@ +char * - + @@ -326,17 +326,17 @@ +char * - + - + @@ -447,7 +447,7 @@

    mm_gdbus_call_get_direction ()

    gint
     mm_gdbus_call_get_direction (MmGdbusCall *object);
    -

    Gets the value of the "Direction" D-Bus property.

    +

    Gets the value of the "Direction" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -475,7 +475,7 @@

    mm_gdbus_call_get_number ()

    const gchar *
     mm_gdbus_call_get_number (MmGdbusCall *object);
    -

    Gets the value of the "Number" D-Bus property.

    +

    Gets the value of the "Number" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_call_dup_number() if on another thread.

    @@ -499,7 +499,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -507,7 +507,7 @@

    mm_gdbus_call_dup_number ()

    gchar *
     mm_gdbus_call_dup_number (MmGdbusCall *object);
    -

    Gets a copy of the "Number" D-Bus property.

    +

    Gets a copy of the "Number" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -528,7 +528,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -536,7 +536,7 @@

    mm_gdbus_call_get_state ()

    gint
     mm_gdbus_call_get_state (MmGdbusCall *object);
    -

    Gets the value of the "State" D-Bus property.

    +

    Gets the value of the "State" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -564,7 +564,7 @@

    mm_gdbus_call_get_state_reason ()

    gint
     mm_gdbus_call_get_state_reason (MmGdbusCall *object);
    -

    Gets the value of the "StateReason" D-Bus property.

    +

    Gets the value of the "StateReason" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -592,7 +592,7 @@

    mm_gdbus_call_dup_audio_format ()

    GVariant *
     mm_gdbus_call_dup_audio_format (MmGdbusCall *object);
    -

    Gets a copy of the "AudioFormat" D-Bus property.

    +

    Gets a copy of the "AudioFormat" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -613,7 +613,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -621,7 +621,7 @@

    mm_gdbus_call_dup_audio_port ()

    gchar *
     mm_gdbus_call_dup_audio_port (MmGdbusCall *object);
    -

    Gets a copy of the "AudioPort" D-Bus property.

    +

    Gets a copy of the "AudioPort" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -642,7 +642,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -650,7 +650,7 @@

    mm_gdbus_call_get_audio_format ()

    GVariant *
     mm_gdbus_call_get_audio_format (MmGdbusCall *object);
    -

    Gets the value of the "AudioFormat" D-Bus property.

    +

    Gets the value of the "AudioFormat" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_call_dup_audio_format() if on another thread.

    @@ -674,7 +674,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -682,7 +682,7 @@

    mm_gdbus_call_get_audio_port ()

    const gchar *
     mm_gdbus_call_get_audio_port (MmGdbusCall *object);
    -

    Gets the value of the "AudioPort" D-Bus property.

    +

    Gets the value of the "AudioPort" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_call_dup_audio_port() if on another thread.

    @@ -706,7 +706,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -714,7 +714,7 @@

    mm_gdbus_call_get_multiparty ()

    gboolean
     mm_gdbus_call_get_multiparty (MmGdbusCall *object);
    -

    Gets the value of the "Multiparty" D-Bus property.

    +

    Gets the value of the "Multiparty" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -745,7 +745,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Accept() D-Bus method on proxy +

    Asynchronously invokes the Accept() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -822,7 +822,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -834,7 +834,7 @@ mm_gdbus_call_call_accept_sync (MmGdbusCall *proxy, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Accept() D-Bus method on proxy +

    Synchronously invokes the Accept() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_call_call_accept() for the asynchronous version of this method.

    @@ -866,7 +866,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -879,7 +879,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Start() D-Bus method on proxy +

    Asynchronously invokes the Start() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -956,7 +956,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -968,7 +968,7 @@ mm_gdbus_call_call_start_sync (MmGdbusCall *proxy, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Start() D-Bus method on proxy +

    Synchronously invokes the Start() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_call_call_start() for the asynchronous version of this method.

    @@ -1000,7 +1000,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1013,7 +1013,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Hangup() D-Bus method on proxy +

    Asynchronously invokes the Hangup() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1090,7 +1090,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1102,7 +1102,7 @@ mm_gdbus_call_call_hangup_sync (MmGdbusCall *proxy, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Hangup() D-Bus method on proxy +

    Synchronously invokes the Hangup() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_call_call_hangup() for the asynchronous version of this method.

    @@ -1134,7 +1134,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1148,7 +1148,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the SendDtmf() D-Bus method on proxy +

    Asynchronously invokes the SendDtmf() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1230,7 +1230,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1243,7 +1243,7 @@ const gchar *arg_dtmf, GCancellable *cancellable, GError **error); -

    Synchronously invokes the SendDtmf() D-Bus method on proxy +

    Synchronously invokes the SendDtmf() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_call_call_send_dtmf() for the asynchronous version of this method.

    @@ -1280,7 +1280,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1294,7 +1294,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Deflect() D-Bus method on proxy +

    Asynchronously invokes the Deflect() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1376,7 +1376,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1389,7 +1389,7 @@ const gchar *arg_number, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Deflect() D-Bus method on proxy +

    Synchronously invokes the Deflect() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_call_call_deflect() for the asynchronous version of this method.

    @@ -1426,7 +1426,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1439,7 +1439,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the JoinMultiparty() D-Bus method on proxy +

    Asynchronously invokes the JoinMultiparty() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1517,7 +1517,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1530,7 +1530,7 @@ (MmGdbusCall *proxy, GCancellable *cancellable, GError **error); -

    Synchronously invokes the JoinMultiparty() D-Bus method on proxy +

    Synchronously invokes the JoinMultiparty() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_call_call_join_multiparty() for the asynchronous version of this method.

    @@ -1562,7 +1562,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1575,7 +1575,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the LeaveMultiparty() D-Bus method on proxy +

    Asynchronously invokes the LeaveMultiparty() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1653,7 +1653,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1666,7 +1666,7 @@ (MmGdbusCall *proxy, GCancellable *cancellable, GError **error); -

    Synchronously invokes the LeaveMultiparty() D-Bus method on proxy +

    Synchronously invokes the LeaveMultiparty() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_call_call_leave_multiparty() for the asynchronous version of this method.

    @@ -1698,7 +1698,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1877,7 +1877,7 @@

    The “audio-format” property

      “audio-format”             GVariant *
    -

    Represents the D-Bus property "AudioFormat".

    +

    Represents the D-Bus property "AudioFormat".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusCall

    Flags: Read / Write

    @@ -1887,8 +1887,8 @@

    The “audio-port” property

    -
      “audio-port”               gchar *
    -

    Represents the D-Bus property "AudioPort".

    +
      “audio-port”               char *
    +

    Represents the D-Bus property "AudioPort".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusCall

    Flags: Read / Write

    @@ -1897,8 +1897,8 @@

    The “direction” property

    -
      “direction”                gint
    -

    Represents the D-Bus property "Direction".

    +
      “direction”                int
    +

    Represents the D-Bus property "Direction".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusCall

    Flags: Read / Write

    @@ -1908,7 +1908,7 @@

    The “multiparty” property

      “multiparty”               gboolean
    -

    Represents the D-Bus property "Multiparty".

    +

    Represents the D-Bus property "Multiparty".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusCall

    Flags: Read / Write

    @@ -1917,8 +1917,8 @@

    The “number” property

    -
      “number”                   gchar *
    -

    Represents the D-Bus property "Number".

    +
      “number”                   char *
    +

    Represents the D-Bus property "Number".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusCall

    Flags: Read / Write

    @@ -1927,8 +1927,8 @@

    The “state” property

    -
      “state”                    gint
    -

    Represents the D-Bus property "State".

    +
      “state”                    int
    +

    Represents the D-Bus property "State".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusCall

    Flags: Read / Write

    @@ -1937,8 +1937,8 @@

    The “state-reason” property

    -
      “state-reason”             gint
    -

    Represents the D-Bus property "StateReason".

    +
      “state-reason”             int
    +

    Represents the D-Bus property "StateReason".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusCall

    Flags: Read / Write

    @@ -1951,9 +1951,9 @@

    The “dtmf-received” signal

    void
     user_function (MmGdbusCall *object,
    -               gchar       *arg_dtmf,
    +               char        *arg_dtmf,
                    gpointer     user_data)
    -

    On the client-side, this signal is emitted whenever the D-Bus signal "DtmfReceived" is received.

    +

    On the client-side, this signal is emitted whenever the D-Bus signal "DtmfReceived" is received.

    On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.

    Parameters

    @@ -1991,7 +1991,7 @@ user_function (MmGdbusCall *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the Accept() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Accept() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_call_complete_accept() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -2023,7 +2023,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -2033,9 +2033,9 @@
    gboolean
     user_function (MmGdbusCall           *object,
                    GDBusMethodInvocation *invocation,
    -               gchar                 *arg_number,
    +               char                  *arg_number,
                    gpointer               user_data)
    -

    Signal emitted when a remote caller is invoking the Deflect() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Deflect() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_call_complete_deflect() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -2072,7 +2072,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -2083,7 +2083,7 @@ user_function (MmGdbusCall *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the Hangup() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Hangup() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_call_complete_hangup() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -2115,7 +2115,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -2126,7 +2126,7 @@ user_function (MmGdbusCall *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the JoinMultiparty() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the JoinMultiparty() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_call_complete_join_multiparty() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -2158,7 +2158,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -2169,7 +2169,7 @@ user_function (MmGdbusCall *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the LeaveMultiparty() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the LeaveMultiparty() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_call_complete_leave_multiparty() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -2201,7 +2201,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -2211,9 +2211,9 @@
    gboolean
     user_function (MmGdbusCall           *object,
                    GDBusMethodInvocation *invocation,
    -               gchar                 *arg_dtmf,
    +               char                  *arg_dtmf,
                    gpointer               user_data)
    -

    Signal emitted when a remote caller is invoking the SendDtmf() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the SendDtmf() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_call_complete_send_dtmf() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -2250,7 +2250,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -2261,7 +2261,7 @@ user_function (MmGdbusCall *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the Start() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Start() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_call_complete_start() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -2293,7 +2293,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -2302,11 +2302,11 @@

    The “state-changed” signal

    void
     user_function (MmGdbusCall *object,
    -               gint         arg_old,
    -               gint         arg_new,
    +               int          arg_old,
    +               int          arg_new,
                    guint        arg_reason,
                    gpointer     user_data)
    -

    On the client-side, this signal is emitted whenever the D-Bus signal "StateChanged" is received.

    +

    On the client-side, this signal is emitted whenever the D-Bus signal "StateChanged" is received.

    On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.

    Parameters

    @@ -2350,6 +2350,6 @@
    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusCallProxy.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusCallProxy.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusCallProxy.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusCallProxy.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -222,7 +222,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusCallProxy]

    +

    [transfer full][type MmGdbusCallProxy]


    @@ -324,7 +324,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusCallProxy]

    +

    [transfer full][type MmGdbusCallProxy]


    @@ -386,7 +386,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusCallProxy]

    +

    [transfer full][type MmGdbusCallProxy]


    @@ -449,7 +449,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusCallProxy]

    +

    [transfer full][type MmGdbusCallProxy]

    @@ -463,6 +463,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusCallSkeleton.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusCallSkeleton.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusCallSkeleton.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusCallSkeleton.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -89,7 +89,7 @@

    Returns

    The skeleton object.

    -

    [transfer full][type MmGdbusCallSkeleton]

    +

    [transfer full][type MmGdbusCallSkeleton]

    @@ -103,6 +103,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModem.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModem.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModem.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModem.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -375,6 +375,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -757,13 +804,13 @@ +char * +char * @@ -786,13 +833,13 @@ +char * +char * @@ -803,19 +850,19 @@ +char * +char * +char * @@ -831,7 +878,7 @@ +char * @@ -842,7 +889,7 @@ +char * @@ -859,13 +906,18 @@ +char * + + + + + +char * @@ -877,12 +929,17 @@ +char * - + + + + + + @@ -993,6 +1050,11 @@ + + + + + @@ -1048,7 +1110,7 @@
    guint
     mm_gdbus_modem_get_access_technologies
                                    (MmGdbusModem *object);
    -

    Gets the value of the "AccessTechnologies" D-Bus property.

    +

    Gets the value of the "AccessTechnologies" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1076,7 +1138,7 @@

    mm_gdbus_modem_get_bearers ()

    const gchar *const *
     mm_gdbus_modem_get_bearers (MmGdbusModem *object);
    -

    Gets the value of the "Bearers" D-Bus property.

    +

    Gets the value of the "Bearers" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_bearers() if on another thread.

    @@ -1100,7 +1162,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -1108,7 +1170,7 @@

    mm_gdbus_modem_dup_bearers ()

    gchar **
     mm_gdbus_modem_dup_bearers (MmGdbusModem *object);
    -

    Gets a copy of the "Bearers" D-Bus property.

    +

    Gets a copy of the "Bearers" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1129,7 +1191,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_strfreev().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -1137,7 +1199,7 @@

    mm_gdbus_modem_get_current_modes ()

    GVariant *
     mm_gdbus_modem_get_current_modes (MmGdbusModem *object);
    -

    Gets the value of the "CurrentModes" D-Bus property.

    +

    Gets the value of the "CurrentModes" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_current_modes() if on another thread.

    @@ -1161,7 +1223,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -1169,7 +1231,7 @@

    mm_gdbus_modem_dup_current_modes ()

    GVariant *
     mm_gdbus_modem_dup_current_modes (MmGdbusModem *object);
    -

    Gets a copy of the "CurrentModes" D-Bus property.

    +

    Gets a copy of the "CurrentModes" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1190,7 +1252,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -1198,7 +1260,7 @@

    mm_gdbus_modem_get_current_bands ()

    GVariant *
     mm_gdbus_modem_get_current_bands (MmGdbusModem *object);
    -

    Gets the value of the "CurrentBands" D-Bus property.

    +

    Gets the value of the "CurrentBands" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_current_bands() if on another thread.

    @@ -1222,7 +1284,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -1230,7 +1292,7 @@

    mm_gdbus_modem_dup_current_bands ()

    GVariant *
     mm_gdbus_modem_dup_current_bands (MmGdbusModem *object);
    -

    Gets a copy of the "CurrentBands" D-Bus property.

    +

    Gets a copy of the "CurrentBands" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1251,7 +1313,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -1260,7 +1322,7 @@
    guint
     mm_gdbus_modem_get_current_capabilities
                                    (MmGdbusModem *object);
    -

    Gets the value of the "CurrentCapabilities" D-Bus property.

    +

    Gets the value of the "CurrentCapabilities" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1288,7 +1350,7 @@

    mm_gdbus_modem_get_device ()

    const gchar *
     mm_gdbus_modem_get_device (MmGdbusModem *object);
    -

    Gets the value of the "Device" D-Bus property.

    +

    Gets the value of the "Device" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_device() if on another thread.

    @@ -1312,7 +1374,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -1320,7 +1382,7 @@

    mm_gdbus_modem_dup_device ()

    gchar *
     mm_gdbus_modem_dup_device (MmGdbusModem *object);
    -

    Gets a copy of the "Device" D-Bus property.

    +

    Gets a copy of the "Device" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1341,7 +1403,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -1349,7 +1411,7 @@

    mm_gdbus_modem_get_device_identifier ()

    const gchar *
     mm_gdbus_modem_get_device_identifier (MmGdbusModem *object);
    -

    Gets the value of the "DeviceIdentifier" D-Bus property.

    +

    Gets the value of the "DeviceIdentifier" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_device_identifier() if on another thread.

    @@ -1373,7 +1435,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -1381,7 +1443,7 @@

    mm_gdbus_modem_dup_device_identifier ()

    gchar *
     mm_gdbus_modem_dup_device_identifier (MmGdbusModem *object);
    -

    Gets a copy of the "DeviceIdentifier" D-Bus property.

    +

    Gets a copy of the "DeviceIdentifier" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1402,7 +1464,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -1410,7 +1472,7 @@

    mm_gdbus_modem_get_drivers ()

    const gchar *const *
     mm_gdbus_modem_get_drivers (MmGdbusModem *object);
    -

    Gets the value of the "Drivers" D-Bus property.

    +

    Gets the value of the "Drivers" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_drivers() if on another thread.

    @@ -1434,7 +1496,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -1442,7 +1504,7 @@

    mm_gdbus_modem_dup_drivers ()

    gchar **
     mm_gdbus_modem_dup_drivers (MmGdbusModem *object);
    -

    Gets a copy of the "Drivers" D-Bus property.

    +

    Gets a copy of the "Drivers" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1463,7 +1525,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_strfreev().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -1472,7 +1534,7 @@
    const gchar *
     mm_gdbus_modem_get_equipment_identifier
                                    (MmGdbusModem *object);
    -

    Gets the value of the "EquipmentIdentifier" D-Bus property.

    +

    Gets the value of the "EquipmentIdentifier" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_equipment_identifier() if on another thread.

    @@ -1496,7 +1558,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -1505,7 +1567,7 @@
    gchar *
     mm_gdbus_modem_dup_equipment_identifier
                                    (MmGdbusModem *object);
    -

    Gets a copy of the "EquipmentIdentifier" D-Bus property.

    +

    Gets a copy of the "EquipmentIdentifier" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1526,7 +1588,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -1534,7 +1596,7 @@

    mm_gdbus_modem_get_manufacturer ()

    const gchar *
     mm_gdbus_modem_get_manufacturer (MmGdbusModem *object);
    -

    Gets the value of the "Manufacturer" D-Bus property.

    +

    Gets the value of the "Manufacturer" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_manufacturer() if on another thread.

    @@ -1558,7 +1620,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -1566,7 +1628,7 @@

    mm_gdbus_modem_dup_manufacturer ()

    gchar *
     mm_gdbus_modem_dup_manufacturer (MmGdbusModem *object);
    -

    Gets a copy of the "Manufacturer" D-Bus property.

    +

    Gets a copy of the "Manufacturer" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1587,7 +1649,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -1595,7 +1657,7 @@

    mm_gdbus_modem_get_max_active_bearers ()

    guint
     mm_gdbus_modem_get_max_active_bearers (MmGdbusModem *object);
    -

    Gets the value of the "MaxActiveBearers" D-Bus property.

    +

    Gets the value of the "MaxActiveBearers" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1623,7 +1685,7 @@

    mm_gdbus_modem_get_max_bearers ()

    guint
     mm_gdbus_modem_get_max_bearers (MmGdbusModem *object);
    -

    Gets the value of the "MaxBearers" D-Bus property.

    +

    Gets the value of the "MaxBearers" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1651,7 +1713,7 @@

    mm_gdbus_modem_get_model ()

    const gchar *
     mm_gdbus_modem_get_model (MmGdbusModem *object);
    -

    Gets the value of the "Model" D-Bus property.

    +

    Gets the value of the "Model" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_model() if on another thread.

    @@ -1675,7 +1737,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -1683,7 +1745,7 @@

    mm_gdbus_modem_dup_model ()

    gchar *
     mm_gdbus_modem_dup_model (MmGdbusModem *object);
    -

    Gets a copy of the "Model" D-Bus property.

    +

    Gets a copy of the "Model" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1704,7 +1766,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -1712,7 +1774,7 @@

    mm_gdbus_modem_get_own_numbers ()

    const gchar *const *
     mm_gdbus_modem_get_own_numbers (MmGdbusModem *object);
    -

    Gets the value of the "OwnNumbers" D-Bus property.

    +

    Gets the value of the "OwnNumbers" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_own_numbers() if on another thread.

    @@ -1736,7 +1798,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -1744,7 +1806,7 @@

    mm_gdbus_modem_dup_own_numbers ()

    gchar **
     mm_gdbus_modem_dup_own_numbers (MmGdbusModem *object);
    -

    Gets a copy of the "OwnNumbers" D-Bus property.

    +

    Gets a copy of the "OwnNumbers" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1765,7 +1827,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_strfreev().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -1773,7 +1835,7 @@

    mm_gdbus_modem_get_plugin ()

    const gchar *
     mm_gdbus_modem_get_plugin (MmGdbusModem *object);
    -

    Gets the value of the "Plugin" D-Bus property.

    +

    Gets the value of the "Plugin" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_plugin() if on another thread.

    @@ -1797,7 +1859,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -1805,7 +1867,7 @@

    mm_gdbus_modem_dup_plugin ()

    gchar *
     mm_gdbus_modem_dup_plugin (MmGdbusModem *object);
    -

    Gets a copy of the "Plugin" D-Bus property.

    +

    Gets a copy of the "Plugin" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1826,7 +1888,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -1834,7 +1896,7 @@

    mm_gdbus_modem_get_power_state ()

    guint
     mm_gdbus_modem_get_power_state (MmGdbusModem *object);
    -

    Gets the value of the "PowerState" D-Bus property.

    +

    Gets the value of the "PowerState" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1862,7 +1924,7 @@

    mm_gdbus_modem_get_primary_port ()

    const gchar *
     mm_gdbus_modem_get_primary_port (MmGdbusModem *object);
    -

    Gets the value of the "PrimaryPort" D-Bus property.

    +

    Gets the value of the "PrimaryPort" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_primary_port() if on another thread.

    @@ -1886,7 +1948,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -1894,7 +1956,7 @@

    mm_gdbus_modem_dup_primary_port ()

    gchar *
     mm_gdbus_modem_dup_primary_port (MmGdbusModem *object);
    -

    Gets a copy of the "PrimaryPort" D-Bus property.

    +

    Gets a copy of the "PrimaryPort" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1915,7 +1977,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -1923,7 +1985,7 @@

    mm_gdbus_modem_get_ports ()

    GVariant *
     mm_gdbus_modem_get_ports (MmGdbusModem *object);
    -

    Gets the value of the "Ports" D-Bus property.

    +

    Gets the value of the "Ports" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_ports() if on another thread.

    @@ -1947,7 +2009,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -1955,7 +2017,7 @@

    mm_gdbus_modem_dup_ports ()

    GVariant *
     mm_gdbus_modem_dup_ports (MmGdbusModem *object);
    -

    Gets a copy of the "Ports" D-Bus property.

    +

    Gets a copy of the "Ports" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1976,7 +2038,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -1984,7 +2046,7 @@

    mm_gdbus_modem_get_revision ()

    const gchar *
     mm_gdbus_modem_get_revision (MmGdbusModem *object);
    -

    Gets the value of the "Revision" D-Bus property.

    +

    Gets the value of the "Revision" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_revision() if on another thread.

    @@ -2008,7 +2070,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -2016,7 +2078,7 @@

    mm_gdbus_modem_dup_revision ()

    gchar *
     mm_gdbus_modem_dup_revision (MmGdbusModem *object);
    -

    Gets a copy of the "Revision" D-Bus property.

    +

    Gets a copy of the "Revision" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -2037,7 +2099,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -2046,7 +2108,7 @@
    const gchar *
     mm_gdbus_modem_get_carrier_configuration
                                    (MmGdbusModem *object);
    -

    Gets the value of the "CarrierConfiguration" D-Bus property.

    +

    Gets the value of the "CarrierConfiguration" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_carrier_configuration() if on another thread.

    @@ -2070,7 +2132,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -2079,7 +2141,7 @@
    gchar *
     mm_gdbus_modem_dup_carrier_configuration
                                    (MmGdbusModem *object);
    -

    Gets a copy of the "CarrierConfiguration" D-Bus property.

    +

    Gets a copy of the "CarrierConfiguration" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -2100,7 +2162,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -2109,7 +2171,7 @@
    const gchar *
     mm_gdbus_modem_get_carrier_configuration_revision
                                    (MmGdbusModem *object);
    -

    Gets the value of the "CarrierConfigurationRevision" D-Bus property.

    +

    Gets the value of the "CarrierConfigurationRevision" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_carrier_configuration_revision() if on another thread.

    @@ -2133,7 +2195,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -2142,7 +2204,7 @@
    gchar *
     mm_gdbus_modem_dup_carrier_configuration_revision
                                    (MmGdbusModem *object);
    -

    Gets a copy of the "CarrierConfigurationRevision" D-Bus property.

    +

    Gets a copy of the "CarrierConfigurationRevision" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -2163,7 +2225,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -2171,7 +2233,7 @@

    mm_gdbus_modem_get_hardware_revision ()

    const gchar *
     mm_gdbus_modem_get_hardware_revision (MmGdbusModem *object);
    -

    Gets the value of the "HardwareRevision" D-Bus property.

    +

    Gets the value of the "HardwareRevision" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_hardware_revision() if on another thread.

    @@ -2195,7 +2257,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -2203,7 +2265,7 @@

    mm_gdbus_modem_dup_hardware_revision ()

    gchar *
     mm_gdbus_modem_dup_hardware_revision (MmGdbusModem *object);
    -

    Gets a copy of the "HardwareRevision" D-Bus property.

    +

    Gets a copy of the "HardwareRevision" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -2224,7 +2286,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -2232,7 +2294,7 @@

    mm_gdbus_modem_get_signal_quality ()

    GVariant *
     mm_gdbus_modem_get_signal_quality (MmGdbusModem *object);
    -

    Gets the value of the "SignalQuality" D-Bus property.

    +

    Gets the value of the "SignalQuality" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_signal_quality() if on another thread.

    @@ -2256,7 +2318,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -2264,7 +2326,7 @@

    mm_gdbus_modem_dup_signal_quality ()

    GVariant *
     mm_gdbus_modem_dup_signal_quality (MmGdbusModem *object);
    -

    Gets a copy of the "SignalQuality" D-Bus property.

    +

    Gets a copy of the "SignalQuality" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -2285,7 +2347,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -2293,7 +2355,7 @@

    mm_gdbus_modem_get_sim ()

    const gchar *
     mm_gdbus_modem_get_sim (MmGdbusModem *object);
    -

    Gets the value of the "Sim" D-Bus property.

    +

    Gets the value of the "Sim" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_sim() if on another thread.

    @@ -2317,7 +2379,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -2325,7 +2387,7 @@

    mm_gdbus_modem_dup_sim ()

    gchar *
     mm_gdbus_modem_dup_sim (MmGdbusModem *object);
    -

    Gets a copy of the "Sim" D-Bus property.

    +

    Gets a copy of the "Sim" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -2346,7 +2408,96 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]

    +
    +
    +
    +
    +

    mm_gdbus_modem_dup_sim_slots ()

    +
    gchar **
    +mm_gdbus_modem_dup_sim_slots (MmGdbusModem *object);
    +

    Gets a copy of the "SimSlots" D-Bus property.

    +

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    +

    [skip]

    +
    +

    Parameters

    +

    storage

    A MMSmsStorage specifying where to store the SMS, or -MM_SMS_STORAGE_UNKNOWN to use the default.

    A MMSmsStorage specifying where to store the SMS, or +MM_SMS_STORAGE_UNKNOWN to use the default.

     

    storage

    A MMSmsStorage specifying where to store the SMS, or -MM_SMS_STORAGE_UNKNOWN to use the default.

    A MMSmsStorage specifying where to store the SMS, or +MM_SMS_STORAGE_UNKNOWN to use the default.

     
    -MMSmsValidityType +MMSmsValidityType mm_sms_properties_get_validity_type () @@ -190,7 +190,7 @@
    -MMSmsCdmaTeleserviceId +MMSmsCdmaTeleserviceId mm_sms_properties_get_teleservice_id () @@ -206,7 +206,7 @@
    -MMSmsCdmaServiceCategory +MMSmsCdmaServiceCategory mm_sms_properties_get_service_category () @@ -259,7 +259,7 @@

    Returns

    a MMSmsProperties. The returned value should be freed with g_object_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -290,7 +290,7 @@ any (e.g. contains data instead). Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -358,7 +358,7 @@

    Returns

    The message data, or NULL if it doesn't contain any (e.g. contains text instead).

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -427,7 +427,7 @@ doesn't contain any (e.g. contains text instead). Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -457,7 +457,7 @@

    A GByteArray with the message data, or NULL if it doesn't contain any (e.g. contains text instead). The returned value should be freed with g_byte_array_unref().

    -

    [transfer full]

    +

    [transfer full]

    Since: 1.0

    @@ -520,7 +520,7 @@

    The number, or NULL if it couldn't be retrieved. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -581,7 +581,7 @@

    The number of the SMSC, or NULL if it couldn't be retrieved. Do not free the returned value, it is owned by self .

    -

    [transfer none]

    +

    [transfer none]

    Since: 1.0

    @@ -619,7 +619,7 @@

    mm_sms_properties_get_validity_type ()

    -
    MMSmsValidityType
    +
    MMSmsValidityType
     mm_sms_properties_get_validity_type (MMSmsProperties *self);

    Gets the relative validity type the SMS.

    @@ -639,7 +639,7 @@

    Since: 1.0

    @@ -695,7 +695,7 @@

    validity

    The validity of MM_SMS_VALIDITY_TYPE_RELATIVE type.

    The validity of MM_SMS_VALIDITY_TYPE_RELATIVE type.

     

    lock

    a MMModemLock.

    a MMModemLock.

     

    lock

    a MMModemLock.

    a MMModemLock.

     
    -gchar * interface Read / Write
    -gchar * audio-port Read / Write
    gintint direction Read / Write
    -gchar * number Read / Write
    gintint state Read / Write
    gintint state-reason Read / Write
    +gchar ** + +mm_gdbus_modem_dup_sim_slots () +
    const gchar *const * + +mm_gdbus_modem_get_sim_slots () +
    +guint + +mm_gdbus_modem_get_primary_sim_slot () +
    GVariant * @@ -714,6 +737,30 @@ void +mm_gdbus_modem_call_set_primary_sim_slot () +
    +gboolean + +mm_gdbus_modem_call_set_primary_sim_slot_finish () +
    +gboolean + +mm_gdbus_modem_call_set_primary_sim_slot_sync () +
    +void + mm_gdbus_modem_call_command ()
    -gchar * carrier-configuration Read / Write
    -gchar * carrier-configuration-revision Read / Write
    -gchar * device Read / Write
    -gchar * device-identifier Read / Write
    -gchar * equipment-identifier Read / Write
    -gchar * hardware-revision Read / Write
    -gchar * manufacturer Read / Write
    -gchar * model Read / Write
    -gchar * plugin Read / Write
    -gchar * primary-port Read / Write
    guintprimary-sim-slotRead / Write
    -gchar * revision Read / Write
    -gchar * sim Read / Write
    gintGStrvsim-slotsRead / Write
    int state Read / Write
    Run Last
    gbooleanhandle-set-primary-sim-slotRun Last
    void state-changed Run Last
    +++++ + + + + + +

    object

    A MmGdbusModem.

     
    +
    +
    +

    Returns

    +

    The property value or NULL if the property is not set. The returned value should be freed with g_strfreev().

    +

    [transfer full][nullable]

    +
    +
    +
    +
    +

    mm_gdbus_modem_get_sim_slots ()

    +
    const gchar *const *
    +mm_gdbus_modem_get_sim_slots (MmGdbusModem *object);
    +

    Gets the value of the "SimSlots" D-Bus property.

    +

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    +

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object + was constructed. Use mm_gdbus_modem_dup_sim_slots() if on another thread.

    +

    [skip]

    +
    +

    Parameters

    +
    +++++ + + + + + +

    object

    A MmGdbusModem.

     
    +
    +
    +

    Returns

    +

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object +.

    +

    [transfer none][nullable]

    +
    +
    +
    +
    +

    mm_gdbus_modem_get_primary_sim_slot ()

    +
    guint
    +mm_gdbus_modem_get_primary_sim_slot (MmGdbusModem *object);
    +

    Gets the value of the "PrimarySimSlot" D-Bus property.

    +

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    +

    [skip]

    +
    +

    Parameters

    +
    +++++ + + + + + +

    object

    A MmGdbusModem.

     
    +
    +
    +

    Returns

    +

    The property value.


    @@ -2355,7 +2506,7 @@
    GVariant *
     mm_gdbus_modem_get_supported_capabilities
                                    (MmGdbusModem *object);
    -

    Gets the value of the "SupportedCapabilities" D-Bus property.

    +

    Gets the value of the "SupportedCapabilities" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_supported_capabilities() if on another thread.

    @@ -2379,7 +2530,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -2388,7 +2539,7 @@
    GVariant *
     mm_gdbus_modem_dup_supported_capabilities
                                    (MmGdbusModem *object);
    -

    Gets a copy of the "SupportedCapabilities" D-Bus property.

    +

    Gets a copy of the "SupportedCapabilities" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -2409,7 +2560,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -2417,7 +2568,7 @@

    mm_gdbus_modem_get_state ()

    gint
     mm_gdbus_modem_get_state (MmGdbusModem *object);
    -

    Gets the value of the "State" D-Bus property.

    +

    Gets the value of the "State" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -2446,7 +2597,7 @@
    guint
     mm_gdbus_modem_get_state_failed_reason
                                    (MmGdbusModem *object);
    -

    Gets the value of the "StateFailedReason" D-Bus property.

    +

    Gets the value of the "StateFailedReason" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -2474,7 +2625,7 @@

    mm_gdbus_modem_get_supported_bands ()

    GVariant *
     mm_gdbus_modem_get_supported_bands (MmGdbusModem *object);
    -

    Gets the value of the "SupportedBands" D-Bus property.

    +

    Gets the value of the "SupportedBands" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_supported_bands() if on another thread.

    @@ -2498,7 +2649,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -2506,7 +2657,7 @@

    mm_gdbus_modem_dup_supported_bands ()

    GVariant *
     mm_gdbus_modem_dup_supported_bands (MmGdbusModem *object);
    -

    Gets a copy of the "SupportedBands" D-Bus property.

    +

    Gets a copy of the "SupportedBands" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -2527,7 +2678,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -2536,7 +2687,7 @@
    guint
     mm_gdbus_modem_get_supported_ip_families
                                    (MmGdbusModem *object);
    -

    Gets the value of the "SupportedIpFamilies" D-Bus property.

    +

    Gets the value of the "SupportedIpFamilies" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -2564,7 +2715,7 @@

    mm_gdbus_modem_get_supported_modes ()

    GVariant *
     mm_gdbus_modem_get_supported_modes (MmGdbusModem *object);
    -

    Gets the value of the "SupportedModes" D-Bus property.

    +

    Gets the value of the "SupportedModes" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_supported_modes() if on another thread.

    @@ -2588,7 +2739,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -2596,7 +2747,7 @@

    mm_gdbus_modem_dup_supported_modes ()

    GVariant *
     mm_gdbus_modem_dup_supported_modes (MmGdbusModem *object);
    -

    Gets a copy of the "SupportedModes" D-Bus property.

    +

    Gets a copy of the "SupportedModes" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -2617,7 +2768,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -2625,7 +2776,7 @@

    mm_gdbus_modem_get_unlock_required ()

    guint
     mm_gdbus_modem_get_unlock_required (MmGdbusModem *object);
    -

    Gets the value of the "UnlockRequired" D-Bus property.

    +

    Gets the value of the "UnlockRequired" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -2653,7 +2804,7 @@

    mm_gdbus_modem_get_unlock_retries ()

    GVariant *
     mm_gdbus_modem_get_unlock_retries (MmGdbusModem *object);
    -

    Gets the value of the "UnlockRetries" D-Bus property.

    +

    Gets the value of the "UnlockRetries" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_dup_unlock_retries() if on another thread.

    @@ -2677,7 +2828,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -2685,7 +2836,7 @@

    mm_gdbus_modem_dup_unlock_retries ()

    GVariant *
     mm_gdbus_modem_dup_unlock_retries (MmGdbusModem *object);
    -

    Gets a copy of the "UnlockRetries" D-Bus property.

    +

    Gets a copy of the "UnlockRetries" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -2706,7 +2857,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -2718,7 +2869,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Enable() D-Bus method on proxy +

    Asynchronously invokes the Enable() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -2800,7 +2951,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -2813,7 +2964,7 @@ gboolean arg_enable, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Enable() D-Bus method on proxy +

    Synchronously invokes the Enable() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_call_enable() for the asynchronous version of this method.

    @@ -2850,7 +3001,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -2864,7 +3015,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the SetPowerState() D-Bus method on proxy +

    Asynchronously invokes the SetPowerState() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -2947,7 +3098,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -2961,7 +3112,7 @@ guint arg_state, GCancellable *cancellable, GError **error); -

    Synchronously invokes the SetPowerState() D-Bus method on proxy +

    Synchronously invokes the SetPowerState() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_call_set_power_state() for the asynchronous version of this method.

    @@ -2998,7 +3149,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -3012,7 +3163,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the CreateBearer() D-Bus method on proxy +

    Asynchronously invokes the CreateBearer() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -3101,7 +3252,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -3116,7 +3267,7 @@ gchar **out_path, GCancellable *cancellable, GError **error); -

    Synchronously invokes the CreateBearer() D-Bus method on proxy +

    Synchronously invokes the CreateBearer() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_call_create_bearer() for the asynchronous version of this method.

    @@ -3158,7 +3309,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -3172,7 +3323,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the DeleteBearer() D-Bus method on proxy +

    Asynchronously invokes the DeleteBearer() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -3255,7 +3406,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -3269,7 +3420,7 @@ const gchar *arg_bearer, GCancellable *cancellable, GError **error); -

    Synchronously invokes the DeleteBearer() D-Bus method on proxy +

    Synchronously invokes the DeleteBearer() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_call_delete_bearer() for the asynchronous version of this method.

    @@ -3306,7 +3457,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -3319,7 +3470,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the ListBearers() D-Bus method on proxy +

    Asynchronously invokes the ListBearers() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -3403,7 +3554,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -3416,7 +3567,7 @@ gchar ***out_bearers, GCancellable *cancellable, GError **error); -

    Synchronously invokes the ListBearers() D-Bus method on proxy +

    Synchronously invokes the ListBearers() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_call_list_bearers() for the asynchronous version of this method.

    @@ -3453,7 +3604,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -3466,7 +3617,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Reset() D-Bus method on proxy +

    Asynchronously invokes the Reset() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -3543,7 +3694,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -3555,7 +3706,7 @@ mm_gdbus_modem_call_reset_sync (MmGdbusModem *proxy, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Reset() D-Bus method on proxy +

    Synchronously invokes the Reset() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_call_reset() for the asynchronous version of this method.

    @@ -3587,7 +3738,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -3601,7 +3752,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the FactoryReset() D-Bus method on proxy +

    Asynchronously invokes the FactoryReset() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -3684,7 +3835,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -3698,7 +3849,7 @@ const gchar *arg_code, GCancellable *cancellable, GError **error); -

    Synchronously invokes the FactoryReset() D-Bus method on proxy +

    Synchronously invokes the FactoryReset() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_call_factory_reset() for the asynchronous version of this method.

    @@ -3735,7 +3886,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -3749,7 +3900,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the SetCurrentModes() D-Bus method on proxy +

    Asynchronously invokes the SetCurrentModes() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -3832,7 +3983,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -3846,7 +3997,7 @@ GVariant *arg_modes, GCancellable *cancellable, GError **error); -

    Synchronously invokes the SetCurrentModes() D-Bus method on proxy +

    Synchronously invokes the SetCurrentModes() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_call_set_current_modes() for the asynchronous version of this method.

    @@ -3883,7 +4034,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -3897,7 +4048,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the SetCurrentBands() D-Bus method on proxy +

    Asynchronously invokes the SetCurrentBands() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -3980,7 +4131,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -3994,7 +4145,7 @@ GVariant *arg_bands, GCancellable *cancellable, GError **error); -

    Synchronously invokes the SetCurrentBands() D-Bus method on proxy +

    Synchronously invokes the SetCurrentBands() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_call_set_current_bands() for the asynchronous version of this method.

    @@ -4031,7 +4182,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -4046,7 +4197,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the SetCurrentCapabilities() D-Bus method on proxy +

    Asynchronously invokes the SetCurrentCapabilities() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -4129,7 +4280,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -4143,7 +4294,7 @@ guint arg_capabilities, GCancellable *cancellable, GError **error); -

    Synchronously invokes the SetCurrentCapabilities() D-Bus method on proxy +

    Synchronously invokes the SetCurrentCapabilities() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_call_set_current_capabilities() for the asynchronous version of this method.

    @@ -4180,7 +4331,156 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error +is set.

    +

    [skip]

    +
    + +
    +
    +

    mm_gdbus_modem_call_set_primary_sim_slot ()

    +
    void
    +mm_gdbus_modem_call_set_primary_sim_slot
    +                               (MmGdbusModem *proxy,
    +                                guint arg_sim_slot,
    +                                GCancellable *cancellable,
    +                                GAsyncReadyCallback callback,
    +                                gpointer user_data);
    +

    Asynchronously invokes the SetPrimarySimSlot() D-Bus method on proxy +. +When the operation is finished, callback + will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). +You can then call mm_gdbus_modem_call_set_primary_sim_slot_finish() to get the result of the operation.

    +

    See mm_gdbus_modem_call_set_primary_sim_slot_sync() for the synchronous, blocking version of this method.

    +
    +

    Parameters

    +
    +++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    proxy

    A MmGdbusModemProxy.

     

    arg_sim_slot

    Argument to pass with the method invocation.

     

    cancellable

    A GCancellable or NULL.

    [nullable]

    callback

    A GAsyncReadyCallback to call when the request is satisfied or NULL.

     

    user_data

    User data to pass to callback +.

     
    +
    +
    +
    +
    +

    mm_gdbus_modem_call_set_primary_sim_slot_finish ()

    +
    gboolean
    +mm_gdbus_modem_call_set_primary_sim_slot_finish
    +                               (MmGdbusModem *proxy,
    +                                GAsyncResult *res,
    +                                GError **error);
    +

    Finishes an operation started with mm_gdbus_modem_call_set_primary_sim_slot().

    +
    +

    Parameters

    +
    +++++ + + + + + + + + + + + + + + + + + +

    proxy

    A MmGdbusModemProxy.

     

    res

    The GAsyncResult obtained from the GAsyncReadyCallback passed to mm_gdbus_modem_call_set_primary_sim_slot().

     

    error

    Return location for error or NULL.

     
    +
    +
    +

    Returns

    +

    TRUE if the call succeeded, FALSE if error +is set.

    +

    [skip]

    +
    +
    +
    +
    +

    mm_gdbus_modem_call_set_primary_sim_slot_sync ()

    +
    gboolean
    +mm_gdbus_modem_call_set_primary_sim_slot_sync
    +                               (MmGdbusModem *proxy,
    +                                guint arg_sim_slot,
    +                                GCancellable *cancellable,
    +                                GError **error);
    +

    Synchronously invokes the SetPrimarySimSlot() D-Bus method on proxy +. The calling thread is blocked until a reply is received.

    +

    See mm_gdbus_modem_call_set_primary_sim_slot() for the asynchronous version of this method.

    +
    +

    Parameters

    +
    +++++ + + + + + + + + + + + + + + + + + + + + + + +

    proxy

    A MmGdbusModemProxy.

     

    arg_sim_slot

    Argument to pass with the method invocation.

     

    cancellable

    A GCancellable or NULL.

    [nullable]

    error

    Return location for error or NULL.

     
    +
    +
    +

    Returns

    +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -4195,7 +4495,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Command() D-Bus method on proxy +

    Asynchronously invokes the Command() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -4288,7 +4588,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -4303,7 +4603,7 @@ gchar **out_response, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Command() D-Bus method on proxy +

    Synchronously invokes the Command() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_call_command() for the asynchronous version of this method.

    @@ -4350,7 +4650,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -4423,6 +4723,11 @@ GDBusMethodInvocation *invocation, guint arg_state); + gboolean (*handle_set_primary_sim_slot) ( + MmGdbusModem *object, + GDBusMethodInvocation *invocation, + guint arg_sim_slot); + guint (*get_access_technologies) (MmGdbusModem *object); const gchar *const * (*get_bearers) (MmGdbusModem *object); @@ -4465,12 +4770,16 @@ const gchar * (*get_primary_port) (MmGdbusModem *object); + guint (*get_primary_sim_slot) (MmGdbusModem *object); + const gchar * (*get_revision) (MmGdbusModem *object); GVariant * (*get_signal_quality) (MmGdbusModem *object); const gchar * (*get_sim) (MmGdbusModem *object); + const gchar *const * (*get_sim_slots) (MmGdbusModem *object); + gint (*get_state) (MmGdbusModem *object); guint (*get_state_failed_reason) (MmGdbusModem *object); @@ -4565,6 +4874,11 @@   +

    handle_set_primary_sim_slot ()

    +

    Handler for the “handle-set-primary-sim-slot” signal.

    +  + +

    get_access_technologies ()

    Getter for the “access-technologies” property.

      @@ -4670,6 +4984,11 @@   +

    get_primary_sim_slot ()

    +

    Getter for the “primary-sim-slot” property.

    +  + +

    get_revision ()

    Getter for the “revision” property.

      @@ -4685,6 +5004,11 @@   +

    get_sim_slots ()

    +

    Getter for the “sim-slots” property.

    +  + +

    get_state ()

    Getter for the “state” property.

      @@ -4739,7 +5063,7 @@

    The “access-technologies” property

      “access-technologies”      guint
    -

    Represents the D-Bus property "AccessTechnologies".

    +

    Represents the D-Bus property "AccessTechnologies".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4749,7 +5073,7 @@

    The “bearers” property

      “bearers”                  GStrv
    -

    Represents the D-Bus property "Bearers".

    +

    Represents the D-Bus property "Bearers".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4757,8 +5081,8 @@

    The “carrier-configuration” property

    -
      “carrier-configuration”    gchar *
    -

    Represents the D-Bus property "CarrierConfiguration".

    +
      “carrier-configuration”    char *
    +

    Represents the D-Bus property "CarrierConfiguration".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4767,8 +5091,8 @@

    The “carrier-configuration-revision” property

    -
      “carrier-configuration-revision” gchar *
    -

    Represents the D-Bus property "CarrierConfigurationRevision".

    +
      “carrier-configuration-revision” char *
    +

    Represents the D-Bus property "CarrierConfigurationRevision".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4778,7 +5102,7 @@

    The “current-bands” property

      “current-bands”            GVariant *
    -

    Represents the D-Bus property "CurrentBands".

    +

    Represents the D-Bus property "CurrentBands".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4789,7 +5113,7 @@

    The “current-capabilities” property

      “current-capabilities”     guint
    -

    Represents the D-Bus property "CurrentCapabilities".

    +

    Represents the D-Bus property "CurrentCapabilities".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4799,7 +5123,7 @@

    The “current-modes” property

      “current-modes”            GVariant *
    -

    Represents the D-Bus property "CurrentModes".

    +

    Represents the D-Bus property "CurrentModes".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4809,8 +5133,8 @@

    The “device” property

    -
      “device”                   gchar *
    -

    Represents the D-Bus property "Device".

    +
      “device”                   char *
    +

    Represents the D-Bus property "Device".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4819,8 +5143,8 @@

    The “device-identifier” property

    -
      “device-identifier”        gchar *
    -

    Represents the D-Bus property "DeviceIdentifier".

    +
      “device-identifier”        char *
    +

    Represents the D-Bus property "DeviceIdentifier".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4830,7 +5154,7 @@

    The “drivers” property

      “drivers”                  GStrv
    -

    Represents the D-Bus property "Drivers".

    +

    Represents the D-Bus property "Drivers".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4838,8 +5162,8 @@

    The “equipment-identifier” property

    -
      “equipment-identifier”     gchar *
    -

    Represents the D-Bus property "EquipmentIdentifier".

    +
      “equipment-identifier”     char *
    +

    Represents the D-Bus property "EquipmentIdentifier".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4848,8 +5172,8 @@

    The “hardware-revision” property

    -
      “hardware-revision”        gchar *
    -

    Represents the D-Bus property "HardwareRevision".

    +
      “hardware-revision”        char *
    +

    Represents the D-Bus property "HardwareRevision".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4858,8 +5182,8 @@

    The “manufacturer” property

    -
      “manufacturer”             gchar *
    -

    Represents the D-Bus property "Manufacturer".

    +
      “manufacturer”             char *
    +

    Represents the D-Bus property "Manufacturer".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4869,7 +5193,7 @@

    The “max-active-bearers” property

      “max-active-bearers”       guint
    -

    Represents the D-Bus property "MaxActiveBearers".

    +

    Represents the D-Bus property "MaxActiveBearers".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4879,7 +5203,7 @@

    The “max-bearers” property

      “max-bearers”              guint
    -

    Represents the D-Bus property "MaxBearers".

    +

    Represents the D-Bus property "MaxBearers".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4888,8 +5212,8 @@

    The “model” property

    -
      “model”                    gchar *
    -

    Represents the D-Bus property "Model".

    +
      “model”                    char *
    +

    Represents the D-Bus property "Model".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4899,7 +5223,7 @@

    The “own-numbers” property

      “own-numbers”              GStrv
    -

    Represents the D-Bus property "OwnNumbers".

    +

    Represents the D-Bus property "OwnNumbers".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4907,8 +5231,8 @@

    The “plugin” property

    -
      “plugin”                   gchar *
    -

    Represents the D-Bus property "Plugin".

    +
      “plugin”                   char *
    +

    Represents the D-Bus property "Plugin".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4918,7 +5242,7 @@

    The “ports” property

      “ports”                    GVariant *
    -

    Represents the D-Bus property "Ports".

    +

    Represents the D-Bus property "Ports".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4929,7 +5253,7 @@

    The “power-state” property

      “power-state”              guint
    -

    Represents the D-Bus property "PowerState".

    +

    Represents the D-Bus property "PowerState".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4938,8 +5262,8 @@

    The “primary-port” property

    -
      “primary-port”             gchar *
    -

    Represents the D-Bus property "PrimaryPort".

    +
      “primary-port”             char *
    +

    Represents the D-Bus property "PrimaryPort".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4947,9 +5271,19 @@

    +

    The “primary-sim-slot” property

    +
      “primary-sim-slot”         guint
    +

    Represents the D-Bus property "PrimarySimSlot".

    +

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    +

    Owner: MmGdbusModem

    +

    Flags: Read / Write

    +

    Default value: 0

    +
    +
    +

    The “revision” property

    -
      “revision”                 gchar *
    -

    Represents the D-Bus property "Revision".

    +
      “revision”                 char *
    +

    Represents the D-Bus property "Revision".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4959,7 +5293,7 @@

    The “signal-quality” property

      “signal-quality”           GVariant *
    -

    Represents the D-Bus property "SignalQuality".

    +

    Represents the D-Bus property "SignalQuality".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4969,8 +5303,8 @@

    The “sim” property

    -
      “sim”                      gchar *
    -

    Represents the D-Bus property "Sim".

    +
      “sim”                      char *
    +

    Represents the D-Bus property "Sim".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4978,9 +5312,18 @@

    +

    The “sim-slots” property

    +
      “sim-slots”                GStrv
    +

    Represents the D-Bus property "SimSlots".

    +

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    +

    Owner: MmGdbusModem

    +

    Flags: Read / Write

    +
    +
    +

    The “state” property

    -
      “state”                    gint
    -

    Represents the D-Bus property "State".

    +
      “state”                    int
    +

    Represents the D-Bus property "State".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -4990,7 +5333,7 @@

    The “state-failed-reason” property

      “state-failed-reason”      guint
    -

    Represents the D-Bus property "StateFailedReason".

    +

    Represents the D-Bus property "StateFailedReason".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -5000,7 +5343,7 @@

    The “supported-bands” property

      “supported-bands”          GVariant *
    -

    Represents the D-Bus property "SupportedBands".

    +

    Represents the D-Bus property "SupportedBands".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -5011,7 +5354,7 @@

    The “supported-capabilities” property

      “supported-capabilities”   GVariant *
    -

    Represents the D-Bus property "SupportedCapabilities".

    +

    Represents the D-Bus property "SupportedCapabilities".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -5022,7 +5365,7 @@

    The “supported-ip-families” property

      “supported-ip-families”    guint
    -

    Represents the D-Bus property "SupportedIpFamilies".

    +

    Represents the D-Bus property "SupportedIpFamilies".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -5032,7 +5375,7 @@

    The “supported-modes” property

      “supported-modes”          GVariant *
    -

    Represents the D-Bus property "SupportedModes".

    +

    Represents the D-Bus property "SupportedModes".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -5043,7 +5386,7 @@

    The “unlock-required” property

      “unlock-required”          guint
    -

    Represents the D-Bus property "UnlockRequired".

    +

    Represents the D-Bus property "UnlockRequired".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -5053,7 +5396,7 @@

    The “unlock-retries” property

      “unlock-retries”           GVariant *
    -

    Represents the D-Bus property "UnlockRetries".

    +

    Represents the D-Bus property "UnlockRetries".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem

    Flags: Read / Write

    @@ -5068,10 +5411,10 @@
    gboolean
     user_function (MmGdbusModem          *object,
                    GDBusMethodInvocation *invocation,
    -               gchar                 *arg_cmd,
    +               char                  *arg_cmd,
                    guint                  arg_timeout,
                    gpointer               user_data)
    -

    Signal emitted when a remote caller is invoking the Command() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Command() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_complete_command() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -5113,7 +5456,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -5125,7 +5468,7 @@ GDBusMethodInvocation *invocation, GVariant *arg_properties, gpointer user_data) -

    Signal emitted when a remote caller is invoking the CreateBearer() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the CreateBearer() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_complete_create_bearer() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -5162,7 +5505,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -5172,9 +5515,9 @@
    gboolean
     user_function (MmGdbusModem          *object,
                    GDBusMethodInvocation *invocation,
    -               gchar                 *arg_bearer,
    +               char                  *arg_bearer,
                    gpointer               user_data)
    -

    Signal emitted when a remote caller is invoking the DeleteBearer() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the DeleteBearer() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_complete_delete_bearer() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -5211,7 +5554,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -5223,7 +5566,7 @@ GDBusMethodInvocation *invocation, gboolean arg_enable, gpointer user_data) -

    Signal emitted when a remote caller is invoking the Enable() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Enable() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_complete_enable() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -5260,7 +5603,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -5270,9 +5613,9 @@
    gboolean
     user_function (MmGdbusModem          *object,
                    GDBusMethodInvocation *invocation,
    -               gchar                 *arg_code,
    +               char                  *arg_code,
                    gpointer               user_data)
    -

    Signal emitted when a remote caller is invoking the FactoryReset() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the FactoryReset() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_complete_factory_reset() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -5309,7 +5652,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -5320,7 +5663,7 @@ user_function (MmGdbusModem *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the ListBearers() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the ListBearers() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_complete_list_bearers() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -5352,7 +5695,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -5363,7 +5706,7 @@ user_function (MmGdbusModem *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the Reset() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Reset() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_complete_reset() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -5395,7 +5738,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -5407,7 +5750,7 @@ GDBusMethodInvocation *invocation, GVariant *arg_bands, gpointer user_data) -

    Signal emitted when a remote caller is invoking the SetCurrentBands() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the SetCurrentBands() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_complete_set_current_bands() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -5444,7 +5787,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -5456,7 +5799,7 @@ GDBusMethodInvocation *invocation, guint arg_capabilities, gpointer user_data) -

    Signal emitted when a remote caller is invoking the SetCurrentCapabilities() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the SetCurrentCapabilities() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_complete_set_current_capabilities() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -5493,7 +5836,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -5505,7 +5848,7 @@ GDBusMethodInvocation *invocation, GVariant *arg_modes, gpointer user_data) -

    Signal emitted when a remote caller is invoking the SetCurrentModes() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the SetCurrentModes() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_complete_set_current_modes() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -5542,7 +5885,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -5554,7 +5897,7 @@ GDBusMethodInvocation *invocation, guint arg_state, gpointer user_data) -

    Signal emitted when a remote caller is invoking the SetPowerState() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the SetPowerState() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_complete_set_power_state() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -5591,7 +5934,56 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    +
    +

    Flags: Run Last

    +
    +
    +
    +

    The “handle-set-primary-sim-slot” signal

    +
    gboolean
    +user_function (MmGdbusModem          *object,
    +               GDBusMethodInvocation *invocation,
    +               guint                  arg_sim_slot,
    +               gpointer               user_data)
    +

    Signal emitted when a remote caller is invoking the SetPrimarySimSlot() D-Bus method.

    +

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation + and eventually call mm_gdbus_modem_complete_set_primary_sim_slot() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    +
    +

    Parameters

    +
    +++++ + + + + + + + + + + + + + + + + + + + + + + +

    object

    A MmGdbusModem.

     

    invocation

    A GDBusMethodInvocation.

     

    arg_sim_slot

    Argument passed by remote caller.

     

    user_data

    user data set when the signal handler was connected.

     
    +
    +
    +

    Returns

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -5600,11 +5992,11 @@

    The “state-changed” signal

    void
     user_function (MmGdbusModem *object,
    -               gint          arg_old,
    -               gint          arg_new,
    +               int           arg_old,
    +               int           arg_new,
                    guint         arg_reason,
                    gpointer      user_data)
    -

    On the client-side, this signal is emitted whenever the D-Bus signal "StateChanged" is received.

    +

    On the client-side, this signal is emitted whenever the D-Bus signal "StateChanged" is received.

    On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.

    Parameters

    @@ -5648,6 +6040,6 @@
    +
    Generated by GTK-Doc V1.33.1
    \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModem3gpp.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModem3gpp.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModem3gpp.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModem3gpp.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -288,13 +288,13 @@ -gchar * +char * imei Read / Write -gchar * +char * initial-eps-bearer Read / Write @@ -306,13 +306,13 @@ -gchar * +char * operator-code Read / Write -gchar * +char * operator-name Read / Write @@ -415,7 +415,7 @@
    guint
     mm_gdbus_modem3gpp_get_registration_state
                                    (MmGdbusModem3gpp *object);
    -

    Gets the value of the "RegistrationState" D-Bus property.

    +

    Gets the value of the "RegistrationState" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -443,7 +443,7 @@

    mm_gdbus_modem3gpp_get_imei ()

    const gchar *
     mm_gdbus_modem3gpp_get_imei (MmGdbusModem3gpp *object);
    -

    Gets the value of the "Imei" D-Bus property.

    +

    Gets the value of the "Imei" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem3gpp_dup_imei() if on another thread.

    @@ -467,7 +467,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -475,7 +475,7 @@

    mm_gdbus_modem3gpp_dup_imei ()

    gchar *
     mm_gdbus_modem3gpp_dup_imei (MmGdbusModem3gpp *object);
    -

    Gets a copy of the "Imei" D-Bus property.

    +

    Gets a copy of the "Imei" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -496,7 +496,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -504,7 +504,7 @@

    mm_gdbus_modem3gpp_get_operator_code ()

    const gchar *
     mm_gdbus_modem3gpp_get_operator_code (MmGdbusModem3gpp *object);
    -

    Gets the value of the "OperatorCode" D-Bus property.

    +

    Gets the value of the "OperatorCode" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem3gpp_dup_operator_code() if on another thread.

    @@ -528,7 +528,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -536,7 +536,7 @@

    mm_gdbus_modem3gpp_dup_operator_code ()

    gchar *
     mm_gdbus_modem3gpp_dup_operator_code (MmGdbusModem3gpp *object);
    -

    Gets a copy of the "OperatorCode" D-Bus property.

    +

    Gets a copy of the "OperatorCode" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -557,7 +557,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -565,7 +565,7 @@

    mm_gdbus_modem3gpp_get_operator_name ()

    const gchar *
     mm_gdbus_modem3gpp_get_operator_name (MmGdbusModem3gpp *object);
    -

    Gets the value of the "OperatorName" D-Bus property.

    +

    Gets the value of the "OperatorName" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem3gpp_dup_operator_name() if on another thread.

    @@ -589,7 +589,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -597,7 +597,7 @@

    mm_gdbus_modem3gpp_dup_operator_name ()

    gchar *
     mm_gdbus_modem3gpp_dup_operator_name (MmGdbusModem3gpp *object);
    -

    Gets a copy of the "OperatorName" D-Bus property.

    +

    Gets a copy of the "OperatorName" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -618,7 +618,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -627,7 +627,7 @@
    guint
     mm_gdbus_modem3gpp_get_enabled_facility_locks
                                    (MmGdbusModem3gpp *object);
    -

    Gets the value of the "EnabledFacilityLocks" D-Bus property.

    +

    Gets the value of the "EnabledFacilityLocks" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -656,7 +656,7 @@
    guint
     mm_gdbus_modem3gpp_get_subscription_state
                                    (MmGdbusModem3gpp *object);
    -

    Gets the value of the "SubscriptionState" D-Bus property.

    +

    Gets the value of the "SubscriptionState" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -685,7 +685,7 @@
    guint
     mm_gdbus_modem3gpp_get_eps_ue_mode_operation
                                    (MmGdbusModem3gpp *object);
    -

    Gets the value of the "EpsUeModeOperation" D-Bus property.

    +

    Gets the value of the "EpsUeModeOperation" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -713,7 +713,7 @@

    mm_gdbus_modem3gpp_get_pco ()

    GVariant *
     mm_gdbus_modem3gpp_get_pco (MmGdbusModem3gpp *object);
    -

    Gets the value of the "Pco" D-Bus property.

    +

    Gets the value of the "Pco" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem3gpp_dup_pco() if on another thread.

    @@ -737,7 +737,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -745,7 +745,7 @@

    mm_gdbus_modem3gpp_dup_pco ()

    GVariant *
     mm_gdbus_modem3gpp_dup_pco (MmGdbusModem3gpp *object);
    -

    Gets a copy of the "Pco" D-Bus property.

    +

    Gets a copy of the "Pco" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -766,7 +766,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -775,7 +775,7 @@
    const gchar *
     mm_gdbus_modem3gpp_get_initial_eps_bearer
                                    (MmGdbusModem3gpp *object);
    -

    Gets the value of the "InitialEpsBearer" D-Bus property.

    +

    Gets the value of the "InitialEpsBearer" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem3gpp_dup_initial_eps_bearer() if on another thread.

    @@ -799,7 +799,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -808,7 +808,7 @@
    gchar *
     mm_gdbus_modem3gpp_dup_initial_eps_bearer
                                    (MmGdbusModem3gpp *object);
    -

    Gets a copy of the "InitialEpsBearer" D-Bus property.

    +

    Gets a copy of the "InitialEpsBearer" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -829,7 +829,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -838,7 +838,7 @@
    GVariant *
     mm_gdbus_modem3gpp_get_initial_eps_bearer_settings
                                    (MmGdbusModem3gpp *object);
    -

    Gets the value of the "InitialEpsBearerSettings" D-Bus property.

    +

    Gets the value of the "InitialEpsBearerSettings" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem3gpp_dup_initial_eps_bearer_settings() if on another thread.

    @@ -862,7 +862,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -871,7 +871,7 @@
    GVariant *
     mm_gdbus_modem3gpp_dup_initial_eps_bearer_settings
                                    (MmGdbusModem3gpp *object);
    -

    Gets a copy of the "InitialEpsBearerSettings" D-Bus property.

    +

    Gets a copy of the "InitialEpsBearerSettings" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -892,7 +892,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -904,7 +904,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Register() D-Bus method on proxy +

    Asynchronously invokes the Register() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -987,7 +987,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1000,7 +1000,7 @@ const gchar *arg_operator_id, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Register() D-Bus method on proxy +

    Synchronously invokes the Register() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem3gpp_call_register() for the asynchronous version of this method.

    @@ -1037,7 +1037,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1050,7 +1050,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Scan() D-Bus method on proxy +

    Asynchronously invokes the Scan() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1133,7 +1133,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1146,7 +1146,7 @@ GVariant **out_results, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Scan() D-Bus method on proxy +

    Synchronously invokes the Scan() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem3gpp_call_scan() for the asynchronous version of this method.

    @@ -1183,7 +1183,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1198,7 +1198,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the SetEpsUeModeOperation() D-Bus method on proxy +

    Asynchronously invokes the SetEpsUeModeOperation() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1281,7 +1281,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1295,7 +1295,7 @@ guint arg_mode, GCancellable *cancellable, GError **error); -

    Synchronously invokes the SetEpsUeModeOperation() D-Bus method on proxy +

    Synchronously invokes the SetEpsUeModeOperation() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem3gpp_call_set_eps_ue_mode_operation() for the asynchronous version of this method.

    @@ -1332,7 +1332,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1347,7 +1347,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the SetInitialEpsBearerSettings() D-Bus method on proxy +

    Asynchronously invokes the SetInitialEpsBearerSettings() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1430,7 +1430,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1444,7 +1444,7 @@ GVariant *arg_settings, GCancellable *cancellable, GError **error); -

    Synchronously invokes the SetInitialEpsBearerSettings() D-Bus method on proxy +

    Synchronously invokes the SetInitialEpsBearerSettings() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem3gpp_call_set_initial_eps_bearer_settings() for the asynchronous version of this method.

    @@ -1481,7 +1481,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1635,7 +1635,7 @@

    The “enabled-facility-locks” property

      “enabled-facility-locks”   guint
    -

    Represents the D-Bus property "EnabledFacilityLocks".

    +

    Represents the D-Bus property "EnabledFacilityLocks".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem3gpp

    Flags: Read / Write

    @@ -1645,7 +1645,7 @@

    The “eps-ue-mode-operation” property

      “eps-ue-mode-operation”    guint
    -

    Represents the D-Bus property "EpsUeModeOperation".

    +

    Represents the D-Bus property "EpsUeModeOperation".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem3gpp

    Flags: Read / Write

    @@ -1654,8 +1654,8 @@

    The “imei” property

    -
      “imei”                     gchar *
    -

    Represents the D-Bus property "Imei".

    +
      “imei”                     char *
    +

    Represents the D-Bus property "Imei".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem3gpp

    Flags: Read / Write

    @@ -1664,8 +1664,8 @@

    The “initial-eps-bearer” property

    -
      “initial-eps-bearer”       gchar *
    -

    Represents the D-Bus property "InitialEpsBearer".

    +
      “initial-eps-bearer”       char *
    +

    Represents the D-Bus property "InitialEpsBearer".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem3gpp

    Flags: Read / Write

    @@ -1675,7 +1675,7 @@

    The “initial-eps-bearer-settings” property

      “initial-eps-bearer-settings” GVariant *
    -

    Represents the D-Bus property "InitialEpsBearerSettings".

    +

    Represents the D-Bus property "InitialEpsBearerSettings".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem3gpp

    Flags: Read / Write

    @@ -1685,8 +1685,8 @@

    The “operator-code” property

    -
      “operator-code”            gchar *
    -

    Represents the D-Bus property "OperatorCode".

    +
      “operator-code”            char *
    +

    Represents the D-Bus property "OperatorCode".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem3gpp

    Flags: Read / Write

    @@ -1695,8 +1695,8 @@

    The “operator-name” property

    -
      “operator-name”            gchar *
    -

    Represents the D-Bus property "OperatorName".

    +
      “operator-name”            char *
    +

    Represents the D-Bus property "OperatorName".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem3gpp

    Flags: Read / Write

    @@ -1706,7 +1706,7 @@

    The “pco” property

      “pco”                      GVariant *
    -

    Represents the D-Bus property "Pco".

    +

    Represents the D-Bus property "Pco".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem3gpp

    Flags: Read / Write

    @@ -1717,7 +1717,7 @@

    The “registration-state” property

      “registration-state”       guint
    -

    Represents the D-Bus property "RegistrationState".

    +

    Represents the D-Bus property "RegistrationState".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem3gpp

    Flags: Read / Write

    @@ -1727,7 +1727,7 @@

    The “subscription-state” property

      “subscription-state”       guint
    -

    Represents the D-Bus property "SubscriptionState".

    +

    Represents the D-Bus property "SubscriptionState".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem3gpp

    Flags: Read / Write

    @@ -1741,9 +1741,9 @@
    gboolean
     user_function (MmGdbusModem3gpp      *object,
                    GDBusMethodInvocation *invocation,
    -               gchar                 *arg_operator_id,
    +               char                  *arg_operator_id,
                    gpointer               user_data)
    -

    Signal emitted when a remote caller is invoking the Register() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Register() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem3gpp_complete_register() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1780,7 +1780,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1791,7 +1791,7 @@ user_function (MmGdbusModem3gpp *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the Scan() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Scan() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem3gpp_complete_scan() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1823,7 +1823,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1835,7 +1835,7 @@ GDBusMethodInvocation *invocation, guint arg_mode, gpointer user_data) -

    Signal emitted when a remote caller is invoking the SetEpsUeModeOperation() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the SetEpsUeModeOperation() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem3gpp_complete_set_eps_ue_mode_operation() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1872,7 +1872,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1884,7 +1884,7 @@ GDBusMethodInvocation *invocation, GVariant *arg_settings, gpointer user_data) -

    Signal emitted when a remote caller is invoking the SetInitialEpsBearerSettings() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the SetInitialEpsBearerSettings() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem3gpp_complete_set_initial_eps_bearer_settings() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1921,13 +1921,13 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    +
    Generated by GTK-Doc V1.33.1
    \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModem3gppProxy.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModem3gppProxy.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModem3gppProxy.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModem3gppProxy.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -222,7 +222,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModem3gppProxy]

    +

    [transfer full][type MmGdbusModem3gppProxy]


    @@ -324,7 +324,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModem3gppProxy]

    +

    [transfer full][type MmGdbusModem3gppProxy]


    @@ -387,7 +387,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModem3gppProxy]

    +

    [transfer full][type MmGdbusModem3gppProxy]


    @@ -450,7 +450,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModem3gppProxy]

    +

    [transfer full][type MmGdbusModem3gppProxy]

    @@ -464,6 +464,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModem3gppSkeleton.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModem3gppSkeleton.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModem3gppSkeleton.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModem3gppSkeleton.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -89,7 +89,7 @@

    Returns

    The skeleton object.

    -

    [transfer full][type MmGdbusModem3gppSkeleton]

    +

    [transfer full][type MmGdbusModem3gppSkeleton]

    @@ -103,6 +103,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModem3gppUssd.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModem3gppUssd.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModem3gppUssd.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModem3gppUssd.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -168,13 +168,13 @@ -gchar * +char * network-notification Read / Write -gchar * +char * network-request Read / Write @@ -260,7 +260,7 @@

    mm_gdbus_modem3gpp_ussd_get_state ()

    guint
     mm_gdbus_modem3gpp_ussd_get_state (MmGdbusModem3gppUssd *object);
    -

    Gets the value of the "State" D-Bus property.

    +

    Gets the value of the "State" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -289,7 +289,7 @@
    const gchar *
     mm_gdbus_modem3gpp_ussd_get_network_request
                                    (MmGdbusModem3gppUssd *object);
    -

    Gets the value of the "NetworkRequest" D-Bus property.

    +

    Gets the value of the "NetworkRequest" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem3gpp_ussd_dup_network_request() if on another thread.

    @@ -313,7 +313,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -322,7 +322,7 @@
    gchar *
     mm_gdbus_modem3gpp_ussd_dup_network_request
                                    (MmGdbusModem3gppUssd *object);
    -

    Gets a copy of the "NetworkRequest" D-Bus property.

    +

    Gets a copy of the "NetworkRequest" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -343,7 +343,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -352,7 +352,7 @@
    const gchar *
     mm_gdbus_modem3gpp_ussd_get_network_notification
                                    (MmGdbusModem3gppUssd *object);
    -

    Gets the value of the "NetworkNotification" D-Bus property.

    +

    Gets the value of the "NetworkNotification" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem3gpp_ussd_dup_network_notification() if on another thread.

    @@ -376,7 +376,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -385,7 +385,7 @@
    gchar *
     mm_gdbus_modem3gpp_ussd_dup_network_notification
                                    (MmGdbusModem3gppUssd *object);
    -

    Gets a copy of the "NetworkNotification" D-Bus property.

    +

    Gets a copy of the "NetworkNotification" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -406,7 +406,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -418,7 +418,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Initiate() D-Bus method on proxy +

    Asynchronously invokes the Initiate() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -507,7 +507,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -522,7 +522,7 @@ gchar **out_reply, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Initiate() D-Bus method on proxy +

    Synchronously invokes the Initiate() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem3gpp_ussd_call_initiate() for the asynchronous version of this method.

    @@ -564,7 +564,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -578,7 +578,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Respond() D-Bus method on proxy +

    Asynchronously invokes the Respond() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -667,7 +667,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -682,7 +682,7 @@ gchar **out_reply, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Respond() D-Bus method on proxy +

    Synchronously invokes the Respond() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem3gpp_ussd_call_respond() for the asynchronous version of this method.

    @@ -724,7 +724,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -737,7 +737,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Cancel() D-Bus method on proxy +

    Asynchronously invokes the Cancel() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -815,7 +815,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -828,7 +828,7 @@ (MmGdbusModem3gppUssd *proxy, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Cancel() D-Bus method on proxy +

    Synchronously invokes the Cancel() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem3gpp_ussd_call_cancel() for the asynchronous version of this method.

    @@ -860,7 +860,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -954,8 +954,8 @@

    Property Details

    The “network-notification” property

    -
      “network-notification”     gchar *
    -

    Represents the D-Bus property "NetworkNotification".

    +
      “network-notification”     char *
    +

    Represents the D-Bus property "NetworkNotification".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem3gppUssd

    Flags: Read / Write

    @@ -964,8 +964,8 @@

    The “network-request” property

    -
      “network-request”          gchar *
    -

    Represents the D-Bus property "NetworkRequest".

    +
      “network-request”          char *
    +

    Represents the D-Bus property "NetworkRequest".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem3gppUssd

    Flags: Read / Write

    @@ -975,7 +975,7 @@

    The “state” property

      “state”                    guint
    -

    Represents the D-Bus property "State".

    +

    Represents the D-Bus property "State".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModem3gppUssd

    Flags: Read / Write

    @@ -990,7 +990,7 @@ user_function (MmGdbusModem3gppUssd *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the Cancel() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Cancel() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem3gpp_ussd_complete_cancel() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1022,7 +1022,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1032,9 +1032,9 @@
    gboolean
     user_function (MmGdbusModem3gppUssd  *object,
                    GDBusMethodInvocation *invocation,
    -               gchar                 *arg_command,
    +               char                  *arg_command,
                    gpointer               user_data)
    -

    Signal emitted when a remote caller is invoking the Initiate() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Initiate() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem3gpp_ussd_complete_initiate() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1071,7 +1071,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1081,9 +1081,9 @@
    gboolean
     user_function (MmGdbusModem3gppUssd  *object,
                    GDBusMethodInvocation *invocation,
    -               gchar                 *arg_response,
    +               char                  *arg_response,
                    gpointer               user_data)
    -

    Signal emitted when a remote caller is invoking the Respond() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Respond() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem3gpp_ussd_complete_respond() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1120,13 +1120,13 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModem3gppUssdProxy.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModem3gppUssdProxy.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModem3gppUssdProxy.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModem3gppUssdProxy.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -223,7 +223,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModem3gppUssdProxy]

    +

    [transfer full][type MmGdbusModem3gppUssdProxy]


    @@ -326,7 +326,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModem3gppUssdProxy]

    +

    [transfer full][type MmGdbusModem3gppUssdProxy]


    @@ -389,7 +389,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModem3gppUssdProxy]

    +

    [transfer full][type MmGdbusModem3gppUssdProxy]


    @@ -453,7 +453,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModem3gppUssdProxy]

    +

    [transfer full][type MmGdbusModem3gppUssdProxy]

    @@ -467,6 +467,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModem3gppUssdSkeleton.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModem3gppUssdSkeleton.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModem3gppUssdSkeleton.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModem3gppUssdSkeleton.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -89,7 +89,7 @@

    Returns

    The skeleton object.

    -

    [transfer full][type MmGdbusModem3gppUssdSkeleton]

    +

    [transfer full][type MmGdbusModem3gppUssdSkeleton]

    @@ -103,6 +103,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemCdma.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemCdma.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemCdma.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemCdma.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -186,7 +186,7 @@ -gchar * +char * esn Read / Write @@ -197,7 +197,7 @@ -gchar * +char * meid Read / Write @@ -289,7 +289,7 @@
    guint
     mm_gdbus_modem_cdma_get_cdma1x_registration_state
                                    (MmGdbusModemCdma *object);
    -

    Gets the value of the "Cdma1xRegistrationState" D-Bus property.

    +

    Gets the value of the "Cdma1xRegistrationState" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -318,7 +318,7 @@
    guint
     mm_gdbus_modem_cdma_get_evdo_registration_state
                                    (MmGdbusModemCdma *object);
    -

    Gets the value of the "EvdoRegistrationState" D-Bus property.

    +

    Gets the value of the "EvdoRegistrationState" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -347,7 +347,7 @@
    guint
     mm_gdbus_modem_cdma_get_activation_state
                                    (MmGdbusModemCdma *object);
    -

    Gets the value of the "ActivationState" D-Bus property.

    +

    Gets the value of the "ActivationState" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -375,7 +375,7 @@

    mm_gdbus_modem_cdma_get_esn ()

    const gchar *
     mm_gdbus_modem_cdma_get_esn (MmGdbusModemCdma *object);
    -

    Gets the value of the "Esn" D-Bus property.

    +

    Gets the value of the "Esn" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_cdma_dup_esn() if on another thread.

    @@ -399,7 +399,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -407,7 +407,7 @@

    mm_gdbus_modem_cdma_dup_esn ()

    gchar *
     mm_gdbus_modem_cdma_dup_esn (MmGdbusModemCdma *object);
    -

    Gets a copy of the "Esn" D-Bus property.

    +

    Gets a copy of the "Esn" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -428,7 +428,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -436,7 +436,7 @@

    mm_gdbus_modem_cdma_get_meid ()

    const gchar *
     mm_gdbus_modem_cdma_get_meid (MmGdbusModemCdma *object);
    -

    Gets the value of the "Meid" D-Bus property.

    +

    Gets the value of the "Meid" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_cdma_dup_meid() if on another thread.

    @@ -460,7 +460,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -468,7 +468,7 @@

    mm_gdbus_modem_cdma_dup_meid ()

    gchar *
     mm_gdbus_modem_cdma_dup_meid (MmGdbusModemCdma *object);
    -

    Gets a copy of the "Meid" D-Bus property.

    +

    Gets a copy of the "Meid" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -489,7 +489,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -497,7 +497,7 @@

    mm_gdbus_modem_cdma_get_nid ()

    guint
     mm_gdbus_modem_cdma_get_nid (MmGdbusModemCdma *object);
    -

    Gets the value of the "Nid" D-Bus property.

    +

    Gets the value of the "Nid" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -525,7 +525,7 @@

    mm_gdbus_modem_cdma_get_sid ()

    guint
     mm_gdbus_modem_cdma_get_sid (MmGdbusModemCdma *object);
    -

    Gets the value of the "Sid" D-Bus property.

    +

    Gets the value of the "Sid" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -557,7 +557,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Activate() D-Bus method on proxy +

    Asynchronously invokes the Activate() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -640,7 +640,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -654,7 +654,7 @@ const gchar *arg_carrier_code, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Activate() D-Bus method on proxy +

    Synchronously invokes the Activate() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_cdma_call_activate() for the asynchronous version of this method.

    @@ -691,7 +691,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -706,7 +706,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the ActivateManual() D-Bus method on proxy +

    Asynchronously invokes the ActivateManual() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -789,7 +789,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -803,7 +803,7 @@ GVariant *arg_properties, GCancellable *cancellable, GError **error); -

    Synchronously invokes the ActivateManual() D-Bus method on proxy +

    Synchronously invokes the ActivateManual() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_cdma_call_activate_manual() for the asynchronous version of this method.

    @@ -840,7 +840,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -965,7 +965,7 @@

    The “activation-state” property

      “activation-state”         guint
    -

    Represents the D-Bus property "ActivationState".

    +

    Represents the D-Bus property "ActivationState".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemCdma

    Flags: Read / Write

    @@ -975,7 +975,7 @@

    The “cdma1x-registration-state” property

      “cdma1x-registration-state” guint
    -

    Represents the D-Bus property "Cdma1xRegistrationState".

    +

    Represents the D-Bus property "Cdma1xRegistrationState".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemCdma

    Flags: Read / Write

    @@ -984,8 +984,8 @@

    The “esn” property

    -
      “esn”                      gchar *
    -

    Represents the D-Bus property "Esn".

    +
      “esn”                      char *
    +

    Represents the D-Bus property "Esn".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemCdma

    Flags: Read / Write

    @@ -995,7 +995,7 @@

    The “evdo-registration-state” property

      “evdo-registration-state”  guint
    -

    Represents the D-Bus property "EvdoRegistrationState".

    +

    Represents the D-Bus property "EvdoRegistrationState".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemCdma

    Flags: Read / Write

    @@ -1004,8 +1004,8 @@

    The “meid” property

    -
      “meid”                     gchar *
    -

    Represents the D-Bus property "Meid".

    +
      “meid”                     char *
    +

    Represents the D-Bus property "Meid".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemCdma

    Flags: Read / Write

    @@ -1015,7 +1015,7 @@

    The “nid” property

      “nid”                      guint
    -

    Represents the D-Bus property "Nid".

    +

    Represents the D-Bus property "Nid".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemCdma

    Flags: Read / Write

    @@ -1025,7 +1025,7 @@

    The “sid” property

      “sid”                      guint
    -

    Represents the D-Bus property "Sid".

    +

    Represents the D-Bus property "Sid".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemCdma

    Flags: Read / Write

    @@ -1042,7 +1042,7 @@ guint arg_activation_error, GVariant *arg_status_changes, gpointer user_data) -

    On the client-side, this signal is emitted whenever the D-Bus signal "ActivationStateChanged" is received.

    +

    On the client-side, this signal is emitted whenever the D-Bus signal "ActivationStateChanged" is received.

    On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.

    Parameters

    @@ -1089,9 +1089,9 @@
    gboolean
     user_function (MmGdbusModemCdma      *object,
                    GDBusMethodInvocation *invocation,
    -               gchar                 *arg_carrier_code,
    +               char                  *arg_carrier_code,
                    gpointer               user_data)
    -

    Signal emitted when a remote caller is invoking the Activate() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Activate() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_cdma_complete_activate() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1128,7 +1128,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1140,7 +1140,7 @@ GDBusMethodInvocation *invocation, GVariant *arg_properties, gpointer user_data) -

    Signal emitted when a remote caller is invoking the ActivateManual() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the ActivateManual() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_cdma_complete_activate_manual() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1177,13 +1177,13 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    +
    Generated by GTK-Doc V1.33.1
    \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemCdmaProxy.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemCdmaProxy.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemCdmaProxy.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemCdmaProxy.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -222,7 +222,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemCdmaProxy]

    +

    [transfer full][type MmGdbusModemCdmaProxy]


    @@ -324,7 +324,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemCdmaProxy]

    +

    [transfer full][type MmGdbusModemCdmaProxy]


    @@ -387,7 +387,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemCdmaProxy]

    +

    [transfer full][type MmGdbusModemCdmaProxy]


    @@ -450,7 +450,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemCdmaProxy]

    +

    [transfer full][type MmGdbusModemCdmaProxy]

    @@ -464,6 +464,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemCdmaSkeleton.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemCdmaSkeleton.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemCdmaSkeleton.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemCdmaSkeleton.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -89,7 +89,7 @@

    Returns

    The skeleton object.

    -

    [transfer full][type MmGdbusModemCdmaSkeleton]

    +

    [transfer full][type MmGdbusModemCdmaSkeleton]

    @@ -103,6 +103,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemFirmware.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemFirmware.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemFirmware.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemFirmware.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -197,7 +197,7 @@
    GVariant *
     mm_gdbus_modem_firmware_dup_update_settings
                                    (MmGdbusModemFirmware *object);
    -

    Gets a copy of the "UpdateSettings" D-Bus property.

    +

    Gets a copy of the "UpdateSettings" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -218,7 +218,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -227,7 +227,7 @@
    GVariant *
     mm_gdbus_modem_firmware_get_update_settings
                                    (MmGdbusModemFirmware *object);
    -

    Gets the value of the "UpdateSettings" D-Bus property.

    +

    Gets the value of the "UpdateSettings" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_firmware_dup_update_settings() if on another thread.

    @@ -251,7 +251,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -262,7 +262,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the List() D-Bus method on proxy +

    Asynchronously invokes the List() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -352,7 +352,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -367,7 +367,7 @@ GVariant **out_installed, GCancellable *cancellable, GError **error); -

    Synchronously invokes the List() D-Bus method on proxy +

    Synchronously invokes the List() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_firmware_call_list() for the asynchronous version of this method.

    @@ -409,7 +409,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -423,7 +423,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Select() D-Bus method on proxy +

    Asynchronously invokes the Select() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -506,7 +506,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -520,7 +520,7 @@ const gchar *arg_uniqueid, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Select() D-Bus method on proxy +

    Synchronously invokes the Select() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_firmware_call_select() for the asynchronous version of this method.

    @@ -557,7 +557,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -628,7 +628,7 @@

    The “update-settings” property

      “update-settings”          GVariant *
    -

    Represents the D-Bus property "UpdateSettings".

    +

    Represents the D-Bus property "UpdateSettings".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemFirmware

    Flags: Read / Write

    @@ -644,7 +644,7 @@ user_function (MmGdbusModemFirmware *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the List() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the List() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_firmware_complete_list() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -676,7 +676,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -686,9 +686,9 @@
    gboolean
     user_function (MmGdbusModemFirmware  *object,
                    GDBusMethodInvocation *invocation,
    -               gchar                 *arg_uniqueid,
    +               char                  *arg_uniqueid,
                    gpointer               user_data)
    -

    Signal emitted when a remote caller is invoking the Select() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Select() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_firmware_complete_select() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -725,13 +725,13 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemFirmwareProxy.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemFirmwareProxy.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemFirmwareProxy.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemFirmwareProxy.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -223,7 +223,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemFirmwareProxy]

    +

    [transfer full][type MmGdbusModemFirmwareProxy]


    @@ -326,7 +326,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemFirmwareProxy]

    +

    [transfer full][type MmGdbusModemFirmwareProxy]


    @@ -389,7 +389,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemFirmwareProxy]

    +

    [transfer full][type MmGdbusModemFirmwareProxy]


    @@ -453,7 +453,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemFirmwareProxy]

    +

    [transfer full][type MmGdbusModemFirmwareProxy]

    @@ -467,6 +467,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemFirmwareSkeleton.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemFirmwareSkeleton.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemFirmwareSkeleton.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemFirmwareSkeleton.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -89,7 +89,7 @@

    Returns

    The skeleton object.

    -

    [transfer full][type MmGdbusModemFirmwareSkeleton]

    +

    [transfer full][type MmGdbusModemFirmwareSkeleton]

    @@ -103,6 +103,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemLocation.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemLocation.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemLocation.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemLocation.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -295,7 +295,7 @@ -gchar * +char * supl-server Read / Write @@ -391,7 +391,7 @@

    mm_gdbus_modem_location_get_enabled ()

    guint
     mm_gdbus_modem_location_get_enabled (MmGdbusModemLocation *object);
    -

    Gets the value of the "Enabled" D-Bus property.

    +

    Gets the value of the "Enabled" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -420,7 +420,7 @@
    guint
     mm_gdbus_modem_location_get_capabilities
                                    (MmGdbusModemLocation *object);
    -

    Gets the value of the "Capabilities" D-Bus property.

    +

    Gets the value of the "Capabilities" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -449,7 +449,7 @@
    gboolean
     mm_gdbus_modem_location_get_signals_location
                                    (MmGdbusModemLocation *object);
    -

    Gets the value of the "SignalsLocation" D-Bus property.

    +

    Gets the value of the "SignalsLocation" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -477,7 +477,7 @@

    mm_gdbus_modem_location_get_location ()

    GVariant *
     mm_gdbus_modem_location_get_location (MmGdbusModemLocation *object);
    -

    Gets the value of the "Location" D-Bus property.

    +

    Gets the value of the "Location" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_location_dup_location() if on another thread.

    @@ -501,7 +501,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -509,7 +509,7 @@

    mm_gdbus_modem_location_dup_location ()

    GVariant *
     mm_gdbus_modem_location_dup_location (MmGdbusModemLocation *object);
    -

    Gets a copy of the "Location" D-Bus property.

    +

    Gets a copy of the "Location" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -530,7 +530,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -539,7 +539,7 @@
    gchar *
     mm_gdbus_modem_location_dup_supl_server
                                    (MmGdbusModemLocation *object);
    -

    Gets a copy of the "SuplServer" D-Bus property.

    +

    Gets a copy of the "SuplServer" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -560,7 +560,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -569,7 +569,7 @@
    const gchar *
     mm_gdbus_modem_location_get_supl_server
                                    (MmGdbusModemLocation *object);
    -

    Gets the value of the "SuplServer" D-Bus property.

    +

    Gets the value of the "SuplServer" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_location_dup_supl_server() if on another thread.

    @@ -593,7 +593,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -602,7 +602,7 @@
    guint
     mm_gdbus_modem_location_get_gps_refresh_rate
                                    (MmGdbusModemLocation *object);
    -

    Gets the value of the "GpsRefreshRate" D-Bus property.

    +

    Gets the value of the "GpsRefreshRate" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -631,7 +631,7 @@
    guint
     mm_gdbus_modem_location_get_supported_assistance_data
                                    (MmGdbusModemLocation *object);
    -

    Gets the value of the "SupportedAssistanceData" D-Bus property.

    +

    Gets the value of the "SupportedAssistanceData" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -660,7 +660,7 @@
    gchar **
     mm_gdbus_modem_location_dup_assistance_data_servers
                                    (MmGdbusModemLocation *object);
    -

    Gets a copy of the "AssistanceDataServers" D-Bus property.

    +

    Gets a copy of the "AssistanceDataServers" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -681,7 +681,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_strfreev().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -690,7 +690,7 @@
    const gchar *const *
     mm_gdbus_modem_location_get_assistance_data_servers
                                    (MmGdbusModemLocation *object);
    -

    Gets the value of the "AssistanceDataServers" D-Bus property.

    +

    Gets the value of the "AssistanceDataServers" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_location_dup_assistance_data_servers() if on another thread.

    @@ -714,7 +714,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -726,7 +726,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the GetLocation() D-Bus method on proxy +

    Asynchronously invokes the GetLocation() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -810,7 +810,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -824,7 +824,7 @@ GVariant **out_Location, GCancellable *cancellable, GError **error); -

    Synchronously invokes the GetLocation() D-Bus method on proxy +

    Synchronously invokes the GetLocation() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_location_call_get_location() for the asynchronous version of this method.

    @@ -861,7 +861,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -876,7 +876,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Setup() D-Bus method on proxy +

    Asynchronously invokes the Setup() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -964,7 +964,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -979,7 +979,7 @@ gboolean arg_signal_location, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Setup() D-Bus method on proxy +

    Synchronously invokes the Setup() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_location_call_setup() for the asynchronous version of this method.

    @@ -1021,7 +1021,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1036,7 +1036,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the SetSuplServer() D-Bus method on proxy +

    Asynchronously invokes the SetSuplServer() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1119,7 +1119,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1133,7 +1133,7 @@ const gchar *arg_supl, GCancellable *cancellable, GError **error); -

    Synchronously invokes the SetSuplServer() D-Bus method on proxy +

    Synchronously invokes the SetSuplServer() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_location_call_set_supl_server() for the asynchronous version of this method.

    @@ -1170,7 +1170,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1185,7 +1185,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the InjectAssistanceData() D-Bus method on proxy +

    Asynchronously invokes the InjectAssistanceData() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1268,7 +1268,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1282,7 +1282,7 @@ GVariant *arg_data, GCancellable *cancellable, GError **error); -

    Synchronously invokes the InjectAssistanceData() D-Bus method on proxy +

    Synchronously invokes the InjectAssistanceData() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_location_call_inject_assistance_data() for the asynchronous version of this method.

    @@ -1319,7 +1319,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1334,7 +1334,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the SetGpsRefreshRate() D-Bus method on proxy +

    Asynchronously invokes the SetGpsRefreshRate() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1417,7 +1417,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1431,7 +1431,7 @@ guint arg_rate, GCancellable *cancellable, GError **error); -

    Synchronously invokes the SetGpsRefreshRate() D-Bus method on proxy +

    Synchronously invokes the SetGpsRefreshRate() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_location_call_set_gps_refresh_rate() for the asynchronous version of this method.

    @@ -1468,7 +1468,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1619,7 +1619,7 @@

    The “assistance-data-servers” property

      “assistance-data-servers”  GStrv
    -

    Represents the D-Bus property "AssistanceDataServers".

    +

    Represents the D-Bus property "AssistanceDataServers".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemLocation

    Flags: Read / Write

    @@ -1628,7 +1628,7 @@

    The “capabilities” property

      “capabilities”             guint
    -

    Represents the D-Bus property "Capabilities".

    +

    Represents the D-Bus property "Capabilities".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemLocation

    Flags: Read / Write

    @@ -1638,7 +1638,7 @@

    The “enabled” property

      “enabled”                  guint
    -

    Represents the D-Bus property "Enabled".

    +

    Represents the D-Bus property "Enabled".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemLocation

    Flags: Read / Write

    @@ -1648,7 +1648,7 @@

    The “gps-refresh-rate” property

      “gps-refresh-rate”         guint
    -

    Represents the D-Bus property "GpsRefreshRate".

    +

    Represents the D-Bus property "GpsRefreshRate".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemLocation

    Flags: Read / Write

    @@ -1658,7 +1658,7 @@

    The “location” property

      “location”                 GVariant *
    -

    Represents the D-Bus property "Location".

    +

    Represents the D-Bus property "Location".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemLocation

    Flags: Read / Write

    @@ -1669,7 +1669,7 @@

    The “signals-location” property

      “signals-location”         gboolean
    -

    Represents the D-Bus property "SignalsLocation".

    +

    Represents the D-Bus property "SignalsLocation".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemLocation

    Flags: Read / Write

    @@ -1678,8 +1678,8 @@

    The “supl-server” property

    -
      “supl-server”              gchar *
    -

    Represents the D-Bus property "SuplServer".

    +
      “supl-server”              char *
    +

    Represents the D-Bus property "SuplServer".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemLocation

    Flags: Read / Write

    @@ -1689,7 +1689,7 @@

    The “supported-assistance-data” property

      “supported-assistance-data” guint
    -

    Represents the D-Bus property "SupportedAssistanceData".

    +

    Represents the D-Bus property "SupportedAssistanceData".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemLocation

    Flags: Read / Write

    @@ -1704,7 +1704,7 @@ user_function (MmGdbusModemLocation *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the GetLocation() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the GetLocation() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_location_complete_get_location() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1736,7 +1736,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1748,7 +1748,7 @@ GDBusMethodInvocation *invocation, GVariant *arg_data, gpointer user_data) -

    Signal emitted when a remote caller is invoking the InjectAssistanceData() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the InjectAssistanceData() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_location_complete_inject_assistance_data() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1785,7 +1785,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1797,7 +1797,7 @@ GDBusMethodInvocation *invocation, guint arg_rate, gpointer user_data) -

    Signal emitted when a remote caller is invoking the SetGpsRefreshRate() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the SetGpsRefreshRate() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_location_complete_set_gps_refresh_rate() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1834,7 +1834,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1844,9 +1844,9 @@
    gboolean
     user_function (MmGdbusModemLocation  *object,
                    GDBusMethodInvocation *invocation,
    -               gchar                 *arg_supl,
    +               char                  *arg_supl,
                    gpointer               user_data)
    -

    Signal emitted when a remote caller is invoking the SetSuplServer() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the SetSuplServer() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_location_complete_set_supl_server() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1883,7 +1883,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1896,7 +1896,7 @@ guint arg_sources, gboolean arg_signal_location, gpointer user_data) -

    Signal emitted when a remote caller is invoking the Setup() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Setup() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_location_complete_setup() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1938,13 +1938,13 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    +
    Generated by GTK-Doc V1.33.1
    \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemLocationProxy.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemLocationProxy.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemLocationProxy.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemLocationProxy.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -223,7 +223,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemLocationProxy]

    +

    [transfer full][type MmGdbusModemLocationProxy]


    @@ -326,7 +326,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemLocationProxy]

    +

    [transfer full][type MmGdbusModemLocationProxy]


    @@ -389,7 +389,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemLocationProxy]

    +

    [transfer full][type MmGdbusModemLocationProxy]


    @@ -453,7 +453,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemLocationProxy]

    +

    [transfer full][type MmGdbusModemLocationProxy]

    @@ -467,6 +467,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemLocationSkeleton.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemLocationSkeleton.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemLocationSkeleton.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemLocationSkeleton.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -89,7 +89,7 @@

    Returns

    The skeleton object.

    -

    [transfer full][type MmGdbusModemLocationSkeleton]

    +

    [transfer full][type MmGdbusModemLocationSkeleton]

    @@ -103,6 +103,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemMessaging.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemMessaging.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemMessaging.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemMessaging.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -270,7 +270,7 @@

    mm_gdbus_modem_messaging_get_messages ()

    const gchar *const *
     mm_gdbus_modem_messaging_get_messages (MmGdbusModemMessaging *object);
    -

    Gets the value of the "Messages" D-Bus property.

    +

    Gets the value of the "Messages" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_messaging_dup_messages() if on another thread.

    @@ -294,7 +294,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -302,7 +302,7 @@

    mm_gdbus_modem_messaging_dup_messages ()

    gchar **
     mm_gdbus_modem_messaging_dup_messages (MmGdbusModemMessaging *object);
    -

    Gets a copy of the "Messages" D-Bus property.

    +

    Gets a copy of the "Messages" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -323,7 +323,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_strfreev().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -332,7 +332,7 @@
    GVariant *
     mm_gdbus_modem_messaging_get_supported_storages
                                    (MmGdbusModemMessaging *object);
    -

    Gets the value of the "SupportedStorages" D-Bus property.

    +

    Gets the value of the "SupportedStorages" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_messaging_dup_supported_storages() if on another thread.

    @@ -356,7 +356,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -365,7 +365,7 @@
    GVariant *
     mm_gdbus_modem_messaging_dup_supported_storages
                                    (MmGdbusModemMessaging *object);
    -

    Gets a copy of the "SupportedStorages" D-Bus property.

    +

    Gets a copy of the "SupportedStorages" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -386,7 +386,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -395,7 +395,7 @@
    guint
     mm_gdbus_modem_messaging_get_default_storage
                                    (MmGdbusModemMessaging *object);
    -

    Gets the value of the "DefaultStorage" D-Bus property.

    +

    Gets the value of the "DefaultStorage" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -427,7 +427,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Create() D-Bus method on proxy +

    Asynchronously invokes the Create() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -516,7 +516,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -531,7 +531,7 @@ gchar **out_path, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Create() D-Bus method on proxy +

    Synchronously invokes the Create() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_messaging_call_create() for the asynchronous version of this method.

    @@ -573,7 +573,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -587,7 +587,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Delete() D-Bus method on proxy +

    Asynchronously invokes the Delete() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -670,7 +670,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -684,7 +684,7 @@ const gchar *arg_path, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Delete() D-Bus method on proxy +

    Synchronously invokes the Delete() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_messaging_call_delete() for the asynchronous version of this method.

    @@ -721,7 +721,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -734,7 +734,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the List() D-Bus method on proxy +

    Asynchronously invokes the List() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -818,7 +818,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -832,7 +832,7 @@ gchar ***out_result, GCancellable *cancellable, GError **error); -

    Synchronously invokes the List() D-Bus method on proxy +

    Synchronously invokes the List() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_messaging_call_list() for the asynchronous version of this method.

    @@ -869,7 +869,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -983,7 +983,7 @@

    The “default-storage” property

      “default-storage”          guint
    -

    Represents the D-Bus property "DefaultStorage".

    +

    Represents the D-Bus property "DefaultStorage".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemMessaging

    Flags: Read / Write

    @@ -993,7 +993,7 @@

    The “messages” property

      “messages”                 GStrv
    -

    Represents the D-Bus property "Messages".

    +

    Represents the D-Bus property "Messages".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemMessaging

    Flags: Read / Write

    @@ -1002,7 +1002,7 @@

    The “supported-storages” property

      “supported-storages”       GVariant *
    -

    Represents the D-Bus property "SupportedStorages".

    +

    Represents the D-Bus property "SupportedStorages".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemMessaging

    Flags: Read / Write

    @@ -1016,10 +1016,10 @@

    The “added” signal

    void
     user_function (MmGdbusModemMessaging *object,
    -               gchar                 *arg_path,
    +               char                  *arg_path,
                    gboolean               arg_received,
                    gpointer               user_data)
    -

    On the client-side, this signal is emitted whenever the D-Bus signal "Added" is received.

    +

    On the client-side, this signal is emitted whenever the D-Bus signal "Added" is received.

    On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.

    Parameters

    @@ -1060,9 +1060,9 @@

    The “deleted” signal

    void
     user_function (MmGdbusModemMessaging *object,
    -               gchar                 *arg_path,
    +               char                  *arg_path,
                    gpointer               user_data)
    -

    On the client-side, this signal is emitted whenever the D-Bus signal "Deleted" is received.

    +

    On the client-side, this signal is emitted whenever the D-Bus signal "Deleted" is received.

    On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.

    Parameters

    @@ -1101,7 +1101,7 @@ GDBusMethodInvocation *invocation, GVariant *arg_properties, gpointer user_data) -

    Signal emitted when a remote caller is invoking the Create() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Create() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_messaging_complete_create() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1138,7 +1138,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1148,9 +1148,9 @@
    gboolean
     user_function (MmGdbusModemMessaging *object,
                    GDBusMethodInvocation *invocation,
    -               gchar                 *arg_path,
    +               char                  *arg_path,
                    gpointer               user_data)
    -

    Signal emitted when a remote caller is invoking the Delete() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Delete() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_messaging_complete_delete() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1187,7 +1187,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1198,7 +1198,7 @@ user_function (MmGdbusModemMessaging *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the List() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the List() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_messaging_complete_list() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1230,13 +1230,13 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemMessagingProxy.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemMessagingProxy.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemMessagingProxy.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemMessagingProxy.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -223,7 +223,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemMessagingProxy]

    +

    [transfer full][type MmGdbusModemMessagingProxy]


    @@ -326,7 +326,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemMessagingProxy]

    +

    [transfer full][type MmGdbusModemMessagingProxy]


    @@ -389,7 +389,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemMessagingProxy]

    +

    [transfer full][type MmGdbusModemMessagingProxy]


    @@ -453,7 +453,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemMessagingProxy]

    +

    [transfer full][type MmGdbusModemMessagingProxy]

    @@ -467,6 +467,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemMessagingSkeleton.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemMessagingSkeleton.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemMessagingSkeleton.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemMessagingSkeleton.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -89,7 +89,7 @@

    Returns

    The skeleton object.

    -

    [transfer full][type MmGdbusModemMessagingSkeleton]

    +

    [transfer full][type MmGdbusModemMessagingSkeleton]

    @@ -103,6 +103,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemOma.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemOma.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemOma.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemOma.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -204,7 +204,7 @@ Read / Write -gint +int session-state Read / Write @@ -306,7 +306,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the AcceptNetworkInitiatedSession() D-Bus method on proxy +

    Asynchronously invokes the AcceptNetworkInitiatedSession() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -394,7 +394,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -409,7 +409,7 @@ gboolean arg_accept, GCancellable *cancellable, GError **error); -

    Synchronously invokes the AcceptNetworkInitiatedSession() D-Bus method on proxy +

    Synchronously invokes the AcceptNetworkInitiatedSession() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_oma_call_accept_network_initiated_session() for the asynchronous version of this method.

    @@ -451,7 +451,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -465,7 +465,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the CancelSession() D-Bus method on proxy +

    Asynchronously invokes the CancelSession() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -543,7 +543,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -556,7 +556,7 @@ (MmGdbusModemOma *proxy, GCancellable *cancellable, GError **error); -

    Synchronously invokes the CancelSession() D-Bus method on proxy +

    Synchronously invokes the CancelSession() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_oma_call_cancel_session() for the asynchronous version of this method.

    @@ -588,7 +588,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -602,7 +602,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Setup() D-Bus method on proxy +

    Asynchronously invokes the Setup() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -684,7 +684,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -697,7 +697,7 @@ guint arg_features, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Setup() D-Bus method on proxy +

    Synchronously invokes the Setup() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_oma_call_setup() for the asynchronous version of this method.

    @@ -734,7 +734,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -749,7 +749,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the StartClientInitiatedSession() D-Bus method on proxy +

    Asynchronously invokes the StartClientInitiatedSession() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -832,7 +832,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -846,7 +846,7 @@ guint arg_session_type, GCancellable *cancellable, GError **error); -

    Synchronously invokes the StartClientInitiatedSession() D-Bus method on proxy +

    Synchronously invokes the StartClientInitiatedSession() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_oma_call_start_client_initiated_session() for the asynchronous version of this method.

    @@ -883,7 +883,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -893,7 +893,7 @@

    mm_gdbus_modem_oma_get_features ()

    guint
     mm_gdbus_modem_oma_get_features (MmGdbusModemOma *object);
    -

    Gets the value of the "Features" D-Bus property.

    +

    Gets the value of the "Features" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -921,7 +921,7 @@

    mm_gdbus_modem_oma_get_session_state ()

    gint
     mm_gdbus_modem_oma_get_session_state (MmGdbusModemOma *object);
    -

    Gets the value of the "SessionState" D-Bus property.

    +

    Gets the value of the "SessionState" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -949,7 +949,7 @@

    mm_gdbus_modem_oma_get_session_type ()

    guint
     mm_gdbus_modem_oma_get_session_type (MmGdbusModemOma *object);
    -

    Gets the value of the "SessionType" D-Bus property.

    +

    Gets the value of the "SessionType" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -978,7 +978,7 @@
    GVariant *
     mm_gdbus_modem_oma_get_pending_network_initiated_sessions
                                    (MmGdbusModemOma *object);
    -

    Gets the value of the "PendingNetworkInitiatedSessions" D-Bus property.

    +

    Gets the value of the "PendingNetworkInitiatedSessions" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_oma_dup_pending_network_initiated_sessions() if on another thread.

    @@ -1002,7 +1002,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -1011,7 +1011,7 @@
    GVariant *
     mm_gdbus_modem_oma_dup_pending_network_initiated_sessions
                                    (MmGdbusModemOma *object);
    -

    Gets a copy of the "PendingNetworkInitiatedSessions" D-Bus property.

    +

    Gets a copy of the "PendingNetworkInitiatedSessions" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1032,7 +1032,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]

    @@ -1154,7 +1154,7 @@

    The “features” property

      “features”                 guint
    -

    Represents the D-Bus property "Features".

    +

    Represents the D-Bus property "Features".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemOma

    Flags: Read / Write

    @@ -1164,7 +1164,7 @@

    The “pending-network-initiated-sessions” property

      “pending-network-initiated-sessions” GVariant *
    -

    Represents the D-Bus property "PendingNetworkInitiatedSessions".

    +

    Represents the D-Bus property "PendingNetworkInitiatedSessions".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemOma

    Flags: Read / Write

    @@ -1174,8 +1174,8 @@

    The “session-state” property

    -
      “session-state”            gint
    -

    Represents the D-Bus property "SessionState".

    +
      “session-state”            int
    +

    Represents the D-Bus property "SessionState".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemOma

    Flags: Read / Write

    @@ -1185,7 +1185,7 @@

    The “session-type” property

      “session-type”             guint
    -

    Represents the D-Bus property "SessionType".

    +

    Represents the D-Bus property "SessionType".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemOma

    Flags: Read / Write

    @@ -1202,7 +1202,7 @@ guint arg_session_id, gboolean arg_accept, gpointer user_data) -

    Signal emitted when a remote caller is invoking the AcceptNetworkInitiatedSession() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the AcceptNetworkInitiatedSession() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_oma_complete_accept_network_initiated_session() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1244,7 +1244,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1255,7 +1255,7 @@ user_function (MmGdbusModemOma *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the CancelSession() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the CancelSession() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_oma_complete_cancel_session() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1287,7 +1287,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1299,7 +1299,7 @@ GDBusMethodInvocation *invocation, guint arg_features, gpointer user_data) -

    Signal emitted when a remote caller is invoking the Setup() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Setup() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_oma_complete_setup() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1336,7 +1336,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1348,7 +1348,7 @@ GDBusMethodInvocation *invocation, guint arg_session_type, gpointer user_data) -

    Signal emitted when a remote caller is invoking the StartClientInitiatedSession() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the StartClientInitiatedSession() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_oma_complete_start_client_initiated_session() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1385,7 +1385,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1394,11 +1394,11 @@

    The “session-state-changed” signal

    void
     user_function (MmGdbusModemOma *object,
    -               gint             arg_old_session_state,
    -               gint             arg_new_session_state,
    +               int              arg_old_session_state,
    +               int              arg_new_session_state,
                    guint            arg_session_state_failed_reason,
                    gpointer         user_data)
    -

    On the client-side, this signal is emitted whenever the D-Bus signal "SessionStateChanged" is received.

    +

    On the client-side, this signal is emitted whenever the D-Bus signal "SessionStateChanged" is received.

    On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.

    Parameters

    @@ -1442,6 +1442,6 @@
    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemOmaProxy.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemOmaProxy.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemOmaProxy.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemOmaProxy.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -222,7 +222,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemOmaProxy]

    +

    [transfer full][type MmGdbusModemOmaProxy]


    @@ -324,7 +324,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemOmaProxy]

    +

    [transfer full][type MmGdbusModemOmaProxy]


    @@ -387,7 +387,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemOmaProxy]

    +

    [transfer full][type MmGdbusModemOmaProxy]


    @@ -450,7 +450,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemOmaProxy]

    +

    [transfer full][type MmGdbusModemOmaProxy]

    @@ -464,6 +464,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemOmaSkeleton.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemOmaSkeleton.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemOmaSkeleton.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemOmaSkeleton.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -89,7 +89,7 @@

    Returns

    The skeleton object.

    -

    [transfer full][type MmGdbusModemOmaSkeleton]

    +

    [transfer full][type MmGdbusModemOmaSkeleton]

    @@ -103,6 +103,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemProxy.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemProxy.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemProxy.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemProxy.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -222,7 +222,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemProxy]

    +

    [transfer full][type MmGdbusModemProxy]


    @@ -324,7 +324,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemProxy]

    +

    [transfer full][type MmGdbusModemProxy]


    @@ -386,7 +386,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemProxy]

    +

    [transfer full][type MmGdbusModemProxy]


    @@ -449,7 +449,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemProxy]

    +

    [transfer full][type MmGdbusModemProxy]

    @@ -463,6 +463,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemSignal.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemSignal.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemSignal.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemSignal.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -97,6 +97,14 @@ GVariant * +mm_gdbus_modem_signal_get_nr5g () + + + + +GVariant * + + mm_gdbus_modem_signal_dup_cdma () @@ -134,6 +142,14 @@ +GVariant * + + +mm_gdbus_modem_signal_dup_nr5g () + + + + void @@ -193,6 +209,12 @@ Read / Write + +GVariant * +nr5g +Read / Write + + guint rate Read / Write @@ -268,7 +290,7 @@

    mm_gdbus_modem_signal_get_rate ()

    guint
     mm_gdbus_modem_signal_get_rate (MmGdbusModemSignal *object);
    -

    Gets the value of the "Rate" D-Bus property.

    +

    Gets the value of the "Rate" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -296,7 +318,7 @@

    mm_gdbus_modem_signal_get_cdma ()

    GVariant *
     mm_gdbus_modem_signal_get_cdma (MmGdbusModemSignal *object);
    -

    Gets the value of the "Cdma" D-Bus property.

    +

    Gets the value of the "Cdma" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_signal_dup_cdma() if on another thread.

    @@ -320,7 +342,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -328,7 +350,7 @@

    mm_gdbus_modem_signal_get_evdo ()

    GVariant *
     mm_gdbus_modem_signal_get_evdo (MmGdbusModemSignal *object);
    -

    Gets the value of the "Evdo" D-Bus property.

    +

    Gets the value of the "Evdo" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_signal_dup_evdo() if on another thread.

    @@ -352,7 +374,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -360,7 +382,7 @@

    mm_gdbus_modem_signal_get_gsm ()

    GVariant *
     mm_gdbus_modem_signal_get_gsm (MmGdbusModemSignal *object);
    -

    Gets the value of the "Gsm" D-Bus property.

    +

    Gets the value of the "Gsm" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_signal_dup_gsm() if on another thread.

    @@ -384,7 +406,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -392,7 +414,7 @@

    mm_gdbus_modem_signal_get_umts ()

    GVariant *
     mm_gdbus_modem_signal_get_umts (MmGdbusModemSignal *object);
    -

    Gets the value of the "Umts" D-Bus property.

    +

    Gets the value of the "Umts" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_signal_dup_umts() if on another thread.

    @@ -416,7 +438,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -424,7 +446,7 @@

    mm_gdbus_modem_signal_get_lte ()

    GVariant *
     mm_gdbus_modem_signal_get_lte (MmGdbusModemSignal *object);
    -

    Gets the value of the "Lte" D-Bus property.

    +

    Gets the value of the "Lte" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_signal_dup_lte() if on another thread.

    @@ -448,7 +470,39 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]

    + + +
    +
    +

    mm_gdbus_modem_signal_get_nr5g ()

    +
    GVariant *
    +mm_gdbus_modem_signal_get_nr5g (MmGdbusModemSignal *object);
    +

    Gets the value of the "Nr5g" D-Bus property.

    +

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    +

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object + was constructed. Use mm_gdbus_modem_signal_dup_nr5g() if on another thread.

    +

    [skip]

    +
    +

    Parameters

    +
    +++++ + + + + + +

    object

    A MmGdbusModemSignal.

     
    +
    +
    +

    Returns

    +

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object +.

    +

    [transfer none][nullable]


    @@ -456,7 +510,7 @@

    mm_gdbus_modem_signal_dup_cdma ()

    GVariant *
     mm_gdbus_modem_signal_dup_cdma (MmGdbusModemSignal *object);
    -

    Gets a copy of the "Cdma" D-Bus property.

    +

    Gets a copy of the "Cdma" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -477,7 +531,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -485,7 +539,7 @@

    mm_gdbus_modem_signal_dup_evdo ()

    GVariant *
     mm_gdbus_modem_signal_dup_evdo (MmGdbusModemSignal *object);
    -

    Gets a copy of the "Evdo" D-Bus property.

    +

    Gets a copy of the "Evdo" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -506,7 +560,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -514,7 +568,7 @@

    mm_gdbus_modem_signal_dup_gsm ()

    GVariant *
     mm_gdbus_modem_signal_dup_gsm (MmGdbusModemSignal *object);
    -

    Gets a copy of the "Gsm" D-Bus property.

    +

    Gets a copy of the "Gsm" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -535,7 +589,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -543,7 +597,7 @@

    mm_gdbus_modem_signal_dup_umts ()

    GVariant *
     mm_gdbus_modem_signal_dup_umts (MmGdbusModemSignal *object);
    -

    Gets a copy of the "Umts" D-Bus property.

    +

    Gets a copy of the "Umts" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -564,7 +618,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -572,7 +626,7 @@

    mm_gdbus_modem_signal_dup_lte ()

    GVariant *
     mm_gdbus_modem_signal_dup_lte (MmGdbusModemSignal *object);
    -

    Gets a copy of the "Lte" D-Bus property.

    +

    Gets a copy of the "Lte" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -593,7 +647,36 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]

    +
    +
    +
    +
    +

    mm_gdbus_modem_signal_dup_nr5g ()

    +
    GVariant *
    +mm_gdbus_modem_signal_dup_nr5g (MmGdbusModemSignal *object);
    +

    Gets a copy of the "Nr5g" D-Bus property.

    +

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    +

    [skip]

    +
    +

    Parameters

    +
    +++++ + + + + + +

    object

    A MmGdbusModemSignal.

     
    +
    +
    +

    Returns

    +

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    +

    [transfer full][nullable]


    @@ -605,7 +688,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Setup() D-Bus method on proxy +

    Asynchronously invokes the Setup() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -688,7 +771,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -701,7 +784,7 @@ guint arg_rate, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Setup() D-Bus method on proxy +

    Synchronously invokes the Setup() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_signal_call_setup() for the asynchronous version of this method.

    @@ -738,7 +821,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -770,6 +853,8 @@ GVariant * (*get_lte) (MmGdbusModemSignal *object); + GVariant * (*get_nr5g) (MmGdbusModemSignal *object); + guint (*get_rate) (MmGdbusModemSignal *object); GVariant * (*get_umts) (MmGdbusModemSignal *object); @@ -816,6 +901,11 @@   +

    get_nr5g ()

    +

    Getter for the “nr5g” property.

    +  + +

    get_rate ()

    Getter for the “rate” property.

      @@ -835,7 +925,7 @@

    The “cdma” property

      “cdma”                     GVariant *
    -

    Represents the D-Bus property "Cdma".

    +

    Represents the D-Bus property "Cdma".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemSignal

    Flags: Read / Write

    @@ -846,7 +936,7 @@

    The “evdo” property

      “evdo”                     GVariant *
    -

    Represents the D-Bus property "Evdo".

    +

    Represents the D-Bus property "Evdo".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemSignal

    Flags: Read / Write

    @@ -857,7 +947,7 @@

    The “gsm” property

      “gsm”                      GVariant *
    -

    Represents the D-Bus property "Gsm".

    +

    Represents the D-Bus property "Gsm".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemSignal

    Flags: Read / Write

    @@ -868,7 +958,18 @@

    The “lte” property

      “lte”                      GVariant *
    -

    Represents the D-Bus property "Lte".

    +

    Represents the D-Bus property "Lte".

    +

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    +

    Owner: MmGdbusModemSignal

    +

    Flags: Read / Write

    +

    Allowed values: GVariant<a{sv}>

    +

    Default value: NULL

    +
    +
    +
    +

    The “nr5g” property

    +
      “nr5g”                     GVariant *
    +

    Represents the D-Bus property "Nr5g".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemSignal

    Flags: Read / Write

    @@ -879,7 +980,7 @@

    The “rate” property

      “rate”                     guint
    -

    Represents the D-Bus property "Rate".

    +

    Represents the D-Bus property "Rate".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemSignal

    Flags: Read / Write

    @@ -889,7 +990,7 @@

    The “umts” property

      “umts”                     GVariant *
    -

    Represents the D-Bus property "Umts".

    +

    Represents the D-Bus property "Umts".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemSignal

    Flags: Read / Write

    @@ -906,7 +1007,7 @@ GDBusMethodInvocation *invocation, guint arg_rate, gpointer user_data) -

    Signal emitted when a remote caller is invoking the Setup() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Setup() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_signal_complete_setup() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -943,13 +1044,13 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    +
    Generated by GTK-Doc V1.33.1
    \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemSignalProxy.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemSignalProxy.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemSignalProxy.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemSignalProxy.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -223,7 +223,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemSignalProxy]

    +

    [transfer full][type MmGdbusModemSignalProxy]


    @@ -326,7 +326,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemSignalProxy]

    +

    [transfer full][type MmGdbusModemSignalProxy]


    @@ -389,7 +389,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemSignalProxy]

    +

    [transfer full][type MmGdbusModemSignalProxy]


    @@ -452,7 +452,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemSignalProxy]

    +

    [transfer full][type MmGdbusModemSignalProxy]

    @@ -466,6 +466,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemSignalSkeleton.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemSignalSkeleton.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemSignalSkeleton.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemSignalSkeleton.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -89,7 +89,7 @@

    Returns

    The skeleton object.

    -

    [transfer full][type MmGdbusModemSignalSkeleton]

    +

    [transfer full][type MmGdbusModemSignalSkeleton]

    @@ -103,6 +103,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemSimple.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemSimple.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemSimple.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemSimple.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -196,7 +196,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Connect() D-Bus method on proxy +

    Asynchronously invokes the Connect() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -285,7 +285,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -300,7 +300,7 @@ gchar **out_bearer, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Connect() D-Bus method on proxy +

    Synchronously invokes the Connect() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_simple_call_connect() for the asynchronous version of this method.

    @@ -342,7 +342,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -356,7 +356,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Disconnect() D-Bus method on proxy +

    Asynchronously invokes the Disconnect() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -439,7 +439,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -453,7 +453,7 @@ const gchar *arg_bearer, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Disconnect() D-Bus method on proxy +

    Synchronously invokes the Disconnect() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_simple_call_disconnect() for the asynchronous version of this method.

    @@ -490,7 +490,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -503,7 +503,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the GetStatus() D-Bus method on proxy +

    Asynchronously invokes the GetStatus() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -587,7 +587,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -601,7 +601,7 @@ GVariant **out_properties, GCancellable *cancellable, GError **error); -

    Synchronously invokes the GetStatus() D-Bus method on proxy +

    Synchronously invokes the GetStatus() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_simple_call_get_status() for the asynchronous version of this method.

    @@ -638,7 +638,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -716,7 +716,7 @@ GDBusMethodInvocation *invocation, GVariant *arg_properties, gpointer user_data) -

    Signal emitted when a remote caller is invoking the Connect() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Connect() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_simple_complete_connect() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -753,7 +753,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -763,9 +763,9 @@
    gboolean
     user_function (MmGdbusModemSimple    *object,
                    GDBusMethodInvocation *invocation,
    -               gchar                 *arg_bearer,
    +               char                  *arg_bearer,
                    gpointer               user_data)
    -

    Signal emitted when a remote caller is invoking the Disconnect() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Disconnect() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_simple_complete_disconnect() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -802,7 +802,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -813,7 +813,7 @@ user_function (MmGdbusModemSimple *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the GetStatus() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the GetStatus() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_simple_complete_get_status() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -845,13 +845,13 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemSimpleProxy.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemSimpleProxy.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemSimpleProxy.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemSimpleProxy.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -223,7 +223,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemSimpleProxy]

    +

    [transfer full][type MmGdbusModemSimpleProxy]


    @@ -326,7 +326,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemSimpleProxy]

    +

    [transfer full][type MmGdbusModemSimpleProxy]


    @@ -389,7 +389,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemSimpleProxy]

    +

    [transfer full][type MmGdbusModemSimpleProxy]


    @@ -452,7 +452,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemSimpleProxy]

    +

    [transfer full][type MmGdbusModemSimpleProxy]

    @@ -466,6 +466,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemSimpleSkeleton.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemSimpleSkeleton.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemSimpleSkeleton.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemSimpleSkeleton.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -89,7 +89,7 @@

    Returns

    The skeleton object.

    -

    [transfer full][type MmGdbusModemSimpleSkeleton]

    +

    [transfer full][type MmGdbusModemSimpleSkeleton]

    @@ -103,6 +103,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemSkeleton.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemSkeleton.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemSkeleton.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemSkeleton.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -89,7 +89,7 @@

    Returns

    The skeleton object.

    -

    [transfer full][type MmGdbusModemSkeleton]

    +

    [transfer full][type MmGdbusModemSkeleton]

    @@ -103,6 +103,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemTime.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemTime.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemTime.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemTime.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -173,7 +173,7 @@
    GVariant *
     mm_gdbus_modem_time_get_network_timezone
                                    (MmGdbusModemTime *object);
    -

    Gets the value of the "NetworkTimezone" D-Bus property.

    +

    Gets the value of the "NetworkTimezone" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_time_dup_network_timezone() if on another thread.

    @@ -197,7 +197,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -206,7 +206,7 @@
    GVariant *
     mm_gdbus_modem_time_dup_network_timezone
                                    (MmGdbusModemTime *object);
    -

    Gets a copy of the "NetworkTimezone" D-Bus property.

    +

    Gets a copy of the "NetworkTimezone" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -227,7 +227,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -239,7 +239,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the GetNetworkTime() D-Bus method on proxy +

    Asynchronously invokes the GetNetworkTime() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -323,7 +323,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -337,7 +337,7 @@ gchar **out_time, GCancellable *cancellable, GError **error); -

    Synchronously invokes the GetNetworkTime() D-Bus method on proxy +

    Synchronously invokes the GetNetworkTime() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_time_call_get_network_time() for the asynchronous version of this method.

    @@ -374,7 +374,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -444,7 +444,7 @@

    The “network-timezone” property

      “network-timezone”         GVariant *
    -

    Represents the D-Bus property "NetworkTimezone".

    +

    Represents the D-Bus property "NetworkTimezone".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemTime

    Flags: Read / Write

    @@ -460,7 +460,7 @@ user_function (MmGdbusModemTime *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the GetNetworkTime() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the GetNetworkTime() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_time_complete_get_network_time() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -492,7 +492,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -501,9 +501,9 @@

    The “network-time-changed” signal

    void
     user_function (MmGdbusModemTime *object,
    -               gchar            *arg_time,
    +               char             *arg_time,
                    gpointer          user_data)
    -

    On the client-side, this signal is emitted whenever the D-Bus signal "NetworkTimeChanged" is received.

    +

    On the client-side, this signal is emitted whenever the D-Bus signal "NetworkTimeChanged" is received.

    On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.

    Parameters

    @@ -537,6 +537,6 @@
    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemTimeProxy.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemTimeProxy.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemTimeProxy.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemTimeProxy.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -222,7 +222,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemTimeProxy]

    +

    [transfer full][type MmGdbusModemTimeProxy]


    @@ -324,7 +324,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemTimeProxy]

    +

    [transfer full][type MmGdbusModemTimeProxy]


    @@ -387,7 +387,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemTimeProxy]

    +

    [transfer full][type MmGdbusModemTimeProxy]


    @@ -450,7 +450,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemTimeProxy]

    +

    [transfer full][type MmGdbusModemTimeProxy]

    @@ -464,6 +464,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemTimeSkeleton.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemTimeSkeleton.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemTimeSkeleton.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemTimeSkeleton.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -89,7 +89,7 @@

    Returns

    The skeleton object.

    -

    [transfer full][type MmGdbusModemTimeSkeleton]

    +

    [transfer full][type MmGdbusModemTimeSkeleton]

    @@ -103,6 +103,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemVoice.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemVoice.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemVoice.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemVoice.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -422,7 +422,7 @@

    mm_gdbus_modem_voice_get_calls ()

    const gchar *const *
     mm_gdbus_modem_voice_get_calls (MmGdbusModemVoice *object);
    -

    Gets the value of the "Calls" D-Bus property.

    +

    Gets the value of the "Calls" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_modem_voice_dup_calls() if on another thread.

    @@ -446,7 +446,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -454,7 +454,7 @@

    mm_gdbus_modem_voice_dup_calls ()

    gchar **
     mm_gdbus_modem_voice_dup_calls (MmGdbusModemVoice *object);
    -

    Gets a copy of the "Calls" D-Bus property.

    +

    Gets a copy of the "Calls" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -475,7 +475,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_strfreev().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -484,7 +484,7 @@
    gboolean
     mm_gdbus_modem_voice_get_emergency_only
                                    (MmGdbusModemVoice *object);
    -

    Gets the value of the "EmergencyOnly" D-Bus property.

    +

    Gets the value of the "EmergencyOnly" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -516,7 +516,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the CreateCall() D-Bus method on proxy +

    Asynchronously invokes the CreateCall() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -605,7 +605,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -620,7 +620,7 @@ gchar **out_path, GCancellable *cancellable, GError **error); -

    Synchronously invokes the CreateCall() D-Bus method on proxy +

    Synchronously invokes the CreateCall() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_voice_call_create_call() for the asynchronous version of this method.

    @@ -662,7 +662,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -676,7 +676,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the DeleteCall() D-Bus method on proxy +

    Asynchronously invokes the DeleteCall() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -759,7 +759,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -773,7 +773,7 @@ const gchar *arg_path, GCancellable *cancellable, GError **error); -

    Synchronously invokes the DeleteCall() D-Bus method on proxy +

    Synchronously invokes the DeleteCall() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_voice_call_delete_call() for the asynchronous version of this method.

    @@ -810,7 +810,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -823,7 +823,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the ListCalls() D-Bus method on proxy +

    Asynchronously invokes the ListCalls() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -907,7 +907,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -921,7 +921,7 @@ gchar ***out_result, GCancellable *cancellable, GError **error); -

    Synchronously invokes the ListCalls() D-Bus method on proxy +

    Synchronously invokes the ListCalls() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_voice_call_list_calls() for the asynchronous version of this method.

    @@ -958,7 +958,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -972,7 +972,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the HangupAndAccept() D-Bus method on proxy +

    Asynchronously invokes the HangupAndAccept() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1050,7 +1050,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1063,7 +1063,7 @@ (MmGdbusModemVoice *proxy, GCancellable *cancellable, GError **error); -

    Synchronously invokes the HangupAndAccept() D-Bus method on proxy +

    Synchronously invokes the HangupAndAccept() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_voice_call_hangup_and_accept() for the asynchronous version of this method.

    @@ -1095,7 +1095,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1109,7 +1109,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the HoldAndAccept() D-Bus method on proxy +

    Asynchronously invokes the HoldAndAccept() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1187,7 +1187,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1200,7 +1200,7 @@ (MmGdbusModemVoice *proxy, GCancellable *cancellable, GError **error); -

    Synchronously invokes the HoldAndAccept() D-Bus method on proxy +

    Synchronously invokes the HoldAndAccept() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_voice_call_hold_and_accept() for the asynchronous version of this method.

    @@ -1232,7 +1232,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1245,7 +1245,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the HangupAll() D-Bus method on proxy +

    Asynchronously invokes the HangupAll() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1323,7 +1323,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1336,7 +1336,7 @@ (MmGdbusModemVoice *proxy, GCancellable *cancellable, GError **error); -

    Synchronously invokes the HangupAll() D-Bus method on proxy +

    Synchronously invokes the HangupAll() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_voice_call_hangup_all() for the asynchronous version of this method.

    @@ -1368,7 +1368,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1381,7 +1381,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Transfer() D-Bus method on proxy +

    Asynchronously invokes the Transfer() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1459,7 +1459,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1472,7 +1472,7 @@ (MmGdbusModemVoice *proxy, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Transfer() D-Bus method on proxy +

    Synchronously invokes the Transfer() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_voice_call_transfer() for the asynchronous version of this method.

    @@ -1504,7 +1504,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1518,7 +1518,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the CallWaitingQuery() D-Bus method on proxy +

    Asynchronously invokes the CallWaitingQuery() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1602,7 +1602,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1616,7 +1616,7 @@ gboolean *out_status, GCancellable *cancellable, GError **error); -

    Synchronously invokes the CallWaitingQuery() D-Bus method on proxy +

    Synchronously invokes the CallWaitingQuery() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_voice_call_call_waiting_query() for the asynchronous version of this method.

    @@ -1653,7 +1653,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1668,7 +1668,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the CallWaitingSetup() D-Bus method on proxy +

    Asynchronously invokes the CallWaitingSetup() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1751,7 +1751,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1765,7 +1765,7 @@ gboolean arg_enable, GCancellable *cancellable, GError **error); -

    Synchronously invokes the CallWaitingSetup() D-Bus method on proxy +

    Synchronously invokes the CallWaitingSetup() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_modem_voice_call_call_waiting_setup() for the asynchronous version of this method.

    @@ -1802,7 +1802,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1963,7 +1963,7 @@

    The “calls” property

      “calls”                    GStrv
    -

    Represents the D-Bus property "Calls".

    +

    Represents the D-Bus property "Calls".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemVoice

    Flags: Read / Write

    @@ -1972,7 +1972,7 @@

    The “emergency-only” property

      “emergency-only”           gboolean
    -

    Represents the D-Bus property "EmergencyOnly".

    +

    Represents the D-Bus property "EmergencyOnly".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusModemVoice

    Flags: Read / Write

    @@ -1985,9 +1985,9 @@

    The “call-added” signal

    void
     user_function (MmGdbusModemVoice *object,
    -               gchar             *arg_path,
    +               char              *arg_path,
                    gpointer           user_data)
    -

    On the client-side, this signal is emitted whenever the D-Bus signal "CallAdded" is received.

    +

    On the client-side, this signal is emitted whenever the D-Bus signal "CallAdded" is received.

    On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.

    Parameters

    @@ -2023,9 +2023,9 @@

    The “call-deleted” signal

    void
     user_function (MmGdbusModemVoice *object,
    -               gchar             *arg_path,
    +               char              *arg_path,
                    gpointer           user_data)
    -

    On the client-side, this signal is emitted whenever the D-Bus signal "CallDeleted" is received.

    +

    On the client-side, this signal is emitted whenever the D-Bus signal "CallDeleted" is received.

    On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.

    Parameters

    @@ -2063,7 +2063,7 @@ user_function (MmGdbusModemVoice *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the CallWaitingQuery() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the CallWaitingQuery() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_voice_complete_call_waiting_query() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -2095,7 +2095,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -2107,7 +2107,7 @@ GDBusMethodInvocation *invocation, gboolean arg_enable, gpointer user_data) -

    Signal emitted when a remote caller is invoking the CallWaitingSetup() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the CallWaitingSetup() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_voice_complete_call_waiting_setup() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -2144,7 +2144,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -2156,7 +2156,7 @@ GDBusMethodInvocation *invocation, GVariant *arg_properties, gpointer user_data) -

    Signal emitted when a remote caller is invoking the CreateCall() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the CreateCall() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_voice_complete_create_call() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -2193,7 +2193,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -2203,9 +2203,9 @@
    gboolean
     user_function (MmGdbusModemVoice     *object,
                    GDBusMethodInvocation *invocation,
    -               gchar                 *arg_path,
    +               char                  *arg_path,
                    gpointer               user_data)
    -

    Signal emitted when a remote caller is invoking the DeleteCall() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the DeleteCall() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_voice_complete_delete_call() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -2242,7 +2242,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -2253,7 +2253,7 @@ user_function (MmGdbusModemVoice *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the HangupAll() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the HangupAll() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_voice_complete_hangup_all() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -2285,7 +2285,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -2296,7 +2296,7 @@ user_function (MmGdbusModemVoice *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the HangupAndAccept() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the HangupAndAccept() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_voice_complete_hangup_and_accept() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -2328,7 +2328,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -2339,7 +2339,7 @@ user_function (MmGdbusModemVoice *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the HoldAndAccept() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the HoldAndAccept() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_voice_complete_hold_and_accept() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -2371,7 +2371,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -2382,7 +2382,7 @@ user_function (MmGdbusModemVoice *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the ListCalls() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the ListCalls() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_voice_complete_list_calls() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -2414,7 +2414,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -2425,7 +2425,7 @@ user_function (MmGdbusModemVoice *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the Transfer() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Transfer() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_modem_voice_complete_transfer() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -2457,13 +2457,13 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemVoiceProxy.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemVoiceProxy.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemVoiceProxy.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemVoiceProxy.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -222,7 +222,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemVoiceProxy]

    +

    [transfer full][type MmGdbusModemVoiceProxy]


    @@ -325,7 +325,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemVoiceProxy]

    +

    [transfer full][type MmGdbusModemVoiceProxy]


    @@ -388,7 +388,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemVoiceProxy]

    +

    [transfer full][type MmGdbusModemVoiceProxy]


    @@ -451,7 +451,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusModemVoiceProxy]

    +

    [transfer full][type MmGdbusModemVoiceProxy]

    @@ -465,6 +465,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemVoiceSkeleton.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemVoiceSkeleton.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusModemVoiceSkeleton.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusModemVoiceSkeleton.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -89,7 +89,7 @@

    Returns

    The skeleton object.

    -

    [transfer full][type MmGdbusModemVoiceSkeleton]

    +

    [transfer full][type MmGdbusModemVoiceSkeleton]

    @@ -103,6 +103,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusObject.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusObject.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusObject.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusObject.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -393,7 +393,7 @@

    A MmGdbusModem or NULL if object does not implement the interface. Do not free the returned object, it is owned by object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -422,7 +422,7 @@

    Returns

    A MmGdbusModem that must be freed with g_object_unref() or NULL if object does not implement the interface.

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -454,7 +454,7 @@

    A MmGdbusModem3gpp or NULL if object does not implement the interface. Do not free the returned object, it is owned by object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -483,7 +483,7 @@

    Returns

    A MmGdbusModem3gpp that must be freed with g_object_unref() or NULL if object does not implement the interface.

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -515,7 +515,7 @@

    A MmGdbusModem3gppUssd or NULL if object does not implement the interface. Do not free the returned object, it is owned by object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -544,7 +544,7 @@

    Returns

    A MmGdbusModem3gppUssd that must be freed with g_object_unref() or NULL if object does not implement the interface.

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -576,7 +576,7 @@

    A MmGdbusModemCdma or NULL if object does not implement the interface. Do not free the returned object, it is owned by object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -605,7 +605,7 @@

    Returns

    A MmGdbusModemCdma that must be freed with g_object_unref() or NULL if object does not implement the interface.

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -637,7 +637,7 @@

    A MmGdbusModemLocation or NULL if object does not implement the interface. Do not free the returned object, it is owned by object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -666,7 +666,7 @@

    Returns

    A MmGdbusModemLocation that must be freed with g_object_unref() or NULL if object does not implement the interface.

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -698,7 +698,7 @@

    A MmGdbusModemMessaging or NULL if object does not implement the interface. Do not free the returned object, it is owned by object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -727,7 +727,7 @@

    Returns

    A MmGdbusModemMessaging that must be freed with g_object_unref() or NULL if object does not implement the interface.

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -759,7 +759,7 @@

    A MmGdbusModemTime or NULL if object does not implement the interface. Do not free the returned object, it is owned by object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -788,7 +788,7 @@

    Returns

    A MmGdbusModemTime that must be freed with g_object_unref() or NULL if object does not implement the interface.

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -820,7 +820,7 @@

    A MmGdbusModemFirmware or NULL if object does not implement the interface. Do not free the returned object, it is owned by object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -849,7 +849,7 @@

    Returns

    A MmGdbusModemFirmware that must be freed with g_object_unref() or NULL if object does not implement the interface.

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -881,7 +881,7 @@

    A MmGdbusModemOma or NULL if object does not implement the interface. Do not free the returned object, it is owned by object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -910,7 +910,7 @@

    Returns

    A MmGdbusModemOma that must be freed with g_object_unref() or NULL if object does not implement the interface.

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -942,7 +942,7 @@

    A MmGdbusModemSimple or NULL if object does not implement the interface. Do not free the returned object, it is owned by object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -971,7 +971,7 @@

    Returns

    A MmGdbusModemSimple that must be freed with g_object_unref() or NULL if object does not implement the interface.

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -1003,7 +1003,7 @@

    A MmGdbusModemSignal or NULL if object does not implement the interface. Do not free the returned object, it is owned by object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -1032,7 +1032,7 @@

    Returns

    A MmGdbusModemSignal that must be freed with g_object_unref() or NULL if object does not implement the interface.

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -1064,7 +1064,7 @@

    A MmGdbusModemVoice or NULL if object does not implement the interface. Do not free the returned object, it is owned by object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -1093,7 +1093,7 @@

    Returns

    A MmGdbusModemVoice that must be freed with g_object_unref() or NULL if object does not implement the interface.

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]

    @@ -1241,6 +1241,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusObjectManagerClient.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusObjectManagerClient.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusObjectManagerClient.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusObjectManagerClient.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -232,7 +232,7 @@

    Returns

    The constructed object manager client or NULL if error is set.

    -

    [transfer full][type MmGdbusObjectManagerClient]

    +

    [transfer full][type MmGdbusObjectManagerClient]


    @@ -296,7 +296,7 @@

    Returns

    The constructed object manager client or NULL if error is set.

    -

    [transfer full][type MmGdbusObjectManagerClient]

    +

    [transfer full][type MmGdbusObjectManagerClient]


    @@ -399,7 +399,7 @@

    Returns

    The constructed object manager client or NULL if error is set.

    -

    [transfer full][type MmGdbusObjectManagerClient]

    +

    [transfer full][type MmGdbusObjectManagerClient]


    @@ -462,7 +462,7 @@

    Returns

    The constructed object manager client or NULL if error is set.

    -

    [transfer full][type MmGdbusObjectManagerClient]

    +

    [transfer full][type MmGdbusObjectManagerClient]


    @@ -525,6 +525,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusObjectProxy.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusObjectProxy.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusObjectProxy.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusObjectProxy.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -113,7 +113,7 @@

    Returns

    The proxy object.

    -

    [transfer full]

    +

    [transfer full]

    @@ -127,6 +127,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusObjectSkeleton.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusObjectSkeleton.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusObjectSkeleton.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusObjectSkeleton.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -202,7 +202,7 @@

    Returns

    The skeleton object.

    -

    [transfer full]

    +

    [transfer full]


    @@ -599,6 +599,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusOrgFreedesktopModemManager1.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusOrgFreedesktopModemManager1.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusOrgFreedesktopModemManager1.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusOrgFreedesktopModemManager1.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -168,7 +168,7 @@ -gchar * +char * version Read / Write @@ -254,7 +254,7 @@
    gchar *
     mm_gdbus_org_freedesktop_modem_manager1_dup_version
                                    (MmGdbusOrgFreedesktopModemManager1 *object);
    -

    Gets a copy of the "Version" D-Bus property.

    +

    Gets a copy of the "Version" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -275,7 +275,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -284,7 +284,7 @@
    const gchar *
     mm_gdbus_org_freedesktop_modem_manager1_get_version
                                    (MmGdbusOrgFreedesktopModemManager1 *object);
    -

    Gets the value of the "Version" D-Bus property.

    +

    Gets the value of the "Version" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_org_freedesktop_modem_manager1_dup_version() if on another thread.

    @@ -308,7 +308,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -320,7 +320,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the ScanDevices() D-Bus method on proxy +

    Asynchronously invokes the ScanDevices() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -398,7 +398,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -411,7 +411,7 @@ (MmGdbusOrgFreedesktopModemManager1 *proxy, GCancellable *cancellable, GError **error); -

    Synchronously invokes the ScanDevices() D-Bus method on proxy +

    Synchronously invokes the ScanDevices() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_org_freedesktop_modem_manager1_call_scan_devices() for the asynchronous version of this method.

    @@ -443,7 +443,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -459,7 +459,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the InhibitDevice() D-Bus method on proxy +

    Asynchronously invokes the InhibitDevice() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -547,7 +547,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -562,7 +562,7 @@ gboolean arg_inhibit, GCancellable *cancellable, GError **error); -

    Synchronously invokes the InhibitDevice() D-Bus method on proxy +

    Synchronously invokes the InhibitDevice() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_org_freedesktop_modem_manager1_call_inhibit_device() for the asynchronous version of this method.

    @@ -604,7 +604,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -619,7 +619,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the SetLogging() D-Bus method on proxy +

    Asynchronously invokes the SetLogging() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -702,7 +702,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -716,7 +716,7 @@ const gchar *arg_level, GCancellable *cancellable, GError **error); -

    Synchronously invokes the SetLogging() D-Bus method on proxy +

    Synchronously invokes the SetLogging() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_org_freedesktop_modem_manager1_call_set_logging() for the asynchronous version of this method.

    @@ -753,7 +753,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -768,7 +768,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the ReportKernelEvent() D-Bus method on proxy +

    Asynchronously invokes the ReportKernelEvent() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -851,7 +851,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -865,7 +865,7 @@ GVariant *arg_properties, GCancellable *cancellable, GError **error); -

    Synchronously invokes the ReportKernelEvent() D-Bus method on proxy +

    Synchronously invokes the ReportKernelEvent() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_org_freedesktop_modem_manager1_call_report_kernel_event() for the asynchronous version of this method.

    @@ -902,7 +902,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -993,8 +993,8 @@

    Property Details

    The “version” property

    -
      “version”                  gchar *
    -

    Represents the D-Bus property "Version".

    +
      “version”                  char *
    +

    Represents the D-Bus property "Version".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusOrgFreedesktopModemManager1

    Flags: Read / Write

    @@ -1008,10 +1008,10 @@
    gboolean
     user_function (MmGdbusOrgFreedesktopModemManager1 *object,
                    GDBusMethodInvocation              *invocation,
    -               gchar                              *arg_uid,
    +               char                               *arg_uid,
                    gboolean                            arg_inhibit,
                    gpointer                            user_data)
    -

    Signal emitted when a remote caller is invoking the InhibitDevice() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the InhibitDevice() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_org_freedesktop_modem_manager1_complete_inhibit_device() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1053,7 +1053,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1065,7 +1065,7 @@ GDBusMethodInvocation *invocation, GVariant *arg_properties, gpointer user_data) -

    Signal emitted when a remote caller is invoking the ReportKernelEvent() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the ReportKernelEvent() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_org_freedesktop_modem_manager1_complete_report_kernel_event() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1102,7 +1102,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1113,7 +1113,7 @@ user_function (MmGdbusOrgFreedesktopModemManager1 *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the ScanDevices() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the ScanDevices() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_org_freedesktop_modem_manager1_complete_scan_devices() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1145,7 +1145,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1155,9 +1155,9 @@
    gboolean
     user_function (MmGdbusOrgFreedesktopModemManager1 *object,
                    GDBusMethodInvocation              *invocation,
    -               gchar                              *arg_level,
    +               char                               *arg_level,
                    gpointer                            user_data)
    -

    Signal emitted when a remote caller is invoking the SetLogging() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the SetLogging() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_org_freedesktop_modem_manager1_complete_set_logging() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1194,13 +1194,13 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusOrgFreedesktopModemManager1Proxy.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusOrgFreedesktopModemManager1Proxy.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusOrgFreedesktopModemManager1Proxy.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusOrgFreedesktopModemManager1Proxy.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -223,7 +223,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusOrgFreedesktopModemManager1Proxy]

    +

    [transfer full][type MmGdbusOrgFreedesktopModemManager1Proxy]


    @@ -326,7 +326,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusOrgFreedesktopModemManager1Proxy]

    +

    [transfer full][type MmGdbusOrgFreedesktopModemManager1Proxy]


    @@ -389,7 +389,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusOrgFreedesktopModemManager1Proxy]

    +

    [transfer full][type MmGdbusOrgFreedesktopModemManager1Proxy]


    @@ -453,7 +453,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusOrgFreedesktopModemManager1Proxy]

    +

    [transfer full][type MmGdbusOrgFreedesktopModemManager1Proxy]

    @@ -467,6 +467,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusOrgFreedesktopModemManager1Skeleton.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusOrgFreedesktopModemManager1Skeleton.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusOrgFreedesktopModemManager1Skeleton.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusOrgFreedesktopModemManager1Skeleton.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -90,7 +90,7 @@

    Returns

    The skeleton object.

    -

    [transfer full][type MmGdbusOrgFreedesktopModemManager1Skeleton]

    +

    [transfer full][type MmGdbusOrgFreedesktopModemManager1Skeleton]

    @@ -104,6 +104,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusSim.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusSim.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusSim.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusSim.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -45,6 +45,14 @@ + +gboolean + + +mm_gdbus_sim_get_active () + + + const gchar * @@ -63,6 +71,21 @@ const gchar * +mm_gdbus_sim_get_eid () + + + + +gchar * + + +mm_gdbus_sim_dup_eid () + + + +const gchar * + + mm_gdbus_sim_get_sim_identifier () @@ -228,31 +251,42 @@ +gboolean +active +Read / Write + + + +char * +eid +Read / Write + + GStrv emergency-numbers Read / Write -gchar * +char * imsi Read / Write -gchar * +char * operator-identifier Read / Write -gchar * +char * operator-name Read / Write -gchar * +char * sim-identifier Read / Write @@ -335,10 +369,38 @@

    Functions

    +

    mm_gdbus_sim_get_active ()

    +
    gboolean
    +mm_gdbus_sim_get_active (MmGdbusSim *object);
    +

    Gets the value of the "Active" D-Bus property.

    +

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    +

    [skip]

    +
    +

    Parameters

    +
    +++++ + + + + + +

    object

    A MmGdbusSim.

     
    +
    +
    +

    Returns

    +

    The property value.

    +
    +
    +
    +

    mm_gdbus_sim_get_imsi ()

    const gchar *
     mm_gdbus_sim_get_imsi (MmGdbusSim *object);
    -

    Gets the value of the "Imsi" D-Bus property.

    +

    Gets the value of the "Imsi" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_sim_dup_imsi() if on another thread.

    @@ -362,7 +424,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -370,7 +432,7 @@

    mm_gdbus_sim_dup_imsi ()

    gchar *
     mm_gdbus_sim_dup_imsi (MmGdbusSim *object);
    -

    Gets a copy of the "Imsi" D-Bus property.

    +

    Gets a copy of the "Imsi" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -391,7 +453,68 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]

    +
    +
    +
    +
    +

    mm_gdbus_sim_get_eid ()

    +
    const gchar *
    +mm_gdbus_sim_get_eid (MmGdbusSim *object);
    +

    Gets the value of the "Eid" D-Bus property.

    +

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    +

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object + was constructed. Use mm_gdbus_sim_dup_eid() if on another thread.

    +

    [skip]

    +
    +

    Parameters

    +
    +++++ + + + + + +

    object

    A MmGdbusSim.

     
    +
    +
    +

    Returns

    +

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object +.

    +

    [transfer none][nullable]

    +
    +
    +
    +
    +

    mm_gdbus_sim_dup_eid ()

    +
    gchar *
    +mm_gdbus_sim_dup_eid (MmGdbusSim *object);
    +

    Gets a copy of the "Eid" D-Bus property.

    +

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    +

    [skip]

    +
    +

    Parameters

    +
    +++++ + + + + + +

    object

    A MmGdbusSim.

     
    +
    +
    +

    Returns

    +

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    +

    [transfer full][nullable]


    @@ -399,7 +522,7 @@

    mm_gdbus_sim_get_sim_identifier ()

    const gchar *
     mm_gdbus_sim_get_sim_identifier (MmGdbusSim *object);
    -

    Gets the value of the "SimIdentifier" D-Bus property.

    +

    Gets the value of the "SimIdentifier" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_sim_dup_sim_identifier() if on another thread.

    @@ -423,7 +546,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -431,7 +554,7 @@

    mm_gdbus_sim_dup_sim_identifier ()

    gchar *
     mm_gdbus_sim_dup_sim_identifier (MmGdbusSim *object);
    -

    Gets a copy of the "SimIdentifier" D-Bus property.

    +

    Gets a copy of the "SimIdentifier" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -452,7 +575,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -460,7 +583,7 @@

    mm_gdbus_sim_get_operator_identifier ()

    const gchar *
     mm_gdbus_sim_get_operator_identifier (MmGdbusSim *object);
    -

    Gets the value of the "OperatorIdentifier" D-Bus property.

    +

    Gets the value of the "OperatorIdentifier" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_sim_dup_operator_identifier() if on another thread.

    @@ -484,7 +607,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -492,7 +615,7 @@

    mm_gdbus_sim_dup_operator_identifier ()

    gchar *
     mm_gdbus_sim_dup_operator_identifier (MmGdbusSim *object);
    -

    Gets a copy of the "OperatorIdentifier" D-Bus property.

    +

    Gets a copy of the "OperatorIdentifier" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -513,7 +636,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -521,7 +644,7 @@

    mm_gdbus_sim_get_operator_name ()

    const gchar *
     mm_gdbus_sim_get_operator_name (MmGdbusSim *object);
    -

    Gets the value of the "OperatorName" D-Bus property.

    +

    Gets the value of the "OperatorName" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_sim_dup_operator_name() if on another thread.

    @@ -545,7 +668,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -553,7 +676,7 @@

    mm_gdbus_sim_dup_operator_name ()

    gchar *
     mm_gdbus_sim_dup_operator_name (MmGdbusSim *object);
    -

    Gets a copy of the "OperatorName" D-Bus property.

    +

    Gets a copy of the "OperatorName" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -574,7 +697,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -582,7 +705,7 @@

    mm_gdbus_sim_get_emergency_numbers ()

    const gchar *const *
     mm_gdbus_sim_get_emergency_numbers (MmGdbusSim *object);
    -

    Gets the value of the "EmergencyNumbers" D-Bus property.

    +

    Gets the value of the "EmergencyNumbers" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_sim_dup_emergency_numbers() if on another thread.

    @@ -606,7 +729,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -614,7 +737,7 @@

    mm_gdbus_sim_dup_emergency_numbers ()

    gchar **
     mm_gdbus_sim_dup_emergency_numbers (MmGdbusSim *object);
    -

    Gets a copy of the "EmergencyNumbers" D-Bus property.

    +

    Gets a copy of the "EmergencyNumbers" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -635,7 +758,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_strfreev().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -647,7 +770,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the SendPin() D-Bus method on proxy +

    Asynchronously invokes the SendPin() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -729,7 +852,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -742,7 +865,7 @@ const gchar *arg_pin, GCancellable *cancellable, GError **error); -

    Synchronously invokes the SendPin() D-Bus method on proxy +

    Synchronously invokes the SendPin() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_sim_call_send_pin() for the asynchronous version of this method.

    @@ -779,7 +902,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -794,7 +917,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the SendPuk() D-Bus method on proxy +

    Asynchronously invokes the SendPuk() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -881,7 +1004,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -895,7 +1018,7 @@ const gchar *arg_pin, GCancellable *cancellable, GError **error); -

    Synchronously invokes the SendPuk() D-Bus method on proxy +

    Synchronously invokes the SendPuk() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_sim_call_send_puk() for the asynchronous version of this method.

    @@ -937,7 +1060,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -952,7 +1075,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the EnablePin() D-Bus method on proxy +

    Asynchronously invokes the EnablePin() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1039,7 +1162,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1053,7 +1176,7 @@ gboolean arg_enabled, GCancellable *cancellable, GError **error); -

    Synchronously invokes the EnablePin() D-Bus method on proxy +

    Synchronously invokes the EnablePin() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_sim_call_enable_pin() for the asynchronous version of this method.

    @@ -1095,7 +1218,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1110,7 +1233,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the ChangePin() D-Bus method on proxy +

    Asynchronously invokes the ChangePin() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1197,7 +1320,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1211,7 +1334,7 @@ const gchar *arg_new_pin, GCancellable *cancellable, GError **error); -

    Synchronously invokes the ChangePin() D-Bus method on proxy +

    Synchronously invokes the ChangePin() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_sim_call_change_pin() for the asynchronous version of this method.

    @@ -1253,7 +1376,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1295,6 +1418,10 @@ const gchar *arg_puk, const gchar *arg_pin); + gboolean (*get_active) (MmGdbusSim *object); + + const gchar * (*get_eid) (MmGdbusSim *object); + const gchar *const * (*get_emergency_numbers) (MmGdbusSim *object); const gchar * (*get_imsi) (MmGdbusSim *object); @@ -1342,6 +1469,16 @@   +

    get_active ()

    +

    Getter for the “active” property.

    +  + + +

    get_eid ()

    +

    Getter for the “eid” property.

    +  + +

    get_emergency_numbers ()

    Getter for the “emergency-numbers” property.

      @@ -1374,9 +1511,29 @@

    Property Details

    +

    The “active” property

    +
      “active”                   gboolean
    +

    Represents the D-Bus property "Active".

    +

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    +

    Owner: MmGdbusSim

    +

    Flags: Read / Write

    +

    Default value: FALSE

    +
    +
    +
    +

    The “eid” property

    +
      “eid”                      char *
    +

    Represents the D-Bus property "Eid".

    +

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    +

    Owner: MmGdbusSim

    +

    Flags: Read / Write

    +

    Default value: NULL

    +
    +
    +

    The “emergency-numbers” property

      “emergency-numbers”        GStrv
    -

    Represents the D-Bus property "EmergencyNumbers".

    +

    Represents the D-Bus property "EmergencyNumbers".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSim

    Flags: Read / Write

    @@ -1384,8 +1541,8 @@

    The “imsi” property

    -
      “imsi”                     gchar *
    -

    Represents the D-Bus property "Imsi".

    +
      “imsi”                     char *
    +

    Represents the D-Bus property "Imsi".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSim

    Flags: Read / Write

    @@ -1394,8 +1551,8 @@

    The “operator-identifier” property

    -
      “operator-identifier”      gchar *
    -

    Represents the D-Bus property "OperatorIdentifier".

    +
      “operator-identifier”      char *
    +

    Represents the D-Bus property "OperatorIdentifier".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSim

    Flags: Read / Write

    @@ -1404,8 +1561,8 @@

    The “operator-name” property

    -
      “operator-name”            gchar *
    -

    Represents the D-Bus property "OperatorName".

    +
      “operator-name”            char *
    +

    Represents the D-Bus property "OperatorName".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSim

    Flags: Read / Write

    @@ -1414,8 +1571,8 @@

    The “sim-identifier” property

    -
      “sim-identifier”           gchar *
    -

    Represents the D-Bus property "SimIdentifier".

    +
      “sim-identifier”           char *
    +

    Represents the D-Bus property "SimIdentifier".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSim

    Flags: Read / Write

    @@ -1429,10 +1586,10 @@
    gboolean
     user_function (MmGdbusSim            *object,
                    GDBusMethodInvocation *invocation,
    -               gchar                 *arg_old_pin,
    -               gchar                 *arg_new_pin,
    +               char                  *arg_old_pin,
    +               char                  *arg_new_pin,
                    gpointer               user_data)
    -

    Signal emitted when a remote caller is invoking the ChangePin() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the ChangePin() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_sim_complete_change_pin() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1474,7 +1631,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1484,10 +1641,10 @@
    gboolean
     user_function (MmGdbusSim            *object,
                    GDBusMethodInvocation *invocation,
    -               gchar                 *arg_pin,
    +               char                  *arg_pin,
                    gboolean               arg_enabled,
                    gpointer               user_data)
    -

    Signal emitted when a remote caller is invoking the EnablePin() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the EnablePin() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_sim_complete_enable_pin() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1529,7 +1686,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1539,9 +1696,9 @@
    gboolean
     user_function (MmGdbusSim            *object,
                    GDBusMethodInvocation *invocation,
    -               gchar                 *arg_pin,
    +               char                  *arg_pin,
                    gpointer               user_data)
    -

    Signal emitted when a remote caller is invoking the SendPin() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the SendPin() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_sim_complete_send_pin() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1578,7 +1735,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1588,10 +1745,10 @@
    gboolean
     user_function (MmGdbusSim            *object,
                    GDBusMethodInvocation *invocation,
    -               gchar                 *arg_puk,
    -               gchar                 *arg_pin,
    +               char                  *arg_puk,
    +               char                  *arg_pin,
                    gpointer               user_data)
    -

    Signal emitted when a remote caller is invoking the SendPuk() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the SendPuk() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_sim_complete_send_puk() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1633,13 +1790,13 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusSimProxy.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusSimProxy.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusSimProxy.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusSimProxy.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -222,7 +222,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusSimProxy]

    +

    [transfer full][type MmGdbusSimProxy]


    @@ -323,7 +323,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusSimProxy]

    +

    [transfer full][type MmGdbusSimProxy]


    @@ -385,7 +385,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusSimProxy]

    +

    [transfer full][type MmGdbusSimProxy]


    @@ -448,7 +448,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusSimProxy]

    +

    [transfer full][type MmGdbusSimProxy]

    @@ -462,6 +462,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusSimSkeleton.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusSimSkeleton.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusSimSkeleton.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusSimSkeleton.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -89,7 +89,7 @@

    Returns

    The skeleton object.

    -

    [transfer full][type MmGdbusSimSkeleton]

    +

    [transfer full][type MmGdbusSimSkeleton]

    @@ -103,6 +103,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusSms.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusSms.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusSms.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusSms.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -284,7 +284,7 @@ -gint +int class Read / Write @@ -306,7 +306,7 @@ -gchar * +char * discharge-timestamp Read / Write @@ -317,7 +317,7 @@ -gchar * +char * number Read / Write @@ -333,7 +333,7 @@ -gchar * +char * smsc Read / Write @@ -354,13 +354,13 @@ -gchar * +char * text Read / Write -gchar * +char * timestamp Read / Write @@ -442,7 +442,7 @@

    mm_gdbus_sms_get_state ()

    guint
     mm_gdbus_sms_get_state (MmGdbusSms *object);
    -

    Gets the value of the "State" D-Bus property.

    +

    Gets the value of the "State" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -470,7 +470,7 @@

    mm_gdbus_sms_get_pdu_type ()

    guint
     mm_gdbus_sms_get_pdu_type (MmGdbusSms *object);
    -

    Gets the value of the "PduType" D-Bus property.

    +

    Gets the value of the "PduType" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -498,7 +498,7 @@

    mm_gdbus_sms_get_message_reference ()

    guint
     mm_gdbus_sms_get_message_reference (MmGdbusSms *object);
    -

    Gets the value of the "MessageReference" D-Bus property.

    +

    Gets the value of the "MessageReference" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -526,7 +526,7 @@

    mm_gdbus_sms_get_storage ()

    guint
     mm_gdbus_sms_get_storage (MmGdbusSms *object);
    -

    Gets the value of the "Storage" D-Bus property.

    +

    Gets the value of the "Storage" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -554,7 +554,7 @@

    mm_gdbus_sms_get_text ()

    const gchar *
     mm_gdbus_sms_get_text (MmGdbusSms *object);
    -

    Gets the value of the "Text" D-Bus property.

    +

    Gets the value of the "Text" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_sms_dup_text() if on another thread.

    @@ -578,7 +578,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -586,7 +586,7 @@

    mm_gdbus_sms_dup_text ()

    gchar *
     mm_gdbus_sms_dup_text (MmGdbusSms *object);
    -

    Gets a copy of the "Text" D-Bus property.

    +

    Gets a copy of the "Text" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -607,7 +607,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -615,7 +615,7 @@

    mm_gdbus_sms_get_data ()

    GVariant *
     mm_gdbus_sms_get_data (MmGdbusSms *object);
    -

    Gets the value of the "Data" D-Bus property.

    +

    Gets the value of the "Data" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_sms_dup_data() if on another thread.

    @@ -639,7 +639,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -647,7 +647,7 @@

    mm_gdbus_sms_dup_data ()

    GVariant *
     mm_gdbus_sms_dup_data (MmGdbusSms *object);
    -

    Gets a copy of the "Data" D-Bus property.

    +

    Gets a copy of the "Data" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -668,7 +668,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -676,7 +676,7 @@

    mm_gdbus_sms_get_number ()

    const gchar *
     mm_gdbus_sms_get_number (MmGdbusSms *object);
    -

    Gets the value of the "Number" D-Bus property.

    +

    Gets the value of the "Number" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_sms_dup_number() if on another thread.

    @@ -700,7 +700,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -708,7 +708,7 @@

    mm_gdbus_sms_dup_number ()

    gchar *
     mm_gdbus_sms_dup_number (MmGdbusSms *object);
    -

    Gets a copy of the "Number" D-Bus property.

    +

    Gets a copy of the "Number" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -729,7 +729,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -737,7 +737,7 @@

    mm_gdbus_sms_get_smsc ()

    const gchar *
     mm_gdbus_sms_get_smsc (MmGdbusSms *object);
    -

    Gets the value of the "SMSC" D-Bus property.

    +

    Gets the value of the "SMSC" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_sms_dup_smsc() if on another thread.

    @@ -761,7 +761,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -769,7 +769,7 @@

    mm_gdbus_sms_dup_smsc ()

    gchar *
     mm_gdbus_sms_dup_smsc (MmGdbusSms *object);
    -

    Gets a copy of the "SMSC" D-Bus property.

    +

    Gets a copy of the "SMSC" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -790,7 +790,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -798,7 +798,7 @@

    mm_gdbus_sms_get_validity ()

    GVariant *
     mm_gdbus_sms_get_validity (MmGdbusSms *object);
    -

    Gets the value of the "Validity" D-Bus property.

    +

    Gets the value of the "Validity" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_sms_dup_validity() if on another thread.

    @@ -822,7 +822,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -830,7 +830,7 @@

    mm_gdbus_sms_dup_validity ()

    GVariant *
     mm_gdbus_sms_dup_validity (MmGdbusSms *object);
    -

    Gets a copy of the "Validity" D-Bus property.

    +

    Gets a copy of the "Validity" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -851,7 +851,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_variant_unref().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -859,7 +859,7 @@

    mm_gdbus_sms_get_class ()

    gint
     mm_gdbus_sms_get_class (MmGdbusSms *object);
    -

    Gets the value of the "Class" D-Bus property.

    +

    Gets the value of the "Class" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -887,7 +887,7 @@

    mm_gdbus_sms_get_teleservice_id ()

    guint
     mm_gdbus_sms_get_teleservice_id (MmGdbusSms *object);
    -

    Gets the value of the "TeleserviceId" D-Bus property.

    +

    Gets the value of the "TeleserviceId" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -915,7 +915,7 @@

    mm_gdbus_sms_get_service_category ()

    guint
     mm_gdbus_sms_get_service_category (MmGdbusSms *object);
    -

    Gets the value of the "ServiceCategory" D-Bus property.

    +

    Gets the value of the "ServiceCategory" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -943,7 +943,7 @@

    mm_gdbus_sms_get_timestamp ()

    const gchar *
     mm_gdbus_sms_get_timestamp (MmGdbusSms *object);
    -

    Gets the value of the "Timestamp" D-Bus property.

    +

    Gets the value of the "Timestamp" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_sms_dup_timestamp() if on another thread.

    @@ -967,7 +967,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -975,7 +975,7 @@

    mm_gdbus_sms_dup_timestamp ()

    gchar *
     mm_gdbus_sms_dup_timestamp (MmGdbusSms *object);
    -

    Gets a copy of the "Timestamp" D-Bus property.

    +

    Gets a copy of the "Timestamp" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -996,7 +996,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -1004,7 +1004,7 @@

    mm_gdbus_sms_get_discharge_timestamp ()

    const gchar *
     mm_gdbus_sms_get_discharge_timestamp (MmGdbusSms *object);
    -

    Gets the value of the "DischargeTimestamp" D-Bus property.

    +

    Gets the value of the "DischargeTimestamp" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where object was constructed. Use mm_gdbus_sms_dup_discharge_timestamp() if on another thread.

    @@ -1028,7 +1028,7 @@

    Returns

    The property value or NULL if the property is not set. Do not free the returned value, it belongs to object .

    -

    [transfer none][nullable]

    +

    [transfer none][nullable]


    @@ -1036,7 +1036,7 @@

    mm_gdbus_sms_dup_discharge_timestamp ()

    gchar *
     mm_gdbus_sms_dup_discharge_timestamp (MmGdbusSms *object);
    -

    Gets a copy of the "DischargeTimestamp" D-Bus property.

    +

    Gets a copy of the "DischargeTimestamp" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1057,7 +1057,7 @@

    Returns

    The property value or NULL if the property is not set. The returned value should be freed with g_free().

    -

    [transfer full][nullable]

    +

    [transfer full][nullable]


    @@ -1066,7 +1066,7 @@
    gboolean
     mm_gdbus_sms_get_delivery_report_request
                                    (MmGdbusSms *object);
    -

    Gets the value of the "DeliveryReportRequest" D-Bus property.

    +

    Gets the value of the "DeliveryReportRequest" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1094,7 +1094,7 @@

    mm_gdbus_sms_get_delivery_state ()

    guint
     mm_gdbus_sms_get_delivery_state (MmGdbusSms *object);
    -

    Gets the value of the "DeliveryState" D-Bus property.

    +

    Gets the value of the "DeliveryState" D-Bus property.

    Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

    [skip]

    @@ -1125,7 +1125,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Send() D-Bus method on proxy +

    Asynchronously invokes the Send() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1202,7 +1202,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1214,7 +1214,7 @@ mm_gdbus_sms_call_send_sync (MmGdbusSms *proxy, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Send() D-Bus method on proxy +

    Synchronously invokes the Send() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_sms_call_send() for the asynchronous version of this method.

    @@ -1246,7 +1246,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1260,7 +1260,7 @@ GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); -

    Asynchronously invokes the Store() D-Bus method on proxy +

    Asynchronously invokes the Store() D-Bus method on proxy . When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see g_main_context_push_thread_default()). @@ -1342,7 +1342,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1355,7 +1355,7 @@ guint arg_storage, GCancellable *cancellable, GError **error); -

    Synchronously invokes the Store() D-Bus method on proxy +

    Synchronously invokes the Store() D-Bus method on proxy . The calling thread is blocked until a reply is received.

    See mm_gdbus_sms_call_store() for the asynchronous version of this method.

    @@ -1392,7 +1392,7 @@

    Returns

    -

    TRUE if the call succeded, FALSE if error +

    TRUE if the call succeeded, FALSE if error is set.

    [skip]

    @@ -1567,8 +1567,8 @@

    Property Details

    The “class” property

    -
      “class”                    gint
    -

    Represents the D-Bus property "Class".

    +
      “class”                    int
    +

    Represents the D-Bus property "Class".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSms

    Flags: Read / Write

    @@ -1578,7 +1578,7 @@

    The “data” property

      “data”                     GVariant *
    -

    Represents the D-Bus property "Data".

    +

    Represents the D-Bus property "Data".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSms

    Flags: Read / Write

    @@ -1589,7 +1589,7 @@

    The “delivery-report-request” property

      “delivery-report-request”  gboolean
    -

    Represents the D-Bus property "DeliveryReportRequest".

    +

    Represents the D-Bus property "DeliveryReportRequest".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSms

    Flags: Read / Write

    @@ -1599,7 +1599,7 @@

    The “delivery-state” property

      “delivery-state”           guint
    -

    Represents the D-Bus property "DeliveryState".

    +

    Represents the D-Bus property "DeliveryState".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSms

    Flags: Read / Write

    @@ -1608,8 +1608,8 @@

    The “discharge-timestamp” property

    -
      “discharge-timestamp”      gchar *
    -

    Represents the D-Bus property "DischargeTimestamp".

    +
      “discharge-timestamp”      char *
    +

    Represents the D-Bus property "DischargeTimestamp".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSms

    Flags: Read / Write

    @@ -1619,7 +1619,7 @@

    The “message-reference” property

      “message-reference”        guint
    -

    Represents the D-Bus property "MessageReference".

    +

    Represents the D-Bus property "MessageReference".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSms

    Flags: Read / Write

    @@ -1628,8 +1628,8 @@

    The “number” property

    -
      “number”                   gchar *
    -

    Represents the D-Bus property "Number".

    +
      “number”                   char *
    +

    Represents the D-Bus property "Number".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSms

    Flags: Read / Write

    @@ -1639,7 +1639,7 @@

    The “pdu-type” property

      “pdu-type”                 guint
    -

    Represents the D-Bus property "PduType".

    +

    Represents the D-Bus property "PduType".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSms

    Flags: Read / Write

    @@ -1649,7 +1649,7 @@

    The “service-category” property

      “service-category”         guint
    -

    Represents the D-Bus property "ServiceCategory".

    +

    Represents the D-Bus property "ServiceCategory".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSms

    Flags: Read / Write

    @@ -1658,8 +1658,8 @@

    The “smsc” property

    -
      “smsc”                     gchar *
    -

    Represents the D-Bus property "SMSC".

    +
      “smsc”                     char *
    +

    Represents the D-Bus property "SMSC".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSms

    Flags: Read / Write

    @@ -1669,7 +1669,7 @@

    The “state” property

      “state”                    guint
    -

    Represents the D-Bus property "State".

    +

    Represents the D-Bus property "State".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSms

    Flags: Read / Write

    @@ -1679,7 +1679,7 @@

    The “storage” property

      “storage”                  guint
    -

    Represents the D-Bus property "Storage".

    +

    Represents the D-Bus property "Storage".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSms

    Flags: Read / Write

    @@ -1689,7 +1689,7 @@

    The “teleservice-id” property

      “teleservice-id”           guint
    -

    Represents the D-Bus property "TeleserviceId".

    +

    Represents the D-Bus property "TeleserviceId".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSms

    Flags: Read / Write

    @@ -1698,8 +1698,8 @@

    The “text” property

    -
      “text”                     gchar *
    -

    Represents the D-Bus property "Text".

    +
      “text”                     char *
    +

    Represents the D-Bus property "Text".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSms

    Flags: Read / Write

    @@ -1708,8 +1708,8 @@

    The “timestamp” property

    -
      “timestamp”                gchar *
    -

    Represents the D-Bus property "Timestamp".

    +
      “timestamp”                char *
    +

    Represents the D-Bus property "Timestamp".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSms

    Flags: Read / Write

    @@ -1719,7 +1719,7 @@

    The “validity” property

      “validity”                 GVariant *
    -

    Represents the D-Bus property "Validity".

    +

    Represents the D-Bus property "Validity".

    Since the D-Bus property for this GObject property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

    Owner: MmGdbusSms

    Flags: Read / Write

    @@ -1735,7 +1735,7 @@ user_function (MmGdbusSms *object, GDBusMethodInvocation *invocation, gpointer user_data) -

    Signal emitted when a remote caller is invoking the Send() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Send() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_sms_complete_send() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1767,7 +1767,7 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    @@ -1779,7 +1779,7 @@ GDBusMethodInvocation *invocation, guint arg_storage, gpointer user_data) -

    Signal emitted when a remote caller is invoking the Store() D-Bus method.

    +

    Signal emitted when a remote caller is invoking the Store() D-Bus method.

    If a signal handler returns TRUE, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call mm_gdbus_sms_complete_store() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the G_DBUS_ERROR_UNKNOWN_METHOD error is returned.

    @@ -1816,13 +1816,13 @@

    Returns

    -

    TRUE if the invocation was handled, FALSE to let other signal handlers run.

    +

    G_DBUS_METHOD_INVOCATION_HANDLED or TRUE if the invocation was handled, G_DBUS_METHOD_INVOCATION_UNHANDLED or FALSE to let other signal handlers run.

    Flags: Run Last

    +
    Generated by GTK-Doc V1.33.1
    \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusSmsProxy.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusSmsProxy.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusSmsProxy.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusSmsProxy.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -222,7 +222,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusSmsProxy]

    +

    [transfer full][type MmGdbusSmsProxy]


    @@ -323,7 +323,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusSmsProxy]

    +

    [transfer full][type MmGdbusSmsProxy]


    @@ -385,7 +385,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusSmsProxy]

    +

    [transfer full][type MmGdbusSmsProxy]


    @@ -448,7 +448,7 @@

    Returns

    The constructed proxy object or NULL if error is set.

    -

    [transfer full][type MmGdbusSmsProxy]

    +

    [transfer full][type MmGdbusSmsProxy]

    @@ -462,6 +462,6 @@
    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusSmsSkeleton.html modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusSmsSkeleton.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/MmGdbusSmsSkeleton.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/MmGdbusSmsSkeleton.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -89,7 +89,7 @@

    Returns

    The skeleton object.

    -

    [transfer full][type MmGdbusSmsSkeleton]

    +

    [transfer full][type MmGdbusSmsSkeleton]

    @@ -103,6 +103,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/annotation-glossary.html modemmanager-1.16.6/docs/reference/libmm-glib/html/annotation-glossary.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/annotation-glossary.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/annotation-glossary.html 2021-06-06 21:45:12.000000000 +0800 @@ -6,8 +6,8 @@ - - + + @@ -27,7 +27,7 @@ T Home -Prev +Prev
    @@ -51,7 +51,7 @@
    optional

    NULL may be passed instead of a pointer to a location.

    out
    -

    Parameter for returning results. Default is transfer full.

    +

    Parameter for returning results. Default is transfer full.

    S

    scope call

    The callback is valid only during the call to the method.

    @@ -59,13 +59,13 @@

    Exposed in C code, not necessarily available in other languages.

    T

    transfer full
    -

    Free data after the code is done.

    +

    The caller owns the data, and is responsible for free it.

    transfer none
    -

    Don't free data after the code is done.

    +

    The data is owned by the callee, which is responsible of freeing it.

    type

    Override the parsed C type with given type.

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-1-0.html modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-1-0.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-1-0.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-1-0.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -1738,6 +1738,6 @@
    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-1-10.html modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-1-10.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-1-10.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-1-10.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -201,6 +201,6 @@
    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-1-12.html modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-1-12.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-1-12.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-1-12.html 2021-06-06 21:45:12.000000000 +0800 @@ -7,8 +7,8 @@ - - + + @@ -21,7 +21,7 @@ Home Prev -Next +Next

    @@ -171,6 +171,6 @@

    +
    Generated by GTK-Doc V1.33.1
    \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-1-14.html modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-1-14.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-1-14.html 1970-01-01 08:00:00.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-1-14.html 2021-06-06 21:45:12.000000000 +0800 @@ -0,0 +1,57 @@ + + + + +Index of new symbols in 1.14: libmm-glib Reference Manual + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-1-16.html modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-1-16.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-1-16.html 1970-01-01 08:00:00.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-1-16.html 2021-06-06 21:45:12.000000000 +0800 @@ -0,0 +1,97 @@ + + + + +Index of new symbols in 1.16: libmm-glib Reference Manual + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-1-2.html modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-1-2.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-1-2.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-1-2.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -326,6 +326,6 @@
    +
    Generated by GTK-Doc V1.33.1
    \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-1-4.html modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-1-4.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-1-4.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-1-4.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -29,6 +29,6 @@
    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-1-6.html modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-1-6.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-1-6.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-1-6.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -238,6 +238,6 @@
    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-1-8.html modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-1-8.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-1-8.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-1-8.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -100,6 +100,6 @@
    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-full.html modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-full.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/api-index-full.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/api-index-full.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -254,14 +254,34 @@
    +mm_bearer_stats_get_attempts, function in MMBearerStats +
    +
    +
    mm_bearer_stats_get_duration, function in MMBearerStats
    +mm_bearer_stats_get_failed_attempts, function in MMBearerStats +
    +
    +
    mm_bearer_stats_get_rx_bytes, function in MMBearerStats
    +mm_bearer_stats_get_total_duration, function in MMBearerStats +
    +
    +
    +mm_bearer_stats_get_total_rx_bytes, function in MMBearerStats +
    +
    +
    +mm_bearer_stats_get_total_tx_bytes, function in MMBearerStats +
    +
    +
    mm_bearer_stats_get_tx_bytes, function in MMBearerStats
    @@ -909,6 +929,10 @@
    +MmGdbusModem::handle-set-primary-sim-slot, object signal in MmGdbusModem +
    +
    +
    MmGdbusModem::state-changed, object signal in MmGdbusModem
    @@ -997,6 +1021,10 @@
    +MmGdbusModem:primary-sim-slot, object property in MmGdbusModem +
    +
    +
    MmGdbusModem:revision, object property in MmGdbusModem
    @@ -1009,6 +1037,10 @@
    +MmGdbusModem:sim-slots, object property in MmGdbusModem +
    +
    +
    MmGdbusModem:state, object property in MmGdbusModem
    @@ -1325,6 +1357,10 @@
    +MmGdbusModemSignal:nr5g, object property in MmGdbusModemSignal +
    +
    +
    MmGdbusModemSignal:rate, object property in MmGdbusModemSignal
    @@ -1597,6 +1633,14 @@
    +MmGdbusSim:active, object property in MmGdbusSim +
    +
    +
    +MmGdbusSim:eid, object property in MmGdbusSim +
    +
    +
    MmGdbusSim:emergency-numbers, object property in MmGdbusSim
    @@ -2333,6 +2377,18 @@
    +mm_gdbus_modem_call_set_primary_sim_slot, function in MmGdbusModem +
    +
    +
    +mm_gdbus_modem_call_set_primary_sim_slot_finish, function in MmGdbusModem +
    +
    +
    +mm_gdbus_modem_call_set_primary_sim_slot_sync, function in MmGdbusModem +
    +
    +
    mm_gdbus_modem_cdma_call_activate, function in MmGdbusModemCdma
    @@ -2497,6 +2553,10 @@
    +mm_gdbus_modem_dup_sim_slots, function in MmGdbusModem +
    +
    +
    mm_gdbus_modem_dup_supported_bands, function in MmGdbusModem
    @@ -2657,6 +2717,10 @@
    +mm_gdbus_modem_get_primary_sim_slot, function in MmGdbusModem +
    +
    +
    mm_gdbus_modem_get_revision, function in MmGdbusModem
    @@ -2669,6 +2733,10 @@
    +mm_gdbus_modem_get_sim_slots, function in MmGdbusModem +
    +
    +
    mm_gdbus_modem_get_state, function in MmGdbusModem
    @@ -3065,6 +3133,10 @@
    +mm_gdbus_modem_signal_dup_nr5g, function in MmGdbusModemSignal +
    +
    +
    mm_gdbus_modem_signal_dup_umts, function in MmGdbusModemSignal
    @@ -3085,6 +3157,10 @@
    +mm_gdbus_modem_signal_get_nr5g, function in MmGdbusModemSignal +
    +
    +
    mm_gdbus_modem_signal_get_rate, function in MmGdbusModemSignal
    @@ -3697,6 +3773,10 @@
    +mm_gdbus_sim_dup_eid, function in MmGdbusSim +
    +
    +
    mm_gdbus_sim_dup_emergency_numbers, function in MmGdbusSim
    @@ -3717,6 +3797,14 @@
    +mm_gdbus_sim_get_active, function in MmGdbusSim +
    +
    +
    +mm_gdbus_sim_get_eid, function in MmGdbusSim +
    +
    +
    mm_gdbus_sim_get_emergency_numbers, function in MmGdbusSim
    @@ -4007,6 +4095,10 @@
    +mm_location_gps_nmea_get_traces, function in MMLocationGpsNmea +
    +
    +
    mm_location_gps_raw_get_altitude, function in MMLocationGpsRaw
    @@ -4636,6 +4728,10 @@
    +mm_modem_dup_sim_slot_paths, function in MMModem +
    +
    +
    mm_modem_enable, function in MMModem
    @@ -4796,6 +4892,10 @@
    +mm_modem_get_primary_sim_slot, function in MMModem +
    +
    +
    mm_modem_get_revision, function in MMModem
    @@ -4816,6 +4916,10 @@
    +mm_modem_get_sim_slot_paths, function in MMModem +
    +
    +
    mm_modem_get_sim_sync, function in MMModem
    @@ -4864,6 +4968,18 @@
    +mm_modem_list_sim_slots, function in MMModem +
    +
    +
    +mm_modem_list_sim_slots_finish, function in MMModem +
    +
    +
    +mm_modem_list_sim_slots_sync, function in MMModem +
    +
    +
    mm_modem_location_assistance_data_type_build_string_from_mask, function in Flags and Enumerations
    @@ -5256,6 +5372,18 @@
    +mm_modem_set_primary_sim_slot, function in MMModem +
    +
    +
    +mm_modem_set_primary_sim_slot_finish, function in MMModem +
    +
    +
    +mm_modem_set_primary_sim_slot_sync, function in MMModem +
    +
    +
    mm_modem_signal_dup_path, function in MMModemSignal
    @@ -5276,6 +5404,10 @@
    +mm_modem_signal_get_nr5g, function in MMModemSignal +
    +
    +
    mm_modem_signal_get_path, function in MMModemSignal
    @@ -5304,6 +5436,10 @@
    +mm_modem_signal_peek_nr5g, function in MMModemSignal +
    +
    +
    mm_modem_signal_peek_umts, function in MMModemSignal
    @@ -5832,6 +5968,10 @@
    +mm_simple_connect_properties_get_rm_protocol, function in MMSimpleConnectProperties +
    +
    +
    mm_simple_connect_properties_get_user, function in MMSimpleConnectProperties
    @@ -5872,6 +6012,10 @@
    +mm_simple_connect_properties_set_rm_protocol, function in MMSimpleConnectProperties +
    +
    +
    mm_simple_connect_properties_set_user, function in MMSimpleConnectProperties
    @@ -5948,6 +6092,10 @@
    +mm_sim_dup_eid, function in MMSim +
    +
    +
    mm_sim_dup_emergency_numbers, function in MMSim
    @@ -5984,6 +6132,14 @@
    +mm_sim_get_active, function in MMSim +
    +
    +
    +mm_sim_get_eid, function in MMSim +
    +
    +
    mm_sim_get_emergency_numbers, function in MMSim
    @@ -6306,6 +6462,6 @@
    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/ch01.html modemmanager-1.16.6/docs/reference/libmm-glib/html/ch01.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/ch01.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/ch01.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/ch02.html modemmanager-1.16.6/docs/reference/libmm-glib/html/ch02.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/ch02.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/ch02.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -32,6 +32,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03.html modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -128,6 +128,6 @@ Generic interfaces +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03s02.html modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03s02.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03s02.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03s02.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -22,6 +22,6 @@

    Simple interface support

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03s03.html modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03s03.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03s03.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03s03.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -22,6 +22,6 @@

    Location support

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03s04.html modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03s04.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03s04.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03s04.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -22,6 +22,6 @@

    Messaging support

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03s05.html modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03s05.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03s05.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03s05.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -22,6 +22,6 @@

    Time support

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03s06.html modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03s06.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03s06.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03s06.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -22,6 +22,6 @@

    Firmware support

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03s07.html modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03s07.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03s07.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03s07.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -22,6 +22,6 @@

    Extended signal information

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03s08.html modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03s08.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03s08.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03s08.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -22,6 +22,6 @@

    OMA support

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03s09.html modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03s09.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03s09.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03s09.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -22,6 +22,6 @@

    Voice support

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03s10.html modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03s10.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/ch03s10.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/ch03s10.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -22,6 +22,6 @@

    PCO support

    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/ch04.html modemmanager-1.16.6/docs/reference/libmm-glib/html/ch04.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/ch04.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/ch04.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -38,6 +38,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/ch05.html modemmanager-1.16.6/docs/reference/libmm-glib/html/ch05.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/ch05.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/ch05.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -27,6 +27,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/ch06.html modemmanager-1.16.6/docs/reference/libmm-glib/html/ch06.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/ch06.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/ch06.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -32,6 +32,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/ch07.html modemmanager-1.16.6/docs/reference/libmm-glib/html/ch07.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/ch07.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/ch07.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -35,6 +35,6 @@ +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/deprecated-api-index.html modemmanager-1.16.6/docs/reference/libmm-glib/html/deprecated-api-index.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/deprecated-api-index.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/deprecated-api-index.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -17,6 +17,8 @@  |  C  |  + L +  |  M  |  P @@ -64,6 +66,11 @@ mm_call_properties_set_state_reason, function in MMCallProperties
    +

    L

    +
    +mm_location_gps_nmea_build_full, function in MMLocationGpsNmea +
    +

    M

    mm_modem_3gpp_get_subscription_state, function in MMModem3gpp @@ -89,6 +96,6 @@
    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/index.html modemmanager-1.16.6/docs/reference/libmm-glib/html/index.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/index.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/index.html 2021-06-06 21:45:12.000000000 +0800 @@ -6,7 +6,7 @@ - + @@ -26,10 +26,12 @@           

    - For libmm-glib version 1.12.8 + For libmm-glib version 1.16.6 + The latest version of this documentation can be found on-line at + https://www.freedesktop.org/software/ModemManager/doc/latest/libmm-glib/.

    -
    +
    +
    Generated by GTK-Doc V1.33.1 \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/libmm-glib-Flags-and-Enumerations.html modemmanager-1.16.6/docs/reference/libmm-glib/html/libmm-glib-Flags-and-Enumerations.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/libmm-glib-Flags-and-Enumerations.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/libmm-glib-Flags-and-Enumerations.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -353,8 +353,8 @@

    mm_bearer_type_get_string ()

    const gchar *
    -mm_bearer_type_get_string (MMBearerType val);
    -

    Gets the nickname string for the MMBearerType specified at val +mm_bearer_type_get_string (MMBearerType val); +

    Gets the nickname string for the MMBearerType specified at val .

    Parameters

    @@ -374,15 +374,15 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    mm_bearer_ip_method_get_string ()

    const gchar *
    -mm_bearer_ip_method_get_string (MMBearerIpMethod val);
    -

    Gets the nickname string for the MMBearerIpMethod specified at val +mm_bearer_ip_method_get_string (MMBearerIpMethod val); +

    Gets the nickname string for the MMBearerIpMethod specified at val .

    Parameters

    @@ -402,15 +402,15 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    mm_bearer_ip_family_get_string ()

    const gchar *
    -mm_bearer_ip_family_get_string (MMBearerIpFamily val);
    -

    Gets the nickname string for the MMBearerIpFamily specified at val +mm_bearer_ip_family_get_string (MMBearerIpFamily val); +

    Gets the nickname string for the MMBearerIpFamily specified at val .

    Parameters

    @@ -430,7 +430,7 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    @@ -438,9 +438,9 @@

    mm_bearer_allowed_auth_build_string_from_mask ()

    gchar *
     mm_bearer_allowed_auth_build_string_from_mask
    -                               (MMBearerAllowedAuth mask);
    + (MMBearerAllowedAuth mask);

    Builds a string containing a comma-separated list of nicknames for -each MMBearerAllowedAuth in mask +each MMBearerAllowedAuth in mask .

    Parameters

    @@ -460,7 +460,7 @@

    Returns

    a string with the list of nicknames, or NULL if none given. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]


    @@ -468,9 +468,9 @@

    mm_modem_capability_build_string_from_mask ()

    gchar *
     mm_modem_capability_build_string_from_mask
    -                               (MMModemCapability mask);
    + (MMModemCapability mask);

    Builds a string containing a comma-separated list of nicknames for -each MMModemCapability in mask +each MMModemCapability in mask .

    Parameters

    @@ -490,15 +490,15 @@

    Returns

    a string with the list of nicknames, or NULL if none given. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]


    mm_modem_state_get_string ()

    const gchar *
    -mm_modem_state_get_string (MMModemState val);
    -

    Gets the nickname string for the MMModemState specified at val +mm_modem_state_get_string (MMModemState val); +

    Gets the nickname string for the MMModemState specified at val .

    Parameters

    @@ -518,7 +518,7 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    @@ -526,8 +526,8 @@

    mm_modem_state_failed_reason_get_string ()

    const gchar *
     mm_modem_state_failed_reason_get_string
    -                               (MMModemStateFailedReason val);
    -

    Gets the nickname string for the MMModemStateFailedReason specified at val + (MMModemStateFailedReason val); +

    Gets the nickname string for the MMModemStateFailedReason specified at val .

    Parameters

    @@ -547,7 +547,7 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    @@ -555,8 +555,8 @@

    mm_modem_state_change_reason_get_string ()

    const gchar *
     mm_modem_state_change_reason_get_string
    -                               (MMModemStateChangeReason val);
    -

    Gets the nickname string for the MMModemStateChangeReason specified at val + (MMModemStateChangeReason val); +

    Gets the nickname string for the MMModemStateChangeReason specified at val .

    Parameters

    @@ -576,15 +576,15 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    mm_modem_power_state_get_string ()

    const gchar *
    -mm_modem_power_state_get_string (MMModemPowerState val);
    -

    Gets the nickname string for the MMModemPowerState specified at val +mm_modem_power_state_get_string (MMModemPowerState val); +

    Gets the nickname string for the MMModemPowerState specified at val .

    Parameters

    @@ -604,15 +604,15 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    mm_modem_lock_get_string ()

    const gchar *
    -mm_modem_lock_get_string (MMModemLock val);
    -

    Gets the nickname string for the MMModemLock specified at val +mm_modem_lock_get_string (MMModemLock val); +

    Gets the nickname string for the MMModemLock specified at val .

    Parameters

    @@ -632,7 +632,7 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    @@ -640,9 +640,9 @@

    mm_modem_access_technology_build_string_from_mask ()

    gchar *
     mm_modem_access_technology_build_string_from_mask
    -                               (MMModemAccessTechnology mask);
    + (MMModemAccessTechnology mask);

    Builds a string containing a comma-separated list of nicknames for -each MMModemAccessTechnology in mask +each MMModemAccessTechnology in mask .

    Parameters

    @@ -662,16 +662,16 @@

    Returns

    a string with the list of nicknames, or NULL if none given. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]


    mm_modem_mode_build_string_from_mask ()

    gchar *
    -mm_modem_mode_build_string_from_mask (MMModemMode mask);
    +mm_modem_mode_build_string_from_mask (MMModemMode mask);

    Builds a string containing a comma-separated list of nicknames for -each MMModemMode in mask +each MMModemMode in mask .

    Parameters

    @@ -691,15 +691,15 @@

    Returns

    a string with the list of nicknames, or NULL if none given. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]


    mm_modem_band_get_string ()

    const gchar *
    -mm_modem_band_get_string (MMModemBand val);
    -

    Gets the nickname string for the MMModemBand specified at val +mm_modem_band_get_string (MMModemBand val); +

    Gets the nickname string for the MMModemBand specified at val .

    Parameters

    @@ -719,15 +719,15 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    mm_modem_port_type_get_string ()

    const gchar *
    -mm_modem_port_type_get_string (MMModemPortType val);
    -

    Gets the nickname string for the MMModemPortType specified at val +mm_modem_port_type_get_string (MMModemPortType val); +

    Gets the nickname string for the MMModemPortType specified at val .

    Parameters

    @@ -747,7 +747,7 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    @@ -755,8 +755,8 @@

    mm_modem_3gpp_registration_state_get_string ()

    const gchar *
     mm_modem_3gpp_registration_state_get_string
    -                               (MMModem3gppRegistrationState val);
    -

    Gets the nickname string for the MMModem3gppRegistrationState specified at val + (MMModem3gppRegistrationState val); +

    Gets the nickname string for the MMModem3gppRegistrationState specified at val .

    Parameters

    @@ -776,7 +776,7 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    @@ -784,8 +784,8 @@

    mm_modem_3gpp_subscription_state_get_string ()

    const gchar *
     mm_modem_3gpp_subscription_state_get_string
    -                               (MMModem3gppSubscriptionState val);
    -

    Gets the nickname string for the MMModem3gppSubscriptionState specified at val + (MMModem3gppSubscriptionState val); +

    Gets the nickname string for the MMModem3gppSubscriptionState specified at val .

    Parameters

    @@ -805,7 +805,7 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    @@ -813,9 +813,9 @@

    mm_modem_3gpp_facility_build_string_from_mask ()

    gchar *
     mm_modem_3gpp_facility_build_string_from_mask
    -                               (MMModem3gppFacility mask);
    + (MMModem3gppFacility mask);

    Builds a string containing a comma-separated list of nicknames for -each MMModem3gppFacility in mask +each MMModem3gppFacility in mask .

    Parameters

    @@ -835,7 +835,7 @@

    Returns

    a string with the list of nicknames, or NULL if none given. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]


    @@ -843,8 +843,8 @@

    mm_modem_3gpp_network_availability_get_string ()

    const gchar *
     mm_modem_3gpp_network_availability_get_string
    -                               (MMModem3gppNetworkAvailability val);
    -

    Gets the nickname string for the MMModem3gppNetworkAvailability specified at val + (MMModem3gppNetworkAvailability val); +

    Gets the nickname string for the MMModem3gppNetworkAvailability specified at val .

    Parameters

    @@ -864,7 +864,7 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    @@ -872,8 +872,8 @@

    mm_modem_3gpp_ussd_session_state_get_string ()

    const gchar *
     mm_modem_3gpp_ussd_session_state_get_string
    -                               (MMModem3gppUssdSessionState val);
    -

    Gets the nickname string for the MMModem3gppUssdSessionState specified at val + (MMModem3gppUssdSessionState val); +

    Gets the nickname string for the MMModem3gppUssdSessionState specified at val .

    Parameters

    @@ -893,7 +893,7 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    @@ -901,8 +901,8 @@

    mm_modem_3gpp_eps_ue_mode_operation_get_string ()

    const gchar *
     mm_modem_3gpp_eps_ue_mode_operation_get_string
    -                               (MMModem3gppEpsUeModeOperation val);
    -

    Gets the nickname string for the MMModem3gppEpsUeModeOperation specified at val + (MMModem3gppEpsUeModeOperation val); +

    Gets the nickname string for the MMModem3gppEpsUeModeOperation specified at val .

    Parameters

    @@ -922,7 +922,7 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    @@ -930,8 +930,8 @@

    mm_modem_cdma_registration_state_get_string ()

    const gchar *
     mm_modem_cdma_registration_state_get_string
    -                               (MMModemCdmaRegistrationState val);
    -

    Gets the nickname string for the MMModemCdmaRegistrationState specified at val + (MMModemCdmaRegistrationState val); +

    Gets the nickname string for the MMModemCdmaRegistrationState specified at val .

    Parameters

    @@ -951,7 +951,7 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    @@ -959,8 +959,8 @@

    mm_modem_cdma_activation_state_get_string ()

    const gchar *
     mm_modem_cdma_activation_state_get_string
    -                               (MMModemCdmaActivationState val);
    -

    Gets the nickname string for the MMModemCdmaActivationState specified at val + (MMModemCdmaActivationState val); +

    Gets the nickname string for the MMModemCdmaActivationState specified at val .

    Parameters

    @@ -980,15 +980,15 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    mm_modem_cdma_rm_protocol_get_string ()

    const gchar *
    -mm_modem_cdma_rm_protocol_get_string (MMModemCdmaRmProtocol val);
    -

    Gets the nickname string for the MMModemCdmaRmProtocol specified at val +mm_modem_cdma_rm_protocol_get_string (MMModemCdmaRmProtocol val); +

    Gets the nickname string for the MMModemCdmaRmProtocol specified at val .

    Parameters

    @@ -1008,7 +1008,7 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    @@ -1016,9 +1016,9 @@

    mm_modem_location_source_build_string_from_mask ()

    gchar *
     mm_modem_location_source_build_string_from_mask
    -                               (MMModemLocationSource mask);
    + (MMModemLocationSource mask);

    Builds a string containing a comma-separated list of nicknames for -each MMModemLocationSource in mask +each MMModemLocationSource in mask .

    Parameters

    @@ -1038,7 +1038,7 @@

    Returns

    a string with the list of nicknames, or NULL if none given. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]


    @@ -1046,9 +1046,9 @@

    mm_modem_location_assistance_data_type_build_string_from_mask ()

    gchar *
     mm_modem_location_assistance_data_type_build_string_from_mask
    -                               (MMModemLocationAssistanceDataType mask);
    + (MMModemLocationAssistanceDataType mask);

    Builds a string containing a comma-separated list of nicknames for -each MMModemLocationAssistanceDataType in mask +each MMModemLocationAssistanceDataType in mask .

    Parameters

    @@ -1068,15 +1068,15 @@

    Returns

    a string with the list of nicknames, or NULL if none given. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]


    mm_modem_contacts_storage_get_string ()

    const gchar *
    -mm_modem_contacts_storage_get_string (MMModemContactsStorage val);
    -

    Gets the nickname string for the MMModemContactsStorage specified at val +mm_modem_contacts_storage_get_string (MMModemContactsStorage val); +

    Gets the nickname string for the MMModemContactsStorage specified at val .

    Parameters

    @@ -1096,7 +1096,7 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    @@ -1104,9 +1104,9 @@

    mm_modem_firmware_update_method_build_string_from_mask ()

    gchar *
     mm_modem_firmware_update_method_build_string_from_mask
    -                               (MMModemFirmwareUpdateMethod mask);
    + (MMModemFirmwareUpdateMethod mask);

    Builds a string containing a comma-separated list of nicknames for -each MMModemFirmwareUpdateMethod in mask +each MMModemFirmwareUpdateMethod in mask .

    Parameters

    @@ -1126,15 +1126,15 @@

    Returns

    a string with the list of nicknames, or NULL if none given. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]


    mm_sms_pdu_type_get_string ()

    const gchar *
    -mm_sms_pdu_type_get_string (MMSmsPduType val);
    -

    Gets the nickname string for the MMSmsPduType specified at val +mm_sms_pdu_type_get_string (MMSmsPduType val); +

    Gets the nickname string for the MMSmsPduType specified at val .

    Parameters

    @@ -1154,15 +1154,15 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    mm_sms_state_get_string ()

    const gchar *
    -mm_sms_state_get_string (MMSmsState val);
    -

    Gets the nickname string for the MMSmsState specified at val +mm_sms_state_get_string (MMSmsState val); +

    Gets the nickname string for the MMSmsState specified at val .

    Parameters

    @@ -1182,15 +1182,15 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    mm_sms_delivery_state_get_string ()

    const gchar *
    -mm_sms_delivery_state_get_string (MMSmsDeliveryState val);
    -

    Gets the nickname string for the MMSmsDeliveryState specified at val +mm_sms_delivery_state_get_string (MMSmsDeliveryState val); +

    Gets the nickname string for the MMSmsDeliveryState specified at val .

    Parameters

    @@ -1210,15 +1210,15 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    mm_sms_storage_get_string ()

    const gchar *
    -mm_sms_storage_get_string (MMSmsStorage val);
    -

    Gets the nickname string for the MMSmsStorage specified at val +mm_sms_storage_get_string (MMSmsStorage val); +

    Gets the nickname string for the MMSmsStorage specified at val .

    Parameters

    @@ -1238,15 +1238,15 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    mm_sms_validity_type_get_string ()

    const gchar *
    -mm_sms_validity_type_get_string (MMSmsValidityType val);
    -

    Gets the nickname string for the MMSmsValidityType specified at val +mm_sms_validity_type_get_string (MMSmsValidityType val); +

    Gets the nickname string for the MMSmsValidityType specified at val .

    Parameters

    @@ -1266,15 +1266,15 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    mm_sms_cdma_teleservice_id_get_string ()

    const gchar *
    -mm_sms_cdma_teleservice_id_get_string (MMSmsCdmaTeleserviceId val);
    -

    Gets the nickname string for the MMSmsCdmaTeleserviceId specified at val +mm_sms_cdma_teleservice_id_get_string (MMSmsCdmaTeleserviceId val); +

    Gets the nickname string for the MMSmsCdmaTeleserviceId specified at val .

    Parameters

    @@ -1294,7 +1294,7 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    @@ -1302,8 +1302,8 @@

    mm_sms_cdma_service_category_get_string ()

    const gchar *
     mm_sms_cdma_service_category_get_string
    -                               (MMSmsCdmaServiceCategory val);
    -

    Gets the nickname string for the MMSmsCdmaServiceCategory specified at val + (MMSmsCdmaServiceCategory val); +

    Gets the nickname string for the MMSmsCdmaServiceCategory specified at val .

    Parameters

    @@ -1323,15 +1323,15 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    mm_firmware_image_type_get_string ()

    const gchar *
    -mm_firmware_image_type_get_string (MMFirmwareImageType val);
    -

    Gets the nickname string for the MMFirmwareImageType specified at val +mm_firmware_image_type_get_string (MMFirmwareImageType val); +

    Gets the nickname string for the MMFirmwareImageType specified at val .

    Parameters

    @@ -1351,16 +1351,16 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    mm_oma_feature_build_string_from_mask ()

    gchar *
    -mm_oma_feature_build_string_from_mask (MMOmaFeature mask);
    +mm_oma_feature_build_string_from_mask (MMOmaFeature mask);

    Builds a string containing a comma-separated list of nicknames for -each MMOmaFeature in mask +each MMOmaFeature in mask .

    Parameters

    @@ -1380,15 +1380,15 @@

    Returns

    a string with the list of nicknames, or NULL if none given. The returned value should be freed with g_free().

    -

    [transfer full]

    +

    [transfer full]


    mm_oma_session_type_get_string ()

    const gchar *
    -mm_oma_session_type_get_string (MMOmaSessionType val);
    -

    Gets the nickname string for the MMOmaSessionType specified at val +mm_oma_session_type_get_string (MMOmaSessionType val); +

    Gets the nickname string for the MMOmaSessionType specified at val .

    Parameters

    @@ -1408,15 +1408,15 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    mm_oma_session_state_get_string ()

    const gchar *
    -mm_oma_session_state_get_string (MMOmaSessionState val);
    -

    Gets the nickname string for the MMOmaSessionState specified at val +mm_oma_session_state_get_string (MMOmaSessionState val); +

    Gets the nickname string for the MMOmaSessionState specified at val .

    Parameters

    @@ -1436,7 +1436,7 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    @@ -1444,8 +1444,8 @@

    mm_oma_session_state_failed_reason_get_string ()

    const gchar *
     mm_oma_session_state_failed_reason_get_string
    -                               (MMOmaSessionStateFailedReason val);
    -

    Gets the nickname string for the MMOmaSessionStateFailedReason specified at val + (MMOmaSessionStateFailedReason val); +

    Gets the nickname string for the MMOmaSessionStateFailedReason specified at val .

    Parameters

    @@ -1465,15 +1465,15 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    mm_call_direction_get_string ()

    const gchar *
    -mm_call_direction_get_string (MMCallDirection val);
    -

    Gets the nickname string for the MMCallDirection specified at val +mm_call_direction_get_string (MMCallDirection val); +

    Gets the nickname string for the MMCallDirection specified at val .

    Parameters

    @@ -1493,15 +1493,15 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    mm_call_state_get_string ()

    const gchar *
    -mm_call_state_get_string (MMCallState val);
    -

    Gets the nickname string for the MMCallState specified at val +mm_call_state_get_string (MMCallState val); +

    Gets the nickname string for the MMCallState specified at val .

    Parameters

    @@ -1521,15 +1521,15 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]


    mm_call_state_reason_get_string ()

    const gchar *
    -mm_call_state_reason_get_string (MMCallStateReason val);
    -

    Gets the nickname string for the MMCallStateReason specified at val +mm_call_state_reason_get_string (MMCallStateReason val); +

    Gets the nickname string for the MMCallStateReason specified at val .

    Parameters

    @@ -1549,12 +1549,12 @@

    Returns

    a string with the nickname, or NULL if not found. Do not free the returned value.

    -

    [transfer none]

    +

    [transfer none]

    +
    Generated by GTK-Doc V1.33.1
    \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/libmm-glib.devhelp2 modemmanager-1.16.6/docs/reference/libmm-glib/html/libmm-glib.devhelp2 --- modemmanager-1.12.8/docs/reference/libmm-glib/html/libmm-glib.devhelp2 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/libmm-glib.devhelp2 2021-06-06 21:45:11.000000000 +0800 @@ -1,5 +1,5 @@ - + @@ -143,6 +143,8 @@ + + @@ -305,6 +307,15 @@ + + + + + + + + + @@ -475,6 +486,8 @@ + + @@ -552,7 +565,8 @@ - + + @@ -628,6 +642,8 @@ + + @@ -750,13 +766,21 @@ + + + + + + + + @@ -1018,6 +1042,9 @@ + + + @@ -1060,6 +1087,9 @@ + + + @@ -1086,9 +1116,11 @@ + + @@ -1108,6 +1140,7 @@ + @@ -1368,11 +1401,13 @@ + + @@ -1382,6 +1417,7 @@ + @@ -1550,8 +1586,11 @@ + + + @@ -1574,6 +1613,8 @@ + + @@ -1733,6 +1774,7 @@ + @@ -1754,9 +1796,11 @@ + + @@ -1836,6 +1880,7 @@ + @@ -1883,6 +1928,8 @@ + + diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/object-tree.html modemmanager-1.16.6/docs/reference/libmm-glib/html/object-tree.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/object-tree.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/object-tree.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -128,6 +128,6 @@
    +
    Generated by GTK-Doc V1.33.1
    \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/pt01.html modemmanager-1.16.6/docs/reference/libmm-glib/html/pt01.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/pt01.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/pt01.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -185,6 +185,6 @@
    +
    Generated by GTK-Doc V1.33.1
    \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/pt02.html modemmanager-1.16.6/docs/reference/libmm-glib/html/pt02.html --- modemmanager-1.12.8/docs/reference/libmm-glib/html/pt02.html 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/pt02.html 2021-06-06 21:45:12.000000000 +0800 @@ -8,7 +8,7 @@ - + @@ -194,6 +194,6 @@
    +
    Generated by GTK-Doc V1.33.1
    \ No newline at end of file diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/html/style.css modemmanager-1.16.6/docs/reference/libmm-glib/html/style.css --- modemmanager-1.12.8/docs/reference/libmm-glib/html/style.css 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/html/style.css 2021-06-06 21:45:11.000000000 +0800 @@ -61,18 +61,6 @@ color: #729fcf; } -div.informaltable table -{ - border-collapse: separate; - border-spacing: 1em 0.3em; - border: none; -} - -div.informaltable table td, div.informaltable table th -{ - vertical-align: top; -} - .function_type, .variable_type, .property_type, @@ -127,6 +115,7 @@ margin: 0.25em; } +div.informaltable table[border="1"], div.table table { border-collapse: collapse; @@ -135,6 +124,8 @@ border: solid 1px #babdb6; } +div.informaltable table[border="1"] td, +div.informaltable table th, div.table table td, div.table table th { /* tango:aluminium 3 */ @@ -143,6 +134,7 @@ vertical-align: top; } +div.informaltable table[border="1"] th, div.table table th { /* tango:aluminium 2 */ @@ -463,6 +455,11 @@ } } +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .hll { background-color: #ffffcc } .c { color: #408080; font-style: italic } /* Comment */ .err { border: 1px solid #FF0000 } /* Error */ diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/libmm-glib-docs.xml modemmanager-1.16.6/docs/reference/libmm-glib/libmm-glib-docs.xml --- modemmanager-1.12.8/docs/reference/libmm-glib/libmm-glib-docs.xml 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/libmm-glib-docs.xml 2021-06-06 21:40:59.000000000 +0800 @@ -15,6 +15,8 @@ For libmm-glib version &version; + The latest version of this documentation can be found on-line at + https://www.freedesktop.org/software/ModemManager/doc/latest/libmm-glib/. @@ -39,6 +41,8 @@ 2017 2018 2019 + 2020 + 2021 The ModemManager Authors @@ -286,6 +290,14 @@ Index of new symbols in 1.12 + + Index of new symbols in 1.14 + + + + Index of new symbols in 1.16 + + diff -Nru modemmanager-1.12.8/docs/reference/libmm-glib/libmm-glib-sections.txt modemmanager-1.16.6/docs/reference/libmm-glib/libmm-glib-sections.txt --- modemmanager-1.12.8/docs/reference/libmm-glib/libmm-glib-sections.txt 2020-03-14 17:17:42.000000000 +0800 +++ modemmanager-1.16.6/docs/reference/libmm-glib/libmm-glib-sections.txt 2021-06-06 21:45:11.000000000 +0800 @@ -182,6 +182,15 @@ mm_modem_get_sim mm_modem_get_sim_finish mm_modem_get_sim_sync +mm_modem_get_sim_slot_paths +mm_modem_dup_sim_slot_paths +mm_modem_get_primary_sim_slot +mm_modem_list_sim_slots +mm_modem_list_sim_slots_finish +mm_modem_list_sim_slots_sync +mm_modem_set_primary_sim_slot +mm_modem_set_primary_sim_slot_finish +mm_modem_set_primary_sim_slot_sync mm_modem_enable mm_modem_enable_finish @@ -528,6 +537,7 @@ MMLocationGpsNmea mm_location_gps_nmea_get_trace +mm_location_gps_nmea_get_traces mm_location_gps_nmea_build_full mm_location_gps_nmea_new @@ -860,6 +870,8 @@ mm_simple_connect_properties_set_ip_type mm_simple_connect_properties_get_allow_roaming mm_simple_connect_properties_set_allow_roaming +mm_simple_connect_properties_get_rm_protocol +mm_simple_connect_properties_set_rm_protocol mm_simple_connect_properties_get_number mm_simple_connect_properties_set_number @@ -942,6 +954,8 @@ mm_modem_signal_get_umts mm_modem_signal_peek_lte mm_modem_signal_get_lte +mm_modem_signal_peek_nr5g +mm_modem_signal_get_nr5g mm_modem_signal_setup mm_modem_signal_setup_finish @@ -1127,6 +1141,11 @@ mm_bearer_stats_get_duration mm_bearer_stats_get_rx_bytes mm_bearer_stats_get_tx_bytes +mm_bearer_stats_get_attempts +mm_bearer_stats_get_failed_attempts +mm_bearer_stats_get_total_duration +mm_bearer_stats_get_total_rx_bytes +mm_bearer_stats_get_total_tx_bytes mm_bearer_stats_get_dictionary mm_bearer_stats_new @@ -1134,6 +1153,11 @@ mm_bearer_stats_set_duration mm_bearer_stats_set_rx_bytes mm_bearer_stats_set_tx_bytes +mm_bearer_stats_set_attempts +mm_bearer_stats_set_failed_attempts +mm_bearer_stats_set_total_duration +mm_bearer_stats_set_total_rx_bytes +mm_bearer_stats_set_total_tx_bytes MMBearerStatsClass MMBearerStatsPrivate @@ -1172,6 +1196,7 @@ mm_bearer_properties_new_from_dictionary mm_bearer_properties_new_from_string +MMBearerPropertiesCmpFlags mm_bearer_properties_cmp mm_bearer_properties_consume_string mm_bearer_properties_consume_variant @@ -1196,10 +1221,13 @@ mm_sim_get_path mm_sim_dup_path +mm_sim_get_active mm_sim_get_identifier mm_sim_dup_identifier mm_sim_get_imsi mm_sim_dup_imsi +mm_sim_get_eid +mm_sim_dup_eid mm_sim_get_operator_identifier mm_sim_dup_operator_identifier mm_sim_get_operator_name @@ -2069,6 +2097,9 @@ mm_gdbus_modem_dup_signal_quality mm_gdbus_modem_get_sim mm_gdbus_modem_dup_sim +mm_gdbus_modem_dup_sim_slots +mm_gdbus_modem_get_sim_slots +mm_gdbus_modem_get_primary_sim_slot mm_gdbus_modem_get_supported_capabilities mm_gdbus_modem_dup_supported_capabilities mm_gdbus_modem_get_state @@ -2112,6 +2143,9 @@ mm_gdbus_modem_call_set_current_capabilities mm_gdbus_modem_call_set_current_capabilities_finish mm_gdbus_modem_call_set_current_capabilities_sync +mm_gdbus_modem_call_set_primary_sim_slot +mm_gdbus_modem_call_set_primary_sim_slot_finish +mm_gdbus_modem_call_set_primary_sim_slot_sync mm_gdbus_modem_call_command mm_gdbus_modem_call_command_finish mm_gdbus_modem_call_command_sync @@ -2139,6 +2173,8 @@ mm_gdbus_modem_set_hardware_revision mm_gdbus_modem_set_signal_quality mm_gdbus_modem_set_sim +mm_gdbus_modem_set_sim_slots +mm_gdbus_modem_set_primary_sim_slot mm_gdbus_modem_set_supported_capabilities mm_gdbus_modem_set_state mm_gdbus_modem_set_state_failed_reason @@ -2160,6 +2196,7 @@ mm_gdbus_modem_complete_set_current_modes mm_gdbus_modem_complete_set_current_bands mm_gdbus_modem_complete_set_current_capabilities +mm_gdbus_modem_complete_set_primary_sim_slot mm_gdbus_modem_interface_info mm_gdbus_modem_override_properties @@ -2782,11 +2819,13 @@ mm_gdbus_modem_signal_get_gsm mm_gdbus_modem_signal_get_umts mm_gdbus_modem_signal_get_lte +mm_gdbus_modem_signal_get_nr5g mm_gdbus_modem_signal_dup_cdma mm_gdbus_modem_signal_dup_evdo mm_gdbus_modem_signal_dup_gsm mm_gdbus_modem_signal_dup_umts mm_gdbus_modem_signal_dup_lte +mm_gdbus_modem_signal_dup_nr5g mm_gdbus_modem_signal_call_setup mm_gdbus_modem_signal_call_setup_finish @@ -2796,6 +2835,7 @@ mm_gdbus_modem_signal_set_evdo mm_gdbus_modem_signal_set_gsm mm_gdbus_modem_signal_set_lte +mm_gdbus_modem_signal_set_nr5g mm_gdbus_modem_signal_set_rate mm_gdbus_modem_signal_set_umts mm_gdbus_modem_signal_complete_setup @@ -3072,8 +3112,11 @@ MmGdbusSim MmGdbusSimIface +mm_gdbus_sim_get_active mm_gdbus_sim_get_imsi mm_gdbus_sim_dup_imsi +mm_gdbus_sim_get_eid +mm_gdbus_sim_dup_eid mm_gdbus_sim_get_sim_identifier mm_gdbus_sim_dup_sim_identifier mm_gdbus_sim_get_operator_identifier @@ -3096,7 +3139,9 @@ mm_gdbus_sim_call_change_pin_finish mm_gdbus_sim_call_change_pin_sync +mm_gdbus_sim_set_active mm_gdbus_sim_set_imsi +mm_gdbus_sim_set_eid mm_gdbus_sim_set_operator_identifier mm_gdbus_sim_set_operator_name mm_gdbus_sim_set_sim_identifier diff -Nru modemmanager-1.12.8/examples/Makefile.in modemmanager-1.16.6/examples/Makefile.in --- modemmanager-1.12.8/examples/Makefile.in 2020-03-14 17:16:02.000000000 +0800 +++ modemmanager-1.16.6/examples/Makefile.in 2021-06-06 21:43:42.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,14 +90,14 @@ subdir = examples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -254,6 +254,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -327,9 +329,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -374,6 +380,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru modemmanager-1.12.8/examples/modem-watcher-javascript/Makefile.in modemmanager-1.16.6/examples/modem-watcher-javascript/Makefile.in --- modemmanager-1.12.8/examples/modem-watcher-javascript/Makefile.in 2020-03-14 17:16:02.000000000 +0800 +++ modemmanager-1.16.6/examples/modem-watcher-javascript/Makefile.in 2021-06-06 21:43:42.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,14 +90,14 @@ subdir = examples/modem-watcher-javascript ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -194,6 +194,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -267,9 +269,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -314,6 +320,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru modemmanager-1.12.8/examples/modem-watcher-python/Makefile.in modemmanager-1.16.6/examples/modem-watcher-python/Makefile.in --- modemmanager-1.12.8/examples/modem-watcher-python/Makefile.in 2020-03-14 17:16:02.000000000 +0800 +++ modemmanager-1.16.6/examples/modem-watcher-python/Makefile.in 2021-06-06 21:43:42.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,14 +90,14 @@ subdir = examples/modem-watcher-python ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -194,6 +194,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -267,9 +269,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -314,6 +320,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru modemmanager-1.12.8/examples/modem-watcher-python/ModemWatcher.py modemmanager-1.16.6/examples/modem-watcher-python/ModemWatcher.py --- modemmanager-1.12.8/examples/modem-watcher-python/ModemWatcher.py 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/examples/modem-watcher-python/ModemWatcher.py 2021-06-06 21:40:59.000000000 +0800 @@ -18,27 +18,25 @@ # Copyright (C) 2014 Aleksander Morgado # -import os, sys, gi - +import gi gi.require_version('ModemManager', '1.0') -from gi.repository import GLib, GObject, Gio, ModemManager +from gi.repository import Gio, GLib, GObject, ModemManager -""" -The ModemWatcher class is responsible for monitoring ModemManager -""" -class ModemWatcher: +class ModemWatcher: """ - Constructor + The ModemWatcher class is responsible for monitoring ModemManager. """ + def __init__(self): # Flag for initial logs self.initializing = True # Setup DBus monitoring - self.connection = Gio.bus_get_sync (Gio.BusType.SYSTEM, None) - self.manager = ModemManager.Manager.new_sync (self.connection, - Gio.DBusObjectManagerClientFlags.DO_NOT_AUTO_START, - None) + self.connection = Gio.bus_get_sync(Gio.BusType.SYSTEM, None) + self.manager = ModemManager.Manager.new_sync( + self.connection, + Gio.DBusObjectManagerClientFlags.DO_NOT_AUTO_START, + None) # IDs for added/removed signals self.object_added_id = 0 self.object_removed_id = 0 @@ -49,25 +47,25 @@ # Finish initialization self.initializing = False - """ - ModemManager is now available - """ def set_available(self): - if self.available == False or self.initializing == True: + """ + ModemManager is now available. + """ + if not self.available or self.initializing: print('[ModemWatcher] ModemManager %s service is available in bus' % self.manager.get_version()) self.object_added_id = self.manager.connect('object-added', self.on_object_added) self.object_removed_id = self.manager.connect('object-removed', self.on_object_removed) self.available = True # Initial scan - if self.initializing == True: + if self.initializing: for obj in self.manager.get_objects(): self.on_object_added(self.manager, obj) - """ - ModemManager is now unavailable - """ def set_unavailable(self): - if self.available == True or self.initializing == True: + """ + ModemManager is now unavailable. + """ + if self.available or self.initializing: print('[ModemWatcher] ModemManager service not available in bus') if self.object_added_id: self.manager.disconnect(self.object_added_id) @@ -77,19 +75,19 @@ self.object_removed_id = 0 self.available = False - """ - Name owner updates - """ def on_name_owner(self, manager, prop): + """ + Name owner updates. + """ if self.manager.get_name_owner(): self.set_available() else: self.set_unavailable() - """ - Object added - """ def on_object_added(self, manager, obj): + """ + Object added. + """ modem = obj.get_modem() print('[ModemWatcher] %s (%s) modem managed by ModemManager [%s]: %s' % (modem.get_manufacturer(), @@ -97,12 +95,12 @@ modem.get_equipment_identifier(), obj.get_object_path())) if modem.get_state() == ModemManager.ModemState.FAILED: - print('[ModemWatcher,%s] ignoring failed modem' % - modem_index(obj.get_object_path())) + print('[ModemWatcher] ignoring failed modem: %s' % + obj.get_object_path()) - """ - Object removed - """ def on_object_removed(self, manager, obj): + """ + Object removed. + """ print('[ModemWatcher] modem unmanaged by ModemManager: %s' % obj.get_object_path()) diff -Nru modemmanager-1.12.8/examples/modem-watcher-python/modem-watcher-python modemmanager-1.16.6/examples/modem-watcher-python/modem-watcher-python --- modemmanager-1.12.8/examples/modem-watcher-python/modem-watcher-python 2017-09-14 22:00:54.000000000 +0800 +++ modemmanager-1.16.6/examples/modem-watcher-python/modem-watcher-python 2021-06-06 21:40:59.000000000 +0800 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- # # This program is free software; you can redistribute it and/or modify it under @@ -18,25 +18,34 @@ # Copyright (C) 2014 Aleksander Morgado # -import sys, signal -import ModemWatcher +import signal + from gi.repository import GLib -main_loop = None -watcher = None +import ModemWatcher -def signal_handler(data): - main_loop.quit() -if __name__ == "__main__": +def signal_handler(loop): + """SIGHUP and SIGINT handler.""" + loop.quit() + + +def main(): + """Main routine.""" # Create modem watcher - watcher = ModemWatcher.ModemWatcher() + ModemWatcher.ModemWatcher() # Main loop main_loop = GLib.MainLoop() - GLib.unix_signal_add(GLib.PRIORITY_HIGH, signal.SIGHUP, signal_handler, None) - GLib.unix_signal_add(GLib.PRIORITY_HIGH, signal.SIGTERM, signal_handler, None) + GLib.unix_signal_add( + GLib.PRIORITY_HIGH, signal.SIGHUP, signal_handler, main_loop) + GLib.unix_signal_add( + GLib.PRIORITY_HIGH, signal.SIGTERM, signal_handler, main_loop) try: main_loop.run() except KeyboardInterrupt: pass + + +if __name__ == "__main__": + main() diff -Nru modemmanager-1.12.8/examples/network-scan-python/Makefile.in modemmanager-1.16.6/examples/network-scan-python/Makefile.in --- modemmanager-1.12.8/examples/network-scan-python/Makefile.in 2020-03-14 17:16:02.000000000 +0800 +++ modemmanager-1.16.6/examples/network-scan-python/Makefile.in 2021-06-06 21:43:42.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,14 +90,14 @@ subdir = examples/network-scan-python ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -194,6 +194,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -267,9 +269,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -314,6 +320,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru modemmanager-1.12.8/examples/network-scan-python/network-scan-python modemmanager-1.16.6/examples/network-scan-python/network-scan-python --- modemmanager-1.12.8/examples/network-scan-python/network-scan-python 2020-02-26 20:11:44.000000000 +0800 +++ modemmanager-1.16.6/examples/network-scan-python/network-scan-python 2021-06-06 21:40:59.000000000 +0800 @@ -18,10 +18,13 @@ # Copyright (C) 2019 Aleksander Morgado # -import sys, signal, gi +import sys +import time +import gi gi.require_version('ModemManager', '1.0') -from gi.repository import GLib, GObject, Gio, ModemManager +from gi.repository import Gio, GLib, GObject, ModemManager + if __name__ == "__main__": @@ -32,25 +35,35 @@ sys.exit(1) # Connection to ModemManager - connection = Gio.bus_get_sync (Gio.BusType.SYSTEM, None) - manager = ModemManager.Manager.new_sync (connection, Gio.DBusObjectManagerClientFlags.DO_NOT_AUTO_START, None) - if manager.get_name_owner() is None: - sys.stderr.write('ModemManager not found in bus') + connection = Gio.bus_get_sync(Gio.BusType.SYSTEM, None) + manager = ModemManager.Manager.new_sync( + connection, Gio.DBusObjectManagerClientFlags.DO_NOT_AUTO_START, None) + if not manager.get_name_owner(): + sys.stderr.write('ModemManager not found in bus\n') sys.exit(2) # Iterate modems and scan network with each one by one for obj in manager.get_objects(): + modem = obj.get_modem() + modem.enable() + time.sleep(1) modem3gpp = obj.get_modem_3gpp() + if not modem3gpp: + sys.stderr.write('%s: skipping unusable modem...\n' % + obj.get_object_path()) + continue modem3gpp.set_default_timeout(300000) print('%s: starting network scan...' % modem3gpp.get_object_path()) networks = modem3gpp.scan_sync() if networks: for network in networks: print('%s: %s - %s (%s, %s)' % ( - network.get_operator_code(), - network.get_operator_short(), - network.get_operator_short(), - ModemManager.modem_access_technology_build_string_from_mask (network.get_access_technology()), - ModemManager.Modem3gppNetworkAvailability.get_string(network.get_availability()))) + network.get_operator_code(), + network.get_operator_short(), + network.get_operator_short(), + ModemManager.modem_access_technology_build_string_from_mask( + network.get_access_technology()), + ModemManager.Modem3gppNetworkAvailability.get_string( + network.get_availability()))) else: print('no networks found') diff -Nru modemmanager-1.12.8/examples/sms-python/Makefile.in modemmanager-1.16.6/examples/sms-python/Makefile.in --- modemmanager-1.12.8/examples/sms-python/Makefile.in 2020-03-14 17:16:02.000000000 +0800 +++ modemmanager-1.16.6/examples/sms-python/Makefile.in 2021-06-06 21:43:42.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,14 +90,14 @@ subdir = examples/sms-python ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -194,6 +194,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -267,9 +269,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -314,6 +320,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru modemmanager-1.12.8/examples/sms-python/sms-python modemmanager-1.16.6/examples/sms-python/sms-python --- modemmanager-1.12.8/examples/sms-python/sms-python 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/examples/sms-python/sms-python 2021-06-06 21:40:59.000000000 +0800 @@ -18,10 +18,12 @@ # Copyright (C) 2016 Aleksander Morgado # -import sys, signal, gi +import sys +import gi gi.require_version('ModemManager', '1.0') -from gi.repository import GLib, GObject, Gio, ModemManager +from gi.repository import Gio, GLib, GObject, ModemManager + if __name__ == "__main__": diff -Nru modemmanager-1.12.8/gtk-doc.make modemmanager-1.16.6/gtk-doc.make --- modemmanager-1.12.8/gtk-doc.make 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/gtk-doc.make 2021-06-06 21:40:59.000000000 +0800 @@ -1,4 +1,22 @@ # -*- mode: makefile -*- +# +# gtk-doc.make - make rules for gtk-doc +# Copyright (C) 2003 James Henstridge +# 2004-2007 Damon Chaplin +# 2007-2017 Stefan Sauer +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . #################################### # Everything below here is generic # @@ -81,55 +99,54 @@ #### setup #### -GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_$(V)) -GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_@AM_V@) +GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_@AM_DEFAULT_V@) GTK_DOC_V_SETUP_0=@echo " DOC Preparing build"; setup-build.stamp: -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ - if test "x$$files" != "x" ; then \ - for file in $$files ; do \ - destdir=`dirname $(abs_builddir)/$$file`; \ - test -d "$$destdir" || mkdir -p "$$destdir"; \ - test -f $(abs_srcdir)/$$file && \ - cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ - done; \ - fi; \ + files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \ + if test "x$$files" != "x" ; then \ + for file in $$files ; do \ + destdir=`dirname $(abs_builddir)/$$file`; \ + test -d "$$destdir" || mkdir -p "$$destdir"; \ + test -f $(abs_srcdir)/$$file && \ + cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ + done; \ + fi; \ fi $(AM_V_at)touch setup-build.stamp - #### scan #### -GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_$(V)) -GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_@AM_V@) +GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_@AM_DEFAULT_V@) GTK_DOC_V_SCAN_0=@echo " DOC Scanning header files"; -GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_$(V)) -GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_@AM_V@) +GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_@AM_DEFAULT_V@) GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects"; scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ + _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ - scanobj_options=""; \ - gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ - if test "$$?" = "0"; then \ - if test "x$(V)" = "x1"; then \ - scanobj_options="--verbose"; \ - fi; \ + scanobj_options=""; \ + gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ + if test "$$?" = "0"; then \ + if test "x$(V)" = "x1"; then \ + scanobj_options="--verbose"; \ fi; \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ - gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ + fi; \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ + gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \ else \ - for i in $(SCANOBJ_FILES) ; do \ - test -f $$i || touch $$i ; \ - done \ + for i in $(SCANOBJ_FILES) ; do \ + test -f $$i || touch $$i ; \ + done \ fi $(AM_V_at)touch scan-build.stamp @@ -138,14 +155,14 @@ #### xml #### -GTK_DOC_V_XML=$(GTK_DOC_V_XML_$(V)) -GTK_DOC_V_XML_=$(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_XML=$(GTK_DOC_V_XML_@AM_V@) +GTK_DOC_V_XML_=$(GTK_DOC_V_XML_@AM_DEFAULT_V@) GTK_DOC_V_XML_0=@echo " DOC Building XML"; sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent $(GTK_DOC_V_XML)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ - _source_dir="$${_source_dir} --source-dir=$$i" ; \ + _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) $(AM_V_at)touch sgml-build.stamp @@ -153,6 +170,9 @@ sgml.stamp: sgml-build.stamp @true +$(DOC_MAIN_SGML_FILE): sgml-build.stamp + @true + xml/gtkdocentities.ent: Makefile $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \ echo ""; \ @@ -166,12 +186,12 @@ #### html #### -GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_$(V)) -GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_@AM_V@) +GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_@AM_DEFAULT_V@) GTK_DOC_V_HTML_0=@echo " DOC Building HTML"; -GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_$(V)) -GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_@AM_V@) +GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_@AM_DEFAULT_V@) GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references"; html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) @@ -190,20 +210,17 @@ cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) -@test "x$(HTML_IMAGES)" = "x" || \ for file in $(HTML_IMAGES) ; do \ - if test -f $(abs_srcdir)/$$file ; then \ - cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ - fi; \ - if test -f $(abs_builddir)/$$file ; then \ - cp $(abs_builddir)/$$file $(abs_builddir)/html; \ - fi; \ + test -f $(abs_srcdir)/$$file && cp $(abs_srcdir)/$$file $(abs_builddir)/html; \ + test -f $(abs_builddir)/$$file && cp $(abs_builddir)/$$file $(abs_builddir)/html; \ + test -f $$file && cp $$file $(abs_builddir)/html; \ done; $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) $(AM_V_at)touch html-build.stamp #### pdf #### -GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_$(V)) -GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_@AM_V@) +GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_@AM_DEFAULT_V@) GTK_DOC_V_PDF_0=@echo " DOC Building PDF"; pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files) @@ -268,7 +285,6 @@ mv -f $${installdir}/$(DOC_MODULE).devhelp2 \ $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \ fi; \ - $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \ fi uninstall-local: diff -Nru modemmanager-1.12.8/include/Makefile.am modemmanager-1.16.6/include/Makefile.am --- modemmanager-1.12.8/include/Makefile.am 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/include/Makefile.am 2021-06-06 21:40:59.000000000 +0800 @@ -15,7 +15,7 @@ ModemManager-names.h: $(XMLS) $(top_srcdir)/build-aux/header-generator.xsl $(AM_V_GEN) $(XSLTPROC) $(top_srcdir)/build-aux/header-generator.xsl $(top_srcdir)/introspection/all.xml > $@ -CLEANFILES = \ +MAINTAINERCLEANFILES = \ ModemManager-names.h EXTRA_DIST = \ diff -Nru modemmanager-1.12.8/include/Makefile.in modemmanager-1.16.6/include/Makefile.in --- modemmanager-1.12.8/include/Makefile.in 2020-03-14 17:16:02.000000000 +0800 +++ modemmanager-1.16.6/include/Makefile.in 2021-06-06 21:43:42.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,14 +91,14 @@ subdir = include ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -244,6 +244,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -317,9 +319,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -364,6 +370,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -382,7 +389,7 @@ ModemManager-version.h \ ModemManager.h -CLEANFILES = \ +MAINTAINERCLEANFILES = \ ModemManager-names.h EXTRA_DIST = \ @@ -565,7 +572,6 @@ mostlyclean-generic: clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -574,6 +580,7 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am diff -Nru modemmanager-1.12.8/include/ModemManager-compat.h modemmanager-1.16.6/include/ModemManager-compat.h --- modemmanager-1.12.8/include/ModemManager-compat.h 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/include/ModemManager-compat.h 2021-06-06 21:40:59.000000000 +0800 @@ -709,6 +709,23 @@ */ #define MM_MODEM_LOCATION_SOURCE_AGPS ((MMModemLocationSourceDeprecated)MM_MODEM_LOCATION_SOURCE_AGPS_MSA) +/* The following type exists just so that we can get deprecation warnings */ +MM_DEPRECATED +typedef int MMModemCapabilityDeprecated; + +/** + * MM_MODEM_CAPABILITY_LTE_ADVANCED: + * + * Modem has LTE Advanced data capability. + * + * This value is deprecated because it is not used anywhere. LTE Advanced + * capable devices are reported as LTE capable. + * + * Since: 1.0 + * Deprecated: 1.14.0. + */ +#define MM_MODEM_CAPABILITY_LTE_ADVANCED ((MMModemCapabilityDeprecated)(1 << 4)) + #endif /* MM_DISABLE_DEPRECATED */ #endif /* _MODEMMANAGER_COMPAT_H_ */ diff -Nru modemmanager-1.12.8/include/ModemManager-enums.h modemmanager-1.16.6/include/ModemManager-enums.h --- modemmanager-1.12.8/include/ModemManager-enums.h 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/include/ModemManager-enums.h 2021-06-06 21:40:59.000000000 +0800 @@ -36,8 +36,8 @@ * @MM_MODEM_CAPABILITY_CDMA_EVDO: Modem supports at least one of CDMA 1xRTT, EVDO revision 0, EVDO revision A, or EVDO revision B. * @MM_MODEM_CAPABILITY_GSM_UMTS: Modem supports at least one of GSM, GPRS, EDGE, UMTS, HSDPA, HSUPA, or HSPA+ packet switched data capability. * @MM_MODEM_CAPABILITY_LTE: Modem has LTE data capability. - * @MM_MODEM_CAPABILITY_LTE_ADVANCED: Modem has LTE Advanced data capability. * @MM_MODEM_CAPABILITY_IRIDIUM: Modem has Iridium capabilities. + * @MM_MODEM_CAPABILITY_5GNR: Modem has 5GNR capabilities. Since 1.14. * @MM_MODEM_CAPABILITY_ANY: Mask specifying all capabilities. * * Flags describing one or more of the general access technology families that a @@ -51,8 +51,9 @@ MM_MODEM_CAPABILITY_CDMA_EVDO = 1 << 1, MM_MODEM_CAPABILITY_GSM_UMTS = 1 << 2, MM_MODEM_CAPABILITY_LTE = 1 << 3, - MM_MODEM_CAPABILITY_LTE_ADVANCED = 1 << 4, + /* MM_MODEM_CAPABILITY_LTE_ADVANCED deprecated */ MM_MODEM_CAPABILITY_IRIDIUM = 1 << 5, + MM_MODEM_CAPABILITY_5GNR = 1 << 6, MM_MODEM_CAPABILITY_ANY = 0xFFFFFFFF } MMModemCapability; @@ -208,6 +209,7 @@ * @MM_MODEM_ACCESS_TECHNOLOGY_EVDOA: CDMA2000 EVDO revision A. * @MM_MODEM_ACCESS_TECHNOLOGY_EVDOB: CDMA2000 EVDO revision B. * @MM_MODEM_ACCESS_TECHNOLOGY_LTE: LTE (ETSI 27.007: "E-UTRAN") + * @MM_MODEM_ACCESS_TECHNOLOGY_5GNR: 5GNR (ETSI 27.007: "NG-RAN"). Since 1.14. * @MM_MODEM_ACCESS_TECHNOLOGY_ANY: Mask specifying all access technologies. * * Describes various access technologies that a device uses when registered with @@ -232,6 +234,7 @@ MM_MODEM_ACCESS_TECHNOLOGY_EVDOA = 1 << 12, MM_MODEM_ACCESS_TECHNOLOGY_EVDOB = 1 << 13, MM_MODEM_ACCESS_TECHNOLOGY_LTE = 1 << 14, + MM_MODEM_ACCESS_TECHNOLOGY_5GNR = 1 << 15, MM_MODEM_ACCESS_TECHNOLOGY_ANY = 0xFFFFFFFF, } MMModemAccessTechnology; @@ -242,6 +245,7 @@ * @MM_MODEM_MODE_2G: GPRS, EDGE. * @MM_MODEM_MODE_3G: UMTS, HSxPA. * @MM_MODEM_MODE_4G: LTE. + * @MM_MODEM_MODE_5G: 5GNR. Since 1.14. * @MM_MODEM_MODE_ANY: Any mode can be used (only this value allowed for POTS modems). * * Bitfield to indicate which access modes are supported, allowed or @@ -255,6 +259,7 @@ MM_MODEM_MODE_2G = 1 << 1, MM_MODEM_MODE_3G = 1 << 2, MM_MODEM_MODE_4G = 1 << 3, + MM_MODEM_MODE_5G = 1 << 4, MM_MODEM_MODE_ANY = 0xFFFFFFFF } MMModemMode; @@ -533,6 +538,7 @@ * @MM_MODEM_PORT_TYPE_QMI: QMI port. * @MM_MODEM_PORT_TYPE_MBIM: MBIM port. * @MM_MODEM_PORT_TYPE_AUDIO: Audio port. Since 1.12. + * @MM_MODEM_PORT_TYPE_IGNORED: Ignored port. Since 1.16. * * Type of modem port. * @@ -547,6 +553,7 @@ MM_MODEM_PORT_TYPE_QMI = 6, MM_MODEM_PORT_TYPE_MBIM = 7, MM_MODEM_PORT_TYPE_AUDIO = 8, + MM_MODEM_PORT_TYPE_IGNORED = 9, } MMModemPortType; /** @@ -1188,6 +1195,7 @@ * @MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY: Emergency services only. Since 1.8. * @MM_MODEM_3GPP_REGISTRATION_STATE_HOME_CSFB_NOT_PREFERRED: Registered for "CSFB not preferred", home network (applicable only when on LTE). Since 1.8. * @MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_CSFB_NOT_PREFERRED: Registered for "CSFB not preferred", roaming network (applicable only when on LTE). Since 1.8. + * @MM_MODEM_3GPP_REGISTRATION_STATE_ATTACHED_RLOS: Attached for access to Restricted Local Operator Services (applicable only when on LTE). Since 1.14. * * GSM registration code as defined in 3GPP TS 27.007. * @@ -1205,6 +1213,7 @@ MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY = 8, MM_MODEM_3GPP_REGISTRATION_STATE_HOME_CSFB_NOT_PREFERRED = 9, MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_CSFB_NOT_PREFERRED = 10, + MM_MODEM_3GPP_REGISTRATION_STATE_ATTACHED_RLOS = 11, } MMModem3gppRegistrationState; /** diff -Nru modemmanager-1.12.8/include/ModemManager-names.h modemmanager-1.16.6/include/ModemManager-names.h --- modemmanager-1.12.8/include/ModemManager-names.h 2020-03-14 17:02:58.000000000 +0800 +++ modemmanager-1.16.6/include/ModemManager-names.h 2021-06-06 21:43:47.000000000 +0800 @@ -85,8 +85,10 @@ #define MM_SIM_METHOD_SENDPUK "SendPuk" #define MM_SIM_METHOD_ENABLEPIN "EnablePin" #define MM_SIM_METHOD_CHANGEPIN "ChangePin" +#define MM_SIM_PROPERTY_ACTIVE "Active" #define MM_SIM_PROPERTY_SIMIDENTIFIER "SimIdentifier" #define MM_SIM_PROPERTY_IMSI "Imsi" +#define MM_SIM_PROPERTY_EID "Eid" #define MM_SIM_PROPERTY_OPERATORIDENTIFIER "OperatorIdentifier" #define MM_SIM_PROPERTY_OPERATORNAME "OperatorName" #define MM_SIM_PROPERTY_EMERGENCYNUMBERS "EmergencyNumbers" @@ -161,9 +163,12 @@ #define MM_MODEM_METHOD_SETCURRENTCAPABILITIES "SetCurrentCapabilities" #define MM_MODEM_METHOD_SETCURRENTMODES "SetCurrentModes" #define MM_MODEM_METHOD_SETCURRENTBANDS "SetCurrentBands" +#define MM_MODEM_METHOD_SETPRIMARYSIMSLOT "SetPrimarySimSlot" #define MM_MODEM_METHOD_COMMAND "Command" #define MM_MODEM_SIGNAL_STATECHANGED "StateChanged" #define MM_MODEM_PROPERTY_SIM "Sim" +#define MM_MODEM_PROPERTY_SIMSLOTS "SimSlots" +#define MM_MODEM_PROPERTY_PRIMARYSIMSLOT "PrimarySimSlot" #define MM_MODEM_PROPERTY_BEARERS "Bearers" #define MM_MODEM_PROPERTY_SUPPORTEDCAPABILITIES "SupportedCapabilities" #define MM_MODEM_PROPERTY_CURRENTCAPABILITIES "CurrentCapabilities" @@ -308,6 +313,7 @@ #define MM_MODEM_SIGNAL_PROPERTY_GSM "Gsm" #define MM_MODEM_SIGNAL_PROPERTY_UMTS "Umts" #define MM_MODEM_SIGNAL_PROPERTY_LTE "Lte" +#define MM_MODEM_SIGNAL_PROPERTY_NR5G "Nr5g" /* * Interface 'org.freedesktop.ModemManager1.Modem.Oma' */ diff -Nru modemmanager-1.12.8/include/ModemManager-tags.h modemmanager-1.16.6/include/ModemManager-tags.h --- modemmanager-1.12.8/include/ModemManager-tags.h 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/include/ModemManager-tags.h 2021-06-06 21:40:59.000000000 +0800 @@ -214,6 +214,36 @@ #define ID_MM_PORT_TYPE_AUDIO "ID_MM_PORT_TYPE_AUDIO" /** + * ID_MM_PORT_TYPE_QMI: + * + * This is a port-specific tag applied to generic ports that we know in advance + * are QMI ports. + * + * This tag will also prevent other types of probing (e.g. AT, MBIM) on the + * port. + * + * This tag is not required for QMI ports exposed by the qmi_wwan driver. + * + * Since: 1.16 + */ +#define ID_MM_PORT_TYPE_QMI "ID_MM_PORT_TYPE_QMI" + +/** + * ID_MM_PORT_TYPE_MBIM: + * + * This is a port-specific tag applied to generic ports that we know in advance + * are MBIM ports. + * + * This tag will also prevent other types of probing (e.g. AT, QMI) on the + * port. + * + * This tag is not required for MBIM ports exposed by the cdc_mbim driver. + * + * Since: 1.16 + */ +#define ID_MM_PORT_TYPE_MBIM "ID_MM_PORT_TYPE_MBIM" + +/** * ID_MM_TTY_BAUDRATE: * * This is a port-specific tag applied to TTYs that require a specific diff -Nru modemmanager-1.12.8/include/ModemManager-version.h modemmanager-1.16.6/include/ModemManager-version.h --- modemmanager-1.12.8/include/ModemManager-version.h 2020-03-14 17:16:04.000000000 +0800 +++ modemmanager-1.16.6/include/ModemManager-version.h 2021-06-06 21:43:45.000000000 +0800 @@ -46,7 +46,7 @@ * * Since: 1.0 */ -#define MM_MINOR_VERSION (12) +#define MM_MINOR_VERSION (16) /** * MM_MICRO_VERSION: @@ -56,7 +56,7 @@ * * Since: 1.0 */ -#define MM_MICRO_VERSION (8) +#define MM_MICRO_VERSION (6) /** * MM_CHECK_VERSION: diff -Nru modemmanager-1.12.8/install-sh modemmanager-1.16.6/install-sh --- modemmanager-1.12.8/install-sh 2020-03-14 17:02:52.000000000 +0800 +++ modemmanager-1.16.6/install-sh 2021-06-06 21:43:42.000000000 +0800 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2018-03-11.20; # UTC +scriptversion=2020-11-14.01; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -69,6 +69,11 @@ # Desired mode of installed file. mode=0755 +# Create dirs (including intermediate dirs) using mode 755. +# This is like GNU 'install' as of coreutils 8.32 (2020). +mkdir_umask=22 + +backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= @@ -99,18 +104,28 @@ --version display version info and exit. -c (ignored) - -C install only if different (preserve the last data modification time) + -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. + -p pass -p to $cpprog. -s $stripprog installed files. + -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG + +By default, rm is invoked with -f; when overridden with RMPROG, +it's up to you to specify -f if you want it. + +If -S is not specified, no backups are attempted. + +Email bug reports to bug-automake@gnu.org. +Automake home page: https://www.gnu.org/software/automake/ " while test $# -ne 0; do @@ -137,8 +152,13 @@ -o) chowncmd="$chownprog $2" shift;; + -p) cpprog="$cpprog -p";; + -s) stripcmd=$stripprog;; + -S) backupsuffix="$2" + shift;; + -t) is_target_a_directory=always dst_arg=$2 @@ -255,6 +275,10 @@ dstdir=$dst test -d "$dstdir" dstdir_status=$? + # Don't chown directories that already exist. + if test $dstdir_status = 0; then + chowncmd="" + fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command @@ -301,22 +325,6 @@ if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then @@ -326,52 +334,49 @@ fi posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - # Note that $RANDOM variable is not portable (e.g. dash); Use it - # here however when possible just to lower collision chance. - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - - trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 - - # Because "mkdir -p" follows existing symlinks and we likely work - # directly in world-writeable /tmp, make sure that the '$tmpdir' - # directory is successfully created first before we actually test - # 'mkdir -p' feature. - if (umask $mkdir_umask && - $mkdirprog $mkdir_mode "$tmpdir" && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - test_tmpdir="$tmpdir/a" - ls_ld_tmpdir=`ls -ld "$test_tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null - fi - trap '' 0;; - esac;; + # The $RANDOM variable is not portable (e.g., dash). Use it + # here however when possible just to lower collision chance. + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + + trap ' + ret=$? + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null + exit $ret + ' 0 + + # Because "mkdir -p" follows existing symlinks and we likely work + # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directory is successfully created first before we actually test + # 'mkdir -p'. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; esac if @@ -382,7 +387,7 @@ then : else - # The umask is ridiculous, or mkdir does not conform to POSIX, + # mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. @@ -411,7 +416,7 @@ prefixes= else if $posix_mkdir; then - (umask=$mkdir_umask && + (umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 @@ -451,7 +456,18 @@ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # @@ -477,6 +493,13 @@ then rm -f "$dsttmp" else + # If $backupsuffix is set, and the file being installed + # already exists, attempt a backup. Don't worry if it fails, + # e.g., if mv doesn't support -f. + if test -n "$backupsuffix" && test -f "$dst"; then + $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null + fi + # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || @@ -491,9 +514,9 @@ # file should still install successfully. { test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || + $doit $rmcmd "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 diff -Nru modemmanager-1.12.8/introspection/Makefile.in modemmanager-1.16.6/introspection/Makefile.in --- modemmanager-1.12.8/introspection/Makefile.in 2020-03-14 17:16:02.000000000 +0800 +++ modemmanager-1.16.6/introspection/Makefile.in 2021-06-06 21:43:42.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,14 +91,14 @@ subdir = introspection ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -284,6 +284,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -357,9 +359,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -404,6 +410,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru modemmanager-1.12.8/introspection/org.freedesktop.ModemManager1.Bearer.xml modemmanager-1.16.6/introspection/org.freedesktop.ModemManager1.Bearer.xml --- modemmanager-1.12.8/introspection/org.freedesktop.ModemManager1.Bearer.xml 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/introspection/org.freedesktop.ModemManager1.Bearer.xml 2021-06-06 21:40:59.000000000 +0800 @@ -120,7 +120,7 @@ If the bearer specifies configuration via PPP or DHCP, only the - "method" item will be present. + "method" item is guaranteed to be present. Additional items which are only applicable when using the MM_BEARER_IP_METHOD_STATIC @@ -244,28 +244,71 @@ @@ -168,9 +182,16 @@ gathering is enabled. If the modem supports multiple location types it may return more than one here. - Note that if the device was told not to emit updated location - information when location information gathering was initially enabled, - this property may not return any location information for security reasons. + For security reasons, the location information updates via this + property are disabled by default. Users can use this property to monitor + location updates only if the location signals are enabled with + Setup(), + but considering that enabling the location signals would allow all users + to receive property updates as well, not just the process that enabled them. + For a finer grained access control, the user can use the + GetLocation() + method instead, which may require the client to authenticate itself on every + call. This dictionary is composed of a MMModemLocationSource diff -Nru modemmanager-1.12.8/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml modemmanager-1.16.6/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml --- modemmanager-1.12.8/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/introspection/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml 2021-06-06 21:40:59.000000000 +0800 @@ -200,7 +200,25 @@ @@ -219,8 +237,9 @@ The network may decide to use different settings during the actual device attach procedure, e.g. if the device is roaming or no explicit settings were requested, - so the properties shown in the #org.freedesktop.ModemManager1.Modem.Modem3gpp.InitialEpsBearer:InitialEpsBearer - may be totally different. + so the values shown in the + #org.freedesktop.ModemManager1.Modem.Modem3gpp:InitialEpsBearer + bearer object may be totally different. This is a read-only property, updating these settings should be done using the SetInitialEpsBearerSettings() diff -Nru modemmanager-1.12.8/introspection/org.freedesktop.ModemManager1.Modem.ModemCdma.xml modemmanager-1.16.6/introspection/org.freedesktop.ModemManager1.Modem.ModemCdma.xml --- modemmanager-1.12.8/introspection/org.freedesktop.ModemManager1.Modem.ModemCdma.xml 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/introspection/org.freedesktop.ModemManager1.Modem.ModemCdma.xml 2021-06-06 21:40:59.000000000 +0800 @@ -112,7 +112,7 @@ ActivationStateChanged: @activation_state: Current activation state, given as a MMModemCdmaActivationState. @activation_error: Carrier-specific error code, given as a MMCdmaActivationError. - @status_changes: Properties that have changed as a result of this activation state chage, including "mdn" and "min". The dictionary may be empty if the changed properties are unknown. + @status_changes: Properties that have changed as a result of this activation state change, including "mdn" and "min". The dictionary may be empty if the changed properties are unknown. The device activation state changed. --> diff -Nru modemmanager-1.12.8/introspection/org.freedesktop.ModemManager1.Modem.Signal.xml modemmanager-1.16.6/introspection/org.freedesktop.ModemManager1.Modem.Signal.xml --- modemmanager-1.12.8/introspection/org.freedesktop.ModemManager1.Modem.Signal.xml 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/introspection/org.freedesktop.ModemManager1.Modem.Signal.xml 2021-06-06 21:40:59.000000000 +0800 @@ -221,5 +221,43 @@ --> + + + diff -Nru modemmanager-1.12.8/introspection/org.freedesktop.ModemManager1.Modem.Simple.xml modemmanager-1.16.6/introspection/org.freedesktop.ModemManager1.Modem.Simple.xml --- modemmanager-1.12.8/introspection/org.freedesktop.ModemManager1.Modem.Simple.xml 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/introspection/org.freedesktop.ModemManager1.Modem.Simple.xml 2021-06-06 21:40:59.000000000 +0800 @@ -91,8 +91,9 @@ "number" - For POTS devices the number to dial,, + Number to dial for the data connection, given as a string value (signature "s"). + Deprecated since version 1.10.0. "allow-roaming" @@ -156,7 +157,7 @@ unsigned integer values (signature "au"). - "access-technology" + "access-technologies" A MMModemAccessTechnology value, given only when registered, as an unsigned integer value diff -Nru modemmanager-1.12.8/introspection/org.freedesktop.ModemManager1.Modem.xml modemmanager-1.16.6/introspection/org.freedesktop.ModemManager1.Modem.xml --- modemmanager-1.12.8/introspection/org.freedesktop.ModemManager1.Modem.xml 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/introspection/org.freedesktop.ModemManager1.Modem.xml 2021-06-06 21:40:59.000000000 +0800 @@ -55,7 +55,7 @@ @@ -178,15 +183,34 @@ + + + + + @@ -211,11 +235,56 @@ + + + + + + @@ -243,8 +316,11 @@ CurrentCapabilities: Bitmask of MMModemCapability - values, specifying the generic family of access technologies the modem - currently supports without a firmware reload or reinitialization. + values, specifying the currently used generic family of access + technologies. + + This bitmask will be one of the ones listed in + #org.freedesktop.ModemManager1.Modem:SupportedCapabilities. --> diff -Nru modemmanager-1.12.8/introspection/org.freedesktop.ModemManager1.Sim.xml modemmanager-1.16.6/introspection/org.freedesktop.ModemManager1.Sim.xml --- modemmanager-1.12.8/introspection/org.freedesktop.ModemManager1.Sim.xml 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/introspection/org.freedesktop.ModemManager1.Sim.xml 2021-06-06 21:40:59.000000000 +0800 @@ -66,6 +66,19 @@ + + + + + + - + %u%%", rssi, quality); + mm_obj_dbg (self, "signal state indication: %u --> %u%%", rssi, quality); mm_iface_modem_update_signal_quality (MM_IFACE_MODEM (self), quality); } } @@ -2828,6 +2948,7 @@ gchar *operator_name_take) { MMModem3gppRegistrationState reg_state; + gboolean operator_updated = FALSE; reg_state = mm_modem_3gpp_registration_state_from_mbim_register_state (state); @@ -2837,6 +2958,7 @@ g_str_equal (self->priv->current_operator_id, operator_id_take)) { g_free (operator_id_take); } else { + operator_updated = TRUE; g_free (self->priv->current_operator_id); self->priv->current_operator_id = operator_id_take; } @@ -2845,10 +2967,13 @@ g_str_equal (self->priv->current_operator_name, operator_name_take)) { g_free (operator_name_take); } else { + operator_updated = TRUE; g_free (self->priv->current_operator_name); self->priv->current_operator_name = operator_name_take; } } else { + if (self->priv->current_operator_id || self->priv->current_operator_name) + operator_updated = TRUE; g_clear_pointer (&self->priv->current_operator_id, g_free); g_clear_pointer (&self->priv->current_operator_name, g_free); g_free (operator_id_take); @@ -2861,6 +2986,11 @@ self->priv->available_data_classes = available_data_classes; update_access_technologies (self); + + /* request to reload operator info explicitly, so that the new + * operator name and code is propagated to the DBus interface */ + if (operator_updated) + mm_iface_modem_3gpp_reload_current_registration_info (MM_IFACE_MODEM_3GPP (self), NULL, NULL); } static void @@ -2893,7 +3023,8 @@ } typedef struct { - guint32 session_id; + MMBroadbandModemMbim *self; + guint32 session_id; } ReportDisconnectedStatusContext; static void @@ -2904,7 +3035,7 @@ if (MM_IS_BEARER_MBIM (bearer) && mm_bearer_mbim_get_session_id (MM_BEARER_MBIM (bearer)) == ctx->session_id) { - mm_dbg ("Bearer '%s' was disconnected.", mm_base_bearer_get_path (bearer)); + mm_obj_dbg (ctx->self, "bearer '%s' was disconnected.", mm_base_bearer_get_path (bearer)); mm_base_bearer_report_connection_status (bearer, MM_BEARER_CONNECTION_STATUS_DISCONNECTED); } } @@ -2941,7 +3072,8 @@ activation_state == MBIM_ACTIVATION_STATE_DEACTIVATED) { ReportDisconnectedStatusContext ctx; - mm_dbg ("Session ID '%u' was deactivated.", session_id); + mm_obj_dbg (self, "session ID '%u' was deactivated.", session_id); + ctx.self = self; ctx.session_id = session_id; mm_bearer_list_foreach (bearer_list, (MMBearerListForeachFunc)bearer_list_report_disconnected_status, @@ -2978,8 +3110,8 @@ (self->priv->last_ready_state == MBIM_SUBSCRIBER_READY_STATE_SIM_NOT_INSERTED && ready_state != MBIM_SUBSCRIBER_READY_STATE_SIM_NOT_INSERTED)) { /* SIM has been removed or reinserted, re-probe to ensure correct interfaces are exposed */ - mm_dbg ("SIM hot swap detected"); - mm_broadband_modem_update_sim_hot_swap_detected (MM_BROADBAND_MODEM (self)); + mm_obj_dbg (self, "SIM hot swap detected"); + mm_broadband_modem_sim_hot_swap_detected (MM_BROADBAND_MODEM (self)); } self->priv->last_ready_state = ready_state; @@ -3006,8 +3138,8 @@ } str = mbim_data_class_build_string_from_mask (highest_available_data_class); - mm_dbg ("Packet service state: '%s', data class: '%s'", - mbim_packet_service_state_get_string (packet_service_state), str); + mm_obj_dbg (self, "packet service state: '%s', data class: '%s'", + mbim_packet_service_state_get_string (packet_service_state), str); g_free (str); if (packet_service_state == MBIM_PACKET_SERVICE_STATE_ATTACHED) { @@ -3108,7 +3240,7 @@ } if (error) { - mm_dbg ("Flash message reading failed: %s", error->message); + mm_obj_dbg (self, "flash message reading failed: %s", error->message); g_error_free (error); } @@ -3126,14 +3258,14 @@ MbimDevice *device; MbimMessage *message; - port = mm_base_modem_peek_port_mbim (MM_BASE_MODEM (self)); + port = mm_broadband_modem_mbim_peek_port_mbim (self); if (!port) return; device = mm_port_mbim_peek_device (port); if (!device) return; - mm_dbg ("Reading new SMS at index '%u'", index); + mm_obj_dbg (self, "reading new SMS at index '%u'", index); message = mbim_message_sms_read_query_new (MBIM_SMS_FORMAT_PDU, MBIM_SMS_FLAG_INDEX, index, @@ -3168,7 +3300,7 @@ &flag, &index, NULL)) { - mm_dbg ("Received SMS store status update: '%s'", mbim_sms_status_flag_get_string (flag)); + mm_obj_dbg (self, "received SMS store status update: '%s'", mbim_sms_status_flag_get_string (flag)); if (flag == MBIM_SMS_STATUS_FLAG_NEW_MESSAGE) sms_notification_read_stored_sms (self, index); } @@ -3194,18 +3326,18 @@ notification, &pco_value, &error)) { - mm_warn ("Couldn't parse PCO notification: %s", error->message); + mm_obj_warn (self, "couldn't parse PCO notification: %s", error->message); g_error_free (error); return; } pco_data_hex = mm_utils_bin2hexstr (pco_value->pco_data_buffer, pco_value->pco_data_size); - mm_dbg ("Received PCO: session ID=%u type=%s size=%u data=%s", - pco_value->session_id, - mbim_pco_type_get_string (pco_value->pco_data_type), - pco_value->pco_data_size, - pco_data_hex); + mm_obj_dbg (self, "received PCO: session ID=%u type=%s size=%u data=%s", + pco_value->session_id, + mbim_pco_type_get_string (pco_value->pco_data_type), + pco_value->pco_data_size, + pco_data_hex); g_free (pco_data_hex); pco = mm_pco_new (); @@ -3235,7 +3367,7 @@ notification, &status, &error)) { - mm_warn ("Couldn't parse LTE attach status notification: %s", error->message); + mm_obj_warn (self, "couldn't parse LTE attach status notification: %s", error->message); g_error_free (error); return; } @@ -3275,7 +3407,7 @@ MbimMessage *notification) { if (mbim_message_indicate_status_get_cid (notification) != MBIM_CID_USSD) { - mm_warn ("unexpected USSD notification (cid %u)", mbim_message_indicate_status_get_cid (notification)); + mm_obj_warn (self, "unexpected USSD notification (cid %u)", mbim_message_indicate_status_get_cid (notification)); return; } @@ -3293,28 +3425,19 @@ MbimService service; service = mbim_message_indicate_status_get_service (notification); - mm_dbg ("Received notification (service '%s', command '%s')", - mbim_service_get_string (service), - mbim_cid_get_printable (service, - mbim_message_indicate_status_get_cid (notification))); + mm_obj_dbg (self, "received notification (service '%s', command '%s')", + mbim_service_get_string (service), + mbim_cid_get_printable (service, + mbim_message_indicate_status_get_cid (notification))); - switch (service) { - case MBIM_SERVICE_BASIC_CONNECT: + if (service == MBIM_SERVICE_BASIC_CONNECT) basic_connect_notification (self, notification); - break; - case MBIM_SERVICE_MS_BASIC_CONNECT_EXTENSIONS: + else if (service == MBIM_SERVICE_MS_BASIC_CONNECT_EXTENSIONS) ms_basic_connect_extensions_notification (self, notification); - break; - case MBIM_SERVICE_SMS: + else if (service == MBIM_SERVICE_SMS) sms_notification (self, notification); - break; - case MBIM_SERVICE_USSD: + else if (service == MBIM_SERVICE_USSD) ussd_notification (self, notification); - break; - default: - /* Ignore */ - break; - } } static void @@ -3325,16 +3448,16 @@ if (!device) return; - mm_dbg ("Supported notifications: signal (%s), registration (%s), sms (%s), connect (%s), subscriber (%s), packet (%s), pco (%s), ussd (%s), lte attach status (%s)", - self->priv->setup_flags & PROCESS_NOTIFICATION_FLAG_SIGNAL_QUALITY ? "yes" : "no", - self->priv->setup_flags & PROCESS_NOTIFICATION_FLAG_REGISTRATION_UPDATES ? "yes" : "no", - self->priv->setup_flags & PROCESS_NOTIFICATION_FLAG_SMS_READ ? "yes" : "no", - self->priv->setup_flags & PROCESS_NOTIFICATION_FLAG_CONNECT ? "yes" : "no", - self->priv->setup_flags & PROCESS_NOTIFICATION_FLAG_SUBSCRIBER_INFO ? "yes" : "no", - self->priv->setup_flags & PROCESS_NOTIFICATION_FLAG_PACKET_SERVICE ? "yes" : "no", - self->priv->setup_flags & PROCESS_NOTIFICATION_FLAG_PCO ? "yes" : "no", - self->priv->setup_flags & PROCESS_NOTIFICATION_FLAG_USSD ? "yes" : "no", - self->priv->setup_flags & PROCESS_NOTIFICATION_FLAG_LTE_ATTACH_STATUS ? "yes" : "no"); + mm_obj_dbg (self, "supported notifications: signal (%s), registration (%s), sms (%s), connect (%s), subscriber (%s), packet (%s), pco (%s), ussd (%s), lte attach status (%s)", + self->priv->setup_flags & PROCESS_NOTIFICATION_FLAG_SIGNAL_QUALITY ? "yes" : "no", + self->priv->setup_flags & PROCESS_NOTIFICATION_FLAG_REGISTRATION_UPDATES ? "yes" : "no", + self->priv->setup_flags & PROCESS_NOTIFICATION_FLAG_SMS_READ ? "yes" : "no", + self->priv->setup_flags & PROCESS_NOTIFICATION_FLAG_CONNECT ? "yes" : "no", + self->priv->setup_flags & PROCESS_NOTIFICATION_FLAG_SUBSCRIBER_INFO ? "yes" : "no", + self->priv->setup_flags & PROCESS_NOTIFICATION_FLAG_PACKET_SERVICE ? "yes" : "no", + self->priv->setup_flags & PROCESS_NOTIFICATION_FLAG_PCO ? "yes" : "no", + self->priv->setup_flags & PROCESS_NOTIFICATION_FLAG_USSD ? "yes" : "no", + self->priv->setup_flags & PROCESS_NOTIFICATION_FLAG_LTE_ATTACH_STATUS ? "yes" : "no"); if (setup) { /* Don't re-enable it if already there */ @@ -3399,16 +3522,9 @@ gpointer user_data) { MMBroadbandModemMbim *self = MM_BROADBAND_MODEM_MBIM (_self); - gboolean is_sim_hot_swap_configured = FALSE; - - g_object_get (self, - MM_IFACE_MODEM_SIM_HOT_SWAP_CONFIGURED, &is_sim_hot_swap_configured, - NULL); self->priv->setup_flags &= ~PROCESS_NOTIFICATION_FLAG_SIGNAL_QUALITY; self->priv->setup_flags &= ~PROCESS_NOTIFICATION_FLAG_CONNECT; - if (is_sim_hot_swap_configured) - self->priv->setup_flags &= ~PROCESS_NOTIFICATION_FLAG_SUBSCRIBER_INFO; self->priv->setup_flags &= ~PROCESS_NOTIFICATION_FLAG_PACKET_SERVICE; if (self->priv->is_pco_supported) self->priv->setup_flags &= ~PROCESS_NOTIFICATION_FLAG_PCO; @@ -3506,16 +3622,16 @@ if (!peek_device (self, &device, callback, user_data)) return; - mm_dbg ("Enabled notifications: signal (%s), registration (%s), sms (%s), connect (%s), subscriber (%s), packet (%s), pco (%s), ussd (%s), lte attach status (%s)", - self->priv->enable_flags & PROCESS_NOTIFICATION_FLAG_SIGNAL_QUALITY ? "yes" : "no", - self->priv->enable_flags & PROCESS_NOTIFICATION_FLAG_REGISTRATION_UPDATES ? "yes" : "no", - self->priv->enable_flags & PROCESS_NOTIFICATION_FLAG_SMS_READ ? "yes" : "no", - self->priv->enable_flags & PROCESS_NOTIFICATION_FLAG_CONNECT ? "yes" : "no", - self->priv->enable_flags & PROCESS_NOTIFICATION_FLAG_SUBSCRIBER_INFO ? "yes" : "no", - self->priv->enable_flags & PROCESS_NOTIFICATION_FLAG_PACKET_SERVICE ? "yes" : "no", - self->priv->enable_flags & PROCESS_NOTIFICATION_FLAG_PCO ? "yes" : "no", - self->priv->enable_flags & PROCESS_NOTIFICATION_FLAG_USSD ? "yes" : "no", - self->priv->enable_flags & PROCESS_NOTIFICATION_FLAG_LTE_ATTACH_STATUS ? "yes" : "no"); + mm_obj_dbg (self, "enabled notifications: signal (%s), registration (%s), sms (%s), connect (%s), subscriber (%s), packet (%s), pco (%s), ussd (%s), lte attach status (%s)", + self->priv->enable_flags & PROCESS_NOTIFICATION_FLAG_SIGNAL_QUALITY ? "yes" : "no", + self->priv->enable_flags & PROCESS_NOTIFICATION_FLAG_REGISTRATION_UPDATES ? "yes" : "no", + self->priv->enable_flags & PROCESS_NOTIFICATION_FLAG_SMS_READ ? "yes" : "no", + self->priv->enable_flags & PROCESS_NOTIFICATION_FLAG_CONNECT ? "yes" : "no", + self->priv->enable_flags & PROCESS_NOTIFICATION_FLAG_SUBSCRIBER_INFO ? "yes" : "no", + self->priv->enable_flags & PROCESS_NOTIFICATION_FLAG_PACKET_SERVICE ? "yes" : "no", + self->priv->enable_flags & PROCESS_NOTIFICATION_FLAG_PCO ? "yes" : "no", + self->priv->enable_flags & PROCESS_NOTIFICATION_FLAG_USSD ? "yes" : "no", + self->priv->enable_flags & PROCESS_NOTIFICATION_FLAG_LTE_ATTACH_STATUS ? "yes" : "no"); entries = g_new0 (MbimEventEntry *, 5); @@ -3636,67 +3752,124 @@ /*****************************************************************************/ /* Setup SIM hot swap */ +typedef struct { + MbimDevice *device; + GError *subscriber_info_error; +#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED + GError *qmi_error; +#endif +} SetupSimHotSwapContext; + +static void +setup_sim_hot_swap_context_free (SetupSimHotSwapContext *ctx) +{ +#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED + g_clear_error (&ctx->qmi_error); +#endif + g_clear_error (&ctx->subscriber_info_error); + g_clear_object (&ctx->device); + g_slice_free (SetupSimHotSwapContext, ctx); +} + static gboolean -modem_setup_sim_hot_swap_finish (MMIfaceModem *self, - GAsyncResult *res, - GError **error) +modem_setup_sim_hot_swap_finish (MMIfaceModem *self, + GAsyncResult *res, + GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void -enable_subscriber_info_unsolicited_events_ready (MMBroadbandModemMbim *self, - GAsyncResult *res, - GTask *task) +sim_hot_swap_complete (GTask *task) { - GError *error = NULL; + SetupSimHotSwapContext *ctx; - if (!common_enable_disable_unsolicited_events_finish (self, res, &error)) { - mm_dbg ("Failed to enable subscriber info events: %s", error->message); - g_task_return_error (task, error); - g_object_unref (task); - return; - } + ctx = g_task_get_task_data (task); - g_task_return_boolean (task, TRUE); + /* If MBIM based logic worked, success */ + if (!ctx->subscriber_info_error) + g_task_return_boolean (task, TRUE); +#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED + /* Otherwise, If QMI-over-MBIM based logic worked, success */ + else if (!ctx->qmi_error) + g_task_return_boolean (task, TRUE); +#endif + /* Otherwise, prefer MBIM specific error */ + else + g_task_return_error (task, g_steal_pointer (&ctx->subscriber_info_error)); g_object_unref (task); } +#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED + static void -setup_subscriber_info_unsolicited_events_ready (MMBroadbandModemMbim *self, - GAsyncResult *res, - GTask *task) +qmi_setup_sim_hot_swap_ready (MMIfaceModem *self, + GAsyncResult *res, + GTask *task) { - GError *error = NULL; + SetupSimHotSwapContext *ctx; - if (!common_setup_cleanup_unsolicited_events_finish (self, res, &error)) { - mm_dbg ("Failed to set up subscriber info events: %s", error->message); - g_task_return_error (task, error); - g_object_unref (task); - return; + ctx = g_task_get_task_data (task); + if (!mm_shared_qmi_setup_sim_hot_swap_finish (self, res, &ctx->qmi_error)) + mm_obj_dbg (self, "couldn't setup SIM hot swap using QMI over MBIM: %s", ctx->qmi_error->message); + + sim_hot_swap_complete (task); +} + +#endif + +static void +enable_subscriber_info_unsolicited_events_ready (MMBroadbandModemMbim *self, + GAsyncResult *res, + GTask *task) +{ + SetupSimHotSwapContext *ctx; + + ctx = g_task_get_task_data (task); + + if (!common_enable_disable_unsolicited_events_finish (self, res, &ctx->subscriber_info_error)) { + mm_obj_dbg (self, "failed to enable subscriber info events: %s", ctx->subscriber_info_error->message); + /* reset setup flags if enabling failed */ + self->priv->setup_flags &= ~PROCESS_NOTIFICATION_FLAG_SUBSCRIBER_INFO; + common_setup_cleanup_unsolicited_events_sync (self, ctx->device, FALSE); } - self->priv->enable_flags |= PROCESS_NOTIFICATION_FLAG_SUBSCRIBER_INFO; - common_enable_disable_unsolicited_events (self, - (GAsyncReadyCallback)enable_subscriber_info_unsolicited_events_ready, - task); +#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED + mm_shared_qmi_setup_sim_hot_swap (MM_IFACE_MODEM (self), + (GAsyncReadyCallback)qmi_setup_sim_hot_swap_ready, + task); +#else + sim_hot_swap_complete (task); +#endif } static void -modem_setup_sim_hot_swap (MMIfaceModem *_self, - GAsyncReadyCallback callback, - gpointer user_data) +modem_setup_sim_hot_swap (MMIfaceModem *_self, + GAsyncReadyCallback callback, + gpointer user_data) { - MMBroadbandModemMbim *self = MM_BROADBAND_MODEM_MBIM (_self); - GTask *task; + MMBroadbandModemMbim *self = MM_BROADBAND_MODEM_MBIM (_self); + MbimDevice *device; + GTask *task; + SetupSimHotSwapContext *ctx; + + if (!peek_device (self, &device, callback, user_data)) + return; task = g_task_new (self, NULL, callback, user_data); + ctx = g_slice_new0 (SetupSimHotSwapContext); + ctx->device = g_object_ref (device); + g_task_set_task_data (task, ctx, (GDestroyNotify)setup_sim_hot_swap_context_free); + /* Setup flags synchronously, which never fails */ self->priv->setup_flags |= PROCESS_NOTIFICATION_FLAG_SUBSCRIBER_INFO; - common_setup_cleanup_unsolicited_events (self, - TRUE, - (GAsyncReadyCallback)setup_subscriber_info_unsolicited_events_ready, - task); + common_setup_cleanup_unsolicited_events_sync (self, ctx->device, TRUE); + + /* Enable flags asynchronously, which may fail */ + self->priv->enable_flags |= PROCESS_NOTIFICATION_FLAG_SUBSCRIBER_INFO; + common_enable_disable_unsolicited_events (self, + (GAsyncReadyCallback)enable_subscriber_info_unsolicited_events_ready, + task); } /*****************************************************************************/ @@ -3921,9 +4094,10 @@ static void modem_3gpp_run_registration_checks (MMIfaceModem3gpp *self, - gboolean cs_supported, - gboolean ps_supported, - gboolean eps_supported, + gboolean is_cs_supported, + gboolean is_ps_supported, + gboolean is_eps_supported, + gboolean is_5gs_supported, GAsyncReadyCallback callback, gpointer user_data) { @@ -4122,7 +4296,7 @@ task = g_task_new (self, NULL, callback, user_data); - mm_dbg ("scanning networks..."); + mm_obj_dbg (self, "scanning networks..."); message = mbim_message_visible_providers_query_new (MBIM_VISIBLE_PROVIDERS_ACTION_FULL_SCAN, NULL); mbim_device_command (device, message, @@ -4186,6 +4360,7 @@ MMSignal *gsm; MMSignal *umts; MMSignal *lte; + MMSignal *nr5g; } SignalLoadValuesResult; static void @@ -4194,6 +4369,7 @@ g_clear_object (&result->gsm); g_clear_object (&result->umts); g_clear_object (&result->lte); + g_clear_object (&result->nr5g); g_slice_free (SignalLoadValuesResult, result); } @@ -4205,6 +4381,7 @@ MMSignal **gsm, MMSignal **umts, MMSignal **lte, + MMSignal **nr5g, GError **error) { SignalLoadValuesResult *result; @@ -4213,20 +4390,14 @@ if (!result) return FALSE; - if (gsm && result->gsm) { - *gsm = result->gsm; - result->gsm = NULL; - } - - if (umts && result->umts) { - *umts = result->umts; - result->umts = NULL; - } - - if (lte && result->lte) { - *lte = result->lte; - result->lte = NULL; - } + if (gsm) + *gsm = g_steal_pointer (&result->gsm); + if (umts) + *umts = g_steal_pointer (&result->umts); + if (lte) + *lte = g_steal_pointer (&result->lte); + if (nr5g) + *nr5g = g_steal_pointer (&result->nr5g); signal_load_values_result_free (result); @@ -4272,12 +4443,12 @@ if (ecno <= 49) { if (!result->umts) result->umts = mm_signal_new (); - mm_signal_set_ecio (result->umts, -24.0 + ((float) ecno / 2)); + mm_signal_set_ecio (result->umts, -24.0 + ((gdouble) ecno / 2)); } if (rsrq <= 34) { result->lte = mm_signal_new (); - mm_signal_set_rsrq (result->lte, -19.5 + ((float) rsrq / 2)); + mm_signal_set_rsrq (result->lte, -19.5 + ((gdouble) rsrq / 2)); } if (rsrp <= 97) { @@ -4333,7 +4504,7 @@ result = g_slice_new0 (SignalLoadValuesResult); if (!iface_modem_signal_parent->load_values_finish (self, res, NULL, NULL, - &result->gsm, &result->umts, &result->lte, + &result->gsm, &result->umts, &result->lte, &result->nr5g, &error)) { signal_load_values_result_free (result); g_task_return_error (task, error); @@ -4416,32 +4587,26 @@ guint32 *scheme, GError **error) { - GByteArray *array; + g_autoptr(GByteArray) array = NULL; if (mm_charset_can_convert_to (command, MM_MODEM_CHARSET_GSM)) { - guint8 *gsm; - guint8 *packed; - guint32 len = 0; - guint32 packed_len = 0; + g_autoptr(GByteArray) gsm = NULL; + guint8 *packed; + guint32 packed_len = 0; *scheme = MM_MODEM_GSM_USSD_SCHEME_7BIT; - gsm = mm_charset_utf8_to_unpacked_gsm (command, &len); + gsm = mm_modem_charset_bytearray_from_utf8 (command, MM_MODEM_CHARSET_GSM, FALSE, error); if (!gsm) { - g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, - "Failed to encode USSD command in GSM7 charset"); + g_prefix_error (error, "Failed to encode USSD command in GSM7 charset: "); return NULL; } - packed = mm_charset_gsm_pack (gsm, len, 0, &packed_len); - g_free (gsm); - + packed = mm_charset_gsm_pack (gsm->data, gsm->len, 0, &packed_len); array = g_byte_array_new_take (packed, packed_len); } else { *scheme = MM_MODEM_GSM_USSD_SCHEME_UCS2; - array = g_byte_array_sized_new (strlen (command) * 2); - if (!mm_modem_charset_byte_array_append (array, command, FALSE, MM_MODEM_CHARSET_UCS2)) { - g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, - "Failed to encode USSD command in UCS2 charset"); - g_byte_array_unref (array); + array = mm_modem_charset_bytearray_from_utf8 (command, MM_MODEM_CHARSET_UCS2, FALSE, error); + if (!array) { + g_prefix_error (error, "Failed to encode USSD command in UCS2 charset: "); return NULL; } } @@ -4449,11 +4614,10 @@ if (array->len > 160) { g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS, "Failed to encode USSD command: encoded data too long (%u > 160)", array->len); - g_byte_array_unref (array); return NULL; } - return array; + return g_steal_pointer (&array); } static gchar * @@ -4464,21 +4628,20 @@ gchar *decoded = NULL; if (scheme == MM_MODEM_GSM_USSD_SCHEME_7BIT) { - guint8 *unpacked; - guint32 unpacked_len; + g_autoptr(GByteArray) unpacked_array = NULL; + guint8 *unpacked = NULL; + guint32 unpacked_len; unpacked = mm_charset_gsm_unpack ((const guint8 *)data->data, (data->len * 8) / 7, 0, &unpacked_len); - decoded = (gchar *) mm_charset_gsm_unpacked_to_utf8 (unpacked, unpacked_len); + unpacked_array = g_byte_array_new_take (unpacked, unpacked_len); + + decoded = mm_modem_charset_bytearray_to_utf8 (unpacked_array, MM_MODEM_CHARSET_GSM, FALSE, error); if (!decoded) - g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, - "Error decoding USSD command in 0x%04x scheme (GSM7 charset)", - scheme); + g_prefix_error (error, "Error decoding USSD command in 0x%04x scheme (GSM7 charset): ", scheme); } else if (scheme == MM_MODEM_GSM_USSD_SCHEME_UCS2) { - decoded = mm_modem_charset_byte_array_to_utf8 (data, MM_MODEM_CHARSET_UCS2); + decoded = mm_modem_charset_bytearray_to_utf8 (data, MM_MODEM_CHARSET_UCS2, FALSE, error); if (!decoded) - g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, - "Error decoding USSD command in 0x%04x scheme (UCS2 charset)", - scheme); + g_prefix_error (error, "Error decoding USSD command in 0x%04x scheme (UCS2 charset): ", scheme); } else g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, "Failed to decode USSD command in unsupported 0x%04x scheme", scheme); @@ -4584,7 +4747,7 @@ /* If no pending task, just report the error */ if (error) { - mm_dbg ("Network reported USSD message: %s", error->message); + mm_obj_dbg (self, "network reported USSD message: %s", error->message); g_error_free (error); } @@ -4608,11 +4771,11 @@ &data_size, &data, NULL)) { - mm_dbg ("Received USSD indication: %s, session state: %s, scheme: 0x%x, data size: %u bytes", - mbim_ussd_response_get_string (ussd_response), - mbim_ussd_session_state_get_string (ussd_session_state), - scheme, - data_size); + mm_obj_dbg (self, "received USSD indication: %s, session state: %s, scheme: 0x%x, data size: %u bytes", + mbim_ussd_response_get_string (ussd_response), + mbim_ussd_session_state_get_string (ussd_session_state), + scheme, + data_size); process_ussd_message (self, ussd_response, ussd_session_state, scheme, data_size, data); } } @@ -4748,11 +4911,11 @@ &data_size, &data, &error)) { - mm_dbg ("Received USSD response: %s, session state: %s, scheme: 0x%x, data size: %u bytes", - mbim_ussd_response_get_string (ussd_response), - mbim_ussd_session_state_get_string (ussd_session_state), - scheme, - data_size); + mm_obj_dbg (self, "received USSD response: %s, session state: %s, scheme: 0x%x, data size: %u bytes", + mbim_ussd_response_get_string (ussd_response), + mbim_ussd_session_state_get_string (ussd_session_state), + scheme, + data_size); process_ussd_message (self, ussd_response, ussd_session_state, scheme, data_size, data); } else { /* Report error in the cached task, if any */ @@ -4764,7 +4927,7 @@ g_task_return_error (task, error); g_object_unref (task); } else { - mm_dbg ("Failed to parse USSD response: %s", error->message); + mm_obj_dbg (self, "failed to parse USSD response: %s", error->message); g_clear_error (&error); } } @@ -4812,6 +4975,8 @@ case MM_MODEM_3GPP_USSD_SESSION_STATE_USER_RESPONSE: action = MBIM_USSD_ACTION_CONTINUE; break; + case MM_MODEM_3GPP_USSD_SESSION_STATE_UNKNOWN: + case MM_MODEM_3GPP_USSD_SESSION_STATE_ACTIVE: default: g_assert_not_reached (); return; @@ -4872,14 +5037,14 @@ /* Complete the pending action, regardless of the operation result */ if (self->priv->pending_ussd_action) { - GTask *task; + GTask *pending_task; - task = self->priv->pending_ussd_action; + pending_task = self->priv->pending_ussd_action; self->priv->pending_ussd_action = NULL; - g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_ABORTED, + g_task_return_new_error (pending_task, MM_CORE_ERROR, MM_CORE_ERROR_ABORTED, "USSD session was cancelled"); - g_object_unref (task); + g_object_unref (pending_task); } mm_iface_modem_3gpp_ussd_update_state (MM_IFACE_MODEM_3GPP_USSD (self), @@ -4951,10 +5116,10 @@ /* We only handle 3GPP messaging (PDU based) currently */ if (self->priv->caps_sms & MBIM_SMS_CAPS_PDU_RECEIVE && self->priv->caps_sms & MBIM_SMS_CAPS_PDU_SEND) { - mm_dbg ("Messaging capabilities supported"); + mm_obj_dbg (self, "messaging capabilities supported"); g_task_return_boolean (task, TRUE); } else { - mm_dbg ("Messaging capabilities not supported by this modem"); + mm_obj_dbg (self, "messaging capabilities not supported by this modem"); g_task_return_boolean (task, FALSE); } g_object_unref (task); @@ -5014,18 +5179,20 @@ part = mm_sms_part_3gpp_new_from_binary_pdu (pdu->message_index, pdu->pdu_data, pdu->pdu_data_size, + self, + FALSE, &error); if (part) { - mm_dbg ("Correctly parsed PDU (%d)", pdu->message_index); + mm_obj_dbg (self, "correctly parsed PDU (%d)", pdu->message_index); mm_iface_modem_messaging_take_part (MM_IFACE_MODEM_MESSAGING (self), part, mm_sms_state_from_mbim_message_status (pdu->message_status), MM_SMS_STORAGE_MT); } else { /* Don't treat the error as critical */ - mm_dbg ("Error parsing PDU (%d): %s", - pdu->message_index, - error->message); + mm_obj_dbg (self, "error parsing PDU (%d): %s", + pdu->message_index, + error->message); g_error_free (error); } } @@ -5085,7 +5252,7 @@ task = g_task_new (self, NULL, callback, user_data); - mm_dbg ("loading SMS parts..."); + mm_obj_dbg (self, "loading SMS parts..."); message = mbim_message_sms_read_query_new (MBIM_SMS_FORMAT_PDU, MBIM_SMS_FLAG_ALL, 0, /* message index, unused */ @@ -5176,6 +5343,44 @@ /*****************************************************************************/ +#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED +static void +set_property (GObject *object, + guint prop_id, + const GValue *value, + GParamSpec *pspec) +{ + MMBroadbandModemMbim *self = MM_BROADBAND_MODEM_MBIM (object); + + switch (prop_id) { + case PROP_QMI_UNSUPPORTED: + self->priv->qmi_unsupported = g_value_get_boolean (value); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} + +static void +get_property (GObject *object, + guint prop_id, + GValue *value, + GParamSpec *pspec) +{ + MMBroadbandModemMbim *self = MM_BROADBAND_MODEM_MBIM (object); + + switch (prop_id) { + case PROP_QMI_UNSUPPORTED: + g_value_set_boolean (value, self->priv->qmi_unsupported); + break; + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + break; + } +} +#endif + MMBroadbandModemMbim * mm_broadband_modem_mbim_new (const gchar *device, const gchar **drivers, @@ -5205,12 +5410,15 @@ } static void -finalize (GObject *object) +dispose (GObject *object) { MMBroadbandModemMbim *self = MM_BROADBAND_MODEM_MBIM (object); MMPortMbim *mbim; - mbim = mm_base_modem_peek_port_mbim (MM_BASE_MODEM (self)); + /* If any port cleanup is needed, it must be done during dispose(), as + * the modem object will be affected by an explciit g_object_run_dispose() + * that will remove all port references right away */ + mbim = mm_broadband_modem_mbim_peek_port_mbim (self); if (mbim) { /* Explicitly remove notification handler */ self->priv->setup_flags = PROCESS_NOTIFICATION_FLAG_NONE; @@ -5222,12 +5430,21 @@ mm_port_mbim_close (mbim, NULL, NULL); } + G_OBJECT_CLASS (mm_broadband_modem_mbim_parent_class)->dispose (object); +} + +static void +finalize (GObject *object) +{ + MMBroadbandModemMbim *self = MM_BROADBAND_MODEM_MBIM (object); + + g_free (self->priv->caps_custom_data_class); g_free (self->priv->caps_device_id); g_free (self->priv->caps_firmware_info); g_free (self->priv->caps_hardware_info); g_free (self->priv->current_operator_id); g_free (self->priv->current_operator_name); - mm_pco_list_free (self->priv->pco_list); + g_list_free_full (self->priv->pco_list, g_object_unref); G_OBJECT_CLASS (mm_broadband_modem_mbim_parent_class)->finalize (object); } @@ -5272,6 +5489,8 @@ iface->modem_power_up_finish = power_up_finish; iface->modem_power_down = modem_power_down; iface->modem_power_down_finish = power_down_finish; + iface->reset = modem_reset; + iface->reset_finish = modem_reset_finish; iface->load_supported_ip_families = modem_load_supported_ip_families; iface->load_supported_ip_families_finish = modem_load_supported_ip_families_finish; @@ -5286,6 +5505,8 @@ iface->load_current_bands_finish = mm_shared_qmi_load_current_bands_finish; iface->set_current_bands = mm_shared_qmi_set_current_bands; iface->set_current_bands_finish = mm_shared_qmi_set_current_bands_finish; + iface->fcc_unlock = mm_shared_qmi_fcc_unlock; + iface->fcc_unlock_finish = mm_shared_qmi_fcc_unlock_finish; #endif /* Additional actions */ @@ -5307,6 +5528,12 @@ /* Create MBIM-specific SIM */ iface->create_sim = create_sim; iface->create_sim_finish = create_sim_finish; +#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED + iface->load_sim_slots = mm_shared_qmi_load_sim_slots; + iface->load_sim_slots_finish = mm_shared_qmi_load_sim_slots_finish; + iface->set_primary_sim_slot = mm_shared_qmi_set_primary_sim_slot; + iface->set_primary_sim_slot_finish = mm_shared_qmi_set_primary_sim_slot_finish; +#endif /* Create MBIM-specific bearer */ iface->create_bearer = modem_create_bearer; @@ -5318,8 +5545,6 @@ /* Other actions */ #if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED - iface->reset = mm_shared_qmi_reset; - iface->reset_finish = mm_shared_qmi_reset_finish; iface->factory_reset = mm_shared_qmi_factory_reset; iface->factory_reset_finish = mm_shared_qmi_factory_reset_finish; #endif @@ -5486,6 +5711,13 @@ g_type_class_add_private (object_class, sizeof (MMBroadbandModemMbimPrivate)); + klass->peek_port_mbim_for_data = peek_port_mbim_for_data; + +#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED + object_class->set_property = set_property; + object_class->get_property = get_property; +#endif + object_class->dispose = dispose; object_class->finalize = finalize; broadband_modem_class->initialization_started = initialization_started; @@ -5495,4 +5727,13 @@ /* Do not initialize the MBIM modem through AT commands */ broadband_modem_class->enabling_modem_init = NULL; broadband_modem_class->enabling_modem_init_finish = NULL; + +#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED + g_object_class_install_property (object_class, PROP_QMI_UNSUPPORTED, + g_param_spec_boolean (MM_BROADBAND_MODEM_MBIM_QMI_UNSUPPORTED, + "QMI over MBIM unsupported", + "TRUE when QMI over MBIM should not be considered.", + FALSE, + G_PARAM_READWRITE)); +#endif } diff -Nru modemmanager-1.12.8/src/mm-broadband-modem-mbim.h modemmanager-1.16.6/src/mm-broadband-modem-mbim.h --- modemmanager-1.12.8/src/mm-broadband-modem-mbim.h 2017-09-14 22:00:54.000000000 +0800 +++ modemmanager-1.16.6/src/mm-broadband-modem-mbim.h 2021-06-06 21:40:59.000000000 +0800 @@ -29,6 +29,8 @@ typedef struct _MMBroadbandModemMbimClass MMBroadbandModemMbimClass; typedef struct _MMBroadbandModemMbimPrivate MMBroadbandModemMbimPrivate; +#define MM_BROADBAND_MODEM_MBIM_QMI_UNSUPPORTED "broadband-modem-mbim-qmi-unsupported" + struct _MMBroadbandModemMbim { MMBroadbandModem parent; MMBroadbandModemMbimPrivate *priv; @@ -36,14 +38,28 @@ struct _MMBroadbandModemMbimClass{ MMBroadbandModemClass parent; + + MMPortMbim * (* peek_port_mbim_for_data) (MMBroadbandModemMbim *self, + MMPort *data, + GError **error); }; GType mm_broadband_modem_mbim_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMBroadbandModemMbim, g_object_unref) -MMBroadbandModemMbim *mm_broadband_modem_mbim_new (const gchar *device, +MMBroadbandModemMbim *mm_broadband_modem_mbim_new (const gchar *device, const gchar **drivers, - const gchar *plugin, - guint16 vendor_id, - guint16 product_id); + const gchar *plugin, + guint16 vendor_id, + guint16 product_id); + +MMPortMbim *mm_broadband_modem_mbim_peek_port_mbim (MMBroadbandModemMbim *self); +MMPortMbim *mm_broadband_modem_mbim_peek_port_mbim_for_data (MMBroadbandModemMbim *self, + MMPort *data, + GError **error); +MMPortMbim *mm_broadband_modem_mbim_get_port_mbim (MMBroadbandModemMbim *self); +MMPortMbim *mm_broadband_modem_mbim_get_port_mbim_for_data (MMBroadbandModemMbim *self, + MMPort *data, + GError **error); #endif /* MM_BROADBAND_MODEM_MBIM_H */ diff -Nru modemmanager-1.12.8/src/mm-broadband-modem-qmi.c modemmanager-1.16.6/src/mm-broadband-modem-qmi.c --- modemmanager-1.12.8/src/mm-broadband-modem-qmi.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-broadband-modem-qmi.c 2021-06-06 21:40:59.000000000 +0800 @@ -85,14 +85,22 @@ /* 3GPP and CDMA share unsolicited events setup/enable/disable/cleanup */ gboolean unsolicited_events_enabled; gboolean unsolicited_events_setup; - guint event_report_indication_id; + guint nas_event_report_indication_id; + guint wds_event_report_indication_id; #if defined WITH_NEWEST_QMI_COMMANDS - guint signal_info_indication_id; + guint nas_signal_info_indication_id; #endif /* WITH_NEWEST_QMI_COMMANDS */ /* New devices may not support the legacy DMS UIM commands */ gboolean dms_uim_deprecated; + /* Whether autoconnect disabling needs to be checked up during + * the device enabling */ + gboolean autoconnect_checked; + + /* Index of the WDS profile used as initial EPS bearer */ + guint16 default_attach_pdn; + /* 3GPP/CDMA registration helpers */ gchar *current_operator_id; gchar *current_operator_description; @@ -122,6 +130,13 @@ gboolean oma_unsolicited_events_setup; guint oma_event_report_indication_id; + /* 3GPP USSD helpers */ + guint ussd_indication_id; + guint ussd_release_indication_id; + gboolean ussd_unsolicited_events_enabled; + gboolean ussd_unsolicited_events_setup; + GTask *pending_ussd_action; + /* Firmware helpers */ gboolean firmware_list_preloaded; GList *firmware_list; @@ -142,7 +157,7 @@ MMPortQmi *port; QmiClient *client; - port = mm_base_modem_peek_port_qmi (MM_BASE_MODEM (self)); + port = mm_broadband_modem_qmi_peek_port_qmi (MM_BROADBAND_MODEM_QMI (self)); if (!port) { g_set_error (error, MM_CORE_ERROR, @@ -163,6 +178,137 @@ } /*****************************************************************************/ + +MMPortQmi * +mm_broadband_modem_qmi_get_port_qmi (MMBroadbandModemQmi *self) +{ + MMPortQmi *primary_qmi_port; + + g_assert (MM_IS_BROADBAND_MODEM_QMI (self)); + + primary_qmi_port = mm_broadband_modem_qmi_peek_port_qmi (self); + return (primary_qmi_port ? + MM_PORT_QMI (g_object_ref (primary_qmi_port)) : + NULL); +} + +MMPortQmi * +mm_broadband_modem_qmi_peek_port_qmi (MMBroadbandModemQmi *self) +{ + MMPortQmi *primary_qmi_port = NULL; + GList *qmi_ports; + + g_assert (MM_IS_BROADBAND_MODEM_QMI (self)); + + qmi_ports = mm_base_modem_find_ports (MM_BASE_MODEM (self), + MM_PORT_SUBSYS_UNKNOWN, + MM_PORT_TYPE_QMI, + NULL); + + /* First QMI port in the list is the primary one always */ + if (qmi_ports) + primary_qmi_port = MM_PORT_QMI (qmi_ports->data); + + g_list_free_full (qmi_ports, g_object_unref); + + return primary_qmi_port; +} + +MMPortQmi * +mm_broadband_modem_qmi_get_port_qmi_for_data (MMBroadbandModemQmi *self, + MMPort *data, + QmiSioPort *out_sio_port, + GError **error) +{ + MMPortQmi *qmi_port; + + g_assert (MM_IS_BROADBAND_MODEM_QMI (self)); + + qmi_port = mm_broadband_modem_qmi_peek_port_qmi_for_data (self, data, out_sio_port, error); + return (qmi_port ? + MM_PORT_QMI (g_object_ref (qmi_port)) : + NULL); +} + +static MMPortQmi * +peek_port_qmi_for_data (MMBroadbandModemQmi *self, + MMPort *data, + QmiSioPort *out_sio_port, + GError **error) +{ + GList *cdc_wdm_qmi_ports; + GList *l; + const gchar *net_port_parent_path; + MMPortQmi *found = NULL; + const gchar *net_port_driver; + + g_assert (MM_IS_BROADBAND_MODEM_QMI (self)); + g_assert (mm_port_get_subsys (data) == MM_PORT_SUBSYS_NET); + + net_port_driver = mm_kernel_device_get_driver (mm_port_peek_kernel_device (data)); + if (g_strcmp0 (net_port_driver, "qmi_wwan") != 0 && g_strcmp0 (net_port_driver, "mhi_net")) { + g_set_error (error, + MM_CORE_ERROR, + MM_CORE_ERROR_FAILED, + "Unsupported QMI kernel driver for 'net/%s': %s", + mm_port_get_device (data), + net_port_driver); + return NULL; + } + + if (!g_strcmp0 (net_port_driver, "mhi_net")) + return mm_broadband_modem_qmi_peek_port_qmi (self); + + net_port_parent_path = mm_kernel_device_get_interface_sysfs_path (mm_port_peek_kernel_device (data)); + if (!net_port_parent_path) { + g_set_error (error, + MM_CORE_ERROR, + MM_CORE_ERROR_FAILED, + "No parent path for 'net/%s'", + mm_port_get_device (data)); + return NULL; + } + + /* Find the CDC-WDM port on the same USB interface as the given net port */ + cdc_wdm_qmi_ports = mm_base_modem_find_ports (MM_BASE_MODEM (self), + MM_PORT_SUBSYS_USBMISC, + MM_PORT_TYPE_QMI, + NULL); + for (l = cdc_wdm_qmi_ports; l && !found; l = g_list_next (l)) { + const gchar *wdm_port_parent_path; + + g_assert (MM_IS_PORT_QMI (l->data)); + wdm_port_parent_path = mm_kernel_device_get_interface_sysfs_path (mm_port_peek_kernel_device (MM_PORT (l->data))); + if (wdm_port_parent_path && g_str_equal (wdm_port_parent_path, net_port_parent_path)) + found = MM_PORT_QMI (l->data); + } + + g_list_free_full (cdc_wdm_qmi_ports, g_object_unref); + + if (!found) + g_set_error (error, + MM_CORE_ERROR, + MM_CORE_ERROR_NOT_FOUND, + "Couldn't find associated QMI port for 'net/%s'", + mm_port_get_device (data)); + else + *out_sio_port = QMI_SIO_PORT_NONE; + + return found; +} + +MMPortQmi * +mm_broadband_modem_qmi_peek_port_qmi_for_data (MMBroadbandModemQmi *self, + MMPort *data, + QmiSioPort *out_sio_port, + GError **error) +{ + g_assert (MM_BROADBAND_MODEM_QMI_GET_CLASS (self)->peek_port_qmi_for_data); + + return MM_BROADBAND_MODEM_QMI_GET_CLASS (self)->peek_port_qmi_for_data (self, data, out_sio_port, error); +} + +/*****************************************************************************/ /* Create Bearer (Modem interface) */ static MMBaseBearer * @@ -241,7 +387,7 @@ callback, user_data)) return; - mm_dbg ("loading manufacturer..."); + mm_obj_dbg (self, "loading manufacturer..."); qmi_client_dms_get_manufacturer (QMI_CLIENT_DMS (client), NULL, 5, @@ -301,7 +447,7 @@ callback, user_data)) return; - mm_dbg ("loading model..."); + mm_obj_dbg (self, "loading model..."); qmi_client_dms_get_model (QMI_CLIENT_DMS (client), NULL, 5, @@ -361,7 +507,7 @@ callback, user_data)) return; - mm_dbg ("loading revision..."); + mm_obj_dbg (self, "loading revision..."); qmi_client_dms_get_revision (QMI_CLIENT_DMS (client), NULL, 5, @@ -421,7 +567,7 @@ callback, user_data)) return; - mm_dbg ("loading hardware revision..."); + mm_obj_dbg (self, "loading hardware revision..."); qmi_client_dms_get_hardware_revision (QMI_CLIENT_DMS (client), NULL, 5, @@ -492,7 +638,7 @@ else if (len == 8) self->priv->esn = g_strdup (str); else - mm_dbg ("Invalid ESN reported: '%s' (unexpected length)", str); + mm_obj_dbg (self, "invalid ESN reported: '%s' (unexpected length)", str); } if (qmi_message_dms_get_ids_output_get_meid (output, &str, NULL) && @@ -502,7 +648,7 @@ if (len == 14) self->priv->meid = g_strdup (str); else - mm_dbg ("Invalid MEID reported: '%s' (unexpected length)", str); + mm_obj_dbg (self, "invalid MEID reported: '%s' (unexpected length)", str); } if (self->priv->imei) @@ -532,7 +678,7 @@ callback, user_data)) return; - mm_dbg ("loading equipment identifier..."); + mm_obj_dbg (self, "loading equipment identifier..."); qmi_client_dms_get_ids (QMI_CLIENT_DMS (client), NULL, 5, @@ -557,17 +703,21 @@ GAsyncReadyCallback callback, gpointer user_data) { - gchar *device_identifier; - GTask *task; + gchar *device_identifier; + GTask *task; + GError *error = NULL; - mm_dbg ("loading device identifier..."); + task = g_task_new (self, NULL, callback, user_data); + + mm_obj_dbg (self, "loading device identifier..."); /* Just use dummy ATI/ATI1 replies, all the other internal info should be * enough for uniqueness */ - device_identifier = mm_broadband_modem_create_device_identifier (MM_BROADBAND_MODEM (self), "", ""); - - task = g_task_new (self, NULL, callback, user_data); - g_task_return_pointer (task, device_identifier, g_free); + device_identifier = mm_broadband_modem_create_device_identifier (MM_BROADBAND_MODEM (self), "", "", &error); + if (!device_identifier) + g_task_return_error (task, error); + else + g_task_return_pointer (task, device_identifier, g_free); g_object_unref (task); } @@ -625,7 +775,7 @@ callback, user_data)) return; - mm_dbg ("loading own numbers..."); + mm_obj_dbg (self, "loading own numbers..."); qmi_client_dms_get_msisdn (QMI_CLIENT_DMS (client), NULL, 5, @@ -669,260 +819,33 @@ static void load_unlock_required_context_step (GTask *task); -/* Used also when loading unlock retries left */ -static gboolean -uim_get_card_status_output_parse (QmiMessageUimGetCardStatusOutput *output, - MMModemLock *o_lock, - guint *o_pin1_retries, - guint *o_puk1_retries, - guint *o_pin2_retries, - guint *o_puk2_retries, - GError **error) -{ - GArray *cards; - QmiMessageUimGetCardStatusOutputCardStatusCardsElement *card; - QmiMessageUimGetCardStatusOutputCardStatusCardsElementApplicationsElement *app; - MMModemLock lock = MM_MODEM_LOCK_UNKNOWN; - guint i; - gint card_i = -1; - gint application_j = -1; - guint n_absent = 0; - guint n_error = 0; - guint n_invalid = 0; - - /* This command supports MULTIPLE cards with MULTIPLE applications each. For our - * purposes, we're going to consider as the SIM to use the first card present - * with a SIM/USIM application. */ - - if (!qmi_message_uim_get_card_status_output_get_result (output, error)) { - g_prefix_error (error, "QMI operation failed: "); - return FALSE; - } - - qmi_message_uim_get_card_status_output_get_card_status ( - output, - NULL, /* index_gw_primary */ - NULL, /* index_1x_primary */ - NULL, /* index_gw_secondary */ - NULL, /* index_1x_secondary */ - &cards, - NULL); - - if (cards->len == 0) { - g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, - "No cards reported"); - return FALSE; - } - - if (cards->len > 1) - mm_dbg ("Multiple cards reported: %u", cards->len); - - /* All KNOWN applications in all cards will need to be in READY state for us - * to consider UNLOCKED */ - for (i = 0; i < cards->len; i++) { - card = &g_array_index (cards, QmiMessageUimGetCardStatusOutputCardStatusCardsElement, i); - - switch (card->card_state) { - case QMI_UIM_CARD_STATE_PRESENT: { - guint j; - gboolean sim_usim_found = FALSE; - - if (card->applications->len == 0) { - mm_dbg ("No applications reported in card [%u]", i); - n_invalid++; - break; - } - - if (card->applications->len > 1) - mm_dbg ("Multiple applications reported in card [%u]: %u", i, card->applications->len); - - for (j = 0; j < card->applications->len; j++) { - app = &g_array_index (card->applications, QmiMessageUimGetCardStatusOutputCardStatusCardsElementApplicationsElement, j); - - if (app->type == QMI_UIM_CARD_APPLICATION_TYPE_UNKNOWN) { - mm_dbg ("Unknown application [%u] found in card [%u]: %s. Ignored.", - j, i, qmi_uim_card_application_state_get_string (app->state)); - continue; - } - - mm_dbg ("Application '%s' [%u] in card [%u]: %s", - qmi_uim_card_application_type_get_string (app->type), j, i, qmi_uim_card_application_state_get_string (app->state)); - - if (app->type == QMI_UIM_CARD_APPLICATION_TYPE_SIM || app->type == QMI_UIM_CARD_APPLICATION_TYPE_USIM) { - /* We found the card/app pair to use! Only keep the first found, - * but still, keep on looping to log about the remaining ones */ - if (card_i < 0 && application_j < 0) { - card_i = i; - application_j = j; - } - - sim_usim_found = TRUE; - } - } - - if (!sim_usim_found) { - mm_dbg ("No SIM/USIM application found in card [%u]", i); - n_invalid++; - } - - break; - } - - case QMI_UIM_CARD_STATE_ABSENT: - mm_dbg ("Card '%u' is absent", i); - n_absent++; - break; - - case QMI_UIM_CARD_STATE_ERROR: - default: - n_error++; - if (qmi_uim_card_error_get_string (card->error_code) != NULL) - mm_warn ("Card '%u' is unusable: %s", i, qmi_uim_card_error_get_string (card->error_code)); - else - mm_warn ("Card '%u' is unusable: unknown error", i); - break; - } - - /* go on to next card */ - } - - /* If we found no card/app to use, we need to report an error */ - if (card_i < 0 || application_j < 0) { - /* If not a single card found, report SIM not inserted */ - if (n_absent > 0 && !n_error && !n_invalid) - g_set_error (error, - MM_MOBILE_EQUIPMENT_ERROR, - MM_MOBILE_EQUIPMENT_ERROR_SIM_NOT_INSERTED, - "No card found"); - else if (n_error > 0) - g_set_error (error, - MM_MOBILE_EQUIPMENT_ERROR, - MM_MOBILE_EQUIPMENT_ERROR_SIM_WRONG, - "Card error"); - else - g_set_error (error, - MM_MOBILE_EQUIPMENT_ERROR, - MM_MOBILE_EQUIPMENT_ERROR_SIM_FAILURE, - "Card failure: %u absent, %u errors, %u invalid", - n_absent, n_error, n_invalid); - return FALSE; - } - - /* Get card/app to use */ - card = &g_array_index (cards, QmiMessageUimGetCardStatusOutputCardStatusCardsElement, card_i); - app = &g_array_index (card->applications, QmiMessageUimGetCardStatusOutputCardStatusCardsElementApplicationsElement, application_j); - - /* If card not ready yet, return RETRY error. - * If the application state reports needing PIN/PUk, consider that ready as - * well, and let the logic fall down to check PIN1/PIN2. */ - if (app->state != QMI_UIM_CARD_APPLICATION_STATE_READY && - app->state != QMI_UIM_CARD_APPLICATION_STATE_PIN1_OR_UPIN_PIN_REQUIRED && - app->state != QMI_UIM_CARD_APPLICATION_STATE_PUK1_OR_UPIN_PUK_REQUIRED && - app->state != QMI_UIM_CARD_APPLICATION_STATE_PIN1_BLOCKED) { - mm_dbg ("Neither SIM nor USIM are ready"); - g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_RETRY, - "SIM not ready yet (retry)"); - return FALSE; - } - - /* Report retries if requested to do so */ - if (o_pin1_retries) - *o_pin1_retries = app->pin1_retries; - if (o_puk1_retries) - *o_puk1_retries = app->puk1_retries; - if (o_pin2_retries) - *o_pin2_retries = app->pin2_retries; - if (o_puk2_retries) - *o_puk2_retries = app->puk2_retries; - - /* Early bail out if lock status isn't wanted at this point, so that we - * don't fail with an error the unlock retries check */ - if (!o_lock) - return TRUE; - - /* Card is ready, what's the lock status? */ - - /* PIN1 */ - switch (app->pin1_state) { - case QMI_UIM_PIN_STATE_PERMANENTLY_BLOCKED: - g_set_error (error, - MM_MOBILE_EQUIPMENT_ERROR, - MM_MOBILE_EQUIPMENT_ERROR_SIM_WRONG, - "SIM PIN/PUK permanently blocked"); - return FALSE; - - case QMI_UIM_PIN_STATE_ENABLED_NOT_VERIFIED: - lock = MM_MODEM_LOCK_SIM_PIN; - break; - - case QMI_UIM_PIN_STATE_BLOCKED: - lock = MM_MODEM_LOCK_SIM_PUK; - break; - - case QMI_UIM_PIN_STATE_DISABLED: - case QMI_UIM_PIN_STATE_ENABLED_VERIFIED: - lock = MM_MODEM_LOCK_NONE; - break; - - default: - g_set_error (error, - MM_MOBILE_EQUIPMENT_ERROR, - MM_MOBILE_EQUIPMENT_ERROR_SIM_WRONG, - "Unknown SIM PIN/PUK status"); - return FALSE; - } - - /* PIN2 */ - if (lock == MM_MODEM_LOCK_NONE) { - switch (app->pin2_state) { - case QMI_UIM_PIN_STATE_ENABLED_NOT_VERIFIED: - lock = MM_MODEM_LOCK_SIM_PIN2; - break; - - case QMI_UIM_PIN_STATE_PERMANENTLY_BLOCKED: - mm_warn ("PUK2 permanently blocked"); - case QMI_UIM_PIN_STATE_BLOCKED: - lock = MM_MODEM_LOCK_SIM_PUK2; - break; - - case QMI_UIM_PIN_STATE_DISABLED: - case QMI_UIM_PIN_STATE_ENABLED_VERIFIED: - break; - - default: - mm_warn ("Unknown SIM PIN2/PUK2 status"); - break; - } - } - - *o_lock = lock; - return TRUE; -} - static void unlock_required_uim_get_card_status_ready (QmiClientUim *client, GAsyncResult *res, GTask *task) { + MMBroadbandModemQmi *self; LoadUnlockRequiredContext *ctx; QmiMessageUimGetCardStatusOutput *output; GError *error = NULL; MMModemLock lock = MM_MODEM_LOCK_UNKNOWN; + self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); output = qmi_client_uim_get_card_status_finish (client, res, &error); - if (!output) { + if (!output || !qmi_message_uim_get_card_status_output_get_result (output, &error)) { g_prefix_error (&error, "QMI operation failed: "); g_task_return_error (task, error); g_object_unref (task); return; } - if (!uim_get_card_status_output_parse (output, - &lock, - NULL, NULL, NULL, NULL, - &error)) { + if (!mm_qmi_uim_get_card_status_output_parse (self, + output, + &lock, + NULL, NULL, NULL, NULL, NULL, NULL, + &error)) { /* The device may report a SIM NOT INSERTED error if we're querying the * card status soon after power on. We'll let the Modem interface generic * logic retry loading the info a bit later if that's the case. This will @@ -1052,18 +975,18 @@ switch (ctx->step) { case LOAD_UNLOCK_REQUIRED_STEP_FIRST: ctx->step++; - /* Go on to next step */ + /* Fall through */ case LOAD_UNLOCK_REQUIRED_STEP_CDMA: /* CDMA-only modems don't need this */ if (mm_iface_modem_is_cdma_only (MM_IFACE_MODEM (self))) { - mm_dbg ("Skipping unlock check in CDMA-only modem..."); + mm_obj_dbg (self, "skipping unlock check in CDMA-only modem..."); g_task_return_int (task, MM_MODEM_LOCK_NONE); g_object_unref (task); return; } ctx->step++; - /* Go on to next step */ + /* Fall through */ case LOAD_UNLOCK_REQUIRED_STEP_DMS: if (!self->priv->dms_uim_deprecated) { @@ -1078,7 +1001,7 @@ return; } - mm_dbg ("loading unlock required (DMS)..."); + mm_obj_dbg (self, "loading unlock required (DMS)..."); qmi_client_dms_uim_get_pin_status (QMI_CLIENT_DMS (client), NULL, 5, @@ -1088,7 +1011,7 @@ return; } ctx->step++; - /* Go on to next step */ + /* Fall through */ case LOAD_UNLOCK_REQUIRED_STEP_UIM: /* Failure to get UIM client at this point is hard as well */ @@ -1102,7 +1025,7 @@ return; } - mm_dbg ("loading unlock required (UIM)..."); + mm_obj_dbg (self, "loading unlock required (UIM)..."); qmi_client_uim_get_card_status (QMI_CLIENT_UIM (client), NULL, 5, @@ -1110,6 +1033,9 @@ (GAsyncReadyCallback) unlock_required_uim_get_card_status_ready, task); return; + + default: + g_assert_not_reached (); } } @@ -1148,6 +1074,7 @@ GAsyncResult *res, GTask *task) { + MMBroadbandModemQmi *self; QmiMessageUimGetCardStatusOutput *output; GError *error = NULL; guint pin1_retries = 0; @@ -1156,19 +1083,22 @@ guint puk2_retries = 0; MMUnlockRetries *retries; + self = g_task_get_source_object (task); + output = qmi_client_uim_get_card_status_finish (client, res, &error); - if (!output) { + if (!output || !qmi_message_uim_get_card_status_output_get_result (output, &error)) { g_prefix_error (&error, "QMI operation failed: "); g_task_return_error (task, error); g_object_unref (task); return; } - if (!uim_get_card_status_output_parse (output, - NULL, - &pin1_retries, &puk1_retries, - &pin2_retries, &puk2_retries, - &error)) { + if (!mm_qmi_uim_get_card_status_output_parse (self, + output, + NULL, + NULL, &pin1_retries, &puk1_retries, + NULL, &pin2_retries, &puk2_retries, + &error)) { g_task_return_error (task, error); g_object_unref (task); return; @@ -1315,7 +1245,7 @@ self = MM_BROADBAND_MODEM_QMI (_self); task = g_task_new (self, NULL, callback, user_data); - mm_dbg ("loading unlock retries..."); + mm_obj_dbg (self, "loading unlock retries..."); if (!self->priv->dms_uim_deprecated) dms_uim_load_unlock_retries (MM_BROADBAND_MODEM_QMI (self), task); else @@ -1378,6 +1308,14 @@ return (dbm > -125 && dbm < -30); case QMI_NAS_RADIO_INTERFACE_UMTS: return (dbm > -125 && dbm < -30); + case QMI_NAS_RADIO_INTERFACE_UNKNOWN: + case QMI_NAS_RADIO_INTERFACE_NONE: + case QMI_NAS_RADIO_INTERFACE_AMPS: + case QMI_NAS_RADIO_INTERFACE_GSM: + case QMI_NAS_RADIO_INTERFACE_LTE: + case QMI_NAS_RADIO_INTERFACE_TD_SCDMA: + case QMI_NAS_RADIO_INTERFACE_5GNR: + /* no explicit validation */ default: break; } @@ -1403,7 +1341,8 @@ #if defined WITH_NEWEST_QMI_COMMANDS static gboolean -common_signal_info_get_quality (gint8 cdma1x_rssi, +common_signal_info_get_quality (MMBroadbandModemQmi *self, + gint8 cdma1x_rssi, gint8 evdo_rssi, gint8 gsm_rssi, gint8 wcdma_rssi, @@ -1424,7 +1363,7 @@ * order to report always the one with the maximum value. */ if (cdma1x_rssi < 0) { - mm_dbg ("RSSI (CDMA): %d dBm", cdma1x_rssi); + mm_obj_dbg (self, "RSSI (CDMA): %d dBm", cdma1x_rssi); if (qmi_dbm_valid (cdma1x_rssi, QMI_NAS_RADIO_INTERFACE_CDMA_1X)) { rssi_max = MAX (cdma1x_rssi, rssi_max); signal_info_radio_interface = QMI_NAS_RADIO_INTERFACE_CDMA_1X; @@ -1432,7 +1371,7 @@ } if (evdo_rssi < 0) { - mm_dbg ("RSSI (HDR): %d dBm", evdo_rssi); + mm_obj_dbg (self, "RSSI (HDR): %d dBm", evdo_rssi); if (qmi_dbm_valid (evdo_rssi, QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO)) { rssi_max = MAX (evdo_rssi, rssi_max); signal_info_radio_interface = QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO; @@ -1440,7 +1379,7 @@ } if (gsm_rssi < 0) { - mm_dbg ("RSSI (GSM): %d dBm", gsm_rssi); + mm_obj_dbg (self, "RSSI (GSM): %d dBm", gsm_rssi); if (qmi_dbm_valid (gsm_rssi, QMI_NAS_RADIO_INTERFACE_GSM)) { rssi_max = MAX (gsm_rssi, rssi_max); signal_info_radio_interface = QMI_NAS_RADIO_INTERFACE_GSM; @@ -1448,7 +1387,7 @@ } if (wcdma_rssi < 0) { - mm_dbg ("RSSI (WCDMA): %d dBm", wcdma_rssi); + mm_obj_dbg (self, "RSSI (WCDMA): %d dBm", wcdma_rssi); if (qmi_dbm_valid (wcdma_rssi, QMI_NAS_RADIO_INTERFACE_UMTS)) { rssi_max = MAX (wcdma_rssi, rssi_max); signal_info_radio_interface = QMI_NAS_RADIO_INTERFACE_UMTS; @@ -1456,7 +1395,7 @@ } if (lte_rssi < 0) { - mm_dbg ("RSSI (LTE): %d dBm", lte_rssi); + mm_obj_dbg (self, "RSSI (LTE): %d dBm", lte_rssi); if (qmi_dbm_valid (lte_rssi, QMI_NAS_RADIO_INTERFACE_LTE)) { rssi_max = MAX (lte_rssi, rssi_max); signal_info_radio_interface = QMI_NAS_RADIO_INTERFACE_LTE; @@ -1468,7 +1407,7 @@ *out_quality = STRENGTH_TO_QUALITY (rssi_max); *out_act = mm_modem_access_technology_from_qmi_radio_interface (signal_info_radio_interface); - mm_dbg ("RSSI: %d dBm --> %u%%", rssi_max, *out_quality); + mm_obj_dbg (self, "RSSI: %d dBm --> %u%%", rssi_max, *out_quality); return TRUE; } @@ -1493,7 +1432,7 @@ qmi_message_nas_get_signal_info_output_get_wcdma_signal_strength (output, &wcdma_rssi, NULL, NULL); qmi_message_nas_get_signal_info_output_get_lte_signal_strength (output, <e_rssi, NULL, NULL, NULL, NULL); - return common_signal_info_get_quality (cdma1x_rssi, evdo_rssi, gsm_rssi, wcdma_rssi, lte_rssi, out_quality, out_act); + return common_signal_info_get_quality (self, cdma1x_rssi, evdo_rssi, gsm_rssi, wcdma_rssi, lte_rssi, out_quality, out_act); } static void @@ -1546,7 +1485,7 @@ qmi_message_nas_get_signal_info_output_unref (output); } -#endif /* WITH_NEWEST_QMI_COMMANDS */ +#else /* WITH_NEWEST_QMI_COMMANDS */ static gboolean signal_strength_get_quality_and_access_tech (MMBroadbandModemQmi *self, @@ -1564,9 +1503,9 @@ /* The mandatory one is always present */ qmi_message_nas_get_signal_strength_output_get_signal_strength (output, &signal_max, &main_interface, NULL); - mm_dbg ("Signal strength (%s): %d dBm", - qmi_nas_radio_interface_get_string (main_interface), - signal_max); + mm_obj_dbg (self, "signal strength (%s): %d dBm", + qmi_nas_radio_interface_get_string (main_interface), + signal_max); /* Treat results as invalid if main signal strength is invalid */ if (!qmi_dbm_valid (signal_max, main_interface)) @@ -1583,9 +1522,9 @@ element = &g_array_index (array, QmiMessageNasGetSignalStrengthOutputStrengthListElement, i); - mm_dbg ("Signal strength (%s): %d dBm", - qmi_nas_radio_interface_get_string (element->radio_interface), - element->strength); + mm_obj_dbg (self, "signal strength (%s): %d dBm", + qmi_nas_radio_interface_get_string (element->radio_interface), + element->strength); if (qmi_dbm_valid (element->strength, element->radio_interface)) { signal_max = MAX (element->strength, signal_max); @@ -1599,7 +1538,7 @@ *o_quality = STRENGTH_TO_QUALITY (signal_max); *o_act = act; - mm_dbg ("Signal strength: %d dBm --> %u%%", signal_max, *o_quality); + mm_obj_dbg (self, "signal strength: %d dBm --> %u%%", signal_max, *o_quality); } return (signal_max < 0); @@ -1655,6 +1594,8 @@ qmi_message_nas_get_signal_strength_output_unref (output); } +#endif /* WITH_NEWEST_QMI_COMMANDS */ + static void load_signal_quality (MMIfaceModem *self, GAsyncReadyCallback callback, @@ -1670,120 +1611,59 @@ task = g_task_new (self, NULL, callback, user_data); - mm_dbg ("loading signal quality..."); + mm_obj_dbg (self, "loading signal quality..."); #if defined WITH_NEWEST_QMI_COMMANDS - /* Signal info introduced in NAS 1.8 */ - if (qmi_client_check_version (client, 1, 8)) { - qmi_client_nas_get_signal_info (QMI_CLIENT_NAS (client), - NULL, - 10, - NULL, - (GAsyncReadyCallback)get_signal_info_ready, - task); - return; - } -#endif /* WITH_NEWEST_QMI_COMMANDS */ - + qmi_client_nas_get_signal_info (QMI_CLIENT_NAS (client), + NULL, + 10, + NULL, + (GAsyncReadyCallback)get_signal_info_ready, + task); +#else qmi_client_nas_get_signal_strength (QMI_CLIENT_NAS (client), NULL, 10, NULL, (GAsyncReadyCallback)get_signal_strength_ready, task); +#endif /* WITH_NEWEST_QMI_COMMANDS */ } /*****************************************************************************/ /* Powering up the modem (Modem interface) */ -typedef enum { - SET_OPERATING_MODE_STEP_FIRST, - SET_OPERATING_MODE_STEP_FCC_AUTH, - SET_OPERATING_MODE_STEP_RETRY, - SET_OPERATING_MODE_STEP_LAST -} SetOperatingModeStep; - -typedef struct { - QmiClientDms *client; - QmiMessageDmsSetOperatingModeInput *input; - SetOperatingModeStep step; -} SetOperatingModeContext; - -static void -set_operating_mode_context_free (SetOperatingModeContext *ctx) -{ - g_object_unref (ctx->client); - qmi_message_dms_set_operating_mode_input_unref (ctx->input); - g_slice_free (SetOperatingModeContext, ctx); -} - static gboolean -modem_power_up_down_off_finish (MMIfaceModem *self, - GAsyncResult *res, - GError **error) +modem_power_up_down_off_finish (MMIfaceModem *self, + GAsyncResult *res, + GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } -static void set_operating_mode_context_step (GTask *task); - -static void -dms_set_fcc_authentication_ready (QmiClientDms *client, - GAsyncResult *res, - GTask *task) -{ - SetOperatingModeContext *ctx; - QmiMessageDmsSetFccAuthenticationOutput *output = NULL; - GError *error = NULL; - - ctx = g_task_get_task_data (task); - - output = qmi_client_dms_set_fcc_authentication_finish (client, res, &error); - if (!output || !qmi_message_dms_set_fcc_authentication_output_get_result (output, &error)) { - /* No hard errors */ - mm_dbg ("Couldn't set FCC authentication: %s", error->message); - g_error_free (error); - } - - if (output) - qmi_message_dms_set_fcc_authentication_output_unref (output); - - /* Retry Set Operating Mode */ - ctx->step++; - set_operating_mode_context_step (task); -} - static void dms_set_operating_mode_ready (QmiClientDms *client, GAsyncResult *res, - GTask *task) + GTask *task) { - SetOperatingModeContext *ctx; - QmiMessageDmsSetOperatingModeOutput *output = NULL; - GError *error = NULL; + MMBroadbandModemQmi *self; + QmiDmsOperatingMode mode; + GError *error = NULL; + g_autoptr(QmiMessageDmsSetOperatingModeOutput) output = NULL; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + mode = GPOINTER_TO_UINT (g_task_get_task_data (task)); output = qmi_client_dms_set_operating_mode_finish (client, res, &error); if (!output) { - /* If unsupported, just go out without errors */ + g_prefix_error (&error, "QMI operation failed: "); + /* If unsupported, just complete without errors */ if (g_error_matches (error, QMI_CORE_ERROR, QMI_CORE_ERROR_UNSUPPORTED)) { - mm_dbg ("Device doesn't support operating mode setting. Ignoring power update."); - g_error_free (error); - ctx->step = SET_OPERATING_MODE_STEP_LAST; - set_operating_mode_context_step (task); - return; + mm_obj_dbg (self, "device doesn't support operating mode setting: ignoring power update"); + g_clear_error (&error); } - - g_prefix_error (&error, "QMI operation failed: "); - g_task_return_error (task, error); - g_object_unref (task); - return; - } - - if (!qmi_message_dms_set_operating_mode_output_get_result (output, &error)) { - QmiDmsOperatingMode mode; - + } else if (!qmi_message_dms_set_operating_mode_output_get_result (output, &error)) { + g_prefix_error (&error, "Couldn't set operating mode: "); /* * Some new devices, like the Dell DW5770, will return an internal error when * trying to bring the power mode to online. @@ -1792,141 +1672,74 @@ * transition" instead when trying to bring the power mode to online. * * We can avoid this by sending the magic "DMS Set FCC Auth" message before - * retrying. + * retrying. Notify this to upper layers with the special MM_CORE_ERROR_RETRY + * error. */ - if (ctx->step == SET_OPERATING_MODE_STEP_FIRST && - qmi_message_dms_set_operating_mode_input_get_mode (ctx->input, &mode, NULL) && - mode == QMI_DMS_OPERATING_MODE_ONLINE && - (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_INTERNAL) || - g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_INVALID_TRANSITION))) { - g_error_free (error); - /* Go on to FCC auth */ - ctx->step++; - set_operating_mode_context_step (task); - qmi_message_dms_set_operating_mode_output_unref (output); - return; + if ((mode == QMI_DMS_OPERATING_MODE_ONLINE) && + ((g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_INTERNAL) || + g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_INVALID_TRANSITION)))) { + g_clear_error (&error); + error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_RETRY, "Invalid transition"); } - - g_prefix_error (&error, "Couldn't set operating mode: "); - g_task_return_error (task, error); - g_object_unref (task); - qmi_message_dms_set_operating_mode_output_unref (output); - return; } - qmi_message_dms_set_operating_mode_output_unref (output); - - /* Good! we're done, go to last step */ - ctx->step = SET_OPERATING_MODE_STEP_LAST; - set_operating_mode_context_step (task); -} - -static void -set_operating_mode_context_step (GTask *task) -{ - SetOperatingModeContext *ctx; - - ctx = g_task_get_task_data (task); - - switch (ctx->step) { - case SET_OPERATING_MODE_STEP_FIRST: - mm_dbg ("Setting device operating mode..."); - qmi_client_dms_set_operating_mode (QMI_CLIENT_DMS (ctx->client), - ctx->input, - 20, - NULL, - (GAsyncReadyCallback)dms_set_operating_mode_ready, - task); - return; - case SET_OPERATING_MODE_STEP_FCC_AUTH: - mm_dbg ("Setting FCC auth..."); - qmi_client_dms_set_fcc_authentication (QMI_CLIENT_DMS (ctx->client), - NULL, - 5, - NULL, - (GAsyncReadyCallback)dms_set_fcc_authentication_ready, - task); - return; - case SET_OPERATING_MODE_STEP_RETRY: - mm_dbg ("Setting device operating mode (retry)..."); - qmi_client_dms_set_operating_mode (QMI_CLIENT_DMS (ctx->client), - ctx->input, - 20, - NULL, - (GAsyncReadyCallback)dms_set_operating_mode_ready, - task); - return; - case SET_OPERATING_MODE_STEP_LAST: - /* Good! */ + if (error) + g_task_return_error (task, error); + else g_task_return_boolean (task, TRUE); - g_object_unref (task); - return; - default: - g_assert_not_reached (); - } + g_object_unref (task); } static void -common_power_up_down_off (MMIfaceModem *self, - QmiDmsOperatingMode mode, - GAsyncReadyCallback callback, - gpointer user_data) -{ - SetOperatingModeContext *ctx; - GTask *task; - QmiClient *client = NULL; +common_power_up_down_off (MMIfaceModem *self, + QmiDmsOperatingMode mode, + GAsyncReadyCallback callback, + gpointer user_data) +{ + GTask *task; + QmiClient *client = NULL; + g_autoptr(QmiMessageDmsSetOperatingModeInput) input = NULL; if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), QMI_SERVICE_DMS, &client, callback, user_data)) return; - /* Setup context */ - ctx = g_slice_new0 (SetOperatingModeContext); - ctx->client = g_object_ref (client); - ctx->input = qmi_message_dms_set_operating_mode_input_new (); - qmi_message_dms_set_operating_mode_input_set_mode (ctx->input, mode, NULL); - ctx->step = SET_OPERATING_MODE_STEP_FIRST; - task = g_task_new (self, NULL, callback, user_data); - g_task_set_task_data (task, - ctx, - (GDestroyNotify)set_operating_mode_context_free); + g_task_set_task_data (task, GUINT_TO_POINTER (mode), NULL); - set_operating_mode_context_step (task); + input = qmi_message_dms_set_operating_mode_input_new (); + qmi_message_dms_set_operating_mode_input_set_mode (input, mode, NULL); + qmi_client_dms_set_operating_mode (QMI_CLIENT_DMS (client), + input, + 20, + NULL, + (GAsyncReadyCallback)dms_set_operating_mode_ready, + task); } static void -modem_power_off (MMIfaceModem *self, - GAsyncReadyCallback callback, - gpointer user_data) +modem_power_off (MMIfaceModem *self, + GAsyncReadyCallback callback, + gpointer user_data) { - common_power_up_down_off (self, - QMI_DMS_OPERATING_MODE_OFFLINE, - callback, - user_data); + common_power_up_down_off (self, QMI_DMS_OPERATING_MODE_OFFLINE, callback, user_data); } static void -modem_power_down (MMIfaceModem *self, - GAsyncReadyCallback callback, - gpointer user_data) +modem_power_down (MMIfaceModem *self, + GAsyncReadyCallback callback, + gpointer user_data) { - common_power_up_down_off (self, - QMI_DMS_OPERATING_MODE_LOW_POWER, - callback, - user_data); + common_power_up_down_off (self, QMI_DMS_OPERATING_MODE_LOW_POWER, callback, user_data); } static void -modem_power_up (MMIfaceModem *self, - GAsyncReadyCallback callback, - gpointer user_data) +modem_power_up (MMIfaceModem *self, + GAsyncReadyCallback callback, + gpointer user_data) { - common_power_up_down_off (self, - QMI_DMS_OPERATING_MODE_ONLINE, - callback, - user_data); + common_power_up_down_off (self, QMI_DMS_OPERATING_MODE_ONLINE, callback, user_data); } /*****************************************************************************/ @@ -1980,6 +1793,10 @@ case QMI_DMS_OPERATING_MODE_OFFLINE: g_task_return_int (task, MM_MODEM_POWER_STATE_OFF); break; + case QMI_DMS_OPERATING_MODE_SHUTTING_DOWN: + case QMI_DMS_OPERATING_MODE_FACTORY_TEST: + case QMI_DMS_OPERATING_MODE_RESET: + case QMI_DMS_OPERATING_MODE_UNKNOWN: default: g_task_return_new_error (task, MM_CORE_ERROR, @@ -2009,7 +1826,7 @@ callback, user_data)) return; - mm_dbg ("Getting device operating mode..."); + mm_obj_dbg (self, "getting device operating mode..."); qmi_client_dms_get_operating_mode (QMI_CLIENT_DMS (client), NULL, 5, @@ -2083,7 +1900,7 @@ MMModem3gppFacility locks; } LoadEnabledFacilityLocksContext; -static void get_next_facility_lock_status (GTask *task); +static void get_next_facility_lock_status_via_dms (GTask *task); static void load_enabled_facility_locks_context_free (LoadEnabledFacilityLocksContext *ctx) @@ -2109,46 +1926,145 @@ } static void +get_sim_lock_status_via_get_card_status_ready (QmiClientUim *client, + GAsyncResult *res, + GTask *task) +{ + MMBroadbandModemQmi *self; + LoadEnabledFacilityLocksContext *ctx; + QmiMessageUimGetCardStatusOutput *output; + GError *error = NULL; + MMModemLock lock = MM_MODEM_LOCK_UNKNOWN; + QmiUimPinState pin1_state; + QmiUimPinState pin2_state; + + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); + + output = qmi_client_uim_get_card_status_finish (client, res, &error); + if (!output || !qmi_message_uim_get_card_status_output_get_result (output, &error)) { + g_prefix_error (&error, "QMI operation failed: "); + g_task_return_error (task, error); + g_object_unref (task); + if (output) + qmi_message_uim_get_card_status_output_unref (output); + return; + } + + if (!mm_qmi_uim_get_card_status_output_parse (self, + output, + &lock, + &pin1_state, NULL, NULL, &pin2_state, NULL, NULL, + &error)) { + g_prefix_error (&error, "QMI operation failed: "); + g_task_return_error (task, error); + } else { + ctx->locks &= ~(MM_MODEM_3GPP_FACILITY_SIM); + ctx->locks &= ~(MM_MODEM_3GPP_FACILITY_FIXED_DIALING); + + if (pin1_state == QMI_UIM_PIN_STATE_ENABLED_VERIFIED || + pin1_state == QMI_UIM_PIN_STATE_ENABLED_NOT_VERIFIED || + pin1_state == QMI_UIM_PIN_STATE_BLOCKED) { + ctx->locks |= (MM_MODEM_3GPP_FACILITY_SIM); + } + if (pin2_state == QMI_UIM_PIN_STATE_ENABLED_VERIFIED || + pin2_state == QMI_UIM_PIN_STATE_ENABLED_NOT_VERIFIED || + pin2_state == QMI_UIM_PIN_STATE_BLOCKED) { + ctx->locks |= (MM_MODEM_3GPP_FACILITY_FIXED_DIALING); + } + + g_task_return_int (task, ctx->locks); + } + + qmi_message_uim_get_card_status_output_unref (output); + g_object_unref (task); +} + +static void +get_sim_lock_status_via_get_card_status (GTask *task) +{ + MMBroadbandModemQmi *self; + LoadEnabledFacilityLocksContext *ctx; + + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); + + mm_obj_dbg (self, "Getting UIM card status to read pin lock state..."); + qmi_client_uim_get_card_status (QMI_CLIENT_UIM (ctx->client), + NULL, + 5, + NULL, + (GAsyncReadyCallback) get_sim_lock_status_via_get_card_status_ready, + task); +} + +static void get_sim_lock_status_via_pin_status_ready (QmiClientDms *client, GAsyncResult *res, GTask *task) { + MMBroadbandModemQmi *self; LoadEnabledFacilityLocksContext *ctx; QmiMessageDmsUimGetPinStatusOutput *output; - gboolean enabled; + QmiDmsUimPinStatus current_status; + GError *error; + gboolean pin1_enabled; + gboolean pin2_enabled; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); - output = qmi_client_dms_uim_get_pin_status_finish (client, res, NULL); + output = qmi_client_dms_uim_get_pin_status_finish (client, res, &error); if (!output || - !qmi_message_dms_uim_get_pin_status_output_get_result (output, NULL)) { - mm_dbg ("Couldn't query PIN status, assuming SIM PIN is disabled"); - enabled = FALSE; - } else { - QmiDmsUimPinStatus current_status; + !qmi_message_dms_uim_get_pin_status_output_get_result (output, &error)) { + g_task_return_error (task, error); + g_object_unref (task); + if (output) + qmi_message_dms_uim_get_pin_status_output_unref (output); + return; + } - if (qmi_message_dms_uim_get_pin_status_output_get_pin1_status ( - output, - ¤t_status, - NULL, /* verify_retries_left */ - NULL, /* unblock_retries_left */ - NULL)) { - enabled = mm_pin_enabled_from_qmi_uim_pin_status (current_status); - mm_dbg ("PIN is reported %s", (enabled ? "enabled" : "disabled")); - } else { - mm_dbg ("Couldn't find PIN1 status in the result, assuming SIM PIN is disabled"); - enabled = FALSE; - } + if (qmi_message_dms_uim_get_pin_status_output_get_pin1_status ( + output, + ¤t_status, + NULL, /* verify_retries_left */ + NULL, /* unblock_retries_left */ + &error)) { + pin1_enabled = mm_pin_enabled_from_qmi_uim_pin_status (current_status); + mm_obj_dbg (self, "PIN1 is reported %s", (pin1_enabled ? "enabled" : "disabled")); + } else { + qmi_message_dms_uim_get_pin_status_output_unref (output); + g_task_return_error (task, error); + g_object_unref (task); + return; } - if (output) + if (qmi_message_dms_uim_get_pin_status_output_get_pin2_status ( + output, + ¤t_status, + NULL, /* verify_retries_left */ + NULL, /* unblock_retries_left */ + &error)) { + pin2_enabled = mm_pin_enabled_from_qmi_uim_pin_status (current_status); + mm_obj_dbg (self, "PIN2 is reported %s", (pin2_enabled ? "enabled" : "disabled")); + } else { qmi_message_dms_uim_get_pin_status_output_unref (output); + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + qmi_message_dms_uim_get_pin_status_output_unref (output); - if (enabled) { + if (pin1_enabled) ctx->locks |= (MM_MODEM_3GPP_FACILITY_SIM); - } else { + else ctx->locks &= ~(MM_MODEM_3GPP_FACILITY_SIM); - } + + if (pin2_enabled) + ctx->locks |= (MM_MODEM_3GPP_FACILITY_FIXED_DIALING); + else + ctx->locks &= ~(MM_MODEM_3GPP_FACILITY_FIXED_DIALING); /* No more facilities to query, all done */ g_task_return_int (task, ctx->locks); @@ -2160,11 +2076,13 @@ static void get_sim_lock_status_via_pin_status (GTask *task) { + MMBroadbandModemQmi *self; LoadEnabledFacilityLocksContext *ctx; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); - mm_dbg ("Retrieving PIN status to check for enabled PIN"); + mm_obj_dbg (self, "retrieving PIN status to check for enabled PIN"); /* if the SIM is locked or not can only be queried by locking at * the PIN status */ qmi_client_dms_uim_get_pin_status (QMI_CLIENT_DMS (ctx->client), @@ -2180,17 +2098,20 @@ GAsyncResult *res, GTask *task) { + MMBroadbandModemQmi *self; LoadEnabledFacilityLocksContext *ctx; gchar *facility_str; QmiMessageDmsUimGetCkStatusOutput *output; + self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); + facility_str = mm_modem_3gpp_facility_build_string_from_mask (1 << ctx->current); output = qmi_client_dms_uim_get_ck_status_finish (client, res, NULL); if (!output || !qmi_message_dms_uim_get_ck_status_output_get_result (output, NULL)) { /* On errors, we'll just assume disabled */ - mm_dbg ("Couldn't query facility '%s' status, assuming disabled", facility_str); + mm_obj_dbg (self, "couldn't query facility '%s' status, assuming disabled", facility_str); ctx->locks &= ~(1 << ctx->current); } else { QmiDmsUimFacilityState state; @@ -2204,7 +2125,7 @@ &unblock_retries_left, NULL); - mm_dbg ("Facility '%s' is: '%s'", + mm_obj_dbg (self, "facility '%s' is: '%s'", facility_str, qmi_dms_uim_facility_state_get_string (state)); @@ -2220,11 +2141,11 @@ /* And go on with the next one */ ctx->current++; - get_next_facility_lock_status (task); + get_next_facility_lock_status_via_dms (task); } static void -get_next_facility_lock_status (GTask *task) +get_next_facility_lock_status_via_dms (GTask *task) { LoadEnabledFacilityLocksContext *ctx; guint i; @@ -2270,10 +2191,17 @@ GTask *task; QmiClient *client = NULL; - if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), - QMI_SERVICE_DMS, &client, - callback, user_data)) - return; + if (!MM_BROADBAND_MODEM_QMI (self)->priv->dms_uim_deprecated) { + if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), + QMI_SERVICE_DMS, &client, + callback, user_data)) + return; + } else { + if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), + QMI_SERVICE_UIM, &client, + callback, user_data)) + return; + } ctx = g_new (LoadEnabledFacilityLocksContext, 1); ctx->client = g_object_ref (client); @@ -2290,7 +2218,13 @@ task = g_task_new (self, NULL, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify)load_enabled_facility_locks_context_free); - get_next_facility_lock_status (task); + /* DMS uses get_ck_status and get_pin_status to probe facilities + * UIM Messages to get all facility locks are not open-source yet + * UIM uses get_card_status to probe only FACILITY_SIM and FACILITY_FIXED_DIALING */ + if (!MM_BROADBAND_MODEM_QMI (self)->priv->dms_uim_deprecated) + get_next_facility_lock_status_via_dms (task); + else + get_sim_lock_status_via_get_card_status (task); } /*****************************************************************************/ @@ -2444,7 +2378,7 @@ callback, user_data)) return; - mm_dbg ("Scanning networks..."); + mm_obj_dbg (self, "scanning networks..."); qmi_client_nas_network_scan (QMI_CLIENT_NAS (client), NULL, 300, @@ -2530,6 +2464,8 @@ return g_task_propagate_boolean (G_TASK (res), error); } +#if !defined WITH_NEWEST_QMI_COMMANDS + static void common_process_serving_system_3gpp (MMBroadbandModemQmi *self, QmiMessageNasGetServingSystemOutput *response_output, @@ -2552,6 +2488,7 @@ MMModemAccessTechnology mm_access_technologies; MMModem3gppRegistrationState mm_cs_registration_state; MMModem3gppRegistrationState mm_ps_registration_state; + gboolean operator_updated = FALSE; if (response_output) qmi_message_nas_get_serving_system_output_get_serving_system ( @@ -2579,7 +2516,7 @@ else qmi_indication_nas_serving_system_output_get_data_service_capability (indication_output, &data_service_capabilities, NULL); - if (data_service_capabilities) + if (data_service_capabilities && data_service_capabilities->len > 0) mm_access_technologies = mm_modem_access_technologies_from_qmi_data_capability_array (data_service_capabilities); else @@ -2588,15 +2525,17 @@ /* Only process 3GPP info. * Seen the case already where 'selected_network' gives UNKNOWN but we still - * have valid LTE info around. */ + * have valid LTE/5GNR info around. */ if (selected_network == QMI_NAS_NETWORK_TYPE_3GPP || (selected_network == QMI_NAS_NETWORK_TYPE_UNKNOWN && (mm_access_technologies & MM_IFACE_MODEM_3GPP_ALL_ACCESS_TECHNOLOGIES_MASK))) { - mm_dbg ("Processing 3GPP info..."); + mm_obj_dbg (self, "processing 3GPP info..."); } else { MMModem3gppRegistrationState reg_state_3gpp; - mm_dbg ("No 3GPP info given..."); + mm_obj_dbg (self, "no 3GPP info given..."); + if (self->priv->current_operator_id || self->priv->current_operator_description) + operator_updated = TRUE; g_free (self->priv->current_operator_id); self->priv->current_operator_id = NULL; g_free (self->priv->current_operator_description); @@ -2611,6 +2550,10 @@ mm_iface_modem_3gpp_update_ps_registration_state (MM_IFACE_MODEM_3GPP (self), reg_state_3gpp); mm_iface_modem_3gpp_update_access_technologies (MM_IFACE_MODEM_3GPP (self), MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN); mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), 0, 0, 0); + /* request to reload operator info explicitly, so that the new + * operator name and code is propagated to the DBus interface */ + if (operator_updated) + mm_iface_modem_3gpp_reload_current_registration_info (MM_IFACE_MODEM_3GPP (self), NULL, NULL); return; } @@ -2650,23 +2593,26 @@ &mnc, &description, NULL))) { + gchar *new_operator_id; + /* When we don't have information about leading PCS digit, guess best */ - g_free (self->priv->current_operator_id); if (mnc >= 100) - self->priv->current_operator_id = - g_strdup_printf ("%.3" G_GUINT16_FORMAT "%.3" G_GUINT16_FORMAT, - mcc, - mnc); + new_operator_id = g_strdup_printf ("%.3" G_GUINT16_FORMAT "%.3" G_GUINT16_FORMAT, mcc, mnc); else - self->priv->current_operator_id = - g_strdup_printf ("%.3" G_GUINT16_FORMAT "%.2" G_GUINT16_FORMAT, - mcc, - mnc); - - g_clear_pointer (&self->priv->current_operator_description, g_free); - /* Some Telit modems apparently sometimes report non-UTF8 characters */ - if (g_utf8_validate (description, -1, NULL)) + new_operator_id = g_strdup_printf ("%.3" G_GUINT16_FORMAT "%.2" G_GUINT16_FORMAT, mcc, mnc); + + if (!self->priv->current_operator_id || !g_str_equal (self->priv->current_operator_id, new_operator_id)) { + operator_updated = TRUE; + g_free (self->priv->current_operator_id); + self->priv->current_operator_id = new_operator_id; + } else + g_free (new_operator_id); + + if (!self->priv->current_operator_description || !g_str_equal (self->priv->current_operator_description, description)) { + operator_updated = TRUE; + g_free (self->priv->current_operator_description); self->priv->current_operator_description = g_strdup (description); + } } /* If MNC comes with PCS digit, we must make sure the additional @@ -2686,18 +2632,35 @@ &has_pcs_digit, NULL))) && has_pcs_digit) { - g_free (self->priv->current_operator_id); - self->priv->current_operator_id = - g_strdup_printf ("%.3" G_GUINT16_FORMAT "%.3" G_GUINT16_FORMAT, - mcc, - mnc); - } + gchar *new_operator_id; - /* Report new registration states */ + new_operator_id = g_strdup_printf ("%.3" G_GUINT16_FORMAT "%.3" G_GUINT16_FORMAT, mcc, mnc); + if (!self->priv->current_operator_id || !g_str_equal (self->priv->current_operator_id, new_operator_id)) { + operator_updated = TRUE; + g_free (self->priv->current_operator_id); + self->priv->current_operator_id = new_operator_id; + } else + g_free (new_operator_id); + } + + /* Report new registration states. The QMI serving system API reports "CS" + * and "PS" registration states, and if the device is in LTE, we'll take the "PS" + * one as "EPS". But, if the device is not in LTE, we should also set the "EPS" + * state as unknown, so that the "PS" one takes precedence when building + * the consolidated registration state (otherwise we may be using some old cached + * "EPS" state wrongly). */ mm_iface_modem_3gpp_update_cs_registration_state (MM_IFACE_MODEM_3GPP (self), mm_cs_registration_state); mm_iface_modem_3gpp_update_ps_registration_state (MM_IFACE_MODEM_3GPP (self), mm_ps_registration_state); - if (mm_access_technologies & MM_MODEM_ACCESS_TECHNOLOGY_LTE) - mm_iface_modem_3gpp_update_eps_registration_state (MM_IFACE_MODEM_3GPP (self), mm_ps_registration_state); + if (mm_iface_modem_is_3gpp_lte (MM_IFACE_MODEM (self))) + mm_iface_modem_3gpp_update_eps_registration_state (MM_IFACE_MODEM_3GPP (self), + (mm_access_technologies & MM_MODEM_ACCESS_TECHNOLOGY_LTE) ? + mm_ps_registration_state : MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN); + /* Same thing for "5GS" state */ + if (mm_iface_modem_is_3gpp_5gnr (MM_IFACE_MODEM (self))) + mm_iface_modem_3gpp_update_5gs_registration_state (MM_IFACE_MODEM_3GPP (self), + (mm_access_technologies & MM_MODEM_ACCESS_TECHNOLOGY_5GNR) ? + mm_ps_registration_state : MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN); + /* Get 3GPP location LAC/TAC and CI */ lac = 0; @@ -2713,9 +2676,14 @@ qmi_indication_nas_serving_system_output_get_cid_3gpp (indication_output, &cid, NULL); } /* Only update info in the interface if we get something */ - if (cid && (lac || tac)) + if (cid || lac || tac) mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), lac, tac, cid); + /* request to reload operator info explicitly, so that the new + * operator name and code is propagated to the DBus interface */ + if (operator_updated) + mm_iface_modem_3gpp_reload_current_registration_info (MM_IFACE_MODEM_3GPP (self), NULL, NULL); + /* Note: don't update access technologies with the ones retrieved here; they * are not really the 'current' access technologies */ } @@ -2754,7 +2722,7 @@ qmi_message_nas_get_serving_system_output_unref (output); } -#if defined WITH_NEWEST_QMI_COMMANDS +#else /* WITH_NEWEST_QMI_COMMANDS */ static gboolean process_common_info (QmiNasServiceStatus service_status, @@ -2802,8 +2770,9 @@ apply_ps = FALSE; else if (domain == QMI_NAS_NETWORK_SERVICE_DOMAIN_PS) apply_cs = FALSE; - else if (domain == QMI_NAS_NETWORK_SERVICE_DOMAIN_CS_PS) + else if (domain == QMI_NAS_NETWORK_SERVICE_DOMAIN_CS_PS) { /* both apply */ ; + } /* Check if we really are roaming or forbidden */ if (forbidden_valid && forbidden) @@ -2832,7 +2801,7 @@ if (network_id_valid) { *mm_operator_id = g_malloc (7); memcpy (*mm_operator_id, mcc, 3); - if (mnc[2] == 0xFF) { + if ((guint8)mnc[2] == 0xFF) { memcpy (&((*mm_operator_id)[3]), mnc, 2); (*mm_operator_id)[5] = '\0'; } else { @@ -2845,7 +2814,8 @@ } static gboolean -process_gsm_info (QmiMessageNasGetSystemInfoOutput *response_output, +process_gsm_info (MMBroadbandModemQmi *self, + QmiMessageNasGetSystemInfoOutput *response_output, QmiIndicationNasSystemInfoOutput *indication_output, MMModem3gppRegistrationState *mm_cs_registration_state, MMModem3gppRegistrationState *mm_ps_registration_state, @@ -2885,7 +2855,11 @@ NULL, /* true_service_status */ NULL, /* preferred_data_path */ NULL) || +#if QMI_CHECK_VERSION(1,29,2) + !qmi_message_nas_get_system_info_output_get_gsm_system_info_v2 ( +#else !qmi_message_nas_get_system_info_output_get_gsm_system_info ( +#endif response_output, &domain_valid, &domain, NULL, NULL, /* service_capability */ @@ -2898,7 +2872,7 @@ NULL, NULL, /* egprs support */ NULL, NULL, /* dtm_support */ NULL)) { - mm_dbg ("No GSM service reported"); + mm_obj_dbg (self, "no GSM service reported"); /* No GSM service */ return FALSE; } @@ -2909,7 +2883,11 @@ NULL, /* true_service_status */ NULL, /* preferred_data_path */ NULL) || +#if QMI_CHECK_VERSION(1,29,2) + !qmi_indication_nas_system_info_output_get_gsm_system_info_v2 ( +#else !qmi_indication_nas_system_info_output_get_gsm_system_info ( +#endif indication_output, &domain_valid, &domain, NULL, NULL, /* service_capability */ @@ -2922,7 +2900,7 @@ NULL, NULL, /* egprs support */ NULL, NULL, /* dtm_support */ NULL)) { - mm_dbg ("No GSM service reported"); + mm_obj_dbg (self, "no GSM service reported"); /* No GSM service */ return FALSE; } @@ -2942,7 +2920,7 @@ NULL, mm_cid, mm_operator_id)) { - mm_dbg ("No GSM service registered"); + mm_obj_dbg (self, "no GSM service registered"); return FALSE; } @@ -2950,7 +2928,8 @@ } static gboolean -process_wcdma_info (QmiMessageNasGetSystemInfoOutput *response_output, +process_wcdma_info (MMBroadbandModemQmi *self, + QmiMessageNasGetSystemInfoOutput *response_output, QmiIndicationNasSystemInfoOutput *indication_output, MMModem3gppRegistrationState *mm_cs_registration_state, MMModem3gppRegistrationState *mm_ps_registration_state, @@ -2992,7 +2971,11 @@ NULL, /* true_service_status */ NULL, /* preferred_data_path */ NULL) || +#if QMI_CHECK_VERSION(1,29,2) + !qmi_message_nas_get_system_info_output_get_wcdma_system_info_v2 ( +#else !qmi_message_nas_get_system_info_output_get_wcdma_system_info ( +#endif response_output, &domain_valid, &domain, NULL, NULL, /* service_capability */ @@ -3006,7 +2989,7 @@ &hs_service_valid, &hs_service, NULL, NULL, /* primary_scrambling_code */ NULL)) { - mm_dbg ("No WCDMA service reported"); + mm_obj_dbg (self, "no WCDMA service reported"); /* No GSM service */ return FALSE; } @@ -3017,7 +3000,11 @@ NULL, /* true_service_status */ NULL, /* preferred_data_path */ NULL) || +#if QMI_CHECK_VERSION(1,29,2) + !qmi_indication_nas_system_info_output_get_wcdma_system_info_v2 ( +#else !qmi_indication_nas_system_info_output_get_wcdma_system_info ( +#endif indication_output, &domain_valid, &domain, NULL, NULL, /* service_capability */ @@ -3031,7 +3018,7 @@ &hs_service_valid, &hs_service, NULL, NULL, /* primary_scrambling_code */ NULL)) { - mm_dbg ("No WCDMA service reported"); + mm_obj_dbg (self, "no WCDMA service reported"); /* No GSM service */ return FALSE; } @@ -3051,7 +3038,7 @@ NULL, mm_cid, mm_operator_id)) { - mm_dbg ("No WCDMA service registered"); + mm_obj_dbg (self, "no WCDMA service registered"); return FALSE; } @@ -3059,7 +3046,8 @@ } static gboolean -process_lte_info (QmiMessageNasGetSystemInfoOutput *response_output, +process_lte_info (MMBroadbandModemQmi *self, + QmiMessageNasGetSystemInfoOutput *response_output, QmiIndicationNasSystemInfoOutput *indication_output, MMModem3gppRegistrationState *mm_cs_registration_state, MMModem3gppRegistrationState *mm_ps_registration_state, @@ -3103,7 +3091,11 @@ NULL, /* true_service_status */ NULL, /* preferred_data_path */ NULL) || +#if QMI_CHECK_VERSION(1,29,2) + !qmi_message_nas_get_system_info_output_get_lte_system_info_v2 ( +#else !qmi_message_nas_get_system_info_output_get_lte_system_info ( +#endif response_output, &domain_valid, &domain, NULL, NULL, /* service_capability */ @@ -3115,7 +3107,7 @@ &network_id_valid, &mcc, &mnc, &tac_valid, &tac, NULL)) { - mm_dbg ("No LTE service reported"); + mm_obj_dbg (self, "no LTE service reported"); /* No GSM service */ return FALSE; } @@ -3126,7 +3118,12 @@ NULL, /* true_service_status */ NULL, /* preferred_data_path */ NULL) || +#if QMI_CHECK_VERSION(1,29,2) + !qmi_indication_nas_system_info_output_get_lte_system_info_v2 ( +#else !qmi_indication_nas_system_info_output_get_lte_system_info ( +#endif + indication_output, &domain_valid, &domain, NULL, NULL, /* service_capability */ @@ -3138,7 +3135,7 @@ &network_id_valid, &mcc, &mnc, &tac_valid, &tac, NULL)) { - mm_dbg ("No LTE service reported"); + mm_obj_dbg (self, "no LTE service reported"); /* No GSM service */ return FALSE; } @@ -3158,7 +3155,7 @@ mm_tac, mm_cid, mm_operator_id)) { - mm_dbg ("No LTE service registered"); + mm_obj_dbg (self, "no LTE service registered"); return FALSE; } @@ -3189,7 +3186,7 @@ * LTE > WCDMA > GSM * The first one giving results will be the one reported. */ - has_lte_info = process_lte_info (response_output, indication_output, + has_lte_info = process_lte_info (self, response_output, indication_output, &cs_registration_state, &ps_registration_state, &lac, @@ -3197,19 +3194,19 @@ &cid, &operator_id); if (!has_lte_info && - !process_wcdma_info (response_output, indication_output, + !process_wcdma_info (self, response_output, indication_output, &cs_registration_state, &ps_registration_state, &lac, &cid, &operator_id) && - !process_gsm_info (response_output, indication_output, + !process_gsm_info (self, response_output, indication_output, &cs_registration_state, &ps_registration_state, &lac, &cid, &operator_id)) { - mm_dbg ("No service (GSM, WCDMA or LTE) reported"); + mm_obj_dbg (self, "no service (GSM, WCDMA or LTE) reported"); } /* Cache current operator ID */ @@ -3263,12 +3260,13 @@ #endif /* WITH_NEWEST_QMI_COMMANDS */ static void -modem_3gpp_run_registration_checks (MMIfaceModem3gpp *self, - gboolean cs_supported, - gboolean ps_supported, - gboolean eps_supported, - GAsyncReadyCallback callback, - gpointer user_data) +modem_3gpp_run_registration_checks (MMIfaceModem3gpp *self, + gboolean is_cs_supported, + gboolean is_ps_supported, + gboolean is_eps_supported, + gboolean is_5gs_supported, + GAsyncReadyCallback callback, + gpointer user_data) { GTask *task; QmiClient *client = NULL; @@ -3281,24 +3279,20 @@ task = g_task_new (self, NULL, callback, user_data); #if defined WITH_NEWEST_QMI_COMMANDS - /* System Info was added in NAS 1.8 */ - if (qmi_client_check_version (client, 1, 8)) { - qmi_client_nas_get_system_info (QMI_CLIENT_NAS (client), - NULL, - 10, - NULL, - (GAsyncReadyCallback)get_system_info_ready, - task); - return; - } -#endif /* WITH_NEWEST_QMI_COMMANDS */ - + qmi_client_nas_get_system_info (QMI_CLIENT_NAS (client), + NULL, + 10, + NULL, + (GAsyncReadyCallback)get_system_info_ready, + task); +#else qmi_client_nas_get_serving_system (QMI_CLIENT_NAS (client), NULL, 10, NULL, (GAsyncReadyCallback)get_serving_system_3gpp_ready, task); +#endif /* WITH_NEWEST_QMI_COMMANDS */ } /*****************************************************************************/ @@ -3337,9 +3331,9 @@ } static gboolean -modem_3gpp_enable_disable_unsolicited_registration_events_finish (MMIfaceModem3gpp *self, - GAsyncResult *res, - GError **error) +modem_3gpp_enable_disable_unsolicited_registration_events_finish (MMIfaceModem3gpp *self, + GAsyncResult *res, + GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } @@ -3347,39 +3341,41 @@ static void ri_serving_system_or_system_info_ready (QmiClientNas *client, GAsyncResult *res, - GTask *task) + GTask *task) { - MMBroadbandModemQmi *self; - UnsolicitedRegistrationEventsContext *ctx; - QmiMessageNasRegisterIndicationsOutput *output = NULL; - GError *error = NULL; + MMBroadbandModemQmi *self; + UnsolicitedRegistrationEventsContext *ctx; + g_autoptr(QmiMessageNasRegisterIndicationsOutput) output = NULL; + g_autoptr(GError) error = NULL; self = g_task_get_source_object (task); - ctx = g_task_get_task_data (task); + ctx = g_task_get_task_data (task); output = qmi_client_nas_register_indications_finish (client, res, &error); - if (!output) { - mm_dbg ("QMI operation failed: '%s'", error->message); - g_error_free (error); - } else if (!qmi_message_nas_register_indications_output_get_result (output, &error)) { - mm_dbg ("Couldn't register indications: '%s'", error->message); - g_error_free (error); + if (!output || !qmi_message_nas_register_indications_output_get_result (output, &error)) { + mm_obj_dbg (self, "couldn't register indications: '%s'", error->message); + if (ctx->enable) { +#if defined WITH_NEWEST_QMI_COMMANDS + mm_obj_dbg (self, "assuming system info indications are always enabled"); +#else + mm_obj_dbg (self, "assuming serving system indications are always enabled"); +#endif + } } - if (output) - qmi_message_nas_register_indications_output_unref (output); - /* Just ignore errors for now */ self->priv->unsolicited_registration_events_enabled = ctx->enable; g_task_return_boolean (task, TRUE); g_object_unref (task); } +#if !defined WITH_NEWEST_QMI_COMMANDS + static void common_enable_disable_unsolicited_registration_events_serving_system (GTask *task) { - UnsolicitedRegistrationEventsContext *ctx; - QmiMessageNasRegisterIndicationsInput *input; + UnsolicitedRegistrationEventsContext *ctx; + g_autoptr(QmiMessageNasRegisterIndicationsInput) input = NULL; ctx = g_task_get_task_data (task); input = qmi_message_nas_register_indications_input_new (); @@ -3391,15 +3387,15 @@ NULL, (GAsyncReadyCallback)ri_serving_system_or_system_info_ready, task); - qmi_message_nas_register_indications_input_unref (input); } -#if defined WITH_NEWEST_QMI_COMMANDS +#else /* WITH_NEWEST_QMI_COMMANDS */ + static void common_enable_disable_unsolicited_registration_events_system_info (GTask *task) { - UnsolicitedRegistrationEventsContext *ctx; - QmiMessageNasRegisterIndicationsInput *input; + UnsolicitedRegistrationEventsContext *ctx; + g_autoptr(QmiMessageNasRegisterIndicationsInput) input = NULL; ctx = g_task_get_task_data (task); input = qmi_message_nas_register_indications_input_new (); @@ -3411,20 +3407,19 @@ NULL, (GAsyncReadyCallback)ri_serving_system_or_system_info_ready, task); - qmi_message_nas_register_indications_input_unref (input); } + #endif /* WITH_NEWEST_QMI_COMMANDS */ static void -modem_3gpp_disable_unsolicited_registration_events (MMIfaceModem3gpp *_self, - gboolean cs_supported, - gboolean ps_supported, - gboolean eps_supported, - GAsyncReadyCallback callback, - gpointer user_data) +modem_3gpp_disable_unsolicited_registration_events (MMIfaceModem3gpp *self, + gboolean cs_supported, + gboolean ps_supported, + gboolean eps_supported, + GAsyncReadyCallback callback, + gpointer user_data) { - MMBroadbandModemQmi *self = MM_BROADBAND_MODEM_QMI (_self); - GTask *task; + GTask *task; QmiClient *client = NULL; if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), @@ -3432,46 +3427,28 @@ callback, user_data)) return; - task = unsolicited_registration_events_task_new (self, + task = unsolicited_registration_events_task_new (MM_BROADBAND_MODEM_QMI (self), client, FALSE, callback, user_data); #if defined WITH_NEWEST_QMI_COMMANDS - /* System Info was added in NAS 1.8 */ - if (qmi_client_check_version (client, 1, 8)) { - common_enable_disable_unsolicited_registration_events_system_info (task); - return; - } + common_enable_disable_unsolicited_registration_events_system_info (task); +#else + common_enable_disable_unsolicited_registration_events_serving_system (task); #endif /* WITH_NEWEST_QMI_COMMANDS */ - - /* Ability to explicitly enable/disable serving system indications was - * added in NAS 1.2 */ - if (qmi_client_check_version (client, 1, 2)) { - common_enable_disable_unsolicited_registration_events_serving_system (task); - return; - } - - /* Devices with NAS < 1.2 will just always issue serving system indications */ - self->priv->unsolicited_registration_events_enabled = FALSE; - g_task_return_new_error (task, - MM_CORE_ERROR, - MM_CORE_ERROR_FAILED, - "Device doesn't allow disabling registration events"); - g_object_unref (task); } static void -modem_3gpp_enable_unsolicited_registration_events (MMIfaceModem3gpp *_self, - gboolean cs_supported, - gboolean ps_supported, - gboolean eps_supported, - GAsyncReadyCallback callback, - gpointer user_data) +modem_3gpp_enable_unsolicited_registration_events (MMIfaceModem3gpp *self, + gboolean cs_supported, + gboolean ps_supported, + gboolean eps_supported, + GAsyncReadyCallback callback, + gpointer user_data) { - MMBroadbandModemQmi *self = MM_BROADBAND_MODEM_QMI (_self); - GTask *task; + GTask *task; QmiClient *client = NULL; if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), @@ -3479,24 +3456,17 @@ callback, user_data)) return; - task = unsolicited_registration_events_task_new (self, + task = unsolicited_registration_events_task_new (MM_BROADBAND_MODEM_QMI (self), client, TRUE, callback, user_data); - /* Ability to explicitly enable/disable serving system indications was - * added in NAS 1.2 */ - if (qmi_client_check_version (client, 1, 2)) { - common_enable_disable_unsolicited_registration_events_serving_system (task); - return; - } - - /* Devices with NAS < 1.2 will just always issue serving system indications */ - mm_dbg ("Assuming serving system indications are always enabled"); - self->priv->unsolicited_registration_events_enabled = TRUE; - g_task_return_boolean (task, TRUE); - g_object_unref (task); +#if defined WITH_NEWEST_QMI_COMMANDS + common_enable_disable_unsolicited_registration_events_system_info (task); +#else + common_enable_disable_unsolicited_registration_events_serving_system (task); +#endif /* WITH_NEWEST_QMI_COMMANDS */ } /*****************************************************************************/ @@ -3568,9 +3538,9 @@ if (selected_network == QMI_NAS_NETWORK_TYPE_3GPP2 || (selected_network == QMI_NAS_NETWORK_TYPE_UNKNOWN && (mm_access_technologies & MM_IFACE_MODEM_CDMA_ALL_ACCESS_TECHNOLOGIES_MASK))) { - mm_dbg ("Processing CDMA info..."); + mm_obj_dbg (self, "processing CDMA info..."); } else { - mm_dbg ("No CDMA info given..."); + mm_obj_dbg (self, "no CDMA info given..."); mm_iface_modem_cdma_update_cdma1x_registration_state (MM_IFACE_MODEM_CDMA (self), MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN, 0, 0); @@ -3939,13 +3909,15 @@ GAsyncResult *res, GTask *task) { + MMBroadbandModemQmi *self; CdmaActivationContext *ctx; QmiMessageDmsGetMsisdnOutput *output = NULL; GError *error = NULL; const gchar *current_mdn = NULL; const gchar *expected_mdn = NULL; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); qmi_message_dms_activate_manual_input_get_info (ctx->input_manual, NULL, /* spc */ @@ -3959,7 +3931,7 @@ qmi_message_dms_get_msisdn_output_get_result (output, NULL) && qmi_message_dms_get_msisdn_output_get_msisdn (output, ¤t_mdn, NULL) && g_str_equal (current_mdn, expected_mdn)) { - mm_dbg ("MDN successfully updated to '%s'", expected_mdn); + mm_obj_dbg (self, "MDN successfully updated to '%s'", expected_mdn); qmi_message_dms_get_msisdn_output_unref (output); /* And go on to next step */ ctx->step++; @@ -3972,7 +3944,7 @@ if (ctx->n_mdn_check_retries < MAX_MDN_CHECK_RETRIES) { /* Retry after some time */ - mm_dbg ("MDN not yet updated, retrying..."); + mm_obj_dbg (self, "MDN not yet updated, retrying..."); g_timeout_add (1, (GSourceFunc) retry_msisdn_check_cb, task); return; } @@ -3998,15 +3970,15 @@ if (!qmi_indication_dms_event_report_output_get_activation_state (output, &state, NULL)) return; - mm_dbg ("Activation state update: '%s'", + mm_obj_dbg (self, "activation state update: '%s'", qmi_dms_activation_state_get_string (state)); new = mm_modem_cdma_activation_state_from_qmi_activation_state (state); if (self->priv->activation_state != new) - mm_info ("Activation state changed: '%s'-->'%s'", - mm_modem_cdma_activation_state_get_string (self->priv->activation_state), - mm_modem_cdma_activation_state_get_string (new)); + mm_obj_info (self, "activation state changed: '%s'-->'%s'", + mm_modem_cdma_activation_state_get_string (self->priv->activation_state), + mm_modem_cdma_activation_state_get_string (new)); /* Cache the new value */ self->priv->activation_state = new; @@ -4046,7 +4018,7 @@ return; } - mm_dbg ("Activation process still ongoing..."); + mm_obj_dbg (self, "activation process still ongoing..."); } static void @@ -4184,15 +4156,14 @@ switch (ctx->step) { case CDMA_ACTIVATION_STEP_FIRST: ctx->step++; - /* Fall down to next step */ + /* Fall through */ case CDMA_ACTIVATION_STEP_ENABLE_INDICATIONS: /* Indications needed in automatic activation */ if (ctx->input_automatic) { QmiMessageDmsSetEventReportInput *input; - mm_info ("Activation step [1/5]: enabling indications"); - + mm_obj_info (ctx->self, "activation step [1/5]: enabling indications"); input = qmi_message_dms_set_event_report_input_new (); qmi_message_dms_set_event_report_input_set_activation_state_reporting (input, TRUE, NULL); qmi_client_dms_set_event_report ( @@ -4208,15 +4179,14 @@ /* Manual activation, no indications needed */ g_assert (ctx->input_manual != NULL); - mm_info ("Activation step [1/5]: indications not needed in manual activation"); + mm_obj_info (ctx->self, "activation step [1/5]: indications not needed in manual activation"); ctx->step++; - /* Fall down to next step */ + /* Fall through */ case CDMA_ACTIVATION_STEP_REQUEST_ACTIVATION: /* Automatic activation */ if (ctx->input_automatic) { - mm_info ("Activation step [2/5]: requesting automatic (OTA) activation"); - + mm_obj_info (ctx->self, "activation step [2/5]: requesting automatic (OTA) activation"); qmi_client_dms_activate_automatic (ctx->client, ctx->input_automatic, 10, @@ -4229,10 +4199,10 @@ /* Manual activation */ g_assert (ctx->input_manual != NULL); if (!ctx->segments) - mm_info ("Activation step [2/5]: requesting manual activation"); + mm_obj_info (ctx->self, "activation step [2/5]: requesting manual activation"); else { - mm_info ("Activation step [2/5]: requesting manual activation (PRL segment %u/%u)", - (ctx->segment_i + 1), ctx->n_segments); + mm_obj_info (ctx->self, "activation step [2/5]: requesting manual activation (PRL segment %u/%u)", + (ctx->segment_i + 1), ctx->n_segments); qmi_message_dms_activate_manual_input_set_prl ( ctx->input_manual, (guint16)ctx->total_segments_size, @@ -4253,14 +4223,14 @@ /* Automatic activation */ if (ctx->input_automatic) { /* State updates via unsolicited messages */ - mm_info ("Activation step [3/5]: waiting for activation state updates"); + mm_obj_info (ctx->self, "activation step [3/5]: waiting for activation state updates"); return; } /* Manual activation; needs MSISDN checks */ g_assert (ctx->input_manual != NULL); ctx->n_mdn_check_retries++; - mm_info ("Activation step [3/5]: checking MDN update (retry %u)", ctx->n_mdn_check_retries); + mm_obj_info (ctx->self, "activation step [3/5]: checking MDN update (retry %u)", ctx->n_mdn_check_retries); qmi_client_dms_get_msisdn (ctx->client, NULL, 5, @@ -4270,14 +4240,14 @@ return; case CDMA_ACTIVATION_STEP_RESET: - mm_info ("Activation step [4/5]: power-cycling..."); + mm_obj_info (ctx->self, "activation step [4/5]: power-cycling..."); mm_shared_qmi_reset (MM_IFACE_MODEM (ctx->self), (GAsyncReadyCallback)activation_reset_ready, task); return; case CDMA_ACTIVATION_STEP_LAST: - mm_info ("Activation step [5/5]: finished"); + mm_obj_info (ctx->self, "activation step [5/5]: finished"); g_task_return_boolean (task, TRUE); g_object_unref (task); return; @@ -4461,7 +4431,8 @@ if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (self))) common_process_system_info_3gpp (self, NULL, output); } -#endif + +#else /* WITH_NEWEST_QMI_COMMANDS */ static void serving_system_indication_cb (QmiClientNas *client, @@ -4474,6 +4445,8 @@ common_process_serving_system_cdma (self, NULL, output); } +#endif + static void common_setup_cleanup_unsolicited_registration_events (MMBroadbandModemQmi *self, gboolean enable, @@ -4491,7 +4464,7 @@ task = g_task_new (self, NULL, callback, user_data); if (enable == self->priv->unsolicited_registration_events_setup) { - mm_dbg ("Unsolicited registration events already %s; skipping", + mm_obj_dbg (self, "unsolicited registration events already %s; skipping", enable ? "setup" : "cleanup"); g_task_return_boolean (task, TRUE); g_object_unref (task); @@ -4502,38 +4475,34 @@ self->priv->unsolicited_registration_events_setup = enable; #if defined WITH_NEWEST_QMI_COMMANDS - /* Signal info introduced in NAS 1.8 */ - if (qmi_client_check_version (client, 1, 8)) { - /* Connect/Disconnect "System Info" indications */ - if (enable) { - g_assert (self->priv->system_info_indication_id == 0); - self->priv->system_info_indication_id = - g_signal_connect (client, - "system-info", - G_CALLBACK (system_info_indication_cb), - self); - } else { - g_assert (self->priv->system_info_indication_id != 0); - g_signal_handler_disconnect (client, self->priv->system_info_indication_id); - self->priv->system_info_indication_id = 0; - } - } else -#endif /* WITH_NEWEST_QMI_COMMANDS */ - { - /* Connect/Disconnect "Serving System" indications */ - if (enable) { - g_assert (self->priv->serving_system_indication_id == 0); - self->priv->serving_system_indication_id = - g_signal_connect (client, - "serving-system", - G_CALLBACK (serving_system_indication_cb), - self); - } else { - g_assert (self->priv->serving_system_indication_id != 0); - g_signal_handler_disconnect (client, self->priv->serving_system_indication_id); - self->priv->serving_system_indication_id = 0; - } + /* Connect/Disconnect "System Info" indications */ + if (enable) { + g_assert (self->priv->system_info_indication_id == 0); + self->priv->system_info_indication_id = + g_signal_connect (client, + "system-info", + G_CALLBACK (system_info_indication_cb), + self); + } else { + g_assert (self->priv->system_info_indication_id != 0); + g_signal_handler_disconnect (client, self->priv->system_info_indication_id); + self->priv->system_info_indication_id = 0; } +#else + /* Connect/Disconnect "Serving System" indications */ + if (enable) { + g_assert (self->priv->serving_system_indication_id == 0); + self->priv->serving_system_indication_id = + g_signal_connect (client, + "serving-system", + G_CALLBACK (serving_system_indication_cb), + self); + } else { + g_assert (self->priv->serving_system_indication_id != 0); + g_signal_handler_disconnect (client, self->priv->serving_system_indication_id); + self->priv->serving_system_indication_id = 0; + } +#endif /* WITH_NEWEST_QMI_COMMANDS */ g_task_return_boolean (task, TRUE); g_object_unref (task); @@ -4635,175 +4604,204 @@ } /*****************************************************************************/ -/* Enabling/disabling unsolicited events (3GPP and CDMA interface) - * - * If NAS >= 1.8: - * - Config Signal Info (only when enabling) - * - Register Indications with Signal Info - * - * If NAS < 1.8: - * - Set Event Report with Signal Strength - */ +/* Enabling/disabling unsolicited events (3GPP and CDMA interface) */ typedef struct { - QmiClientNas *client; - gboolean enable; + QmiClientNas *client_nas; + QmiClientWds *client_wds; + gboolean enable; } EnableUnsolicitedEventsContext; static void enable_unsolicited_events_context_free (EnableUnsolicitedEventsContext *ctx) { - g_object_unref (ctx->client); + g_clear_object (&ctx->client_wds); + g_clear_object (&ctx->client_nas); g_free (ctx); } static gboolean -common_enable_disable_unsolicited_events_finish (MMBroadbandModemQmi *self, - GAsyncResult *res, - GError **error) +common_enable_disable_unsolicited_events_finish (MMBroadbandModemQmi *self, + GAsyncResult *res, + GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void +ser_data_system_status_ready (QmiClientWds *client, + GAsyncResult *res, + GTask *task) +{ + MMBroadbandModemQmi *self; + g_autoptr(QmiMessageWdsSetEventReportOutput) output = NULL; + g_autoptr(GError) error = NULL; + + self = g_task_get_source_object (task); + + output = qmi_client_wds_set_event_report_finish (client, res, &error); + if (!output || !qmi_message_wds_set_event_report_output_get_result (output, &error)) + mm_obj_dbg (self, "couldn't set event report: '%s'", error->message); + + g_task_return_boolean (task, TRUE); + g_object_unref (task); +} + +static void +common_enable_disable_unsolicited_events_data_system_status (GTask *task) +{ + EnableUnsolicitedEventsContext *ctx; + g_autoptr(QmiMessageWdsSetEventReportInput) input = NULL; + + ctx = g_task_get_task_data (task); + + input = qmi_message_wds_set_event_report_input_new (); + qmi_message_wds_set_event_report_input_set_data_systems (input, ctx->enable, NULL); + qmi_client_wds_set_event_report (ctx->client_wds, + input, + 5, + NULL, + (GAsyncReadyCallback)ser_data_system_status_ready, + task); +} + +#if !defined WITH_NEWEST_QMI_COMMANDS + +static void ser_signal_strength_ready (QmiClientNas *client, GAsyncResult *res, - GTask *task) + GTask *task) { - MMBroadbandModemQmi *self; - EnableUnsolicitedEventsContext *ctx; - QmiMessageNasSetEventReportOutput *output = NULL; - GError *error = NULL; + MMBroadbandModemQmi *self; + EnableUnsolicitedEventsContext *ctx; + g_autoptr(QmiMessageNasSetEventReportOutput) output = NULL; + g_autoptr(GError) error = NULL; self = g_task_get_source_object (task); - ctx = g_task_get_task_data (task); + ctx = g_task_get_task_data (task); output = qmi_client_nas_set_event_report_finish (client, res, &error); - if (!output) { - mm_dbg ("QMI operation failed: '%s'", error->message); - g_error_free (error); - } else if (!qmi_message_nas_set_event_report_output_get_result (output, &error)) { - mm_dbg ("Couldn't set event report: '%s'", error->message); - g_error_free (error); + if (!output || !qmi_message_nas_set_event_report_output_get_result (output, &error)) + mm_obj_dbg (self, "couldn't enable signal strength indications: '%s'", error->message); + else { + /* Disable access technology and signal quality polling if we can use the indications */ + mm_obj_dbg (self, "signal strength indications enabled: polling disabled"); + g_object_set (self, + MM_IFACE_MODEM_PERIODIC_SIGNAL_CHECK_DISABLED, TRUE, + MM_IFACE_MODEM_PERIODIC_ACCESS_TECH_CHECK_DISABLED, TRUE, + NULL); } - if (output) - qmi_message_nas_set_event_report_output_unref (output); + if (!ctx->client_wds) { + g_task_return_boolean (task, TRUE); + g_object_unref (task); + return; + } - /* Just ignore errors for now */ - self->priv->unsolicited_events_enabled = ctx->enable; - g_task_return_boolean (task, TRUE); - g_object_unref (task); + common_enable_disable_unsolicited_events_data_system_status (task); } static void common_enable_disable_unsolicited_events_signal_strength (GTask *task) { - EnableUnsolicitedEventsContext *ctx; + EnableUnsolicitedEventsContext *ctx; + g_autoptr(QmiMessageNasSetEventReportInput) input = NULL; + g_autoptr(GArray) thresholds = NULL; /* The device doesn't really like to have many threshold values, so don't * grow this array without checking first */ static const gint8 thresholds_data[] = { -80, -40, 0, 40, 80 }; - QmiMessageNasSetEventReportInput *input; - GArray *thresholds; ctx = g_task_get_task_data (task); - input = qmi_message_nas_set_event_report_input_new (); - /* Prepare thresholds, separated 20 each */ + /* Always set thresholds, both in enable and disable, or otherwise the protocol will + * complain with FAILURE: NoThresholdsProvided */ thresholds = g_array_sized_new (FALSE, FALSE, sizeof (gint8), G_N_ELEMENTS (thresholds_data)); + g_array_append_vals (thresholds, thresholds_data, G_N_ELEMENTS (thresholds_data)); - /* Only set thresholds during enable */ - if (ctx->enable) - g_array_append_vals (thresholds, thresholds_data, G_N_ELEMENTS (thresholds_data)); - + input = qmi_message_nas_set_event_report_input_new (); qmi_message_nas_set_event_report_input_set_signal_strength_indicator ( input, ctx->enable, thresholds, NULL); - g_array_unref (thresholds); qmi_client_nas_set_event_report ( - ctx->client, + ctx->client_nas, input, 5, NULL, (GAsyncReadyCallback)ser_signal_strength_ready, task); - qmi_message_nas_set_event_report_input_unref (input); } -#if defined WITH_NEWEST_QMI_COMMANDS +#else /* WITH_NEWEST_QMI_COMMANDS */ static void ri_signal_info_ready (QmiClientNas *client, GAsyncResult *res, - GTask *task) + GTask *task) { - MMBroadbandModemQmi *self; - EnableUnsolicitedEventsContext *ctx; - QmiMessageNasRegisterIndicationsOutput *output = NULL; - GError *error = NULL; + MMBroadbandModemQmi *self; + EnableUnsolicitedEventsContext *ctx; + g_autoptr(QmiMessageNasRegisterIndicationsOutput) output = NULL; + g_autoptr(GError) error = NULL; self = g_task_get_source_object (task); - ctx = g_task_get_task_data (task); + ctx = g_task_get_task_data (task); output = qmi_client_nas_register_indications_finish (client, res, &error); - if (!output) { - mm_dbg ("QMI operation failed: '%s'", error->message); - g_error_free (error); - } else if (!qmi_message_nas_register_indications_output_get_result (output, &error)) { - mm_dbg ("Couldn't register indications: '%s'", error->message); - g_error_free (error); + if (!output || !qmi_message_nas_register_indications_output_get_result (output, &error)) + mm_obj_dbg (self, "couldn't register signal info indications: '%s'", error->message); + else { + /* Disable access technology and signal quality polling if we can use the indications */ + mm_obj_dbg (self, "signal strength indications enabled: polling disabled"); + g_object_set (self, + MM_IFACE_MODEM_PERIODIC_SIGNAL_CHECK_DISABLED, TRUE, + MM_IFACE_MODEM_PERIODIC_ACCESS_TECH_CHECK_DISABLED, TRUE, + NULL); } - if (output) - qmi_message_nas_register_indications_output_unref (output); + if (!ctx->client_wds) { + g_task_return_boolean (task, TRUE); + g_object_unref (task); + return; + } - /* Just ignore errors for now */ - self->priv->unsolicited_events_enabled = ctx->enable; - g_task_return_boolean (task, TRUE); - g_object_unref (task); + common_enable_disable_unsolicited_events_data_system_status (task); } static void common_enable_disable_unsolicited_events_signal_info (GTask *task) { - EnableUnsolicitedEventsContext *ctx; - QmiMessageNasRegisterIndicationsInput *input; + EnableUnsolicitedEventsContext *ctx; + g_autoptr(QmiMessageNasRegisterIndicationsInput) input = NULL; ctx = g_task_get_task_data (task); input = qmi_message_nas_register_indications_input_new (); qmi_message_nas_register_indications_input_set_signal_info (input, ctx->enable, NULL); qmi_client_nas_register_indications ( - ctx->client, + ctx->client_nas, input, 5, NULL, (GAsyncReadyCallback)ri_signal_info_ready, task); - qmi_message_nas_register_indications_input_unref (input); } static void config_signal_info_ready (QmiClientNas *client, GAsyncResult *res, - GTask *task) + GTask *task) { - QmiMessageNasConfigSignalInfoOutput *output = NULL; - GError *error = NULL; + MMBroadbandModemQmi *self; + g_autoptr(QmiMessageNasConfigSignalInfoOutput) output = NULL; + g_autoptr(GError) error = NULL; - output = qmi_client_nas_config_signal_info_finish (client, res, &error); - if (!output) { - mm_dbg ("QMI operation failed: '%s'", error->message); - g_error_free (error); - } else if (!qmi_message_nas_config_signal_info_output_get_result (output, &error)) { - mm_dbg ("Couldn't config signal info: '%s'", error->message); - g_error_free (error); - } + self = g_task_get_source_object (task); - if (output) - qmi_message_nas_config_signal_info_output_unref (output); + output = qmi_client_nas_config_signal_info_finish (client, res, &error); + if (!output || !qmi_message_nas_config_signal_info_output_get_result (output, &error)) + mm_obj_dbg (self, "couldn't config signal info: '%s'", error->message); /* Keep on */ common_enable_disable_unsolicited_events_signal_info (task); @@ -4812,12 +4810,8 @@ static void common_enable_disable_unsolicited_events_signal_info_config (GTask *task) { - EnableUnsolicitedEventsContext *ctx; - /* RSSI values go between -105 and -60 for 3GPP technologies, - * and from -105 to -90 in 3GPP2 technologies (approx). */ - static const gint8 thresholds_data[] = { -100, -97, -95, -92, -90, -85, -80, -75, -70, -65 }; - QmiMessageNasConfigSignalInfoInput *input; - GArray *thresholds; + EnableUnsolicitedEventsContext *ctx; + g_autoptr(QmiMessageNasConfigSignalInfoInput) input = NULL; ctx = g_task_get_task_data (task); @@ -4830,65 +4824,85 @@ input = qmi_message_nas_config_signal_info_input_new (); /* Prepare thresholds, separated 20 each */ - thresholds = g_array_sized_new (FALSE, FALSE, sizeof (gint8), G_N_ELEMENTS (thresholds_data)); - g_array_append_vals (thresholds, thresholds_data, G_N_ELEMENTS (thresholds_data)); + { + /* RSSI values go between -105 and -60 for 3GPP technologies, + * and from -105 to -90 in 3GPP2 technologies (approx). */ + static const gint8 thresholds_data[] = { -100, -97, -95, -92, -90, -85, -80, -75, -70, -65 }; + g_autoptr(GArray) thresholds = NULL; + + thresholds = g_array_sized_new (FALSE, FALSE, sizeof (gint8), G_N_ELEMENTS (thresholds_data)); + g_array_append_vals (thresholds, thresholds_data, G_N_ELEMENTS (thresholds_data)); + qmi_message_nas_config_signal_info_input_set_rssi_threshold ( + input, + thresholds, + NULL); + } - qmi_message_nas_config_signal_info_input_set_rssi_threshold ( - input, - thresholds, - NULL); - g_array_unref (thresholds); qmi_client_nas_config_signal_info ( - ctx->client, + ctx->client_nas, input, 5, NULL, (GAsyncReadyCallback)config_signal_info_ready, task); - qmi_message_nas_config_signal_info_input_unref (input); } #endif /* WITH_NEWEST_QMI_COMMANDS */ static void common_enable_disable_unsolicited_events (MMBroadbandModemQmi *self, - gboolean enable, - GAsyncReadyCallback callback, - gpointer user_data) + gboolean enable, + GAsyncReadyCallback callback, + gpointer user_data) { EnableUnsolicitedEventsContext *ctx; - GTask *task; - QmiClient *client = NULL; - - if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), - QMI_SERVICE_NAS, &client, - callback, user_data)) - return; + GTask *task; + QmiClient *client_nas = NULL; + QmiClient *client_wds = NULL; task = g_task_new (self, NULL, callback, user_data); if (enable == self->priv->unsolicited_events_enabled) { - mm_dbg ("Unsolicited events already %s; skipping", - enable ? "enabled" : "disabled"); + mm_obj_dbg (self, "unsolicited events already %s; skipping", + enable ? "enabled" : "disabled"); g_task_return_boolean (task, TRUE); g_object_unref (task); return; } + self->priv->unsolicited_events_enabled = enable; + + client_nas = mm_shared_qmi_peek_client (MM_SHARED_QMI (self), + QMI_SERVICE_NAS, + MM_PORT_QMI_FLAG_DEFAULT, + NULL); + client_wds = mm_shared_qmi_peek_client (MM_SHARED_QMI (self), + QMI_SERVICE_WDS, + MM_PORT_QMI_FLAG_DEFAULT, + NULL); ctx = g_new0 (EnableUnsolicitedEventsContext, 1); - ctx->client = g_object_ref (client); + ctx->enable = enable; + ctx->client_nas = client_nas ? g_object_ref (client_nas) : NULL; + ctx->client_wds = client_wds ? g_object_ref (client_wds) : NULL; g_task_set_task_data (task, ctx, (GDestroyNotify)enable_unsolicited_events_context_free); + if (ctx->client_nas) { #if defined WITH_NEWEST_QMI_COMMANDS - /* Signal info introduced in NAS 1.8 */ - if (qmi_client_check_version (client, 1, 8)) { common_enable_disable_unsolicited_events_signal_info_config (task); +#else + common_enable_disable_unsolicited_events_signal_strength (task); +#endif /* WITH_NEWEST_QMI_COMMANDS */ return; } -#endif /* WITH_NEWEST_QMI_COMMANDS */ - common_enable_disable_unsolicited_events_signal_strength (task); + if (ctx->client_wds) { + common_enable_disable_unsolicited_events_data_system_status (task); + return; + } + + g_task_return_boolean (task, TRUE); + g_object_unref (task); } /*****************************************************************************/ @@ -4969,9 +4983,26 @@ } static void -event_report_indication_cb (QmiClientNas *client, - QmiIndicationNasEventReportOutput *output, - MMBroadbandModemQmi *self) +wds_event_report_indication_cb (QmiClientWds *client, + QmiIndicationWdsEventReportOutput *output, + MMBroadbandModemQmi *self) +{ + QmiWdsDataSystemNetworkType preferred_network; + + if (qmi_indication_wds_event_report_output_get_data_systems (output, &preferred_network, NULL, NULL)) { + mm_obj_dbg (self, "data systems update, preferred network: %s", + qmi_wds_data_system_network_type_get_string (preferred_network)); + if (preferred_network == QMI_WDS_DATA_SYSTEM_NETWORK_TYPE_3GPP) + mm_iface_modem_3gpp_reload_initial_eps_bearer (MM_IFACE_MODEM_3GPP (self)); + else + mm_iface_modem_3gpp_update_initial_eps_bearer (MM_IFACE_MODEM_3GPP (self), NULL); + } +} + +static void +nas_event_report_indication_cb (QmiClientNas *client, + QmiIndicationNasEventReportOutput *output, + MMBroadbandModemQmi *self) { gint8 signal_strength; QmiNasRadioInterface signal_strength_radio_interface; @@ -4987,10 +5018,10 @@ /* This signal strength comes as negative dBms */ quality = STRENGTH_TO_QUALITY (signal_strength); - mm_dbg ("Signal strength indication (%s): %d dBm --> %u%%", - qmi_nas_radio_interface_get_string (signal_strength_radio_interface), - signal_strength, - quality); + mm_obj_dbg (self, "signal strength indication (%s): %d dBm --> %u%%", + qmi_nas_radio_interface_get_string (signal_strength_radio_interface), + signal_strength, + quality); mm_iface_modem_update_signal_quality (MM_IFACE_MODEM (self), quality); mm_iface_modem_update_access_technologies ( @@ -4998,9 +5029,9 @@ mm_modem_access_technology_from_qmi_radio_interface (signal_strength_radio_interface), (MM_IFACE_MODEM_3GPP_ALL_ACCESS_TECHNOLOGIES_MASK | MM_IFACE_MODEM_CDMA_ALL_ACCESS_TECHNOLOGIES_MASK)); } else { - mm_dbg ("Ignoring invalid signal strength (%s): %d dBm", - qmi_nas_radio_interface_get_string (signal_strength_radio_interface), - signal_strength); + mm_obj_dbg (self, "ignoring invalid signal strength (%s): %d dBm", + qmi_nas_radio_interface_get_string (signal_strength_radio_interface), + signal_strength); } } } @@ -5008,9 +5039,9 @@ #if defined WITH_NEWEST_QMI_COMMANDS static void -signal_info_indication_cb (QmiClientNas *client, - QmiIndicationNasSignalInfoOutput *output, - MMBroadbandModemQmi *self) +nas_signal_info_indication_cb (QmiClientNas *client, + QmiIndicationNasSignalInfoOutput *output, + MMBroadbandModemQmi *self) { gint8 cdma1x_rssi = 0; gint8 evdo_rssi = 0; @@ -5026,7 +5057,8 @@ qmi_indication_nas_signal_info_output_get_wcdma_signal_strength (output, &wcdma_rssi, NULL, NULL); qmi_indication_nas_signal_info_output_get_lte_signal_strength (output, <e_rssi, NULL, NULL, NULL, NULL); - if (common_signal_info_get_quality (cdma1x_rssi, + if (common_signal_info_get_quality (self, + cdma1x_rssi, evdo_rssi, gsm_rssi, wcdma_rssi, @@ -5049,59 +5081,72 @@ GAsyncReadyCallback callback, gpointer user_data) { - GTask *task; - QmiClient *client = NULL; - - if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), - QMI_SERVICE_NAS, &client, - callback, user_data)) - return; + GTask *task; + QmiClient *client_nas = NULL; + QmiClient *client_wds = NULL; task = g_task_new (self, NULL, callback, user_data); if (enable == self->priv->unsolicited_events_setup) { - mm_dbg ("Unsolicited events already %s; skipping", - enable ? "setup" : "cleanup"); + mm_obj_dbg (self, "unsolicited events already %s; skipping", + enable ? "setup" : "cleanup"); g_task_return_boolean (task, TRUE); g_object_unref (task); return; } - - /* Store new state */ self->priv->unsolicited_events_setup = enable; + client_nas = mm_shared_qmi_peek_client (MM_SHARED_QMI (self), + QMI_SERVICE_NAS, + MM_PORT_QMI_FLAG_DEFAULT, + NULL); + client_wds = mm_shared_qmi_peek_client (MM_SHARED_QMI (self), + QMI_SERVICE_WDS, + MM_PORT_QMI_FLAG_DEFAULT, + NULL); + /* Connect/Disconnect "Event Report" indications */ - if (enable) { - g_assert (self->priv->event_report_indication_id == 0); - self->priv->event_report_indication_id = - g_signal_connect (client, - "event-report", - G_CALLBACK (event_report_indication_cb), - self); - } else { - g_assert (self->priv->event_report_indication_id != 0); - g_signal_handler_disconnect (client, self->priv->event_report_indication_id); - self->priv->event_report_indication_id = 0; - } + if (client_nas) { + if (enable) { + g_assert (self->priv->nas_event_report_indication_id == 0); + self->priv->nas_event_report_indication_id = + g_signal_connect (client_nas, + "event-report", + G_CALLBACK (nas_event_report_indication_cb), + self); + } else if (self->priv->nas_event_report_indication_id != 0) { + g_signal_handler_disconnect (client_nas, self->priv->nas_event_report_indication_id); + self->priv->nas_event_report_indication_id = 0; + } #if defined WITH_NEWEST_QMI_COMMANDS - /* Connect/Disconnect "Signal Info" indications. - * Signal info introduced in NAS 1.8 */ - if (qmi_client_check_version (client, 1, 8)) { if (enable) { - g_assert (self->priv->signal_info_indication_id == 0); - self->priv->signal_info_indication_id = - g_signal_connect (client, + g_assert (self->priv->nas_signal_info_indication_id == 0); + self->priv->nas_signal_info_indication_id = + g_signal_connect (client_nas, "signal-info", - G_CALLBACK (signal_info_indication_cb), + G_CALLBACK (nas_signal_info_indication_cb), self); - } else { - g_assert (self->priv->signal_info_indication_id != 0); - g_signal_handler_disconnect (client, self->priv->signal_info_indication_id); - self->priv->signal_info_indication_id = 0; + } else if (self->priv->nas_signal_info_indication_id != 0) { + g_signal_handler_disconnect (client_nas, self->priv->nas_signal_info_indication_id); + self->priv->nas_signal_info_indication_id = 0; } - } #endif /* WITH_NEWEST_QMI_COMMANDS */ + } + + if (client_wds) { + if (enable) { + g_assert (self->priv->wds_event_report_indication_id == 0); + self->priv->wds_event_report_indication_id = + g_signal_connect (client_wds, + "event-report", + G_CALLBACK (wds_event_report_indication_cb), + self); + } else if (self->priv->wds_event_report_indication_id != 0) { + g_signal_handler_disconnect (client_wds, self->priv->wds_event_report_indication_id); + self->priv->wds_event_report_indication_id = 0; + } + } g_task_return_boolean (task, TRUE); g_object_unref (task); @@ -5219,7 +5264,7 @@ return; } - mm_dbg ("Messaging capabilities supported"); + mm_obj_dbg (self, "messaging capabilities supported"); g_task_return_boolean (task, TRUE); g_object_unref (task); } @@ -5392,7 +5437,7 @@ g_array_append_val (routes_array, route); qmi_message_wms_set_routes_input_set_route_list (input, routes_array, NULL); - mm_dbg ("setting default messaging routes..."); + mm_obj_dbg (self, "setting default messaging routes..."); qmi_client_wms_set_routes (QMI_CLIENT_WMS (client), input, 5, @@ -5469,6 +5514,7 @@ guint32 index, QmiWmsMessageTagType tag, QmiWmsMessageFormat format, + gboolean transfer_route, GArray *data) { MMSmsPart *part = NULL; @@ -5479,6 +5525,7 @@ part = mm_sms_part_cdma_new_from_binary_pdu (index, (guint8 *)data->data, data->len, + self, &error); break; @@ -5487,25 +5534,27 @@ part = mm_sms_part_3gpp_new_from_binary_pdu (index, (guint8 *)data->data, data->len, + self, + transfer_route, &error); break; case QMI_WMS_MESSAGE_FORMAT_MWI: - mm_dbg ("Don't know how to process 'message waiting indicator' messages"); + mm_obj_dbg (self, "don't know how to process 'message waiting indicator' messages"); break; default: - mm_dbg ("Unhandled message format '%u'", format); + mm_obj_dbg (self, "unhandled message format '%u'", format); break; } if (part) { - mm_dbg ("Correctly parsed PDU (%d)", index); + mm_obj_dbg (self, "correctly parsed PDU (%d)", index); mm_iface_modem_messaging_take_part (self, part, mm_sms_state_from_qmi_message_tag (tag), mm_sms_storage_from_qmi_storage_type (storage)); } else if (error) { /* Don't treat the error as critical */ - mm_dbg ("Error parsing PDU (%d): %s", index, error->message); + mm_obj_dbg (self, "error parsing PDU (%d): %s", index, error->message); g_error_free (error); } } @@ -5527,10 +5576,10 @@ output = qmi_client_wms_raw_read_finish (client, res, &error); if (!output) { - mm_dbg ("QMI operation failed: %s", error->message); + mm_obj_dbg (self, "QMI operation failed: %s", error->message); g_error_free (error); } else if (!qmi_message_wms_raw_read_output_get_result (output, &error)) { - mm_dbg ("Couldn't read raw message: %s", error->message); + mm_obj_dbg (self, "couldn't read raw message: %s", error->message); g_error_free (error); } else { QmiWmsMessageTagType tag; @@ -5553,6 +5602,7 @@ message->memory_index, tag, format, + FALSE, data); } @@ -5627,12 +5677,14 @@ GAsyncResult *res, GTask *task) { + MMBroadbandModemQmi *self; LoadInitialSmsPartsContext *ctx; QmiMessageWmsListMessagesOutput *output = NULL; GError *error = NULL; GArray *message_array; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); output = qmi_client_wms_list_messages_finish (client, res, &error); if (!output) { @@ -5644,7 +5696,7 @@ if (!qmi_message_wms_list_messages_output_get_result (output, &error)) { /* Ignore error, keep on */ - mm_dbg ("Couldn't read SMS messages: %s", error->message); + mm_obj_dbg (self, "couldn't read SMS messages: %s", error->message); g_error_free (error); ctx->step++; load_initial_sms_parts_step (task); @@ -5684,7 +5736,8 @@ switch (ctx->step) { case LOAD_INITIAL_SMS_PARTS_STEP_FIRST: ctx->step++; - /* Fall down */ + /* Fall through */ + case LOAD_INITIAL_SMS_PARTS_STEP_3GPP_FIRST: /* If modem doesn't have 3GPP caps, skip 3GPP SMS */ if (!mm_iface_modem_is_3gpp (MM_IFACE_MODEM (self))) { @@ -5693,39 +5746,46 @@ return; } ctx->step++; - /* Fall down */ + /* Fall through */ + case LOAD_INITIAL_SMS_PARTS_STEP_3GPP_LIST_ALL: - mm_dbg ("loading all 3GPP messages from storage '%s'...", + mm_obj_dbg (self, "loading all 3GPP messages from storage '%s'...", mm_sms_storage_get_string (ctx->storage)); mode = QMI_WMS_MESSAGE_MODE_GSM_WCDMA; break; + case LOAD_INITIAL_SMS_PARTS_STEP_3GPP_LIST_MT_READ: - mm_dbg ("loading 3GPP MT-read messages from storage '%s'...", + mm_obj_dbg (self, "loading 3GPP MT-read messages from storage '%s'...", mm_sms_storage_get_string (ctx->storage)); tag_type = QMI_WMS_MESSAGE_TAG_TYPE_MT_READ; mode = QMI_WMS_MESSAGE_MODE_GSM_WCDMA; break; + case LOAD_INITIAL_SMS_PARTS_STEP_3GPP_LIST_MT_NOT_READ: - mm_dbg ("loading 3GPP MT-not-read messages from storage '%s'...", + mm_obj_dbg (self, "loading 3GPP MT-not-read messages from storage '%s'...", mm_sms_storage_get_string (ctx->storage)); tag_type = QMI_WMS_MESSAGE_TAG_TYPE_MT_NOT_READ; mode = QMI_WMS_MESSAGE_MODE_GSM_WCDMA; break; + case LOAD_INITIAL_SMS_PARTS_STEP_3GPP_LIST_MO_SENT: - mm_dbg ("loading 3GPP MO-sent messages from storage '%s'...", + mm_obj_dbg (self, "loading 3GPP MO-sent messages from storage '%s'...", mm_sms_storage_get_string (ctx->storage)); tag_type = QMI_WMS_MESSAGE_TAG_TYPE_MO_SENT; mode = QMI_WMS_MESSAGE_MODE_GSM_WCDMA; break; + case LOAD_INITIAL_SMS_PARTS_STEP_3GPP_LIST_MO_NOT_SENT: - mm_dbg ("loading 3GPP MO-not-sent messages from storage '%s'...", + mm_obj_dbg (self, "loading 3GPP MO-not-sent messages from storage '%s'...", mm_sms_storage_get_string (ctx->storage)); tag_type = QMI_WMS_MESSAGE_TAG_TYPE_MO_NOT_SENT; mode = QMI_WMS_MESSAGE_MODE_GSM_WCDMA; break; + case LOAD_INITIAL_SMS_PARTS_STEP_3GPP_LAST: ctx->step++; - /* Fall down */ + /* Fall through */ + case LOAD_INITIAL_SMS_PARTS_STEP_CDMA_FIRST: /* If modem doesn't have CDMA caps, skip CDMA SMS */ if (!mm_iface_modem_is_cdma (MM_IFACE_MODEM (self))) { @@ -5734,44 +5794,54 @@ return; } ctx->step++; - /* Fall down */ + /* Fall through */ + case LOAD_INITIAL_SMS_PARTS_STEP_CDMA_LIST_ALL: - mm_dbg ("loading all CDMA messages from storage '%s'...", + mm_obj_dbg (self, "loading all CDMA messages from storage '%s'...", mm_sms_storage_get_string (ctx->storage)); mode = QMI_WMS_MESSAGE_MODE_CDMA; break; + case LOAD_INITIAL_SMS_PARTS_STEP_CDMA_LIST_MT_READ: - mm_dbg ("loading CDMA MT-read messages from storage '%s'...", + mm_obj_dbg (self, "loading CDMA MT-read messages from storage '%s'...", mm_sms_storage_get_string (ctx->storage)); tag_type = QMI_WMS_MESSAGE_TAG_TYPE_MT_READ; mode = QMI_WMS_MESSAGE_MODE_CDMA; break; + case LOAD_INITIAL_SMS_PARTS_STEP_CDMA_LIST_MT_NOT_READ: - mm_dbg ("loading CDMA MT-not-read messages from storage '%s'...", + mm_obj_dbg (self, "loading CDMA MT-not-read messages from storage '%s'...", mm_sms_storage_get_string (ctx->storage)); tag_type = QMI_WMS_MESSAGE_TAG_TYPE_MT_NOT_READ; mode = QMI_WMS_MESSAGE_MODE_CDMA; break; + case LOAD_INITIAL_SMS_PARTS_STEP_CDMA_LIST_MO_SENT: - mm_dbg ("loading CDMA MO-sent messages from storage '%s'...", + mm_obj_dbg (self, "loading CDMA MO-sent messages from storage '%s'...", mm_sms_storage_get_string (ctx->storage)); tag_type = QMI_WMS_MESSAGE_TAG_TYPE_MO_SENT; mode = QMI_WMS_MESSAGE_MODE_CDMA; break; + case LOAD_INITIAL_SMS_PARTS_STEP_CDMA_LIST_MO_NOT_SENT: - mm_dbg ("loading CDMA MO-not-sent messages from storage '%s'...", + mm_obj_dbg (self, "loading CDMA MO-not-sent messages from storage '%s'...", mm_sms_storage_get_string (ctx->storage)); tag_type = QMI_WMS_MESSAGE_TAG_TYPE_MO_NOT_SENT; mode = QMI_WMS_MESSAGE_MODE_CDMA; break; + case LOAD_INITIAL_SMS_PARTS_STEP_CDMA_LAST: ctx->step++; - /* Fall down */ + /* Fall through */ + case LOAD_INITIAL_SMS_PARTS_STEP_LAST: /* All steps done */ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + g_assert_not_reached (); } g_assert (mode != -1); @@ -5862,10 +5932,10 @@ output = qmi_client_wms_raw_read_finish (client, res, &error); if (!output) { - mm_dbg ("QMI operation failed: %s", error->message); + mm_obj_dbg (ctx->self, "QMI operation failed: %s", error->message); g_error_free (error); } else if (!qmi_message_wms_raw_read_output_get_result (output, &error)) { - mm_dbg ("Couldn't read raw message: %s", error->message); + mm_obj_dbg (ctx->self, "couldn't read raw message: %s", error->message); g_error_free (error); } else { QmiWmsMessageTagType tag; @@ -5883,6 +5953,7 @@ ctx->memory_index, tag, format, + FALSE, data); } @@ -5893,14 +5964,87 @@ } static void +wms_send_ack_ready (QmiClientWms *client, + GAsyncResult *res, + MMBroadbandModemQmi *self) +{ + g_autoptr(QmiMessageWmsSendAckOutput) output = NULL; + g_autoptr(GError) error= NULL; + + output = qmi_client_wms_send_ack_finish (client, res, &error); + if (!output) { + mm_obj_dbg (self, "QMI operation failed: '%s'", error->message); + } + g_object_unref (self); +} + +static void messaging_event_report_indication_cb (QmiClientNas *client, QmiIndicationWmsEventReportOutput *output, MMBroadbandModemQmi *self) { QmiWmsStorageType storage; guint32 memory_index; + QmiWmsAckIndicator ack_ind; + guint32 transaction_id; + QmiWmsMessageFormat msg_format; + QmiWmsMessageTagType tag; + GArray *raw_data = NULL; - /* Currently ignoring transfer-route MT messages */ + /* Handle transfer-route MT messages */ + if (qmi_indication_wms_event_report_output_get_transfer_route_mt_message ( + output, + &ack_ind, + &transaction_id, + &msg_format, + &raw_data, + NULL)) { + mm_obj_dbg (self, "Got transfer-route MT message"); + /* If this is the first of a multi-part message, send an ACK to get the + * second part */ + if (ack_ind == QMI_WMS_ACK_INDICATOR_SEND) { + g_autoptr(QmiMessageWmsSendAckInput) ack_input = NULL; + QmiWmsMessageProtocol message_protocol; + /* Need to ack message */ + mm_obj_dbg (self, "Need to ACK indicator"); + switch (msg_format) { + case QMI_WMS_MESSAGE_FORMAT_CDMA: + message_protocol = QMI_WMS_MESSAGE_PROTOCOL_CDMA; + break; + case QMI_WMS_MESSAGE_FORMAT_MWI: + case QMI_WMS_MESSAGE_FORMAT_GSM_WCDMA_POINT_TO_POINT: + case QMI_WMS_MESSAGE_FORMAT_GSM_WCDMA_BROADCAST: + default: + message_protocol = QMI_WMS_MESSAGE_PROTOCOL_WCDMA; + break; + } + ack_input = qmi_message_wms_send_ack_input_new(); + qmi_message_wms_send_ack_input_set_information (ack_input, + transaction_id, + message_protocol, + TRUE, + NULL); + qmi_client_wms_send_ack (QMI_CLIENT_WMS (client), + ack_input, + 180, + NULL, + (GAsyncReadyCallback)wms_send_ack_ready, + g_object_ref (self)); + } + + /* Defaults for transfer-route messages, which are not stored anywhere */ + storage = QMI_WMS_STORAGE_TYPE_NONE; + memory_index = 0; + tag = QMI_WMS_MESSAGE_TAG_TYPE_MT_NOT_READ; + add_new_read_sms_part (MM_IFACE_MODEM_MESSAGING (self), + storage, + memory_index, + tag, + msg_format, + TRUE, + raw_data); + return; + } if (qmi_indication_wms_event_report_output_get_mt_message ( output, @@ -5991,8 +6135,8 @@ task = g_task_new (self, NULL, callback, user_data); if (enable == self->priv->messaging_unsolicited_events_setup) { - mm_dbg ("Messaging unsolicited events already %s; skipping", - enable ? "setup" : "cleanup"); + mm_obj_dbg (self, "messaging unsolicited events already %s; skipping", + enable ? "setup" : "cleanup"); g_task_return_boolean (task, TRUE); g_object_unref (task); return; @@ -6107,10 +6251,10 @@ output = qmi_client_wms_set_event_report_finish (client, res, &error); if (!output) { - mm_dbg ("QMI operation failed: '%s'", error->message); + mm_obj_dbg (self, "QMI operation failed: '%s'", error->message); g_error_free (error); } else if (!qmi_message_wms_set_event_report_output_get_result (output, &error)) { - mm_dbg ("Couldn't set event report: '%s'", error->message); + mm_obj_dbg (self, "couldn't set event report: '%s'", error->message); g_error_free (error); } @@ -6142,8 +6286,8 @@ task = g_task_new (self, NULL, callback, user_data); if (enable == self->priv->messaging_unsolicited_events_enabled) { - mm_dbg ("Messaging unsolicited events already %s; skipping", - enable ? "enabled" : "disabled"); + mm_obj_dbg (self, "messaging unsolicited events already %s; skipping", + enable ? "enabled" : "disabled"); g_task_return_boolean (task, TRUE); g_object_unref (task); return; @@ -6444,10 +6588,10 @@ QMI_SERVICE_OMA, MM_PORT_QMI_FLAG_DEFAULT, NULL)) { - mm_dbg ("OMA capabilities not supported"); + mm_obj_dbg (self, "OMA capabilities not supported"); g_task_return_boolean (task, FALSE); } else { - mm_dbg ("OMA capabilities supported"); + mm_obj_dbg (self, "OMA capabilities supported"); g_task_return_boolean (task, TRUE); } @@ -6832,7 +6976,7 @@ session_type = mm_oma_session_type_from_qmi_oma_session_type (network_initiated_alert_session_type); if (session_type == MM_OMA_SESSION_TYPE_UNKNOWN) - mm_warn ("Unknown QMI OMA session type '%u'", network_initiated_alert_session_type); + mm_obj_warn (self, "unknown QMI OMA session type '%u'", network_initiated_alert_session_type); else mm_iface_modem_oma_add_pending_network_initiated_session ( MM_IFACE_MODEM_OMA (self), @@ -6866,8 +7010,8 @@ task = g_task_new (self, NULL, callback, user_data); if (enable == self->priv->oma_unsolicited_events_setup) { - mm_dbg ("OMA unsolicited events already %s; skipping", - enable ? "setup" : "cleanup"); + mm_obj_dbg (self, "OMA unsolicited events already %s; skipping", + enable ? "setup" : "cleanup"); g_task_return_boolean (task, TRUE); g_object_unref (task); return; @@ -6946,10 +7090,10 @@ output = qmi_client_oma_set_event_report_finish (client, res, &error); if (!output) { - mm_dbg ("QMI operation failed: '%s'", error->message); + mm_obj_dbg (self, "QMI operation failed: '%s'", error->message); g_error_free (error); } else if (!qmi_message_oma_set_event_report_output_get_result (output, &error)) { - mm_dbg ("Couldn't set event report: '%s'", error->message); + mm_obj_dbg (self, "couldn't set event report: '%s'", error->message); g_error_free (error); } @@ -6981,8 +7125,8 @@ task = g_task_new (self, NULL, callback, user_data); if (enable == self->priv->oma_unsolicited_events_enabled) { - mm_dbg ("OMA unsolicited events already %s; skipping", - enable ? "enabled" : "disabled"); + mm_obj_dbg (self, "OMA unsolicited events already %s; skipping", + enable ? "enabled" : "disabled"); g_task_return_boolean (task, TRUE); g_object_unref (task); return; @@ -7035,6 +7179,1101 @@ } /*****************************************************************************/ +/* Check support (3GPP USSD interface) */ + +static gboolean +modem_3gpp_ussd_check_support_finish (MMIfaceModem3gppUssd *self, + GAsyncResult *res, + GError **error) +{ + return g_task_propagate_boolean (G_TASK (res), error); +} + +static void +modem_3gpp_ussd_check_support (MMIfaceModem3gppUssd *self, + GAsyncReadyCallback callback, + gpointer user_data) +{ + GTask *task; + + task = g_task_new (self, NULL, callback, user_data); + + /* If we have support for the Voice client, USSD is supported */ + if (!mm_shared_qmi_peek_client (MM_SHARED_QMI (self), + QMI_SERVICE_VOICE, + MM_PORT_QMI_FLAG_DEFAULT, + NULL)) { + mm_obj_dbg (self, "USSD capabilities not supported"); + g_task_return_boolean (task, FALSE); + } else { + mm_obj_dbg (self, "USSD capabilities supported"); + g_task_return_boolean (task, TRUE); + } + + g_object_unref (task); +} + +/*****************************************************************************/ +/* USSD encode/decode helpers */ + +static GArray * +ussd_encode (const gchar *command, + QmiVoiceUssDataCodingScheme *scheme, + GError **error) +{ + gsize command_len; + g_autoptr(GByteArray) barray = NULL; + g_autoptr(GError) inner_error = NULL; + + command_len = strlen (command); + + if (g_str_is_ascii (command)) { + barray = g_byte_array_sized_new (command_len); + g_byte_array_append (barray, (const guint8 *)command, command_len); + + *scheme = QMI_VOICE_USS_DATA_CODING_SCHEME_ASCII; + return (GArray *) g_steal_pointer (&barray); + } + + barray = mm_modem_charset_bytearray_from_utf8 (command, MM_MODEM_CHARSET_UCS2, FALSE, &inner_error); + if (!barray) { + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, + "Failed to encode USSD command in UCS2 charset: %s", inner_error->message); + return NULL; + } + + *scheme = QMI_VOICE_USS_DATA_CODING_SCHEME_UCS2; + return (GArray *) g_steal_pointer (&barray); +} + +static gchar * +ussd_decode (QmiVoiceUssDataCodingScheme scheme, + GArray *data, + GError **error) +{ + gchar *decoded = NULL; + + if (scheme == QMI_VOICE_USS_DATA_CODING_SCHEME_ASCII) { + decoded = g_strndup ((const gchar *) data->data, data->len); + if (!decoded) + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, + "Error decoding USSD command in 0x%04x scheme (ASCII charset)", + scheme); + } else if (scheme == QMI_VOICE_USS_DATA_CODING_SCHEME_UCS2) { + decoded = mm_modem_charset_bytearray_to_utf8 ((GByteArray *) data, MM_MODEM_CHARSET_UCS2, FALSE, error); + if (!decoded) + g_prefix_error (error, "Error decoding USSD command in 0x%04x scheme (UCS2 charset): ", scheme); + } else + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, + "Failed to decode USSD command in unsupported 0x%04x scheme", scheme); + + return decoded; +} + +/*****************************************************************************/ +/* USSD indications */ + +static void +process_ussd_message (MMBroadbandModemQmi *self, + QmiVoiceUserAction user_action, + gchar *utf8_take, + GError *error_take) +{ + MMModem3gppUssdSessionState ussd_state = MM_MODEM_3GPP_USSD_SESSION_STATE_IDLE; + g_autoptr(GTask) task = NULL; + g_autofree gchar *utf8 = utf8_take; + g_autoptr(GError) error = error_take; + + task = g_steal_pointer (&self->priv->pending_ussd_action); + + if (error) { + g_assert (!utf8); + if (task) + g_task_return_error (task, g_steal_pointer (&error)); + else + mm_obj_dbg (self, "USSD operation failed: %s", error->message); + return; + } + + switch (user_action) { + case QMI_VOICE_USER_ACTION_NOT_REQUIRED: + /* no response, or a response to user's request? */ + if (!utf8 || task) + break; + /* Network-initiated USSD-Notify */ + mm_iface_modem_3gpp_ussd_update_network_notification (MM_IFACE_MODEM_3GPP_USSD (self), utf8); + g_clear_pointer (&utf8, g_free); + break; + case QMI_VOICE_USER_ACTION_REQUIRED: + /* further action required */ + ussd_state = MM_MODEM_3GPP_USSD_SESSION_STATE_USER_RESPONSE; + /* no response, or a response to user's request? */ + if (!utf8 || task) + break; + /* Network-initiated USSD-Request */ + mm_iface_modem_3gpp_ussd_update_network_request (MM_IFACE_MODEM_3GPP_USSD (self), utf8); + g_clear_pointer (&utf8, g_free); + break; + case QMI_VOICE_USER_ACTION_UNKNOWN: + default: + /* Not an indication */ + break; + } + + mm_iface_modem_3gpp_ussd_update_state (MM_IFACE_MODEM_3GPP_USSD (self), ussd_state); + + if (!task) { + if (utf8) + mm_obj_dbg (self, "ignoring unprocessed USSD message: %s", utf8); + return; + } + + /* Complete the pending action, if any */ + if (utf8) + g_task_return_pointer (task, g_steal_pointer (&utf8), g_free); + else + g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, + "USSD action response not processed correctly"); +} + +static void +ussd_indication_cb (QmiClientVoice *client, + QmiIndicationVoiceUssdOutput *output, + MMBroadbandModemQmi *self) +{ + QmiVoiceUserAction user_action = QMI_VOICE_USER_ACTION_UNKNOWN; + QmiVoiceUssDataCodingScheme scheme; + GArray *uss_data = NULL; + gchar *utf8 = NULL; + GError *error = NULL; + + qmi_indication_voice_ussd_output_get_user_action (output, &user_action, NULL); + if (qmi_indication_voice_ussd_output_get_uss_data_utf16 (output, &uss_data, NULL) && uss_data) + utf8 = g_convert ((const gchar *) uss_data->data, (2 * uss_data->len), "UTF-8", "UTF-16LE", NULL, NULL, &error); + else if (qmi_indication_voice_ussd_output_get_uss_data (output, &scheme, &uss_data, NULL) && uss_data) + utf8 = ussd_decode(scheme, uss_data, &error); + + process_ussd_message (self, user_action, utf8, error); +} + +static void +ussd_release_indication_cb (QmiClientVoice *client, + MMBroadbandModemQmi *self) +{ + GTask *pending_task; + GError *error; + + mm_iface_modem_3gpp_ussd_update_state (MM_IFACE_MODEM_3GPP_USSD (self), + MM_MODEM_3GPP_USSD_SESSION_STATE_IDLE); + + error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_ABORTED, "USSD terminated by network"); + + pending_task = g_steal_pointer (&self->priv->pending_ussd_action); + if (pending_task) { + g_task_return_error (pending_task, error); + g_object_unref (pending_task); + return; + } + + /* If no pending task, just report the error */ + mm_obj_dbg (self, "USSD release indication: %s", error->message); + g_error_free (error); +} + +/*****************************************************************************/ +/* Setup/cleanup unsolicited events */ + +static gboolean +common_3gpp_ussd_setup_cleanup_unsolicited_events_finish (MMIfaceModem3gppUssd *self, + GAsyncResult *res, + GError **error) +{ + return g_task_propagate_boolean (G_TASK (res), error); +} + +static void +common_3gpp_ussd_setup_cleanup_unsolicited_events (MMBroadbandModemQmi *self, + gboolean setup, + GAsyncReadyCallback callback, + gpointer user_data) +{ + GTask *task; + QmiClient *client = NULL; + + if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), + QMI_SERVICE_VOICE, &client, + callback, user_data)) + return; + + task = g_task_new (self, NULL, callback, user_data); + + if (setup == self->priv->ussd_unsolicited_events_setup) { + mm_obj_dbg (self, "USSD unsolicited events already %s; skipping", + setup ? "setup" : "cleanup"); + g_task_return_boolean (task, TRUE); + g_object_unref (task); + return; + } + self->priv->ussd_unsolicited_events_setup = setup; + + if (setup) { + g_assert (self->priv->ussd_indication_id == 0); + self->priv->ussd_indication_id = + g_signal_connect (client, + "ussd", + G_CALLBACK (ussd_indication_cb), + self); + g_assert (self->priv->ussd_release_indication_id == 0); + self->priv->ussd_release_indication_id = + g_signal_connect (client, + "release-ussd", + G_CALLBACK (ussd_release_indication_cb), + self); + } else { + g_assert (self->priv->ussd_indication_id != 0); + g_signal_handler_disconnect (client, self->priv->ussd_indication_id); + self->priv->ussd_indication_id = 0; + g_assert (self->priv->ussd_release_indication_id != 0); + g_signal_handler_disconnect (client, self->priv->ussd_release_indication_id); + self->priv->ussd_release_indication_id = 0; + } + + g_task_return_boolean (task, TRUE); + g_object_unref (task); +} + +static void +modem_3gpp_ussd_setup_unsolicited_events (MMIfaceModem3gppUssd *self, + GAsyncReadyCallback callback, + gpointer user_data) +{ + common_3gpp_ussd_setup_cleanup_unsolicited_events (MM_BROADBAND_MODEM_QMI (self), TRUE, callback, user_data); +} + +static void +modem_3gpp_ussd_cleanup_unsolicited_events (MMIfaceModem3gppUssd *self, + GAsyncReadyCallback callback, + gpointer user_data) +{ + common_3gpp_ussd_setup_cleanup_unsolicited_events (MM_BROADBAND_MODEM_QMI (self), FALSE, callback, user_data); +} + +/*****************************************************************************/ +/* Enable/disable unsolicited events */ + +static gboolean +common_3gpp_ussd_enable_disable_unsolicited_events_finish (MMIfaceModem3gppUssd *self, + GAsyncResult *res, + GError **error) +{ + return g_task_propagate_boolean (G_TASK (res), error); +} + +static void +voice_indication_register_ready (QmiClientVoice *client, + GAsyncResult *res, + GTask *task) +{ + g_autoptr(QmiMessageVoiceIndicationRegisterOutput) output = NULL; + GError *error = NULL; + + output = qmi_client_voice_indication_register_finish (client, res, &error); + if (!output) { + g_prefix_error (&error, "QMI operation failed: "); + g_task_return_error (task, error); + } else if (!qmi_message_voice_indication_register_output_get_result (output, &error)) { + g_prefix_error (&error, "Couldn't register voice USSD indications: "); + g_task_return_error (task, error); + } else + g_task_return_boolean (task, TRUE); + g_object_unref (task); +} + +static void +common_3gpp_ussd_enable_disable_unsolicited_events (MMBroadbandModemQmi *self, + gboolean enable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_autoptr(QmiMessageVoiceIndicationRegisterInput) input = NULL; + GTask *task; + QmiClient *client; + + if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), + QMI_SERVICE_VOICE, &client, + callback, user_data)) + return; + + task = g_task_new (self, NULL, callback, user_data); + + if (enable == self->priv->ussd_unsolicited_events_enabled) { + mm_obj_dbg (self, "USSD unsolicited events already %s; skipping", + enable ? "enabled" : "disabled"); + g_task_return_boolean (task, TRUE); + g_object_unref (task); + return; + } + self->priv->ussd_unsolicited_events_enabled = enable; + + input = qmi_message_voice_indication_register_input_new (); + qmi_message_voice_indication_register_input_set_ussd_notification_events (input, enable, NULL); + qmi_client_voice_indication_register (QMI_CLIENT_VOICE (client), + input, + 10, + NULL, + (GAsyncReadyCallback) voice_indication_register_ready, + task); +} + +static void +modem_3gpp_ussd_enable_unsolicited_events (MMIfaceModem3gppUssd *self, + GAsyncReadyCallback callback, + gpointer user_data) +{ + common_3gpp_ussd_enable_disable_unsolicited_events (MM_BROADBAND_MODEM_QMI (self), TRUE, callback, user_data); +} + +static void +modem_3gpp_ussd_disable_unsolicited_events (MMIfaceModem3gppUssd *self, + GAsyncReadyCallback callback, + gpointer user_data) +{ + common_3gpp_ussd_enable_disable_unsolicited_events (MM_BROADBAND_MODEM_QMI (self), FALSE, callback, user_data); +} + +/*****************************************************************************/ +/* Send command (3GPP/USSD interface) */ + +static gchar * +modem_3gpp_ussd_send_finish (MMIfaceModem3gppUssd *self, + GAsyncResult *res, + GError **error) +{ + return g_task_propagate_pointer (G_TASK (res), error); +} + +static void +voice_answer_ussd_ready (QmiClientVoice *client, + GAsyncResult *res, + MMBroadbandModemQmi *self) +{ + g_autoptr(QmiMessageVoiceAnswerUssdOutput) output = NULL; + GError *error = NULL; + + output = qmi_client_voice_answer_ussd_finish (client, res, &error); + if (!output) + g_prefix_error (&error, "QMI operation failed: "); + else if (!qmi_message_voice_answer_ussd_output_get_result (output, &error)) + g_prefix_error (&error, "Couldn't answer USSD operation: "); + + process_ussd_message (self, QMI_VOICE_USER_ACTION_UNKNOWN, error ? NULL : g_strdup (""), error); + + /* balance out the full reference we received */ + g_object_unref (self); +} + +static void +voice_originate_ussd_ready (QmiClientVoice *client, + GAsyncResult *res, + MMBroadbandModemQmi *self) +{ + g_autoptr(QmiMessageVoiceOriginateUssdOutput) output = NULL; + QmiVoiceUssDataCodingScheme scheme; + GError *error = NULL; + GArray *uss_data = NULL; + gchar *utf8 = NULL; + + output = qmi_client_voice_originate_ussd_finish (client, res, &error); + if (!output) + g_prefix_error (&error, "QMI operation failed: "); + else if (!qmi_message_voice_originate_ussd_output_get_result (output, &error)) + g_prefix_error (&error, "Couldn't originate USSD operation: "); + else if (qmi_message_voice_originate_ussd_output_get_uss_data_utf16 (output, &uss_data, NULL) && uss_data) + utf8 = g_convert ((const gchar *) uss_data->data, (2 * uss_data->len), "UTF-8", "UTF-16LE", NULL, NULL, &error); + else if (qmi_message_voice_originate_ussd_output_get_uss_data (output, &scheme, &uss_data, NULL) && uss_data) + utf8 = ussd_decode (scheme, uss_data, &error); + + process_ussd_message (self, QMI_VOICE_USER_ACTION_UNKNOWN, utf8, error); + + /* balance out the full reference we received */ + g_object_unref (self); +} + +static void +modem_3gpp_ussd_send (MMIfaceModem3gppUssd *_self, + const gchar *command, + GAsyncReadyCallback callback, + gpointer user_data) +{ + MMBroadbandModemQmi *self = MM_BROADBAND_MODEM_QMI (_self); + GTask *task; + QmiClient *client; + QmiVoiceUssDataCodingScheme scheme; + g_autoptr(GArray) encoded = NULL; + GError *error = NULL; + MMModem3gppUssdSessionState state; + + if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), + QMI_SERVICE_VOICE, &client, + callback, user_data)) + return; + + task = g_task_new (self, NULL, callback, user_data); + + /* Fail if there is an ongoing operation already */ + if (self->priv->pending_ussd_action) { + g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_IN_PROGRESS, + "there is already an ongoing USSD operation"); + g_object_unref (task); + return; + } + + encoded = ussd_encode (command, &scheme, &error); + if (!encoded) { + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + state = mm_iface_modem_3gpp_ussd_get_state (MM_IFACE_MODEM_3GPP_USSD (self)); + + /* Cache the action, as it may be completed via URCs */ + self->priv->pending_ussd_action = task; + mm_iface_modem_3gpp_ussd_update_state (_self, MM_MODEM_3GPP_USSD_SESSION_STATE_ACTIVE); + + switch (state) { + case MM_MODEM_3GPP_USSD_SESSION_STATE_IDLE: { + g_autoptr(QmiMessageVoiceOriginateUssdInput) input = NULL; + + input = qmi_message_voice_originate_ussd_input_new (); + qmi_message_voice_originate_ussd_input_set_uss_data (input, scheme, encoded, NULL); + qmi_client_voice_originate_ussd (QMI_CLIENT_VOICE (client), input, 100, NULL, + (GAsyncReadyCallback) voice_originate_ussd_ready, + g_object_ref (self)); /* full reference! */ + return; + } + case MM_MODEM_3GPP_USSD_SESSION_STATE_USER_RESPONSE: { + g_autoptr(QmiMessageVoiceAnswerUssdInput) input = NULL; + + input = qmi_message_voice_answer_ussd_input_new (); + qmi_message_voice_answer_ussd_input_set_uss_data (input, scheme, encoded, NULL); + qmi_client_voice_answer_ussd (QMI_CLIENT_VOICE (client), input, 100, NULL, + (GAsyncReadyCallback) voice_answer_ussd_ready, + g_object_ref (self)); /* full reference! */ + return; + } + case MM_MODEM_3GPP_USSD_SESSION_STATE_UNKNOWN: + case MM_MODEM_3GPP_USSD_SESSION_STATE_ACTIVE: + default: + g_assert_not_reached (); + return; + } +} + +/*****************************************************************************/ +/* Cancel USSD (3GPP/USSD interface) */ + +static gboolean +modem_3gpp_ussd_cancel_finish (MMIfaceModem3gppUssd *self, + GAsyncResult *res, + GError **error) +{ + return g_task_propagate_boolean (G_TASK (res), error); +} + +static void +voice_cancel_ussd_ready (QmiClientVoice *client, + GAsyncResult *res, + GTask *task) +{ + g_autoptr(QmiMessageVoiceCancelUssdOutput) output = NULL; + MMBroadbandModemQmi *self; + GTask *pending_task; + GError *error = NULL; + + self = g_task_get_source_object (task); + + output = qmi_client_voice_cancel_ussd_finish (client, res, &error); + if (!output) + g_prefix_error (&error, "QMI operation failed: "); + else if (!qmi_message_voice_cancel_ussd_output_get_result (output, &error)) + g_prefix_error (&error, "Couldn't cancel USSD operation: "); + + /* Complete the pending action, regardless of the operation result */ + pending_task = g_steal_pointer (&self->priv->pending_ussd_action); + if (pending_task) { + g_task_return_new_error (pending_task, MM_CORE_ERROR, MM_CORE_ERROR_ABORTED, + "USSD session was cancelled"); + g_object_unref (pending_task); + } + + mm_iface_modem_3gpp_ussd_update_state (MM_IFACE_MODEM_3GPP_USSD (self), + MM_MODEM_3GPP_USSD_SESSION_STATE_IDLE); + + if (error) + g_task_return_error (task, error); + else + g_task_return_boolean (task, TRUE); + g_object_unref (task); +} + +static void +modem_3gpp_ussd_cancel (MMIfaceModem3gppUssd *_self, + GAsyncReadyCallback callback, + gpointer user_data) +{ + MMBroadbandModemQmi *self = MM_BROADBAND_MODEM_QMI (_self); + GTask *task; + QmiClient *client; + + if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), + QMI_SERVICE_VOICE, &client, + callback, user_data)) + return; + + task = g_task_new (self, NULL, callback, user_data); + + qmi_client_voice_cancel_ussd (QMI_CLIENT_VOICE (client), NULL, 100, NULL, + (GAsyncReadyCallback) voice_cancel_ussd_ready, + task); +} + +/*****************************************************************************/ +/* Initial EPS bearer info loading */ + +static MMBearerProperties * +modem_3gpp_load_initial_eps_bearer_finish (MMIfaceModem3gpp *self, + GAsyncResult *res, + GError **error) +{ + return MM_BEARER_PROPERTIES (g_task_propagate_pointer (G_TASK (res), error)); +} + +static void +get_lte_attach_parameters_ready (QmiClientWds *client, + GAsyncResult *res, + GTask *task) +{ + g_autoptr(QmiMessageWdsGetLteAttachParametersOutput) output = NULL; + GError *error = NULL; + MMBearerProperties *properties; + const gchar *apn; + QmiWdsIpSupportType ip_support_type; + + output = qmi_client_wds_get_lte_attach_parameters_finish (client, res, &error); + if (!output) { + g_prefix_error (&error, "QMI operation failed: "); + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + if (!qmi_message_wds_get_lte_attach_parameters_output_get_result (output, &error)) { + g_prefix_error (&error, "Couldn't get LTE attach parameters: "); + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + properties = mm_bearer_properties_new (); + if (qmi_message_wds_get_lte_attach_parameters_output_get_apn (output, &apn, NULL)) + mm_bearer_properties_set_apn (properties, apn); + if (qmi_message_wds_get_lte_attach_parameters_output_get_ip_support_type (output, &ip_support_type, NULL)) { + MMBearerIpFamily ip_family; + + ip_family = mm_bearer_ip_family_from_qmi_ip_support_type (ip_support_type); + if (ip_family != MM_BEARER_IP_FAMILY_NONE) + mm_bearer_properties_set_ip_type (properties, ip_family); + } + g_task_return_pointer (task, properties, g_object_unref); + g_object_unref (task); +} + +static void +modem_3gpp_load_initial_eps_bearer (MMIfaceModem3gpp *self, + GAsyncReadyCallback callback, + gpointer user_data) +{ + GTask *task; + QmiClient *client; + + if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), + QMI_SERVICE_WDS, &client, + callback, user_data)) + return; + + task = g_task_new (self, NULL, callback, user_data); + qmi_client_wds_get_lte_attach_parameters (QMI_CLIENT_WDS (client), + NULL, + 10, + NULL, + (GAsyncReadyCallback) get_lte_attach_parameters_ready, + task); +} + +/*****************************************************************************/ +/* Initial EPS bearer settings setting */ + +typedef enum { + SET_INITIAL_EPS_BEARER_SETTINGS_STEP_FIRST, + SET_INITIAL_EPS_BEARER_SETTINGS_STEP_LOAD_POWER_STATE, + SET_INITIAL_EPS_BEARER_SETTINGS_STEP_POWER_DOWN, + SET_INITIAL_EPS_BEARER_SETTINGS_STEP_MODIFY_PROFILE, + SET_INITIAL_EPS_BEARER_SETTINGS_STEP_POWER_UP, + SET_INITIAL_EPS_BEARER_SETTINGS_STEP_LAST_SETTING, +} SetInitialEpsBearerSettingsStep; + +typedef struct { + SetInitialEpsBearerSettingsStep step; + QmiClientWds *client; + MMBearerProperties *settings; + MMModemPowerState power_state; +} SetInitialEpsBearerSettingsContext; + +static void +set_initial_eps_bearer_settings_context_free (SetInitialEpsBearerSettingsContext *ctx) +{ + g_clear_object (&ctx->client); + g_clear_object (&ctx->settings); + g_slice_free (SetInitialEpsBearerSettingsContext, ctx); +} + +static gboolean +modem_3gpp_set_initial_eps_bearer_settings_finish (MMIfaceModem3gpp *self, + GAsyncResult *res, + GError **error) +{ + return g_task_propagate_boolean (G_TASK (res), error); +} + +static void set_initial_eps_bearer_settings_step (GTask *task); + +static void +set_initial_eps_bearer_power_up_ready (MMIfaceModem *self, + GAsyncResult *res, + GTask *task) +{ + SetInitialEpsBearerSettingsContext *ctx; + GError *error = NULL; + + ctx = g_task_get_task_data (task); + + if (!modem_power_up_down_off_finish (self, res, &error)) { + g_prefix_error (&error, "Couldn't power up modem: "); + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + ctx->step++; + set_initial_eps_bearer_settings_step (task); +} + +static void +set_initial_eps_bearer_modify_profile_ready (QmiClientWds *client, + GAsyncResult *res, + GTask *task) +{ + g_autoptr(QmiMessageWdsModifyProfileOutput) output = NULL; + GError *error = NULL; + SetInitialEpsBearerSettingsContext *ctx; + + ctx = g_task_get_task_data (task); + + output = qmi_client_wds_modify_profile_finish (client, res, &error); + if (!output) { + g_prefix_error (&error, "QMI operation failed: "); + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + if (!qmi_message_wds_modify_profile_output_get_result (output, &error)) { + QmiWdsDsProfileError ds_profile_error; + + if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_EXTENDED_INTERNAL) && + qmi_message_wds_modify_profile_output_get_extended_error_code (output, &ds_profile_error, NULL)) { + g_prefix_error (&error, "DS profile error: %s: ", + qmi_wds_ds_profile_error_get_string (ds_profile_error)); + } + g_prefix_error (&error, "Couldn't modify default LTE attach PDN settings: "); + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + ctx->step++; + set_initial_eps_bearer_settings_step (task); +} + +static void +set_initial_eps_bearer_modify_profile (GTask *task) +{ + g_autoptr(QmiMessageWdsModifyProfileInput) input = NULL; + MMBroadbandModemQmi *self; + SetInitialEpsBearerSettingsContext *ctx; + const gchar *str; + MMBearerIpFamily ip_family; + QmiWdsPdpType pdp_type; + MMBearerAllowedAuth allowed_auth; + QmiWdsAuthentication auth; + + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); + + input = qmi_message_wds_modify_profile_input_new (); + qmi_message_wds_modify_profile_input_set_profile_identifier (input, + QMI_WDS_PROFILE_TYPE_3GPP, + self->priv->default_attach_pdn, + NULL); + + str = mm_bearer_properties_get_apn (ctx->settings); + qmi_message_wds_modify_profile_input_set_apn_name (input, str ? str : "", NULL); + + ip_family = mm_bearer_properties_get_ip_type (ctx->settings); + if (ip_family == MM_BEARER_IP_FAMILY_NONE || ip_family == MM_BEARER_IP_FAMILY_ANY) + ip_family = MM_BEARER_IP_FAMILY_IPV4; + if (mm_bearer_ip_family_to_qmi_pdp_type (ip_family, &pdp_type)) + qmi_message_wds_modify_profile_input_set_pdp_type (input, pdp_type, NULL); + + allowed_auth = mm_bearer_properties_get_allowed_auth (ctx->settings); + if (allowed_auth == MM_BEARER_ALLOWED_AUTH_UNKNOWN) + allowed_auth = MM_BEARER_ALLOWED_AUTH_NONE; + auth = mm_bearer_allowed_auth_to_qmi_authentication (allowed_auth); + qmi_message_wds_modify_profile_input_set_authentication (input, auth, NULL); + + str = mm_bearer_properties_get_user (ctx->settings); + qmi_message_wds_modify_profile_input_set_username (input, str ? str : "", NULL); + + str = mm_bearer_properties_get_password (ctx->settings); + qmi_message_wds_modify_profile_input_set_password (input, str ? str : "", NULL); + + qmi_client_wds_modify_profile (ctx->client, + input, + 10, + NULL, + (GAsyncReadyCallback)set_initial_eps_bearer_modify_profile_ready, + task); +} + +static void +set_initial_eps_bearer_power_down_ready (MMIfaceModem *self, + GAsyncResult *res, + GTask *task) +{ + SetInitialEpsBearerSettingsContext *ctx; + GError *error = NULL; + + ctx = g_task_get_task_data (task); + + if (!modem_power_up_down_off_finish (self, res, &error)) { + g_prefix_error (&error, "Couldn't power down modem: "); + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + ctx->step++; + set_initial_eps_bearer_settings_step (task); +} + +static void +set_initial_eps_bearer_load_power_state_ready (MMIfaceModem *self, + GAsyncResult *res, + GTask *task) +{ + SetInitialEpsBearerSettingsContext *ctx; + GError *error = NULL; + + ctx = g_task_get_task_data (task); + + ctx->power_state = load_power_state_finish (self, res, &error); + if (ctx->power_state == MM_MODEM_POWER_STATE_UNKNOWN) { + g_prefix_error (&error, "Couldn't load power state: "); + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + ctx->step++; + set_initial_eps_bearer_settings_step (task); +} + +static void +set_initial_eps_bearer_settings_step (GTask *task) +{ + SetInitialEpsBearerSettingsContext *ctx; + MMBroadbandModemQmi *self; + + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); + + switch (ctx->step) { + case SET_INITIAL_EPS_BEARER_SETTINGS_STEP_FIRST: + ctx->step++; + /* fall through */ + + case SET_INITIAL_EPS_BEARER_SETTINGS_STEP_LOAD_POWER_STATE: + mm_obj_dbg (self, "querying current power state..."); + load_power_state (MM_IFACE_MODEM (self), + (GAsyncReadyCallback) set_initial_eps_bearer_load_power_state_ready, + task); + return; + + case SET_INITIAL_EPS_BEARER_SETTINGS_STEP_POWER_DOWN: + if (ctx->power_state == MM_MODEM_POWER_STATE_ON) { + mm_obj_dbg (self, "powering down before changing initial EPS bearer settings..."); + modem_power_down (MM_IFACE_MODEM (self), + (GAsyncReadyCallback) set_initial_eps_bearer_power_down_ready, + task); + return; + } + ctx->step++; + /* fall through */ + + case SET_INITIAL_EPS_BEARER_SETTINGS_STEP_MODIFY_PROFILE: + mm_obj_dbg (self, "modifying initial EPS bearer settings profile..."); + set_initial_eps_bearer_modify_profile (task); + return; + + case SET_INITIAL_EPS_BEARER_SETTINGS_STEP_POWER_UP: + if (ctx->power_state == MM_MODEM_POWER_STATE_ON) { + mm_obj_dbg (self, "powering up after changing initial EPS bearer settings..."); + modem_power_up (MM_IFACE_MODEM (self), + (GAsyncReadyCallback) set_initial_eps_bearer_power_up_ready, + task); + return; + } + ctx->step++; + /* fall through */ + + case SET_INITIAL_EPS_BEARER_SETTINGS_STEP_LAST_SETTING: + g_task_return_boolean (task, TRUE); + g_object_unref (task); + return; + default: + g_assert_not_reached (); + } +} + +static void +modem_3gpp_set_initial_eps_bearer_settings (MMIfaceModem3gpp *_self, + MMBearerProperties *config, + GAsyncReadyCallback callback, + gpointer user_data) +{ + MMBroadbandModemQmi *self = MM_BROADBAND_MODEM_QMI (_self); + SetInitialEpsBearerSettingsContext *ctx; + GTask *task; + QmiClient *client; + + if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), + QMI_SERVICE_WDS, &client, + callback, user_data)) + return; + + task = g_task_new (self, NULL, callback, user_data); + + if (!self->priv->default_attach_pdn) { + g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, + "Unknown default LTE attach APN index"); + g_object_unref (task); + return; + } + + ctx = g_slice_new0 (SetInitialEpsBearerSettingsContext); + ctx->settings = g_object_ref (config);; + ctx->client = QMI_CLIENT_WDS (g_object_ref (client)); + ctx->step = SET_INITIAL_EPS_BEARER_SETTINGS_STEP_FIRST; + g_task_set_task_data (task, ctx, (GDestroyNotify) set_initial_eps_bearer_settings_context_free); + + set_initial_eps_bearer_settings_step (task); +} + +/*****************************************************************************/ +/* Initial EPS bearer settings loading */ + +static MMBearerProperties * +modem_3gpp_load_initial_eps_bearer_settings_finish (MMIfaceModem3gpp *self, + GAsyncResult *res, + GError **error) +{ + return MM_BEARER_PROPERTIES (g_task_propagate_pointer (G_TASK (res), error)); +} + +static void +load_initial_eps_bearer_get_profile_settings_ready (QmiClientWds *client, + GAsyncResult *res, + GTask *task) +{ + g_autoptr(QmiMessageWdsGetProfileSettingsOutput) output = NULL; + GError *error = NULL; + const gchar *str; + QmiWdsPdpType pdp_type; + QmiWdsAuthentication auth; + gboolean flag; + MMBearerProperties *properties; + + output = qmi_client_wds_get_profile_settings_finish (client, res, &error); + if (!output) { + g_prefix_error (&error, "QMI operation failed: "); + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + if (!qmi_message_wds_get_profile_settings_output_get_result (output, &error)) { + QmiWdsDsProfileError ds_profile_error; + + if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_EXTENDED_INTERNAL) && + qmi_message_wds_get_profile_settings_output_get_extended_error_code (output, &ds_profile_error, NULL)) { + g_prefix_error (&error, "DS profile error: %s: ", + qmi_wds_ds_profile_error_get_string (ds_profile_error)); + } + g_prefix_error (&error, "Couldn't get default LTE attach PDN settings: "); + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + properties = mm_bearer_properties_new (); + if (qmi_message_wds_get_profile_settings_output_get_apn_name (output, &str, NULL)) + mm_bearer_properties_set_apn (properties, str); + + if (qmi_message_wds_get_profile_settings_output_get_pdp_type (output, &pdp_type, NULL)) { + MMBearerIpFamily ip_family; + + ip_family = mm_bearer_ip_family_from_qmi_pdp_type (pdp_type); + if (ip_family != MM_BEARER_IP_FAMILY_NONE) + mm_bearer_properties_set_ip_type (properties, ip_family); + } + + if (qmi_message_wds_get_profile_settings_output_get_username (output, &str, NULL)) + mm_bearer_properties_set_user (properties, str); + + if (qmi_message_wds_get_profile_settings_output_get_password (output, &str, NULL)) + mm_bearer_properties_set_password (properties, str); + + if (qmi_message_wds_get_profile_settings_output_get_authentication (output, &auth, NULL)) { + MMBearerAllowedAuth allowed_auth; + + allowed_auth = mm_bearer_allowed_auth_from_qmi_authentication (auth); + if (allowed_auth != MM_BEARER_ALLOWED_AUTH_UNKNOWN) + mm_bearer_properties_set_allowed_auth (properties, allowed_auth); + } + + if (qmi_message_wds_get_profile_settings_output_get_roaming_disallowed_flag (output, &flag, NULL)) + mm_bearer_properties_set_allow_roaming (properties, !flag); + + g_task_return_pointer (task, properties, g_object_unref); + g_object_unref (task); +} + +static void +load_initial_eps_bearer_get_profile_settings (GTask *task, + QmiClientWds *client) +{ + g_autoptr(QmiMessageWdsGetProfileSettingsInput) input = NULL; + MMBroadbandModemQmi *self; + + self = g_task_get_source_object (task); + g_assert (self->priv->default_attach_pdn); + + input = qmi_message_wds_get_profile_settings_input_new (); + qmi_message_wds_get_profile_settings_input_set_profile_id (input, + QMI_WDS_PROFILE_TYPE_3GPP, + self->priv->default_attach_pdn, + NULL); + mm_obj_dbg (self, "querying LTE attach PDN settings at index %u...", self->priv->default_attach_pdn); + qmi_client_wds_get_profile_settings (client, + input, + 10, + NULL, + (GAsyncReadyCallback)load_initial_eps_bearer_get_profile_settings_ready, + task); +} + +static void +load_initial_eps_bearer_get_lte_attach_pdn_list_ready (QmiClientWds *client, + GAsyncResult *res, + GTask *task) +{ + g_autoptr(QmiMessageWdsGetLteAttachPdnListOutput) output = NULL; + MMBroadbandModemQmi *self; + GError *error = NULL; + GArray *current_list = NULL; + guint i; + + self = g_task_get_source_object (task); + + output = qmi_client_wds_get_lte_attach_pdn_list_finish (client, res, &error); + if (!output) { + g_prefix_error (&error, "QMI operation failed: "); + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + if (!qmi_message_wds_get_lte_attach_pdn_list_output_get_result (output, &error)) { + g_prefix_error (&error, "Couldn't get LTE attach PDN list: "); + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + qmi_message_wds_get_lte_attach_pdn_list_output_get_current_list (output, ¤t_list, NULL); + if (!current_list || !current_list->len) { + g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, + "Undefined list of LTE attach PDN"); + g_object_unref (task); + return; + } + + mm_obj_dbg (self, "Found %u LTE attach PDNs defined", current_list->len); + for (i = 0; i < current_list->len; i++) { + if (i == 0) { + self->priv->default_attach_pdn = g_array_index (current_list, guint16, i); + mm_obj_dbg (self, "Default LTE attach PDN profile: %u", self->priv->default_attach_pdn); + } else + mm_obj_dbg (self, "Additional LTE attach PDN profile: %u", g_array_index (current_list, guint16, i)); + } + + load_initial_eps_bearer_get_profile_settings (task, client); +} + +static void +modem_3gpp_load_initial_eps_bearer_settings (MMIfaceModem3gpp *_self, + GAsyncReadyCallback callback, + gpointer user_data) +{ + MMBroadbandModemQmi *self = MM_BROADBAND_MODEM_QMI (_self); + QmiClient *client; + GTask *task; + + if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), + QMI_SERVICE_WDS, &client, + callback, user_data)) + return; + + task = g_task_new (self, NULL, callback, user_data); + + /* Default attach PDN is assumed to never change during runtime + * (we don't change it) so just load it the first time */ + if (!self->priv->default_attach_pdn) { + mm_obj_dbg (self, "querying LTE attach PDN list..."); + qmi_client_wds_get_lte_attach_pdn_list (QMI_CLIENT_WDS (client), + NULL, + 10, + NULL, + (GAsyncReadyCallback)load_initial_eps_bearer_get_lte_attach_pdn_list_ready, + task); + return; + } + + load_initial_eps_bearer_get_profile_settings (task, QMI_CLIENT_WDS (client)); +} + +/*****************************************************************************/ /* Check firmware support (Firmware interface) */ typedef struct { @@ -7089,9 +8328,9 @@ /* If this is is also the running image, keep an extra reference to it */ if (running) { if (self->priv->current_firmware) - mm_warn ("A running firmware is already set (%s), not setting '%s'", - mm_firmware_properties_get_unique_id (self->priv->current_firmware), - mm_firmware_properties_get_unique_id (firmware)); + mm_obj_warn (self, "a running firmware is already set (%s), not setting '%s'", + mm_firmware_properties_get_unique_id (self->priv->current_firmware), + mm_firmware_properties_get_unique_id (firmware)); else self->priv->current_firmware = g_object_ref (firmware); } @@ -7120,8 +8359,8 @@ if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND)) ctx->skip_image_info = TRUE; else - mm_dbg ("couldn't get detailed info for PRI image with build ID '%s': %s", - ctx->current_pair->build_id, error->message); + mm_obj_dbg (self, "couldn't get detailed info for PRI image with build ID '%s': %s", + ctx->current_pair->build_id, error->message); g_error_free (error); goto out; } @@ -7299,7 +8538,8 @@ } static GList * -find_image_pairs (QmiMessageDmsListStoredImagesOutputListImage *image_pri, +find_image_pairs (MMBroadbandModemQmi *self, + QmiMessageDmsListStoredImagesOutputListImage *image_pri, QmiMessageDmsListStoredImagesOutputListImage *image_modem, GError **error) { @@ -7323,7 +8563,7 @@ if (match_images (subimage_pri->build_id, subimage_modem->build_id)) { FirmwarePair *pair; - mm_dbg ("Found pairing PRI+MODEM images with build ID '%s'", subimage_pri->build_id); + mm_obj_dbg (self, "found pairing PRI+MODEM images with build ID '%s'", subimage_pri->build_id); pair = g_slice_new (FirmwarePair); pair->build_id = g_strdup (subimage_pri->build_id); pair->modem_unique_id = g_array_ref (subimage_modem->unique_id); @@ -7342,7 +8582,7 @@ } if (j == image_modem->sublist->len) - mm_dbg ("Pairing for PRI image with build ID '%s' not found", subimage_pri->build_id); + mm_obj_dbg (self, "pairing for PRI image with build ID '%s' not found", subimage_pri->build_id); } if (!pairs) @@ -7352,7 +8592,8 @@ } static gboolean -find_image_type_indices (GArray *array, +find_image_type_indices (MMBroadbandModemQmi *self, + GArray *array, QmiMessageDmsListStoredImagesOutputListImage **image_pri, QmiMessageDmsListStoredImagesOutputListImage **image_modem, GError **error) @@ -7377,13 +8618,13 @@ switch (image->type) { case QMI_DMS_FIRMWARE_IMAGE_TYPE_PRI: if (*image_pri != NULL) - mm_dbg ("Multiple array elements found with PRI type: ignoring additional list at index %u", i); + mm_obj_dbg (self, "multiple array elements found with PRI type: ignoring additional list at index %u", i); else *image_pri = image; break; case QMI_DMS_FIRMWARE_IMAGE_TYPE_MODEM: if (*image_modem != NULL) - mm_dbg ("Multiple array elements found with MODEM type: ignoring additional list at index %u", i); + mm_obj_dbg (self, "multiple array elements found with MODEM type: ignoring additional list at index %u", i); else *image_modem = image; break; @@ -7408,6 +8649,7 @@ GAsyncResult *res, GTask *task) { + MMBroadbandModemQmi *self; FirmwareListPreloadContext *ctx; GArray *array; QmiMessageDmsListStoredImagesOutputListImage *image_pri; @@ -7415,7 +8657,8 @@ QmiMessageDmsListStoredImagesOutput *output; GError *error = NULL; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); /* Read array from output */ output = qmi_client_dms_list_stored_images_finish (client, res, &error); @@ -7428,14 +8671,14 @@ } /* Find which index corresponds to each image type */ - if (!find_image_type_indices (array, &image_pri, &image_modem, &error)) { + if (!find_image_type_indices (self, array, &image_pri, &image_modem, &error)) { g_task_return_error (task, error); g_object_unref (task); goto out; } /* Build firmware PRI+MODEM pair list */ - ctx->pairs = find_image_pairs (image_pri, image_modem, &error); + ctx->pairs = find_image_pairs (self, image_pri, image_modem, &error); if (!ctx->pairs) { g_task_return_error (task, error); g_object_unref (task); @@ -7471,7 +8714,7 @@ task = g_task_new (self, NULL, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify)firmware_list_preload_context_free); - mm_dbg ("loading firmware images..."); + mm_obj_dbg (self, "loading firmware images..."); qmi_client_dms_list_stored_images (QMI_CLIENT_DMS (client), NULL, 10, @@ -7523,7 +8766,7 @@ GError *error = NULL; if (!firmware_list_preload_finish (self, res, &error)) { - mm_dbg ("firmware list loading failed: %s", error ? error->message : "unsupported"); + mm_obj_dbg (self, "firmware list loading failed: %s", error ? error->message : "unsupported"); g_clear_error (&error); } @@ -7755,7 +8998,7 @@ if (self->priv->current_firmware && g_str_equal (mm_firmware_properties_get_unique_id (self->priv->current_firmware), mm_firmware_properties_get_unique_id (ctx->firmware))) { - mm_dbg ("Modem is already running firmware image '%s'", + mm_obj_dbg (self, "modem is already running firmware image '%s'", mm_firmware_properties_get_unique_id (self->priv->current_firmware)); g_task_return_boolean (task, TRUE); g_object_unref (task); @@ -7784,10 +9027,10 @@ goto out; } - mm_dbg ("Changing Gobi firmware to MODEM '%s' and PRI '%s' with Build ID '%s'...", - mm_firmware_properties_get_gobi_modem_unique_id (ctx->firmware), - mm_firmware_properties_get_gobi_pri_unique_id (ctx->firmware), - unique_id); + mm_obj_dbg (self, "changing Gobi firmware to MODEM '%s' and PRI '%s' with Build ID '%s'...", + mm_firmware_properties_get_gobi_modem_unique_id (ctx->firmware), + mm_firmware_properties_get_gobi_pri_unique_id (ctx->firmware), + unique_id); /* Build array of image IDs */ array = g_array_sized_new (FALSE, FALSE, sizeof (QmiMessageDmsSetFirmwarePreferenceInputListImage), 2); @@ -7796,6 +9039,8 @@ input = qmi_message_dms_set_firmware_preference_input_new (); qmi_message_dms_set_firmware_preference_input_set_list (input, array, NULL); + g_array_unref (array); + qmi_client_dms_set_firmware_preference ( QMI_CLIENT_DMS (client), input, @@ -7839,10 +9084,10 @@ QMI_SERVICE_NAS, MM_PORT_QMI_FLAG_DEFAULT, NULL)) { - mm_dbg ("Extended signal capabilities not supported"); + mm_obj_dbg (self, "extended signal capabilities not supported"); g_task_return_boolean (task, FALSE); } else { - mm_dbg ("Extended signal capabilities supported"); + mm_obj_dbg (self, "extended signal capabilities supported"); g_task_return_boolean (task, TRUE); } g_object_unref (task); @@ -7864,40 +9109,35 @@ MMSignal *gsm; MMSignal *umts; MMSignal *lte; + MMSignal *nr5g; } SignalLoadValuesResult; typedef struct { - QmiClientNas *client; - SignalLoadValuesStep step; + QmiClientNas *client; + SignalLoadValuesStep step; SignalLoadValuesResult *values_result; } SignalLoadValuesContext; static void signal_load_values_result_free (SignalLoadValuesResult *result) { - if (result->cdma) - g_object_unref (result->cdma); - if (result->evdo) - g_object_unref (result->evdo); - if (result->gsm) - g_object_unref (result->gsm); - if (result->umts) - g_object_unref (result->umts); - if (result->lte) - g_object_unref (result->lte); + g_clear_object (&result->cdma); + g_clear_object (&result->evdo); + g_clear_object (&result->gsm); + g_clear_object (&result->lte); g_slice_free (SignalLoadValuesResult, result); } static void signal_load_values_context_free (SignalLoadValuesContext *ctx) { - if (ctx->values_result) - signal_load_values_result_free (ctx->values_result); + g_clear_pointer (&ctx->values_result, (GDestroyNotify)signal_load_values_result_free); g_slice_free (SignalLoadValuesContext, ctx); } static gdouble -get_db_from_sinr_level (QmiNasEvdoSinrLevel level) +get_db_from_sinr_level (MMBroadbandModemQmi *self, + QmiNasEvdoSinrLevel level) { switch (level) { case QMI_NAS_EVDO_SINR_LEVEL_0: return -9.0; @@ -7910,20 +9150,21 @@ case QMI_NAS_EVDO_SINR_LEVEL_7: return 6; case QMI_NAS_EVDO_SINR_LEVEL_8: return +9; default: - mm_warn ("Invalid SINR level '%u'", level); + mm_obj_warn (self, "invalid SINR level '%u'", level); return -G_MAXDOUBLE; } } static gboolean signal_load_values_finish (MMIfaceModemSignal *self, - GAsyncResult *res, - MMSignal **cdma, - MMSignal **evdo, - MMSignal **gsm, - MMSignal **umts, - MMSignal **lte, - GError **error) + GAsyncResult *res, + MMSignal **cdma, + MMSignal **evdo, + MMSignal **gsm, + MMSignal **umts, + MMSignal **lte, + MMSignal **nr5g, + GError **error) { SignalLoadValuesResult *values_result; @@ -7936,6 +9177,7 @@ *gsm = values_result->gsm ? g_object_ref (values_result->gsm) : NULL; *umts = values_result->umts ? g_object_ref (values_result->umts) : NULL; *lte = values_result->lte ? g_object_ref (values_result->lte) : NULL; + *nr5g = values_result->nr5g ? g_object_ref (values_result->nr5g) : NULL; signal_load_values_result_free (values_result); return TRUE; } @@ -7945,25 +9187,26 @@ static void signal_load_values_get_signal_strength_ready (QmiClientNas *client, GAsyncResult *res, - GTask *task) + GTask *task) { - SignalLoadValuesContext *ctx; - QmiMessageNasGetSignalStrengthOutput *output; - GArray *array; - gint32 aux_int32; - gint16 aux_int16; - gint8 aux_int8; - QmiNasRadioInterface radio_interface; - QmiNasEvdoSinrLevel sinr; + MMBroadbandModemQmi *self; + SignalLoadValuesContext *ctx; + GArray *array; + gint32 aux_int32; + gint16 aux_int16; + gint8 aux_int8; + QmiNasRadioInterface radio_interface; + QmiNasEvdoSinrLevel sinr; + g_autoptr(QmiMessageNasGetSignalStrengthOutput) output = NULL; + + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); - ctx = g_task_get_task_data (task); output = qmi_client_nas_get_signal_strength_finish (client, res, NULL); if (!output || !qmi_message_nas_get_signal_strength_output_get_result (output, NULL)) { /* No hard errors, go on to next step */ ctx->step++; signal_load_values_context_step (task); - if (output) - qmi_message_nas_get_signal_strength_output_unref (output); return; } @@ -8012,6 +9255,11 @@ ctx->values_result->lte = mm_signal_new (); mm_signal_set_rssi (ctx->values_result->lte, (gdouble)element->rssi); break; + case QMI_NAS_RADIO_INTERFACE_UNKNOWN: + case QMI_NAS_RADIO_INTERFACE_NONE: + case QMI_NAS_RADIO_INTERFACE_AMPS: + case QMI_NAS_RADIO_INTERFACE_TD_SCDMA: + case QMI_NAS_RADIO_INTERFACE_5GNR: default: break; } @@ -8041,6 +9289,13 @@ mm_signal_set_ecio (ctx->values_result->umts, ((gdouble)element->ecio) * (-0.5)); break; default: + case QMI_NAS_RADIO_INTERFACE_GSM: + case QMI_NAS_RADIO_INTERFACE_LTE: + case QMI_NAS_RADIO_INTERFACE_UNKNOWN: + case QMI_NAS_RADIO_INTERFACE_NONE: + case QMI_NAS_RADIO_INTERFACE_AMPS: + case QMI_NAS_RADIO_INTERFACE_TD_SCDMA: + case QMI_NAS_RADIO_INTERFACE_5GNR: break; } } @@ -8074,11 +9329,9 @@ /* SINR (EV-DO) */ if (qmi_message_nas_get_signal_strength_output_get_sinr (output, &sinr, NULL)) { if (ctx->values_result->evdo) - mm_signal_set_sinr (ctx->values_result->evdo, get_db_from_sinr_level (sinr)); + mm_signal_set_sinr (ctx->values_result->evdo, get_db_from_sinr_level (self, sinr)); } - qmi_message_nas_get_signal_strength_output_unref (output); - /* Go on */ ctx->step++; signal_load_values_context_step (task); @@ -8087,26 +9340,28 @@ static void signal_load_values_get_signal_info_ready (QmiClientNas *client, GAsyncResult *res, - GTask *task) + GTask *task) { + MMBroadbandModemQmi *self; SignalLoadValuesContext *ctx; - QmiMessageNasGetSignalInfoOutput *output; - gint8 rssi; - gint16 ecio; - QmiNasEvdoSinrLevel sinr_level; - gint32 io; - gint8 rsrq; - gint16 rsrp; - gint16 snr; + gint8 rssi; + gint16 ecio; + QmiNasEvdoSinrLevel sinr_level; + gint32 io; + gint8 rsrq; + gint16 rsrp; + gint16 snr; + gint16 rsrq_5g; + g_autoptr(QmiMessageNasGetSignalInfoOutput) output = NULL; + + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); - ctx = g_task_get_task_data (task); output = qmi_client_nas_get_signal_info_finish (client, res, NULL); if (!output || !qmi_message_nas_get_signal_info_output_get_result (output, NULL)) { /* No hard errors, go on to next step */ ctx->step++; signal_load_values_context_step (task); - if (output) - qmi_message_nas_get_signal_info_output_unref (output); return; } @@ -8133,7 +9388,7 @@ ctx->values_result->evdo = mm_signal_new (); mm_signal_set_rssi (ctx->values_result->evdo, (gdouble)rssi); mm_signal_set_ecio (ctx->values_result->evdo, ((gdouble)ecio) * (-0.5)); - mm_signal_set_sinr (ctx->values_result->evdo, get_db_from_sinr_level (sinr_level)); + mm_signal_set_sinr (ctx->values_result->evdo, get_db_from_sinr_level (self, sinr_level)); mm_signal_set_io (ctx->values_result->evdo, (gdouble)io); } @@ -8169,7 +9424,21 @@ mm_signal_set_snr (ctx->values_result->lte, (0.1) * ((gdouble)snr)); } - qmi_message_nas_get_signal_info_output_unref (output); + /* 5G */ + if (qmi_message_nas_get_signal_info_output_get_5g_signal_strength (output, + &rsrp, + &snr, + NULL)) { + ctx->values_result->nr5g = mm_signal_new (); + mm_signal_set_rsrp (ctx->values_result->nr5g, (gdouble)rsrp); + mm_signal_set_snr (ctx->values_result->nr5g, (gdouble)snr); + } + + if (qmi_message_nas_get_signal_info_output_get_5g_signal_strength_extended (output, + &rsrq_5g, + NULL)) { + mm_signal_set_rsrq (ctx->values_result->nr5g, (gdouble)rsrq_5g); + } /* Keep on */ ctx->step++; @@ -8194,69 +9463,60 @@ switch (ctx->step) { case SIGNAL_LOAD_VALUES_STEP_SIGNAL_FIRST: ctx->step++; - /* Fall down */ + /* Fall through */ case SIGNAL_LOAD_VALUES_STEP_SIGNAL_INFO: - if (qmi_client_check_version (QMI_CLIENT (ctx->client), 1, 8)) { - qmi_client_nas_get_signal_info (ctx->client, - NULL, - 5, - NULL, - (GAsyncReadyCallback)signal_load_values_get_signal_info_ready, - task); + qmi_client_nas_get_signal_info (ctx->client, + NULL, + 5, + NULL, + (GAsyncReadyCallback)signal_load_values_get_signal_info_ready, + task); + return; + + case SIGNAL_LOAD_VALUES_STEP_SIGNAL_STRENGTH: + /* If already loaded with signal info, don't try signal strength */ + if (!VALUES_RESULT_LOADED (ctx)) { + g_autoptr(QmiMessageNasGetSignalStrengthInput) input = NULL; + + input = qmi_message_nas_get_signal_strength_input_new (); + qmi_message_nas_get_signal_strength_input_set_request_mask ( + input, + (QMI_NAS_SIGNAL_STRENGTH_REQUEST_RSSI | + QMI_NAS_SIGNAL_STRENGTH_REQUEST_ECIO | + QMI_NAS_SIGNAL_STRENGTH_REQUEST_IO | + QMI_NAS_SIGNAL_STRENGTH_REQUEST_SINR | + QMI_NAS_SIGNAL_STRENGTH_REQUEST_RSRQ | + QMI_NAS_SIGNAL_STRENGTH_REQUEST_LTE_SNR | + QMI_NAS_SIGNAL_STRENGTH_REQUEST_LTE_RSRP), + NULL); + qmi_client_nas_get_signal_strength (ctx->client, + input, + 5, + NULL, + (GAsyncReadyCallback)signal_load_values_get_signal_strength_ready, + task); return; } ctx->step++; - /* Fall down */ - - case SIGNAL_LOAD_VALUES_STEP_SIGNAL_STRENGTH: - /* If already loaded with signal info, don't try signal strength */ - if (!VALUES_RESULT_LOADED (ctx)) { - QmiMessageNasGetSignalStrengthInput *input; - - input = qmi_message_nas_get_signal_strength_input_new (); - qmi_message_nas_get_signal_strength_input_set_request_mask ( - input, - (QMI_NAS_SIGNAL_STRENGTH_REQUEST_RSSI | - QMI_NAS_SIGNAL_STRENGTH_REQUEST_ECIO | - QMI_NAS_SIGNAL_STRENGTH_REQUEST_IO | - QMI_NAS_SIGNAL_STRENGTH_REQUEST_SINR | - QMI_NAS_SIGNAL_STRENGTH_REQUEST_RSRQ | - QMI_NAS_SIGNAL_STRENGTH_REQUEST_LTE_SNR | - QMI_NAS_SIGNAL_STRENGTH_REQUEST_LTE_RSRP), - NULL); - qmi_client_nas_get_signal_strength (ctx->client, - input, - 5, - NULL, - (GAsyncReadyCallback)signal_load_values_get_signal_strength_ready, - task); - qmi_message_nas_get_signal_strength_input_unref (input); - return; - } - ctx->step++; - /* Fall down */ + /* Fall through */ case SIGNAL_LOAD_VALUES_STEP_SIGNAL_LAST: /* If any result is set, succeed */ - if (VALUES_RESULT_LOADED (ctx)) { - SignalLoadValuesResult *values_result; - - /* Steal results from context in order to return them */ - values_result = ctx->values_result; - ctx->values_result = NULL; - + if (VALUES_RESULT_LOADED (ctx)) g_task_return_pointer (task, - values_result, + g_steal_pointer (&ctx->values_result), (GDestroyNotify)signal_load_values_result_free); - } else { + else g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "No way to load extended signal information"); - } g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -8265,16 +9525,16 @@ } static void -signal_load_values (MMIfaceModemSignal *self, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) +signal_load_values (MMIfaceModemSignal *self, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) { SignalLoadValuesContext *ctx; - GTask *task; - QmiClient *client = NULL; + GTask *task; + QmiClient *client = NULL; - mm_dbg ("loading extended signal information..."); + mm_obj_dbg (self, "loading extended signal information..."); if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), QMI_SERVICE_NAS, &client, @@ -8286,9 +9546,7 @@ ctx->step = SIGNAL_LOAD_VALUES_STEP_SIGNAL_FIRST; task = g_task_new (self, cancellable, callback, user_data); - g_task_set_task_data (task, - ctx, - (GDestroyNotify)signal_load_values_context_free); + g_task_set_task_data (task, ctx, (GDestroyNotify)signal_load_values_context_free); signal_load_values_context_step (task); } @@ -8297,38 +9555,127 @@ /* First enabling step */ static gboolean -enabling_started_finish (MMBroadbandModem *self, - GAsyncResult *res, - GError **error) +enabling_started_finish (MMBroadbandModem *self, + GAsyncResult *res, + GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void -parent_enabling_started_ready (MMBroadbandModem *self, - GAsyncResult *res, - GTask *task) +wds_set_autoconnect_settings_ready (QmiClientWds *client, + GAsyncResult *res, + GTask *task) { - GError *error = NULL; + MMBroadbandModemQmi *self; + g_autoptr(GError) error = NULL; + g_autoptr(QmiMessageWdsSetAutoconnectSettingsOutput) output = NULL; - if (!MM_BROADBAND_MODEM_CLASS (mm_broadband_modem_qmi_parent_class)->enabling_started_finish ( - self, - res, - &error)) { + self = g_task_get_source_object (task); + + output = qmi_client_wds_set_autoconnect_settings_finish (client, res, &error); + if (!output || !qmi_message_wds_set_autoconnect_settings_output_get_result (output, &error)) + mm_obj_warn (self, "failed disabling autoconnect: %s", error->message); + else + mm_obj_info (self, "autoconnect explicitly disabled"); + g_task_return_boolean (task, TRUE); + g_object_unref (task); +} + +static void +wds_get_autoconnect_settings_ready (QmiClientWds *client, + GAsyncResult *res, + GTask *task) +{ + MMBroadbandModemQmi *self; + QmiWdsAutoconnectSetting autoconnect_setting; + g_autoptr(GError) error = NULL; + g_autoptr(QmiMessageWdsSetAutoconnectSettingsInput) input = NULL; + g_autoptr(QmiMessageWdsGetAutoconnectSettingsOutput) output = NULL; + + self = g_task_get_source_object (task); + + output = qmi_client_wds_get_autoconnect_settings_finish (client, res, &error); + if (!output || + !qmi_message_wds_get_autoconnect_settings_output_get_result (output, &error) || + !qmi_message_wds_get_autoconnect_settings_output_get_status (output, &autoconnect_setting, &error)) { + mm_obj_warn (self, "failed checking whether autoconnect is disabled or not: %s", error->message); + g_task_return_boolean (task, TRUE); + g_object_unref (task); + return; + } + + if (autoconnect_setting != QMI_WDS_AUTOCONNECT_SETTING_ENABLED) { + mm_obj_dbg (self, "autoconnect is already disabled"); + g_task_return_boolean (task, TRUE); + g_object_unref (task); + return; + } + + mm_obj_dbg (self, "need to explicitly disable autoconnect"); + input = qmi_message_wds_set_autoconnect_settings_input_new (); + qmi_message_wds_set_autoconnect_settings_input_set_status (input, QMI_WDS_AUTOCONNECT_SETTING_DISABLED, NULL); + qmi_client_wds_set_autoconnect_settings (client, + input, + 10, + NULL, + (GAsyncReadyCallback) wds_set_autoconnect_settings_ready, + task); +} + +static void +parent_enabling_started_ready (MMBroadbandModem *_self, + GAsyncResult *res, + GTask *task) +{ + MMBroadbandModemQmi *self = MM_BROADBAND_MODEM_QMI (_self); + QmiClient *client = NULL; + g_autoptr(GError) error = NULL; + + if (!MM_BROADBAND_MODEM_CLASS (mm_broadband_modem_qmi_parent_class)->enabling_started_finish (_self, res, &error)) { /* Don't treat this as fatal. Parent enabling may fail if it cannot grab a primary * AT port, which isn't really an issue in QMI-based modems */ - mm_dbg ("Couldn't start parent enabling: %s", error->message); - g_error_free (error); + mm_obj_dbg (self, "couldn't start parent enabling: %s", error->message); } - g_task_return_boolean (task, TRUE); - g_object_unref (task); + /* If the autoconnect check has already been done, we're finished */ + if (self->priv->autoconnect_checked) { + g_task_return_boolean (task, TRUE); + g_object_unref (task); + return; + } + + /* The connection logic doesn't work properly when the device is already set + * to autoconnect, so automatically disable autoconnect ourselves. */ + mm_obj_dbg (self, "need to check whether autoconnect is disabled or not..."); + self->priv->autoconnect_checked = TRUE; + + /* Use default WDS client to query autoconnect settings */ + client = mm_shared_qmi_peek_client (MM_SHARED_QMI (self), + QMI_SERVICE_WDS, + MM_PORT_QMI_FLAG_DEFAULT, + NULL); + + if (!client) { + mm_obj_warn (self, "cannot check whether autoconnect is disabled or not: couldn't peek default WDS client"); + /* not fatal, just assume autoconnect is disabled */ + g_task_return_boolean (task, TRUE); + g_object_unref (task); + return; + } + + qmi_client_wds_get_autoconnect_settings (QMI_CLIENT_WDS (client), + NULL, + 5, + NULL, + (GAsyncReadyCallback) wds_get_autoconnect_settings_ready, + task); } static void -enabling_started (MMBroadbandModem *self, - GAsyncReadyCallback callback, - gpointer user_data) +enabling_started (MMBroadbandModem *self, + GAsyncReadyCallback callback, + gpointer user_data) { GTask *task; @@ -8346,12 +9693,14 @@ static const QmiService qmi_services[] = { QMI_SERVICE_DMS, QMI_SERVICE_NAS, + QMI_SERVICE_WDS, QMI_SERVICE_WMS, QMI_SERVICE_PDS, QMI_SERVICE_OMA, QMI_SERVICE_UIM, QMI_SERVICE_LOC, QMI_SERVICE_PDC, + QMI_SERVICE_VOICE, }; typedef struct { @@ -8390,7 +9739,7 @@ if (error) { /* Don't treat this as fatal. Parent initialization may fail if it cannot grab a primary * AT port, which isn't really an issue in QMI-based modems */ - mm_dbg ("Couldn't start parent initialization: %s", error->message); + mm_obj_dbg (self, "couldn't start parent initialization: %s", error->message); g_error_free (error); } @@ -8416,8 +9765,8 @@ MMBroadbandModemQmi *self) { /* Reprobe the modem here so we can get notifications back. */ - mm_info ("Connection to qmi-proxy for %s lost, reprobing", - qmi_device_get_path_display (device)); + mm_obj_info (self, "connection to qmi-proxy for %s lost, reprobing", + qmi_device_get_path_display (device)); g_signal_handler_disconnect (device, self->priv->qmi_device_removed_id); self->priv->qmi_device_removed_id = 0; @@ -8426,25 +9775,31 @@ mm_base_modem_set_valid (MM_BASE_MODEM (self), FALSE); } -static void -track_qmi_device_removed (MMBroadbandModemQmi *self, - MMPortQmi* qmi) +static gboolean +track_qmi_device_removed (MMBroadbandModemQmi *self, + MMPortQmi *qmi, + GError **error) { QmiDevice *device; device = mm_port_qmi_peek_device (qmi); - g_assert (device); + if (!device) { + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, + "Cannot track QMI device removal: QMI port no longer available"); + return FALSE; + } self->priv->qmi_device_removed_id = g_signal_connect ( device, QMI_DEVICE_SIGNAL_REMOVED, G_CALLBACK (qmi_device_removed_cb), self); + return TRUE; } static void untrack_qmi_device_removed (MMBroadbandModemQmi *self, - MMPortQmi* qmi) + MMPortQmi *qmi) { QmiDevice *device; @@ -8466,15 +9821,17 @@ GAsyncResult *res, GTask *task) { + MMBroadbandModemQmi *self; InitializationStartedContext *ctx; GError *error = NULL; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); if (!mm_port_qmi_allocate_client_finish (qmi, res, &error)) { - mm_dbg ("Couldn't allocate client for service '%s': %s", - qmi_service_get_string (qmi_services[ctx->service_index]), - error->message); + mm_obj_dbg (self, "couldn't allocate client for service '%s': %s", + qmi_service_get_string (qmi_services[ctx->service_index]), + error->message); g_error_free (error); } @@ -8486,14 +9843,20 @@ allocate_next_client (GTask *task) { InitializationStartedContext *ctx; - MMBroadbandModemQmi *self; + MMBroadbandModemQmi *self; self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); if (ctx->service_index == G_N_ELEMENTS (qmi_services)) { + GError *error = NULL; + /* Done we are, track device removal and launch parent's callback */ - track_qmi_device_removed (self, ctx->qmi); + if (!track_qmi_device_removed (self, ctx->qmi, &error)) { + g_task_return_error (task, error); + g_object_unref (task); + return; + } parent_initialization_started (task); return; } @@ -8529,10 +9892,12 @@ GAsyncResult *res, GTask *task) { + MMBroadbandModemQmi *self; InitializationStartedContext *ctx; GError *error = NULL; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); if (!mm_port_qmi_open_finish (qmi, res, &error)) { /* Really, really old devices (Gobi 1K, 2008-era firmware) may not @@ -8540,7 +9905,7 @@ * try without it. The qmi_wwan driver will fix up any issues that * the device might have between raw-ip and 802.3 mode anyway. */ - mm_dbg ("Couldn't open QMI port with data format update: %s", error->message); + mm_obj_dbg (self, "couldn't open QMI port with data format update: %s", error->message); g_error_free (error); mm_port_qmi_open (ctx->qmi, FALSE, @@ -8560,9 +9925,10 @@ { InitializationStartedContext *ctx; GTask *task; + GError *error = NULL; ctx = g_new0 (InitializationStartedContext, 1); - ctx->qmi = mm_base_modem_get_port_qmi (MM_BASE_MODEM (self)); + ctx->qmi = mm_broadband_modem_qmi_get_port_qmi (MM_BROADBAND_MODEM_QMI (self)); task = g_task_new (self, NULL, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify)initialization_started_context_free); @@ -8572,7 +9938,7 @@ g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, - "Cannot initialize: QMI port went missing"); + "Cannot initialize: QMI port no longer available"); g_object_unref (task); return; } @@ -8580,7 +9946,12 @@ if (mm_port_qmi_is_open (ctx->qmi)) { /* Nothing to be done, just track device removal and launch parent's * callback */ - track_qmi_device_removed (MM_BROADBAND_MODEM_QMI (self), ctx->qmi); + if (!track_qmi_device_removed (MM_BROADBAND_MODEM_QMI (self), ctx->qmi, &error)) { + g_task_return_error (task, error); + g_object_unref (task); + return; + } + parent_initialization_started (task); return; } @@ -8623,18 +9994,8 @@ static void finalize (GObject *object) { - MMPortQmi *qmi; MMBroadbandModemQmi *self = MM_BROADBAND_MODEM_QMI (object); - qmi = mm_base_modem_peek_port_qmi (MM_BASE_MODEM (self)); - if (qmi) { - /* Disconnect signal handler for qmi-proxy disappearing, if it exists */ - untrack_qmi_device_removed (self, qmi); - /* If we did open the QMI port during initialization, close it now */ - if (mm_port_qmi_is_open (qmi)) - mm_port_qmi_close (qmi); - } - g_free (self->priv->imei); g_free (self->priv->meid); g_free (self->priv->esn); @@ -8650,6 +10011,19 @@ dispose (GObject *object) { MMBroadbandModemQmi *self = MM_BROADBAND_MODEM_QMI (object); + MMPortQmi *qmi; + + /* If any port cleanup is needed, it must be done during dispose(), as + * the modem object will be affected by an explicit g_object_run_dispose() + * that will remove all port references right away */ + qmi = mm_broadband_modem_qmi_peek_port_qmi (self); + if (qmi) { + /* Disconnect signal handler for qmi-proxy disappearing, if it exists */ + untrack_qmi_device_removed (self, qmi); + /* If we did open the QMI port during initialization, close it now */ + if (mm_port_qmi_is_open (qmi)) + mm_port_qmi_close (qmi, NULL, NULL); + } g_list_free_full (self->priv->firmware_list, g_object_unref); self->priv->firmware_list = NULL; @@ -8703,6 +10077,8 @@ /* Enabling/disabling */ iface->modem_power_up = modem_power_up; iface->modem_power_up_finish = modem_power_up_down_off_finish; + iface->fcc_unlock = mm_shared_qmi_fcc_unlock; + iface->fcc_unlock_finish = mm_shared_qmi_fcc_unlock_finish; iface->modem_after_power_up = NULL; iface->modem_after_power_up_finish = NULL; iface->modem_power_down = modem_power_down; @@ -8735,6 +10111,12 @@ /* Create QMI-specific SIM */ iface->create_sim = create_sim; iface->create_sim_finish = create_sim_finish; + iface->load_sim_slots = mm_shared_qmi_load_sim_slots; + iface->load_sim_slots_finish = mm_shared_qmi_load_sim_slots_finish; + iface->set_primary_sim_slot = mm_shared_qmi_set_primary_sim_slot; + iface->set_primary_sim_slot_finish = mm_shared_qmi_set_primary_sim_slot_finish; + iface->setup_sim_hot_swap = mm_shared_qmi_setup_sim_hot_swap; + iface->setup_sim_hot_swap_finish = mm_shared_qmi_setup_sim_hot_swap_finish; /* Create QMI-specific bearer */ iface->create_bearer = modem_create_bearer; @@ -8785,14 +10167,31 @@ iface->load_operator_code_finish = modem_3gpp_load_operator_code_finish; iface->load_operator_name = modem_3gpp_load_operator_name; iface->load_operator_name_finish = modem_3gpp_load_operator_name_finish; + iface->load_initial_eps_bearer = modem_3gpp_load_initial_eps_bearer; + iface->load_initial_eps_bearer_finish = modem_3gpp_load_initial_eps_bearer_finish; + iface->load_initial_eps_bearer_settings = modem_3gpp_load_initial_eps_bearer_settings; + iface->load_initial_eps_bearer_settings_finish = modem_3gpp_load_initial_eps_bearer_settings_finish; + iface->set_initial_eps_bearer_settings = modem_3gpp_set_initial_eps_bearer_settings; + iface->set_initial_eps_bearer_settings_finish = modem_3gpp_set_initial_eps_bearer_settings_finish; } static void iface_modem_3gpp_ussd_init (MMIfaceModem3gppUssd *iface) { - /* Assume we don't have USSD support */ - iface->check_support = NULL; - iface->check_support_finish = NULL; + iface->check_support = modem_3gpp_ussd_check_support; + iface->check_support_finish = modem_3gpp_ussd_check_support_finish; + iface->setup_unsolicited_events = modem_3gpp_ussd_setup_unsolicited_events; + iface->setup_unsolicited_events_finish = common_3gpp_ussd_setup_cleanup_unsolicited_events_finish; + iface->cleanup_unsolicited_events = modem_3gpp_ussd_cleanup_unsolicited_events; + iface->cleanup_unsolicited_events_finish = common_3gpp_ussd_setup_cleanup_unsolicited_events_finish; + iface->enable_unsolicited_events = modem_3gpp_ussd_enable_unsolicited_events; + iface->enable_unsolicited_events_finish = common_3gpp_ussd_enable_disable_unsolicited_events_finish; + iface->disable_unsolicited_events = modem_3gpp_ussd_disable_unsolicited_events; + iface->disable_unsolicited_events_finish = common_3gpp_ussd_enable_disable_unsolicited_events_finish; + iface->send = modem_3gpp_ussd_send; + iface->send_finish = modem_3gpp_ussd_send_finish; + iface->cancel = modem_3gpp_ussd_cancel; + iface->cancel_finish = modem_3gpp_ussd_cancel_finish; } static void @@ -8940,6 +10339,8 @@ g_type_class_add_private (object_class, sizeof (MMBroadbandModemQmiPrivate)); + klass->peek_port_qmi_for_data = peek_port_qmi_for_data; + object_class->finalize = finalize; object_class->dispose = dispose; diff -Nru modemmanager-1.12.8/src/mm-broadband-modem-qmi.h modemmanager-1.16.6/src/mm-broadband-modem-qmi.h --- modemmanager-1.12.8/src/mm-broadband-modem-qmi.h 2016-03-24 18:25:04.000000000 +0800 +++ modemmanager-1.16.6/src/mm-broadband-modem-qmi.h 2021-06-06 21:40:59.000000000 +0800 @@ -36,14 +36,31 @@ struct _MMBroadbandModemQmiClass{ MMBroadbandModemClass parent; + + MMPortQmi * (* peek_port_qmi_for_data) (MMBroadbandModemQmi *self, + MMPort *data, + QmiSioPort *out_sio_port, + GError **error); }; GType mm_broadband_modem_qmi_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMBroadbandModemQmi, g_object_unref) -MMBroadbandModemQmi *mm_broadband_modem_qmi_new (const gchar *device, +MMBroadbandModemQmi *mm_broadband_modem_qmi_new (const gchar *device, const gchar **drivers, - const gchar *plugin, - guint16 vendor_id, - guint16 product_id); + const gchar *plugin, + guint16 vendor_id, + guint16 product_id); + +MMPortQmi *mm_broadband_modem_qmi_peek_port_qmi (MMBroadbandModemQmi *self); +MMPortQmi *mm_broadband_modem_qmi_peek_port_qmi_for_data (MMBroadbandModemQmi *self, + MMPort *data, + QmiSioPort *out_sio_port, + GError **error); +MMPortQmi *mm_broadband_modem_qmi_get_port_qmi (MMBroadbandModemQmi *self); +MMPortQmi *mm_broadband_modem_qmi_get_port_qmi_for_data (MMBroadbandModemQmi *self, + MMPort *data, + QmiSioPort *out_sio_port, + GError **error); #endif /* MM_BROADBAND_MODEM_QMI_H */ diff -Nru modemmanager-1.12.8/src/mm-broadband-modem.c modemmanager-1.16.6/src/mm-broadband-modem.c --- modemmanager-1.12.8/src/mm-broadband-modem.c 2020-03-14 16:37:24.000000000 +0800 +++ modemmanager-1.16.6/src/mm-broadband-modem.c 2021-06-06 21:40:59.000000000 +0800 @@ -48,7 +48,7 @@ #include "mm-sms-part-3gpp.h" #include "mm-call-list.h" #include "mm-base-sim.h" -#include "mm-log.h" +#include "mm-log-object.h" #include "mm-modem-helpers.h" #include "mm-error-helpers.h" #include "mm-port-serial-qcdm.h" @@ -100,12 +100,14 @@ PROP_MODEM_OMA_DBUS_SKELETON, PROP_MODEM_FIRMWARE_DBUS_SKELETON, PROP_MODEM_SIM, + PROP_MODEM_SIM_SLOTS, PROP_MODEM_BEARER_LIST, PROP_MODEM_STATE, PROP_MODEM_3GPP_REGISTRATION_STATE, PROP_MODEM_3GPP_CS_NETWORK_SUPPORTED, PROP_MODEM_3GPP_PS_NETWORK_SUPPORTED, PROP_MODEM_3GPP_EPS_NETWORK_SUPPORTED, + PROP_MODEM_3GPP_5GS_NETWORK_SUPPORTED, PROP_MODEM_3GPP_IGNORED_FACILITY_LOCKS, PROP_MODEM_3GPP_INITIAL_EPS_BEARER, PROP_MODEM_CDMA_CDMA1X_REGISTRATION_STATE, @@ -124,6 +126,7 @@ PROP_MODEM_PERIODIC_ACCESS_TECH_CHECK_DISABLED, PROP_MODEM_PERIODIC_CALL_LIST_CHECK_DISABLED, PROP_MODEM_CARRIER_CONFIG_MAPPING, + PROP_MODEM_FIRMWARE_IGNORE_CARRIER, PROP_FLOW_CONTROL, PROP_INDICATORS_DISABLED, PROP_LAST @@ -152,6 +155,7 @@ /* Properties */ GObject *modem_dbus_skeleton; MMBaseSim *modem_sim; + GPtrArray *modem_sim_slots; MMBearerList *modem_bearer_list; MMModemState modem_state; gchar *carrier_config_mapping; @@ -179,6 +183,7 @@ gboolean modem_3gpp_cs_network_supported; gboolean modem_3gpp_ps_network_supported; gboolean modem_3gpp_eps_network_supported; + gboolean modem_3gpp_5gs_network_supported; /* Implementation helpers */ GPtrArray *modem_3gpp_registration_regex; MMModem3gppFacility modem_3gpp_ignored_facility_locks; @@ -249,7 +254,8 @@ /*<--- Modem Firmware interface --->*/ /* Properties */ - GObject *modem_firmware_dbus_skeleton; + GObject *modem_firmware_dbus_skeleton; + gboolean modem_firmware_ignore_carrier; }; /*****************************************************************************/ @@ -366,30 +372,6 @@ } /*****************************************************************************/ - -static gboolean -response_processor_string_ignore_at_errors (MMBaseModem *self, - gpointer none, - const gchar *command, - const gchar *response, - gboolean last_command, - const GError *error, - GVariant **result, - GError **result_error) -{ - if (error) { - /* Ignore AT errors (ie, ERROR or CMx ERROR) */ - if (error->domain != MM_MOBILE_EQUIPMENT_ERROR || last_command) - *result_error = g_error_copy (error); - - return FALSE; - } - - *result = g_variant_new_string (response); - return TRUE; -} - -/*****************************************************************************/ /* Create Bearer (Modem interface) */ static MMBaseBearer * @@ -418,7 +400,7 @@ static void modem_create_bearer (MMIfaceModem *self, - MMBearerProperties *properties, + MMBearerProperties *props, GAsyncReadyCallback callback, gpointer user_data) { @@ -427,9 +409,9 @@ task = g_task_new (self, NULL, callback, user_data); /* We just create a MMBroadbandBearer */ - mm_dbg ("Creating Broadband bearer in broadband modem"); + mm_obj_dbg (self, "creating broadband bearer in broadband modem..."); mm_broadband_bearer_new (MM_BROADBAND_MODEM (self), - properties, + props, NULL, /* cancellable */ (GAsyncReadyCallback)broadband_bearer_new_ready, task); @@ -501,6 +483,10 @@ const gchar *response; GArray *modes; guint i; + gboolean is_2g = FALSE; + gboolean is_3g = FALSE; + gboolean is_4g = FALSE; + gboolean is_5g = FALSE; ctx = g_task_get_task_data (task); @@ -513,27 +499,37 @@ if (!modes) goto out; - /* Add LTE caps if any of the reported modes supports 4G */ + /* Process list of modes to gather supported ones */ for (i = 0; i < modes->len; i++) { - if (g_array_index (modes, MMModemMode, i) & MM_MODEM_MODE_4G) { - ctx->caps |= MM_MODEM_CAPABILITY_LTE; - break; - } + if (g_array_index (modes, MMModemMode, i) & MM_MODEM_MODE_2G) + is_2g = TRUE; + if (g_array_index (modes, MMModemMode, i) & MM_MODEM_MODE_3G) + is_3g = TRUE; + if (g_array_index (modes, MMModemMode, i) & MM_MODEM_MODE_4G) + is_4g = TRUE; + if (g_array_index (modes, MMModemMode, i) & MM_MODEM_MODE_5G) + is_5g = TRUE; } + /* Add capabilities from modes */ + if (is_2g || is_3g) + ctx->caps |= MM_MODEM_CAPABILITY_GSM_UMTS; + if (is_4g) + ctx->caps |= MM_MODEM_CAPABILITY_LTE; + if (is_5g) + ctx->caps |= MM_MODEM_CAPABILITY_5GNR; + /* The +CGSM capability is saying that the modem is a 3GPP modem, but that * doesn't necessarily mean it's a GSM/UMTS modem, it could be a LTE-only - * device. We did add the GSM_UMTS capability when +CGSM was found, so now - * we'll check if the device only reports 4G-only mode, and remove the - * capability if so. + * or 5GNR-only device. We did add the GSM_UMTS capability when +CGSM was + * found, so now we'll check if the device only reports 4G or 5G modes, and + * remove the capability if so. * * Note that we don't change the default +CGSM -> GSM/UMTS logic, we just * fix it up. */ - if ((modes->len == 1) && (g_array_index (modes, MMModemMode, 0) == MM_MODEM_MODE_4G)) { - g_assert (ctx->caps & MM_MODEM_CAPABILITY_LTE); + if ((is_4g || is_5g) && !is_2g && !is_3g) ctx->caps &= ~MM_MODEM_CAPABILITY_GSM_UMTS; - } g_array_unref (modes); @@ -543,7 +539,7 @@ } typedef struct { - gchar *name; + const gchar *name; MMModemCapability bits; } ModemCaps; @@ -567,27 +563,30 @@ { NULL } }; -static gboolean -parse_caps_gcap (MMBaseModem *self, - gpointer none, - const gchar *command, - const gchar *response, - gboolean last_command, - const GError *error, - GVariant **variant, - GError **result_error) +static MMBaseModemAtResponseProcessorResult +parse_caps_gcap (MMBaseModem *self, + gpointer none, + const gchar *command, + const gchar *response, + gboolean last_command, + const GError *error, + GVariant **result, + GError **result_error) { const ModemCaps *cap = modem_caps; guint32 ret = 0; + *result = NULL; + *result_error = NULL; + if (!response) - return FALSE; + return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_CONTINUE; /* Some modems (Huawei E160g) won't respond to +GCAP with no SIM, but * will respond to ATI. Ignore the error and continue. */ - if (strstr (response, "+CME ERROR:")) - return FALSE; + if (strstr (response, "+CME ERROR:") || (error && error->domain == MM_MOBILE_EQUIPMENT_ERROR)) + return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_CONTINUE; while (cap->name) { if (strstr (response, cap->name)) @@ -597,22 +596,25 @@ /* No result built? */ if (ret == 0) - return FALSE; + return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_CONTINUE; - *variant = g_variant_new_uint32 (ret); - return TRUE; + *result = g_variant_new_uint32 (ret); + return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_SUCCESS; } -static gboolean -parse_caps_cpin (MMBaseModem *self, - gpointer none, - const gchar *command, - const gchar *response, - gboolean last_command, - const GError *error, - GVariant **result, - GError **result_error) +static MMBaseModemAtResponseProcessorResult +parse_caps_cpin (MMBaseModem *self, + gpointer none, + const gchar *command, + const gchar *response, + gboolean last_command, + const GError *error, + GVariant **result, + GError **result_error) { + *result = NULL; + *result_error = NULL; + if (!response) { if (error && (g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_SIM_NOT_INSERTED) || @@ -621,9 +623,9 @@ g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_SIM_WRONG))) { /* At least, it's a GSM modem */ *result = g_variant_new_uint32 (MM_MODEM_CAPABILITY_GSM_UMTS); - return TRUE; + return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_SUCCESS; } - return FALSE; + return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_CONTINUE; } if (strcasestr (response, "SIM PIN") || @@ -644,23 +646,27 @@ strcasestr (response, "READY")) { /* At least, it's a GSM modem */ *result = g_variant_new_uint32 (MM_MODEM_CAPABILITY_GSM_UMTS); - return TRUE; + return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_SUCCESS; } - return FALSE; + + return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_CONTINUE; } -static gboolean -parse_caps_cgmm (MMBaseModem *self, - gpointer none, - const gchar *command, - const gchar *response, - gboolean last_command, - const GError *error, - GVariant **result, - GError **result_error) +static MMBaseModemAtResponseProcessorResult +parse_caps_cgmm (MMBaseModem *self, + gpointer none, + const gchar *command, + const gchar *response, + gboolean last_command, + const GError *error, + GVariant **result, + GError **result_error) { + *result = NULL; + *result_error = NULL; + if (!response) - return FALSE; + return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_CONTINUE; /* This check detects some really old Motorola GPRS dongles and phones */ if (strstr (response, "GSM900") || @@ -669,9 +675,10 @@ strstr (response, "GSM850")) { /* At least, it's a GSM modem */ *result = g_variant_new_uint32 (MM_MODEM_CAPABILITY_GSM_UMTS); - return TRUE; + return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_SUCCESS; } - return FALSE; + + return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_CONTINUE; } static const MMBaseModemAtCommand capabilities[] = { @@ -760,6 +767,7 @@ GAsyncResult *res, GTask *task) { + MMBroadbandModem *self; LoadCapabilitiesContext *ctx; QcdmResult *result; gint err = QCDM_SUCCESS; @@ -767,12 +775,13 @@ GError *error = NULL; GByteArray *response; + self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); response = mm_port_serial_qcdm_command_finish (port, res, &error); if (error) { /* Fall back to AT checking */ - mm_dbg ("Failed to load NV ModePref: %s", error->message); + mm_obj_dbg (self, "failed to load NV ModePref: %s", error->message); g_error_free (error); goto at_caps; } @@ -783,7 +792,7 @@ &err); g_byte_array_unref (response); if (!result) { - mm_dbg ("Failed to parse NV ModePref result: %d", err); + mm_obj_dbg (self, "failed to parse NV ModePref result: %d", err); g_byte_array_unref (response); goto at_caps; } @@ -791,7 +800,7 @@ err = qcdm_result_get_u8 (result, QCDM_CMD_NV_GET_MODE_PREF_ITEM_MODE_PREF, &pref); qcdm_result_unref (result); if (err) { - mm_dbg ("Failed to read NV ModePref: %d", err); + mm_obj_dbg (self, "failed to read NV ModePref: %d", err); goto at_caps; } @@ -847,8 +856,7 @@ g_assert (ctx->qcdm_port); if (!mm_port_serial_open (MM_PORT_SERIAL (ctx->qcdm_port), &error)) { - mm_dbg ("Failed to open QCDM port for NV ModePref request: %s", - error->message); + mm_obj_dbg (self, "failed to open QCDM port for NV ModePref request: %s", error->message); g_error_free (error); ctx->qcdm_port = NULL; load_current_capabilities_at (task); @@ -878,11 +886,10 @@ LoadCapabilitiesContext *ctx; GTask *task; - mm_dbg ("loading current capabilities..."); - - ctx = g_slice_new0 (LoadCapabilitiesContext); + mm_obj_dbg (self, "loading current capabilities..."); task = g_task_new (self, NULL, callback, user_data); + ctx = g_slice_new0 (LoadCapabilitiesContext); g_task_set_task_data (task, ctx, (GDestroyNotify)load_capabilities_context_free); if (mm_base_modem_peek_port_qcdm (MM_BASE_MODEM (self))) @@ -920,14 +927,14 @@ result = mm_base_modem_at_sequence_finish (MM_BASE_MODEM (self), res, NULL, error); if (result) { manufacturer = sanitize_info_reply (result, "GMI:"); - mm_dbg ("loaded manufacturer: %s", manufacturer); + mm_obj_dbg (self, "loaded manufacturer: %s", manufacturer); } return manufacturer; } static const MMBaseModemAtCommand manufacturers[] = { - { "+CGMI", 3, TRUE, response_processor_string_ignore_at_errors }, - { "+GMI", 3, TRUE, response_processor_string_ignore_at_errors }, + { "+CGMI", 3, TRUE, mm_base_modem_response_processor_string_ignore_at_errors }, + { "+GMI", 3, TRUE, mm_base_modem_response_processor_string_ignore_at_errors }, { NULL } }; @@ -936,7 +943,7 @@ GAsyncReadyCallback callback, gpointer user_data) { - mm_dbg ("loading manufacturer..."); + mm_obj_dbg (self, "loading manufacturer..."); mm_base_modem_at_sequence ( MM_BASE_MODEM (self), manufacturers, @@ -960,14 +967,14 @@ result = mm_base_modem_at_sequence_finish (MM_BASE_MODEM (self), res, NULL, error); if (result) { model = sanitize_info_reply (result, "GMM:"); - mm_dbg ("loaded model: %s", model); + mm_obj_dbg (self, "loaded model: %s", model); } return model; } static const MMBaseModemAtCommand models[] = { - { "+CGMM", 3, TRUE, response_processor_string_ignore_at_errors }, - { "+GMM", 3, TRUE, response_processor_string_ignore_at_errors }, + { "+CGMM", 3, TRUE, mm_base_modem_response_processor_string_ignore_at_errors }, + { "+GMM", 3, TRUE, mm_base_modem_response_processor_string_ignore_at_errors }, { NULL } }; @@ -976,7 +983,7 @@ GAsyncReadyCallback callback, gpointer user_data) { - mm_dbg ("loading model..."); + mm_obj_dbg (self, "loading model..."); mm_base_modem_at_sequence ( MM_BASE_MODEM (self), models, @@ -1000,14 +1007,14 @@ result = mm_base_modem_at_sequence_finish (MM_BASE_MODEM (self), res, NULL, error); if (result) { revision = sanitize_info_reply (result, "GMR:"); - mm_dbg ("loaded revision: %s", revision); + mm_obj_dbg (self, "loaded revision: %s", revision); } return revision; } static const MMBaseModemAtCommand revisions[] = { - { "+CGMR", 3, TRUE, response_processor_string_ignore_at_errors }, - { "+GMR", 3, TRUE, response_processor_string_ignore_at_errors }, + { "+CGMR", 3, TRUE, mm_base_modem_response_processor_string_ignore_at_errors }, + { "+GMR", 3, TRUE, mm_base_modem_response_processor_string_ignore_at_errors }, { NULL } }; @@ -1016,7 +1023,7 @@ GAsyncReadyCallback callback, gpointer user_data) { - mm_dbg ("loading revision..."); + mm_obj_dbg (self, "loading revision..."); mm_base_modem_at_sequence ( MM_BASE_MODEM (self), revisions, @@ -1060,14 +1067,14 @@ } else { /* Leave whatever the modem returned alone */ } - mm_dbg ("loaded equipment identifier: %s", equip_id); + mm_obj_dbg (self, "loaded equipment identifier: %s", equip_id); } return equip_id; } static const MMBaseModemAtCommand equipment_identifiers[] = { - { "+CGSN", 3, TRUE, response_processor_string_ignore_at_errors }, - { "+GSN", 3, TRUE, response_processor_string_ignore_at_errors }, + { "+CGSN", 3, TRUE, mm_base_modem_response_processor_string_ignore_at_errors }, + { "+GSN", 3, TRUE, mm_base_modem_response_processor_string_ignore_at_errors }, { NULL } }; @@ -1078,7 +1085,7 @@ { const MMBaseModemAtCommand *commands = equipment_identifiers; - mm_dbg ("loading equipment identifier..."); + mm_obj_dbg (self, "loading equipment identifier..."); /* On CDMA-only (non-3GPP) modems, just try +GSN */ if (mm_iface_modem_is_cdma_only (self)) @@ -1114,9 +1121,9 @@ GAsyncResult *res, GError **error) { - GError *inner_error = NULL; - gpointer ctx = NULL; - gchar *device_identifier; + GError *inner_error = NULL; + gpointer ctx = NULL; + gchar *device_identifier; mm_base_modem_at_sequence_finish (MM_BASE_MODEM (self), res, &ctx, &inner_error); if (inner_error) { @@ -1125,11 +1132,17 @@ } g_assert (ctx != NULL); - device_identifier = (mm_broadband_modem_create_device_identifier ( - MM_BROADBAND_MODEM (self), - ((DeviceIdentifierContext *)ctx)->ati, - ((DeviceIdentifierContext *)ctx)->ati1)); - mm_dbg ("loaded device identifier: %s", device_identifier); + device_identifier = mm_broadband_modem_create_device_identifier ( + MM_BROADBAND_MODEM (self), + ((DeviceIdentifierContext *)ctx)->ati, + ((DeviceIdentifierContext *)ctx)->ati1, + &inner_error); + if (!device_identifier) { + g_propagate_error (error, inner_error); + return NULL; + } + + mm_obj_dbg (self, "loaded device identifier: %s", device_identifier); return device_identifier; } @@ -1166,7 +1179,7 @@ GAsyncReadyCallback callback, gpointer user_data) { - mm_dbg ("loading device identifier..."); + mm_obj_dbg (self, "loading device identifier..."); mm_base_modem_at_sequence ( MM_BASE_MODEM (self), device_identifier_steps, @@ -1327,9 +1340,9 @@ if (mm_port_serial_open (MM_PORT_SERIAL (ctx->qcdm), &error)) { ctx->qcdm = g_object_ref (ctx->qcdm); } else { - mm_dbg ("Couldn't open QCDM port: (%d) %s", - error ? error->code : -1, - error ? error->message : "(unknown)"); + mm_obj_dbg (self, "couldn't open QCDM port: (%d) %s", + error ? error->code : -1, + error ? error->message : "(unknown)"); ctx->qcdm = NULL; } } @@ -1337,7 +1350,7 @@ task = g_task_new (self, NULL, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify)own_numbers_context_free); - mm_dbg ("loading own numbers..."); + mm_obj_dbg (self, "loading own numbers..."); mm_base_modem_at_command (MM_BASE_MODEM (self), "+CNUM", 3, @@ -1448,13 +1461,13 @@ /* CDMA-only modems don't need this */ if (mm_iface_modem_is_cdma_only (self)) { - mm_dbg ("Skipping unlock check in CDMA-only modem..."); + mm_obj_dbg (self, "skipping unlock check in CDMA-only modem..."); g_task_return_int (task, MM_MODEM_LOCK_NONE); g_object_unref (task); return; } - mm_dbg ("checking if unlock required..."); + mm_obj_dbg (self, "checking if unlock required..."); mm_base_modem_at_command (MM_BASE_MODEM (self), "+CPIN?", 10, @@ -1508,28 +1521,31 @@ LoadUnlockRetriesContext *ctx; const gchar *response; GError *error = NULL; + gint val; ctx = g_task_get_task_data (task); response = mm_base_modem_at_command_finish (self, res, &error); if (!response) { - mm_dbg ("Couldn't load retry count for lock '%s': %s", - mm_modem_lock_get_string (unlock_retries_map[ctx->i].lock), - error->message); - g_error_free (error); - } else { - gint val; - GError *error = NULL; + mm_obj_dbg (self, "couldn't load retry count for lock '%s': %s", + mm_modem_lock_get_string (unlock_retries_map[ctx->i].lock), + error->message); + goto next; + } - val = mm_parse_csim_response (response, &error); - if (val < 0) { - mm_warn ("Parse error in step %d: %s.", ctx->i, error->message); - mm_dbg ("Couldn't parse retry count value for lock '%s'", - mm_modem_lock_get_string (unlock_retries_map[ctx->i].lock)); - } else - mm_unlock_retries_set (ctx->retries, unlock_retries_map[ctx->i].lock, val); + val = mm_parse_csim_response (response, &error); + if (val < 0) { + mm_obj_dbg (self, "couldn't parse retry count value for lock '%s': %s", + mm_modem_lock_get_string (unlock_retries_map[ctx->i].lock), + error->message); + goto next; } + mm_unlock_retries_set (ctx->retries, unlock_retries_map[ctx->i].lock, val); + +next: + g_clear_error (&error); + /* Go to next lock value */ ctx->i++; load_unlock_retries_context_step (task); @@ -1637,7 +1653,7 @@ self->priv->modem_cdma_evdo_network_supported = TRUE; g_object_notify (G_OBJECT (self), MM_IFACE_MODEM_CDMA_EVDO_NETWORK_SUPPORTED); } - mm_dbg ("Device allows (CDMA) 3G network mode"); + mm_obj_dbg (self, "device allows (CDMA) 3G network mode"); mode |= MM_MODEM_MODE_3G; } /* IS-707 is the 1xRTT family, which we consider as 2G */ @@ -1646,7 +1662,7 @@ self->priv->modem_cdma_cdma1x_network_supported = TRUE; g_object_notify (G_OBJECT (self), MM_IFACE_MODEM_CDMA_CDMA1X_NETWORK_SUPPORTED); } - mm_dbg ("Device allows (CDMA) 2G network mode"); + mm_obj_dbg (self, "device allows (CDMA) 2G network mode"); mode |= MM_MODEM_MODE_2G; } } @@ -1665,16 +1681,16 @@ } if (error) { - mm_dbg ("Generic query of supported CDMA networks failed: '%s'", error->message); + mm_obj_dbg (self, "generic query of supported CDMA networks failed: '%s'", error->message); g_error_free (error); /* Use defaults */ if (self->priv->modem_cdma_cdma1x_network_supported) { - mm_dbg ("Assuming device allows (CDMA) 2G network mode"); + mm_obj_dbg (self, "assuming device allows (CDMA) 2G network mode"); ctx->mode |= MM_MODEM_MODE_2G; } if (self->priv->modem_cdma_evdo_network_supported) { - mm_dbg ("Assuming device allows (CDMA) 3G network mode"); + mm_obj_dbg (self, "assuming device allows (CDMA) 3G network mode"); ctx->mode |= MM_MODEM_MODE_3G; } } @@ -1699,14 +1715,14 @@ response = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error); if (error) { - mm_dbg ("Generic query of supported 3GPP networks with WS46=? failed: '%s'", error->message); + mm_obj_dbg (self, "generic query of supported 3GPP networks with WS46=? failed: '%s'", error->message); g_error_free (error); goto out; } modes = mm_3gpp_parse_ws46_test_response (response, &error); if (!modes) { - mm_dbg ("Parsing WS46=? response failed: '%s'", error->message); + mm_obj_dbg (self, "parsing WS46=? response failed: '%s'", error->message); g_error_free (error); goto out; } @@ -1720,7 +1736,7 @@ ctx->mode |= mode; str = mm_modem_mode_build_string_from_mask (mode); - mm_dbg ("Device allows (3GPP) mode combination: %s", str); + mm_obj_dbg (self, "device allows (3GPP) mode combination: %s", str); g_free (str); } @@ -1753,7 +1769,7 @@ if (g_strstr_len (lower, -1, "gsm") || g_strstr_len (lower, -1, "gprs") || g_strstr_len (lower, -1, "edge")) { - mm_dbg ("Device allows (3GPP) 2G networks"); + mm_obj_dbg (self, "device allows (3GPP) 2G networks"); mode |= MM_MODEM_MODE_2G; } @@ -1761,12 +1777,12 @@ g_strstr_len (lower, -1, "hsdpa") || g_strstr_len (lower, -1, "hsupa") || g_strstr_len (lower, -1, "hspa+")) { - mm_dbg ("Device allows (3GPP) 3G networks"); + mm_obj_dbg (self, "device allows (3GPP) 3G networks"); mode |= MM_MODEM_MODE_3G; } if (g_strstr_len (lower, -1, "lte")) { - mm_dbg ("Device allows (3GPP) 4G networks"); + mm_obj_dbg (self, "device allows (3GPP) 4G networks"); mode |= MM_MODEM_MODE_4G; } @@ -1774,11 +1790,11 @@ /* If no expected ID found, log error */ if (mode == MM_MODEM_MODE_NONE) - mm_dbg ("Invalid list of supported networks reported by *CNTI: '%s'", response); + mm_obj_dbg (self, "invalid list of supported networks reported by *CNTI: '%s'", response); else ctx->mode |= mode; } else { - mm_dbg ("Generic query of supported 3GPP networks with *CNTI failed: '%s'", error->message); + mm_obj_dbg (self, "generic query of supported 3GPP networks with *CNTI failed: '%s'", error->message); g_error_free (error); } @@ -1850,7 +1866,7 @@ LoadSupportedModesContext *ctx; GTask *task; - mm_dbg ("loading supported modes..."); + mm_obj_dbg (self, "loading supported modes..."); ctx = g_new0 (LoadSupportedModesContext, 1); ctx->mode = MM_MODEM_MODE_NONE; @@ -1903,7 +1919,7 @@ if (response) { GList *formats, *l; - formats = mm_3gpp_parse_cgdcont_test_response (response, &error); + formats = mm_3gpp_parse_cgdcont_test_response (response, self, &error); for (l = formats; l; l = g_list_next (l)) mask |= ((MM3gppPdpContextFormat *)(l->data))->pdp_type; @@ -1925,7 +1941,7 @@ { GTask *task; - mm_dbg ("loading supported IP families..."); + mm_obj_dbg (self, "loading supported IP families..."); task = g_task_new (self, NULL, callback, user_data); if (mm_iface_modem_is_cdma_only (self)) { @@ -1979,7 +1995,7 @@ &pilot_pn, &pilot_energy, &rssi_dbm)) { - mm_dbg ("EVDO active pilot RSSI: %ddBm", rssi_dbm); + mm_obj_dbg (self, "EVDO active pilot RSSI: %ddBm", rssi_dbm); self->priv->evdo_pilot_rssi = rssi_dbm; } @@ -2080,8 +2096,8 @@ * try the other command if the first one fails. */ static const MMBaseModemAtCommand signal_quality_csq_sequence[] = { - { "+CSQ", 3, FALSE, response_processor_string_ignore_at_errors }, - { "+CSQ?", 3, FALSE, response_processor_string_ignore_at_errors }, + { "+CSQ", 3, FALSE, mm_base_modem_response_processor_string_ignore_at_errors }, + { "+CSQ?", 3, FALSE, mm_base_modem_response_processor_string_ignore_at_errors }, { NULL } }; @@ -2131,14 +2147,11 @@ GAsyncResult *res, GTask *task) { - SignalQualityContext *ctx; GError *error = NULL; const gchar *result; GByteArray *indicators; guint quality = 0; - ctx = g_task_get_task_data (task); - result = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error); if (error) { g_clear_error (&error); @@ -2147,19 +2160,17 @@ indicators = mm_3gpp_parse_cind_read_response (result, &error); if (!indicators) { - mm_dbg ("(%s) Could not parse CIND signal quality results: %s", - mm_port_get_device (MM_PORT (ctx->at_port)), - error->message); + mm_obj_dbg (self, "could not parse CIND signal quality results: %s", error->message); g_clear_error (&error); goto try_csq; } if (indicators->len < self->priv->modem_cind_indicator_signal_quality) { - mm_dbg ("(%s) Could not parse CIND signal quality results; signal " - "index (%u) outside received range (0-%u)", - mm_port_get_device (MM_PORT (ctx->at_port)), - self->priv->modem_cind_indicator_signal_quality, - indicators->len); + mm_obj_dbg (self, + "could not parse CIND signal quality results; signal " + "index (%u) outside received range (0-%u)", + self->priv->modem_cind_indicator_signal_quality, + indicators->len); } else { quality = g_array_index (indicators, guint8, @@ -2314,7 +2325,7 @@ GError *error = NULL; GTask *task; - mm_dbg ("loading signal quality..."); + mm_obj_dbg (self, "loading signal quality..."); ctx = g_new0 (SignalQualityContext, 1); task = g_task_new (self, NULL, callback, user_data); @@ -2345,7 +2356,7 @@ } ctx->qcdm_port = NULL; - mm_dbg ("Couldn't open QCDM port: %s", error->message); + mm_obj_dbg (self, "couldn't open QCDM port: %s", error->message); } /* Return the error we got when getting best AT port */ @@ -2405,24 +2416,25 @@ } static AccessTechAndMask * -access_tech_and_mask_new (AccessTechContext *ctx) +access_tech_and_mask_new (MMBroadbandModem *self, + AccessTechContext *ctx) { AccessTechAndMask *tech; MMModemAccessTechnology act = MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN; guint mask = MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN; if (ctx->fallback_mask) { - mm_dbg ("Fallback access technology: 0x%08x", ctx->fallback_act); + mm_obj_dbg (self, "fallback access technology: 0x%08x", ctx->fallback_act); act = ctx->fallback_act; mask = ctx->fallback_mask; goto done; } - mm_dbg ("QCDM operating mode: %d", ctx->opmode); - mm_dbg ("QCDM system mode: %d", ctx->sysmode); - mm_dbg ("QCDM hybrid pref: %d", ctx->hybrid); - mm_dbg ("QCDM WCDMA open: %d", ctx->wcdma_open); - mm_dbg ("QCDM EVDO open: %d", ctx->evdo_open); + mm_obj_dbg (self, "QCDM operating mode: %d", ctx->opmode); + mm_obj_dbg (self, "QCDM system mode: %d", ctx->sysmode); + mm_obj_dbg (self, "QCDM hybrid pref: %d", ctx->hybrid); + mm_obj_dbg (self, "QCDM WCDMA open: %d", ctx->wcdma_open); + mm_obj_dbg (self, "QCDM EVDO open: %d", ctx->evdo_open); if (ctx->opmode == QCDM_CMD_CM_SUBSYS_STATE_INFO_OPERATING_MODE_ONLINE) { switch (ctx->sysmode) { @@ -2461,6 +2473,8 @@ act = MM_MODEM_ACCESS_TECHNOLOGY_LTE; mask = MM_IFACE_MODEM_3GPP_ALL_ACCESS_TECHNOLOGIES_MASK; break; + default: + break; } } @@ -2476,6 +2490,7 @@ GAsyncResult *res, GTask *task) { + MMBroadbandModem *self; AccessTechContext *ctx; QcdmResult *result; gint err = QCDM_SUCCESS; @@ -2490,6 +2505,7 @@ return; } + self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); /* Parse the response */ @@ -2508,7 +2524,9 @@ ctx->wcdma_open = TRUE; } - g_task_return_pointer (task, access_tech_and_mask_new (ctx), g_free); + g_task_return_pointer (task, + access_tech_and_mask_new (MM_BROADBAND_MODEM (self), ctx), + g_free); g_object_unref (task); } @@ -2576,6 +2594,7 @@ GAsyncResult *res, GTask *task) { + MMBroadbandModem *self; AccessTechContext *ctx; QcdmResult *result; gint err = QCDM_SUCCESS; @@ -2591,7 +2610,8 @@ return; } - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); /* Parse the response */ result = qcdm_cmd_hdr_subsys_state_info_result ((const gchar *) response->data, @@ -2609,7 +2629,7 @@ ctx->evdo_open = TRUE; } - g_task_return_pointer (task, access_tech_and_mask_new (ctx), g_free); + g_task_return_pointer (task, access_tech_and_mask_new (self, ctx), g_free); g_object_unref (task); } @@ -2692,9 +2712,9 @@ ctx->fallback_mask = MM_IFACE_MODEM_CDMA_ALL_ACCESS_TECHNOLOGIES_MASK; } - mm_dbg ("EVDO registration: %d", self->priv->modem_cdma_evdo_registration_state); - mm_dbg ("CDMA1x registration: %d", self->priv->modem_cdma_cdma1x_registration_state); - mm_dbg ("Fallback access tech: 0x%08x", ctx->fallback_act); + mm_obj_dbg (self, "EVDO registration: %d", self->priv->modem_cdma_evdo_registration_state); + mm_obj_dbg (self, "CDMA1x registration: %d", self->priv->modem_cdma_cdma1x_registration_state); + mm_obj_dbg (self, "fallback access tech: 0x%08x", ctx->fallback_act); } static void @@ -2722,7 +2742,7 @@ if (mm_port_serial_open (MM_PORT_SERIAL (ctx->port), &error)) { g_object_ref (ctx->port); - mm_dbg ("loading access technologies via QCDM..."); + mm_obj_dbg (self, "loading access technologies via QCDM..."); /* FIXME: we may want to run both the CDMA and 3GPP in sequence to ensure * that a multi-mode device that's in CDMA-mode but still has 3GPP capabilities @@ -2763,7 +2783,7 @@ } ctx->port = NULL; - mm_dbg ("Couldn't open QCDM port: %s", error->message); + mm_obj_dbg (self, "couldn't open QCDM port: %s", error->message); g_clear_error (&error); } @@ -2773,7 +2793,9 @@ * guess access technologies from the registration information. */ access_tech_from_cdma_registration_state (MM_BROADBAND_MODEM (self), ctx); - g_task_return_pointer (task, access_tech_and_mask_new (ctx), g_free); + g_task_return_pointer (task, + access_tech_and_mask_new (MM_BROADBAND_MODEM (self), ctx), + g_free); } else { g_task_return_new_error (task, MM_CORE_ERROR, @@ -2813,7 +2835,7 @@ if (mm_base_bearer_get_status (bearer) == MM_BEARER_STATUS_DISCONNECTED) return; - mm_info ("Bearer %s: explicitly disconnected", mm_base_bearer_get_path (bearer)); + mm_obj_info (bearer, "explicitly disconnected"); mm_base_bearer_report_connection_status (bearer, MM_BEARER_CONNECTION_STATUS_DISCONNECTED); } @@ -2839,18 +2861,19 @@ cgev_process_detach (MMBroadbandModem *self, MM3gppCgev type) { - switch (type) { - case MM_3GPP_CGEV_NW_DETACH: - mm_info ("network forced PS detach: all contexts have been deactivated"); + if (type == MM_3GPP_CGEV_NW_DETACH) { + mm_obj_info (self, "network forced PS detach: all contexts have been deactivated"); bearer_list_report_disconnections (self, 0); - break; - case MM_3GPP_CGEV_ME_DETACH: - mm_info ("mobile equipment forced PS detach: all contexts have been deactivated"); + return; + } + + if (type == MM_3GPP_CGEV_ME_DETACH) { + mm_obj_info (self, "mobile equipment forced PS detach: all contexts have been deactivated"); bearer_list_report_disconnections (self, 0); - break; - default: - g_assert_not_reached (); + return; } + + g_assert_not_reached (); } static void @@ -2862,26 +2885,41 @@ guint cid = 0; if (!mm_3gpp_parse_cgev_indication_primary (str, type, &cid, &error)) { - mm_warn ("couldn't parse cid info from +CGEV indication '%s': %s", str, error->message); + mm_obj_warn (self, "couldn't parse cid info from +CGEV indication '%s': %s", str, error->message); g_error_free (error); return; } switch (type) { case MM_3GPP_CGEV_NW_ACT_PRIMARY: - mm_info ("network request to activate context (cid %u)", cid); + mm_obj_info (self, "network request to activate context (cid %u)", cid); break; case MM_3GPP_CGEV_ME_ACT_PRIMARY: - mm_info ("mobile equipment request to activate context (cid %u)", cid); + mm_obj_info (self, "mobile equipment request to activate context (cid %u)", cid); break; case MM_3GPP_CGEV_NW_DEACT_PRIMARY: - mm_info ("network request to deactivate context (cid %u)", cid); + mm_obj_info (self, "network request to deactivate context (cid %u)", cid); bearer_list_report_disconnections (self, cid); break; case MM_3GPP_CGEV_ME_DEACT_PRIMARY: - mm_info ("mobile equipment request to deactivate context (cid %u)", cid); + mm_obj_info (self, "mobile equipment request to deactivate context (cid %u)", cid); bearer_list_report_disconnections (self, cid); break; + case MM_3GPP_CGEV_UNKNOWN: + case MM_3GPP_CGEV_NW_DETACH: + case MM_3GPP_CGEV_ME_DETACH: + case MM_3GPP_CGEV_NW_CLASS: + case MM_3GPP_CGEV_ME_CLASS: + case MM_3GPP_CGEV_NW_ACT_SECONDARY: + case MM_3GPP_CGEV_ME_ACT_SECONDARY: + case MM_3GPP_CGEV_NW_DEACT_SECONDARY: + case MM_3GPP_CGEV_ME_DEACT_SECONDARY: + case MM_3GPP_CGEV_NW_DEACT_PDP: + case MM_3GPP_CGEV_ME_DEACT_PDP: + case MM_3GPP_CGEV_NW_MODIFY: + case MM_3GPP_CGEV_ME_MODIFY: + case MM_3GPP_CGEV_REJECT: + case MM_3GPP_CGEV_NW_REACT: default: g_assert_not_reached (); break; @@ -2898,26 +2936,41 @@ guint cid = 0; if (!mm_3gpp_parse_cgev_indication_secondary (str, type, &p_cid, &cid, NULL, &error)) { - mm_warn ("couldn't parse p_cid/cid info from +CGEV indication '%s': %s", str, error->message); + mm_obj_warn (self, "couldn't parse p_cid/cid info from +CGEV indication '%s': %s", str, error->message); g_error_free (error); return; } switch (type) { case MM_3GPP_CGEV_NW_ACT_SECONDARY: - mm_info ("network request to activate secondary context (cid %u, primary cid %u)", cid, p_cid); + mm_obj_info (self, "network request to activate secondary context (cid %u, primary cid %u)", cid, p_cid); break; case MM_3GPP_CGEV_ME_ACT_SECONDARY: - mm_info ("mobile equipment request to activate secondary context (cid %u, primary cid %u)", cid, p_cid); + mm_obj_info (self, "mobile equipment request to activate secondary context (cid %u, primary cid %u)", cid, p_cid); break; case MM_3GPP_CGEV_NW_DEACT_SECONDARY: - mm_info ("network request to deactivate secondary context (cid %u, primary cid %u)", cid, p_cid); + mm_obj_info (self, "network request to deactivate secondary context (cid %u, primary cid %u)", cid, p_cid); bearer_list_report_disconnections (self, cid); break; case MM_3GPP_CGEV_ME_DEACT_SECONDARY: - mm_info ("mobile equipment request to deactivate secondary context (cid %u, primary cid %u)", cid, p_cid); + mm_obj_info (self, "mobile equipment request to deactivate secondary context (cid %u, primary cid %u)", cid, p_cid); bearer_list_report_disconnections (self, cid); break; + case MM_3GPP_CGEV_UNKNOWN: + case MM_3GPP_CGEV_NW_DETACH: + case MM_3GPP_CGEV_ME_DETACH: + case MM_3GPP_CGEV_NW_CLASS: + case MM_3GPP_CGEV_ME_CLASS: + case MM_3GPP_CGEV_NW_ACT_PRIMARY: + case MM_3GPP_CGEV_ME_ACT_PRIMARY: + case MM_3GPP_CGEV_NW_DEACT_PRIMARY: + case MM_3GPP_CGEV_ME_DEACT_PRIMARY: + case MM_3GPP_CGEV_NW_DEACT_PDP: + case MM_3GPP_CGEV_ME_DEACT_PDP: + case MM_3GPP_CGEV_NW_MODIFY: + case MM_3GPP_CGEV_ME_MODIFY: + case MM_3GPP_CGEV_REJECT: + case MM_3GPP_CGEV_NW_REACT: default: g_assert_not_reached (); break; @@ -2935,36 +2988,51 @@ guint cid = 0; if (!mm_3gpp_parse_cgev_indication_pdp (str, type, &pdp_type, &pdp_addr, &cid, &error)) { - mm_warn ("couldn't parse PDP info from +CGEV indication '%s': %s", str, error->message); + mm_obj_warn (self, "couldn't parse PDP info from +CGEV indication '%s': %s", str, error->message); g_error_free (error); return; } switch (type) { case MM_3GPP_CGEV_REJECT: - mm_info ("network request to activate context (type %s, address %s) has been automatically rejected", pdp_type, pdp_addr); + mm_obj_info (self, "network request to activate context (type %s, address %s) has been automatically rejected", pdp_type, pdp_addr); break; case MM_3GPP_CGEV_NW_REACT: /* NOTE: we don't currently notify about automatic reconnections like this one */ if (cid) - mm_info ("network request to reactivate context (type %s, address %s, cid %u)", pdp_type, pdp_addr, cid); + mm_obj_info (self, "network request to reactivate context (type %s, address %s, cid %u)", pdp_type, pdp_addr, cid); else - mm_info ("network request to reactivate context (type %s, address %s, cid unknown)", pdp_type, pdp_addr); + mm_obj_info (self, "network request to reactivate context (type %s, address %s, cid unknown)", pdp_type, pdp_addr); break; case MM_3GPP_CGEV_NW_DEACT_PDP: if (cid) { - mm_info ("network request to deactivate context (type %s, address %s, cid %u)", pdp_type, pdp_addr, cid); + mm_obj_info (self, "network request to deactivate context (type %s, address %s, cid %u)", pdp_type, pdp_addr, cid); bearer_list_report_disconnections (self, cid); } else - mm_info ("network request to deactivate context (type %s, address %s, cid unknown)", pdp_type, pdp_addr); + mm_obj_info (self, "network request to deactivate context (type %s, address %s, cid unknown)", pdp_type, pdp_addr); break; case MM_3GPP_CGEV_ME_DEACT_PDP: if (cid) { - mm_info ("mobile equipment request to deactivate context (type %s, address %s, cid %u)", pdp_type, pdp_addr, cid); + mm_obj_info (self, "mobile equipment request to deactivate context (type %s, address %s, cid %u)", pdp_type, pdp_addr, cid); bearer_list_report_disconnections (self, cid); } else - mm_info ("mobile equipment request to deactivate context (type %s, address %s, cid unknown)", pdp_type, pdp_addr); + mm_obj_info (self, "mobile equipment request to deactivate context (type %s, address %s, cid unknown)", pdp_type, pdp_addr); break; + case MM_3GPP_CGEV_UNKNOWN: + case MM_3GPP_CGEV_NW_DETACH: + case MM_3GPP_CGEV_ME_DETACH: + case MM_3GPP_CGEV_NW_CLASS: + case MM_3GPP_CGEV_ME_CLASS: + case MM_3GPP_CGEV_NW_ACT_PRIMARY: + case MM_3GPP_CGEV_ME_ACT_PRIMARY: + case MM_3GPP_CGEV_NW_ACT_SECONDARY: + case MM_3GPP_CGEV_ME_ACT_SECONDARY: + case MM_3GPP_CGEV_NW_DEACT_PRIMARY: + case MM_3GPP_CGEV_ME_DEACT_PRIMARY: + case MM_3GPP_CGEV_NW_DEACT_SECONDARY: + case MM_3GPP_CGEV_ME_DEACT_SECONDARY: + case MM_3GPP_CGEV_NW_MODIFY: + case MM_3GPP_CGEV_ME_MODIFY: default: g_assert_not_reached (); break; @@ -3017,8 +3085,9 @@ case MM_3GPP_CGEV_ME_MODIFY: /* ignore */ break; + case MM_3GPP_CGEV_UNKNOWN: default: - mm_dbg ("unhandled +CGEV indication: %s", str); + mm_obj_dbg (self, "unhandled +CGEV indication: %s", str); break; } @@ -3043,9 +3112,9 @@ continue; /* Set/unset unsolicited CGEV event handler */ - mm_dbg ("(%s) %s 3GPP +CGEV unsolicited events handlers", - mm_port_get_device (MM_PORT (ports[i])), - enable ? "Setting" : "Removing"); + mm_obj_dbg (self, "%s 3GPP +CGEV unsolicited events handlers in %s", + enable ? "setting" : "removing", + mm_port_get_device (MM_PORT (ports[i]))); mm_port_serial_at_add_unsolicited_msg_handler ( ports[i], cgev_regex, @@ -3058,41 +3127,47 @@ } static void -ciev_received (MMPortSerialAt *port, - GMatchInfo *info, +ciev_signal_received (MMBroadbandModem *self, + GMatchInfo *match_info) +{ + guint quality; + + if (!mm_get_uint_from_match_info (match_info, 2, &quality)) { + mm_obj_dbg (self, "couldn't parse signal quality value from +CIEV"); + return; + } + + mm_iface_modem_update_signal_quality ( + MM_IFACE_MODEM (self), + normalize_ciev_cind_signal_quality (quality, + self->priv->modem_cind_min_signal_quality, + self->priv->modem_cind_max_signal_quality)); +} + +static void +ciev_received (MMPortSerialAt *port, + GMatchInfo *match_info, MMBroadbandModem *self) { - gint ind = 0; + guint ind; gchar *item; - item = g_match_info_fetch (info, 1); - if (item) - ind = atoi (item); - - /* Handle signal quality change indication */ - if (ind == self->priv->modem_cind_indicator_signal_quality || - g_str_equal (item, "signal")) { - gchar *value; - - value = g_match_info_fetch (info, 2); - if (value) { - gint quality = 0; - - quality = atoi (value); - - mm_iface_modem_update_signal_quality ( - MM_IFACE_MODEM (self), - normalize_ciev_cind_signal_quality (quality, - self->priv->modem_cind_min_signal_quality, - self->priv->modem_cind_max_signal_quality)); - g_free (value); - } + item = mm_get_string_unquoted_from_match_info (match_info, 1); + if (!item) + return; + + /* numeric index? */ + if (mm_get_uint_from_str (item, &ind)) { + if (ind == self->priv->modem_cind_indicator_signal_quality) + ciev_signal_received (self, match_info); + } + /* string index? */ + else { + if (g_str_equal (item, "signal")) + ciev_signal_received (self, match_info); } g_free (item); - - /* FIXME: handle roaming and service indicators. - * ... wait, arent these already handle by unsolicited CREG responses? */ } static void @@ -3113,9 +3188,9 @@ continue; /* Set/unset unsolicited CIEV event handler */ - mm_dbg ("(%s) %s 3GPP +CIEV unsolicited events handlers", - mm_port_get_device (MM_PORT (ports[i])), - enable ? "Setting" : "Removing"); + mm_obj_dbg (self, "%s 3GPP +CIEV unsolicited events handlers in %s", + enable ? "setting" : "removing", + mm_port_get_device (MM_PORT (ports[i]))); mm_port_serial_at_add_unsolicited_msg_handler ( ports[i], ciev_regex, @@ -3156,12 +3231,13 @@ result = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error); if (!result) { - mm_dbg ("+CGEREP check failed, marking packet domain event reporting as unsupported: '%s'", error->message); + mm_obj_dbg (self, "+CGEREP check failed: %s", error->message); + mm_obj_dbg (self, "packet domain event reporting is unsupported"); g_error_free (error); goto out; } - mm_dbg ("Modem supports packet domain event reporting"); + mm_obj_dbg (self, "packet domain event reporting is supported"); self->priv->modem_cgerep_supported = TRUE; out: @@ -3181,18 +3257,19 @@ gchar *aux; result = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error); - if (error || !mm_3gpp_parse_cmer_test_response (result, &supported_modes, &supported_inds, &error)) { - mm_dbg ("+CMER check failed, marking indications as unsupported: '%s'", error->message); + if (error || !mm_3gpp_parse_cmer_test_response (result, self, &supported_modes, &supported_inds, &error)) { + mm_obj_dbg (self, "+CMER check failed: %s", error->message); + mm_obj_dbg (self, "generic indications are unsupported"); g_error_free (error); goto out; } aux = mm_3gpp_cmer_mode_build_string_from_mask (supported_modes); - mm_dbg ("Supported +CMER modes: %s", aux); + mm_obj_dbg (self, "supported +CMER modes: %s", aux); g_free (aux); aux = mm_3gpp_cmer_ind_build_string_from_mask (supported_inds); - mm_dbg ("Supported +CMER indication settings: %s", aux); + mm_obj_dbg (self, "supported +CMER indication settings: %s", aux); g_free (aux); /* Flag +CMER supported values */ @@ -3205,14 +3282,14 @@ self->priv->modem_cmer_enable_mode = MM_3GPP_CMER_MODE_DISCARD_URCS_IF_LINK_RESERVED; aux = mm_3gpp_cmer_mode_build_string_from_mask (self->priv->modem_cmer_enable_mode); - mm_dbg ("+CMER enable mode: %s", aux); + mm_obj_dbg (self, "+CMER enable mode: %s", aux); g_free (aux); if (supported_modes & MM_3GPP_CMER_MODE_DISCARD_URCS) self->priv->modem_cmer_disable_mode = MM_3GPP_CMER_MODE_DISCARD_URCS; aux = mm_3gpp_cmer_mode_build_string_from_mask (self->priv->modem_cmer_disable_mode); - mm_dbg ("+CMER disable mode: %s", aux); + mm_obj_dbg (self, "+CMER disable mode: %s", aux); g_free (aux); if (supported_inds & MM_3GPP_CMER_IND_ENABLE_NOT_CAUSED_BY_CIND) @@ -3221,7 +3298,7 @@ self->priv->modem_cmer_ind = MM_3GPP_CMER_IND_ENABLE_ALL; aux = mm_3gpp_cmer_ind_build_string_from_mask (self->priv->modem_cmer_ind); - mm_dbg ("+CMER indication setting: %s", aux); + mm_obj_dbg (self, "+CMER indication setting: %s", aux); g_free (aux); out: @@ -3243,7 +3320,8 @@ if (error || !(indicators = mm_3gpp_parse_cind_test_response (result, &error))) { /* unsupported indications */ - mm_dbg ("+CIND check failed, marking indications as unsupported: '%s'", error->message); + mm_obj_dbg (self, "+CIND check failed: %s", error->message); + mm_obj_dbg (self, "generic indications are unsupported"); g_error_free (error); /* go on with remaining checks */ check_and_setup_3gpp_urc_support (task); @@ -3261,11 +3339,10 @@ self->priv->modem_cind_min_signal_quality = mm_3gpp_cind_response_get_min (r); self->priv->modem_cind_max_signal_quality = mm_3gpp_cind_response_get_max (r); - mm_dbg ("Modem supports signal quality indications via CIND at index '%u'" - "(min: %u, max: %u)", - self->priv->modem_cind_indicator_signal_quality, - self->priv->modem_cind_min_signal_quality, - self->priv->modem_cind_max_signal_quality); + mm_obj_dbg (self, "signal quality indications via CIND are supported at index '%u' (min: %u, max: %u)", + self->priv->modem_cind_indicator_signal_quality, + self->priv->modem_cind_min_signal_quality, + self->priv->modem_cind_max_signal_quality); } else self->priv->modem_cind_indicator_signal_quality = CIND_INDICATOR_INVALID; @@ -3273,8 +3350,8 @@ r = g_hash_table_lookup (indicators, "roam"); if (r) { self->priv->modem_cind_indicator_roaming = mm_3gpp_cind_response_get_index (r); - mm_dbg ("Modem supports roaming indications via CIND at index '%u'", - self->priv->modem_cind_indicator_roaming); + mm_obj_dbg (self, "roaming indications via CIND are supported at index '%u'", + self->priv->modem_cind_indicator_roaming); } else self->priv->modem_cind_indicator_roaming = CIND_INDICATOR_INVALID; @@ -3282,8 +3359,8 @@ r = g_hash_table_lookup (indicators, "service"); if (r) { self->priv->modem_cind_indicator_service = mm_3gpp_cind_response_get_index (r); - mm_dbg ("Modem supports service indications via CIND at index '%u'", - self->priv->modem_cind_indicator_service); + mm_obj_dbg (self, "service indications via CIND are supported at index '%u'", + self->priv->modem_cind_indicator_service); } else self->priv->modem_cind_indicator_service = CIND_INDICATOR_INVALID; @@ -3307,7 +3384,7 @@ /* Check support for +CIEV indications, managed with +CIND/+CMER */ if (!self->priv->modem_cind_disabled && !self->priv->modem_cind_support_checked) { - mm_dbg ("Checking indicator support..."); + mm_obj_dbg (self, "checking indicator support..."); self->priv->modem_cind_support_checked = TRUE; mm_base_modem_at_command (MM_BASE_MODEM (self), "+CIND=?", @@ -3320,7 +3397,7 @@ /* Check support for +CGEV indications, managed with +CGEREP */ if (!self->priv->modem_cgerep_support_checked) { - mm_dbg ("Checking packet domain event reporting..."); + mm_obj_dbg (self, "checking packet domain event reporting..."); self->priv->modem_cgerep_support_checked = TRUE; mm_base_modem_at_command (MM_BASE_MODEM (self), "+CGEREP=?", @@ -3413,9 +3490,9 @@ ctx = g_task_get_task_data (task); if (!mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error)) { - mm_dbg ("Couldn't %s event reporting: '%s'", - ctx->enable ? "enable" : "disable", - error->message); + mm_obj_dbg (self, "couldn't %s event reporting: '%s'", + ctx->enable ? "enable" : "disable", + error->message); g_error_free (error); } @@ -3436,28 +3513,28 @@ /* CMER on primary port */ if (!ctx->cmer_primary_done && ctx->cmer_command && ctx->primary && !self->priv->modem_cind_disabled) { - mm_dbg ("%s +CIND event reporting in primary port...", ctx->enable ? "Enabling" : "Disabling"); + mm_obj_dbg (self, "%s +CIND event reporting in primary port...", ctx->enable ? "enabling" : "disabling"); ctx->cmer_primary_done = TRUE; command = ctx->cmer_command; port = ctx->primary; } /* CMER on secondary port */ else if (!ctx->cmer_secondary_done && ctx->cmer_command && ctx->secondary && !self->priv->modem_cind_disabled) { - mm_dbg ("%s +CIND event reporting in secondary port...", ctx->enable ? "Enabling" : "Disabling"); + mm_obj_dbg (self, "%s +CIND event reporting in secondary port...", ctx->enable ? "enabling" : "disabling"); ctx->cmer_secondary_done = TRUE; command = ctx->cmer_command; port = ctx->secondary; } /* CGEREP on primary port */ else if (!ctx->cgerep_primary_done && ctx->cgerep_command && ctx->primary) { - mm_dbg ("%s +CGEV event reporting in primary port...", ctx->enable ? "Enabling" : "Disabling"); + mm_obj_dbg (self, "%s +CGEV event reporting in primary port...", ctx->enable ? "enabling" : "disabling"); ctx->cgerep_primary_done = TRUE; command = ctx->cgerep_command; port = ctx->primary; } /* CGEREP on secondary port */ else if (!ctx->cgerep_secondary_done && ctx->cgerep_command && ctx->secondary) { - mm_dbg ("%s +CGEV event reporting in secondary port...", ctx->enable ? "Enabling" : "Disabling"); + mm_obj_dbg (self, "%s +CGEV event reporting in secondary port...", ctx->enable ? "enabling" : "disabling"); ctx->cgerep_secondary_done = TRUE; port = ctx->secondary; command = ctx->cgerep_command; @@ -3542,14 +3619,14 @@ * First one with quotes * Second without. * + last NUL */ - MMBaseModemAtCommand charset_commands[3]; + MMBaseModemAtCommandAlloc charset_commands[3]; } SetupCharsetContext; static void setup_charset_context_free (SetupCharsetContext *ctx) { - g_free (ctx->charset_commands[0].command); - g_free (ctx->charset_commands[1].command); + mm_base_modem_at_command_alloc_clear (&ctx->charset_commands[0]); + mm_base_modem_at_command_alloc_clear (&ctx->charset_commands[1]); g_free (ctx); } @@ -3677,7 +3754,7 @@ /* Launch sequence */ mm_base_modem_at_sequence ( MM_BASE_MODEM (self), - ctx->charset_commands, + (const MMBaseModemAtCommand *)ctx->charset_commands, NULL, /* response_processor_context */ NULL, /* response_processor_context_free */ (GAsyncReadyCallback)charset_change_ready, @@ -3738,7 +3815,7 @@ /* CDMA-only modems don't need this */ if (mm_iface_modem_is_cdma_only (self)) { - mm_dbg ("Skipping supported charset loading in CDMA-only modem..."); + mm_obj_dbg (self, "skipping supported charset loading in CDMA-only modem..."); g_task_return_int (task, MM_MODEM_CHARSET_UNKNOWN); g_object_unref (task); return; @@ -3787,7 +3864,7 @@ goto out; /* Parse response */ - flow_control_supported = mm_parse_ifc_test_response (response, &error); + flow_control_supported = mm_parse_ifc_test_response (response, self, &error); if (flow_control_supported == MM_FLOW_CONTROL_UNKNOWN) goto out; flow_control_supported_str = mm_flow_control_build_string_from_mask (flow_control_supported); @@ -3814,7 +3891,7 @@ return; } - mm_dbg ("Flow control settings explicitly requested (%s)", flow_control_requested_str); + mm_obj_dbg (self, "flow control settings explicitly requested: %s", flow_control_requested_str); flow_control_selected = flow_control_requested; flow_control_selected_str = flow_control_requested_str; } else { @@ -3833,7 +3910,7 @@ else g_assert_not_reached (); flow_control_selected_str = mm_flow_control_build_string_from_mask (flow_control_selected); - mm_dbg ("Flow control settings automatically selected (%s)", flow_control_selected_str); + mm_obj_dbg (self, "flow control settings automatically selected: %s", flow_control_selected_str); } /* Select flow control for all connections */ @@ -3851,6 +3928,7 @@ case MM_FLOW_CONTROL_NONE: cmd = "+IFC=0,0"; break; + case MM_FLOW_CONTROL_UNKNOWN: default: g_assert_not_reached (); } @@ -3862,7 +3940,7 @@ /* Ignore errors */ if (error) { - mm_dbg ("couldn't load supported flow control methods: %s", error->message); + mm_obj_dbg (self, "couldn't load supported flow control methods: %s", error->message); g_error_free (error); } @@ -3936,13 +4014,13 @@ /* CDMA-only modems don't need this */ if (mm_iface_modem_is_cdma_only (self)) { - mm_dbg ("Assuming full power state in CDMA-only modem..."); + mm_obj_dbg (self, "assuming full power state in CDMA-only modem..."); g_task_return_int (task, MM_MODEM_POWER_STATE_ON); g_object_unref (task); return; } - mm_dbg ("loading power state..."); + mm_obj_dbg (self, "loading power state..."); mm_base_modem_at_command (MM_BASE_MODEM (self), "+CFUN?", 3, @@ -3974,7 +4052,7 @@ /* CDMA-only modems don't need this */ if (mm_iface_modem_is_cdma_only (self)) - mm_dbg ("Skipping Power-up in CDMA-only modem..."); + mm_obj_dbg (self, "skipping power-up in CDMA-only modem..."); else mm_base_modem_at_command (MM_BASE_MODEM (self), "+CFUN=1", @@ -4036,22 +4114,23 @@ } if (ctx->retries > 0) { - mm_warn ("could not load SIM identifier: %s (%d retries left)", - error->message, ctx->retries); + mm_obj_warn (self, "could not load SIM identifier: %s (%d retries left)", + error->message, ctx->retries); --ctx->retries; g_clear_error (&error); g_timeout_add_seconds (1, (GSourceFunc) load_sim_identifier, task); return; } - mm_warn ("could not load SIM identifier: %s", error->message); + mm_obj_warn (self, "could not load SIM identifier: %s", error->message); g_task_return_error (task, error); goto out; } if (g_strcmp0 (current_simid, cached_simid) != 0) { - mm_info ("sim identifier has changed: possible SIM swap during power down/low"); - mm_broadband_modem_update_sim_hot_swap_detected (self); + mm_obj_info (self, "sim identifier has changed: %s -> %s - possible SIM swap", + cached_simid, current_simid); + mm_broadband_modem_sim_hot_swap_detected (self); } g_task_return_boolean (task, TRUE); @@ -4076,13 +4155,14 @@ static void modem_check_for_sim_swap (MMIfaceModem *self, + const gchar *iccid, GAsyncReadyCallback callback, gpointer user_data) { GTask *task; SimSwapContext *ctx; - mm_dbg ("Checking if SIM was swapped..."); + mm_obj_dbg (self, "checking if SIM was swapped..."); task = g_task_new (self, NULL, callback, user_data); ctx = g_slice_new0 (SimSwapContext); @@ -4093,10 +4173,42 @@ MM_IFACE_MODEM_SIM, &ctx->sim, NULL); if (!ctx->sim) { - g_task_return_new_error (task, - MM_CORE_ERROR, - MM_CORE_ERROR_FAILED, - "could not acquire sim object"); + MMModemState modem_state; + + modem_state = MM_MODEM_STATE_UNKNOWN; + g_object_get (self, + MM_IFACE_MODEM_STATE, &modem_state, + NULL); + + if (modem_state == MM_MODEM_STATE_FAILED) { + mm_obj_info (self, "new SIM detected, handle as SIM hot-swap"); + mm_broadband_modem_sim_hot_swap_detected (MM_BROADBAND_MODEM (self)); + g_task_return_boolean (task, TRUE); + } else { + g_task_return_new_error (task, + MM_CORE_ERROR, + MM_CORE_ERROR_FAILED, + "could not acquire sim object"); + } + g_object_unref (task); + return; + } + + /* We may or may not get the new SIM identifier (iccid). In case + * we've got it, the load_sim_identifier phase can be skipped. */ + if (iccid) { + const gchar *cached_simid; + + cached_simid = mm_gdbus_sim_get_sim_identifier (MM_GDBUS_SIM (ctx->sim)); + if (!cached_simid || g_strcmp0 (iccid, cached_simid) != 0) { + mm_obj_info (self, "detected ICCID change (%s -> %s), handle as SIM hot-swap", + cached_simid ? cached_simid : "", + iccid); + mm_broadband_modem_sim_hot_swap_detected (MM_BROADBAND_MODEM (self)); + } else + mm_obj_dbg (self, "ICCID not changed"); + + g_task_return_boolean (task, TRUE); g_object_unref (task); return; } @@ -4158,7 +4270,7 @@ result = mm_strip_tag (result, "+CGSN:"); mm_parse_gsn (result, &imei, NULL, NULL); - mm_dbg ("loaded IMEI: %s", imei); + mm_obj_dbg (self, "loaded IMEI: %s", imei); return imei; } @@ -4167,7 +4279,7 @@ GAsyncReadyCallback callback, gpointer user_data) { - mm_dbg ("loading IMEI..."); + mm_obj_dbg (self, "loading IMEI..."); mm_base_modem_at_command (MM_BASE_MODEM (self), "+CGSN", 3, @@ -4301,7 +4413,7 @@ gchar *str; str = mm_modem_3gpp_facility_build_string_from_mask (MM_BROADBAND_MODEM (self)->priv->modem_3gpp_ignored_facility_locks); - mm_dbg ("Ignoring facility locks: '%s'", str); + mm_obj_dbg (self, "ignoring facility locks: '%s'", str); g_free (str); ctx->facilities &= ~MM_BROADBAND_MODEM (self)->priv->modem_3gpp_ignored_facility_locks; @@ -4327,7 +4439,7 @@ task = g_task_new (self, NULL, callback, user_data); g_task_set_task_data (task, ctx, g_free); - mm_dbg ("loading enabled facility locks..."); + mm_obj_dbg (self, "loading enabled facility locks..."); mm_base_modem_at_command (MM_BASE_MODEM (self), "+CLCK=?", 3, @@ -4359,9 +4471,9 @@ error)) return NULL; - mm_3gpp_normalize_operator (&operator_code, MM_BROADBAND_MODEM (self)->priv->modem_current_charset); + mm_3gpp_normalize_operator (&operator_code, MM_BROADBAND_MODEM (self)->priv->modem_current_charset, self); if (operator_code) - mm_dbg ("loaded Operator Code: %s", operator_code); + mm_obj_dbg (self, "loaded Operator Code: %s", operator_code); return operator_code; } @@ -4370,7 +4482,7 @@ GAsyncReadyCallback callback, gpointer user_data) { - mm_dbg ("loading Operator Code..."); + mm_obj_dbg (self, "loading Operator Code..."); mm_base_modem_at_command (MM_BASE_MODEM (self), "+COPS=3,2", 3, FALSE, NULL, NULL); mm_base_modem_at_command (MM_BASE_MODEM (self), "+COPS?", 3, FALSE, callback, user_data); } @@ -4398,9 +4510,9 @@ error)) return NULL; - mm_3gpp_normalize_operator (&operator_name, MM_BROADBAND_MODEM (self)->priv->modem_current_charset); + mm_3gpp_normalize_operator (&operator_name, MM_BROADBAND_MODEM (self)->priv->modem_current_charset, self); if (operator_name) - mm_dbg ("loaded Operator Name: %s", operator_name); + mm_obj_dbg (self, "loaded Operator Name: %s", operator_name); return operator_name; } @@ -4409,7 +4521,7 @@ GAsyncReadyCallback callback, gpointer user_data) { - mm_dbg ("loading Operator Name..."); + mm_obj_dbg (self, "loading Operator Name..."); mm_base_modem_at_command (MM_BASE_MODEM (self), "+COPS=3,0", 3, FALSE, NULL, NULL); mm_base_modem_at_command (MM_BASE_MODEM (self), "+COPS?", 3, FALSE, callback, user_data); } @@ -4437,7 +4549,7 @@ GAsyncReadyCallback callback, gpointer user_data) { - mm_dbg ("loading UE mode of operation for EPS..."); + mm_obj_dbg (self, "loading UE mode of operation for EPS..."); mm_base_modem_at_command (MM_BASE_MODEM (self), "+CEMODE?", 3, @@ -4465,7 +4577,7 @@ { gchar *cmd; - mm_dbg ("updating UE mode of operation for EPS..."); + mm_obj_dbg (self, "updating UE mode of operation for EPS..."); cmd = mm_3gpp_build_cemode_set_request (mode); mm_base_modem_at_command (MM_BASE_MODEM (self), cmd, @@ -4497,18 +4609,21 @@ MMModemAccessTechnology act = MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN; gboolean cgreg = FALSE; gboolean cereg = FALSE; + gboolean c5greg = FALSE; GError *error = NULL; if (!mm_3gpp_parse_creg_response (match_info, + self, &state, &lac, &cell_id, &act, &cgreg, &cereg, + &c5greg, &error)) { - mm_warn ("error parsing unsolicited registration: %s", - error && error->message ? error->message : "(unknown)"); + mm_obj_warn (self, "error parsing unsolicited registration: %s", + error && error->message ? error->message : "(unknown)"); g_clear_error (&error); return; } @@ -4516,7 +4631,7 @@ /* Report new registration state and fix LAC/TAC. * According to 3GPP TS 27.007: * - If CREG reports 7 (LTE) then the field contains TAC - * - CEREG always reports TAC + * - CEREG/C5GREG always reports TAC */ if (cgreg) mm_iface_modem_3gpp_update_ps_registration_state (MM_IFACE_MODEM_3GPP (self), state); @@ -4524,6 +4639,10 @@ tac = lac; lac = 0; mm_iface_modem_3gpp_update_eps_registration_state (MM_IFACE_MODEM_3GPP (self), state); + } else if (c5greg) { + tac = lac; + lac = 0; + mm_iface_modem_3gpp_update_5gs_registration_state (MM_IFACE_MODEM_3GPP (self), state); } else { if (act == MM_MODEM_ACCESS_TECHNOLOGY_LTE) { tac = lac; @@ -4564,8 +4683,8 @@ if (!ports[i]) continue; - mm_dbg ("(%s) setting up 3GPP unsolicited registration messages handlers", - mm_port_get_device (MM_PORT (ports[i]))); + mm_obj_dbg (self, "setting up 3GPP unsolicited registration messages handlers in %s", + mm_port_get_device (MM_PORT (ports[i]))); for (j = 0; j < array->len; j++) { mm_port_serial_at_add_unsolicited_msg_handler ( MM_PORT_SERIAL_AT (ports[i]), @@ -4613,9 +4732,8 @@ if (!ports[i]) continue; - mm_dbg ("(%s) cleaning up unsolicited registration messages handlers", - mm_port_get_device (MM_PORT (ports[i]))); - + mm_obj_dbg (self, "cleaning up unsolicited registration messages handlers in %s", + mm_port_get_device (MM_PORT (ports[i]))); for (j = 0; j < array->len; j++) { mm_port_serial_at_add_unsolicited_msg_handler ( MM_PORT_SERIAL_AT (ports[i]), @@ -4646,7 +4764,7 @@ if (!result) return NULL; - return mm_3gpp_parse_cops_test_response (result, error); + return mm_3gpp_parse_cops_test_response (result, MM_BROADBAND_MODEM (self)->priv->modem_current_charset, self, error); } static void @@ -4666,34 +4784,109 @@ /* Register in network (3GPP interface) */ static gboolean -modem_3gpp_register_in_network_finish (MMIfaceModem3gpp *self, - GAsyncResult *res, - GError **error) +modem_3gpp_register_in_network_finish (MMIfaceModem3gpp *self, + GAsyncResult *res, + GError **error) { - return !!mm_base_modem_at_command_full_finish (MM_BASE_MODEM (self), res, error); + return g_task_propagate_boolean (G_TASK (res), error); } static void -modem_3gpp_register_in_network (MMIfaceModem3gpp *self, - const gchar *operator_id, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) +cops_set_ready (MMBaseModem *self, + GAsyncResult *res, + GTask *task) { - gchar *command; + GError *error = NULL; - /* If the user sent a specific network to use, lock it in. */ - if (operator_id) - command = g_strdup_printf ("+COPS=1,2,\"%s\"", operator_id); - /* If no specific network was given, and the modem is not registered and not - * searching, kick it to search for a network. Also do auto registration if - * the modem had been set to manual registration last time but now is not. - */ + if (!mm_base_modem_at_command_full_finish (MM_BASE_MODEM (self), res, &error)) + g_task_return_error (task, error); else + g_task_return_boolean (task, TRUE); + g_object_unref (task); +} + +static void +cops_ascii_set_ready (MMBaseModem *_self, + GAsyncResult *res, + GTask *task) +{ + MMBroadbandModem *self = MM_BROADBAND_MODEM (_self); + g_autoptr(GError) error = NULL; + + if (!mm_base_modem_at_command_full_finish (_self, res, &error)) { + /* If it failed with an unsupported error, retry with current modem charset */ + if (g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_NOT_SUPPORTED)) { + g_autoptr(GError) enc_error = NULL; + g_autofree gchar *operator_id_enc = NULL; + gchar *operator_id; + + /* try to encode to current charset */ + operator_id = g_task_get_task_data (task); + operator_id_enc = mm_modem_charset_str_from_utf8 (operator_id, self->priv->modem_current_charset, FALSE, &enc_error); + if (!operator_id_enc) { + mm_obj_dbg (self, "couldn't convert operator id to current charset: %s", enc_error->message); + g_task_return_error (task, g_steal_pointer (&error)); + g_object_unref (task); + return; + } + + /* retry only if encoded string is different to the non-encoded one */ + if (g_strcmp0 (operator_id, operator_id_enc) != 0) { + g_autofree gchar *command = NULL; + + command = g_strdup_printf ("+COPS=1,2,\"%s\"", operator_id_enc); + mm_base_modem_at_command_full (_self, + mm_base_modem_peek_best_at_port (_self, NULL), + command, + 120, + FALSE, + FALSE, /* raw */ + g_task_get_cancellable (task), + (GAsyncReadyCallback)cops_set_ready, + task); + return; + } + } + g_task_return_error (task, g_steal_pointer (&error)); + } else + g_task_return_boolean (task, TRUE); + g_object_unref (task); +} + +static void +modem_3gpp_register_in_network (MMIfaceModem3gpp *self, + const gchar *operator_id, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + GTask *task; + gchar *command; + + task = g_task_new (self, cancellable, callback, user_data); + + /* Trigger automatic network registration if no explicit operator id given */ + if (!operator_id) { /* Note that '+COPS=0,,' (same but with commas) won't work in some Nokia * phones */ - command = g_strdup ("+COPS=0"); + mm_base_modem_at_command_full (MM_BASE_MODEM (self), + mm_base_modem_peek_best_at_port (MM_BASE_MODEM (self), NULL), + "+COPS=0", + 120, + FALSE, + FALSE, /* raw */ + cancellable, + (GAsyncReadyCallback)cops_set_ready, + task); + return; + } + + /* Store operator id in context, in case we need to retry with the current + * modem charset */ + g_task_set_task_data (task, g_strdup (operator_id), g_free); + /* Use the operator id given in ASCII initially */ + command = g_strdup_printf ("+COPS=1,2,\"%s\"", operator_id); mm_base_modem_at_command_full (MM_BASE_MODEM (self), mm_base_modem_peek_best_at_port (MM_BASE_MODEM (self), NULL), command, @@ -4701,8 +4894,8 @@ FALSE, FALSE, /* raw */ cancellable, - callback, - user_data); + (GAsyncReadyCallback)cops_ascii_set_ready, + task); g_free (command); } @@ -4710,36 +4903,38 @@ /* Registration checks (3GPP interface) */ typedef struct { - gboolean cs_supported; - gboolean ps_supported; - gboolean eps_supported; + gboolean is_cs_supported; + gboolean is_ps_supported; + gboolean is_eps_supported; + gboolean is_5gs_supported; gboolean run_cs; gboolean run_ps; gboolean run_eps; + gboolean run_5gs; gboolean running_cs; gboolean running_ps; gboolean running_eps; - GError *cs_error; - GError *ps_error; - GError *eps_error; + gboolean running_5gs; + GError *error_cs; + GError *error_ps; + GError *error_eps; + GError *error_5gs; } RunRegistrationChecksContext; static void run_registration_checks_context_free (RunRegistrationChecksContext *ctx) { - if (ctx->cs_error) - g_error_free (ctx->cs_error); - if (ctx->ps_error) - g_error_free (ctx->ps_error); - if (ctx->eps_error) - g_error_free (ctx->eps_error); + g_clear_error (&ctx->error_cs); + g_clear_error (&ctx->error_ps); + g_clear_error (&ctx->error_eps); + g_clear_error (&ctx->error_5gs); g_free (ctx); } static gboolean -modem_3gpp_run_registration_checks_finish (MMIfaceModem3gpp *self, - GAsyncResult *res, - GError **error) +modem_3gpp_run_registration_checks_finish (MMIfaceModem3gpp *self, + GAsyncResult *res, + GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } @@ -4747,9 +4942,26 @@ static void run_registration_checks_context_step (GTask *task); static void +run_registration_checks_context_set_error (RunRegistrationChecksContext *ctx, + GError *error) +{ + g_assert (error != NULL); + if (ctx->running_cs) + ctx->error_cs = error; + else if (ctx->running_ps) + ctx->error_ps = error; + else if (ctx->running_eps) + ctx->error_eps = error; + else if (ctx->running_5gs) + ctx->error_5gs = error; + else + g_assert_not_reached (); +} + +static void registration_status_check_ready (MMBroadbandModem *self, - GAsyncResult *res, - GTask *task) + GAsyncResult *res, + GTask *task) { RunRegistrationChecksContext *ctx; const gchar *response; @@ -4757,31 +4969,23 @@ GMatchInfo *match_info = NULL; guint i; gboolean parsed; - gboolean cgreg; - gboolean cereg; - MMModem3gppRegistrationState state; - MMModemAccessTechnology act; - gulong lac; - gulong tac; - gulong cid; + gboolean cgreg = FALSE; + gboolean cereg = FALSE; + gboolean c5greg = FALSE; + MMModem3gppRegistrationState state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; + MMModemAccessTechnology act = MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN; + gulong lac = 0; + gulong tac = 0; + gulong cid = 0; ctx = g_task_get_task_data (task); /* Only one must be running */ - g_assert ((ctx->running_cs ? 1 : 0) + - (ctx->running_ps ? 1 : 0) + - (ctx->running_eps ? 1 : 0) == 1); + g_assert ((ctx->running_cs + ctx->running_ps + ctx->running_eps + ctx->running_5gs) == 1); response = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error); if (!response) { - g_assert (error != NULL); - if (ctx->running_cs) - ctx->cs_error = error; - else if (ctx->running_ps) - ctx->ps_error = error; - else - ctx->eps_error = error; - + run_registration_checks_context_set_error (ctx, error); run_registration_checks_context_step (task); return; } @@ -4799,8 +5003,7 @@ for (i = 0; i < self->priv->modem_3gpp_registration_regex->len; i++) { - if (g_regex_match ((GRegex *)g_ptr_array_index ( - self->priv->modem_3gpp_registration_regex, i), + if (g_regex_match ((GRegex *)g_ptr_array_index (self->priv->modem_3gpp_registration_regex, i), response, 0, &match_info)) @@ -4814,31 +5017,20 @@ MM_CORE_ERROR_FAILED, "Unknown registration status response: '%s'", response); - if (ctx->running_cs) - ctx->cs_error = error; - else if (ctx->running_ps) - ctx->ps_error = error; - else - ctx->eps_error = error; - + run_registration_checks_context_set_error (ctx, error); run_registration_checks_context_step (task); return; } - cgreg = FALSE; - cereg = FALSE; - state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; - act = MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN; - tac = 0; - lac = 0; - cid = 0; parsed = mm_3gpp_parse_creg_response (match_info, + self, &state, &lac, &cid, &act, &cgreg, &cereg, + &c5greg, &error); g_match_info_free (match_info); @@ -4848,12 +5040,7 @@ MM_CORE_ERROR_FAILED, "Error parsing registration response: '%s'", response); - if (ctx->running_cs) - ctx->cs_error = error; - else if (ctx->running_ps) - ctx->ps_error = error; - else - ctx->eps_error = error; + run_registration_checks_context_set_error (ctx, error); run_registration_checks_context_step (task); return; } @@ -4865,27 +5052,43 @@ */ if (cgreg) { if (ctx->running_cs) - mm_dbg ("Got PS registration state when checking CS registration state"); + mm_obj_dbg (self, "got PS registration state when checking CS registration state"); else if (ctx->running_eps) - mm_dbg ("Got PS registration state when checking EPS registration state"); + mm_obj_dbg (self, "got PS registration state when checking EPS registration state"); + else if (ctx->running_5gs) + mm_obj_dbg (self, "got PS registration state when checking 5GS registration state"); mm_iface_modem_3gpp_update_ps_registration_state (MM_IFACE_MODEM_3GPP (self), state); } else if (cereg) { tac = lac; lac = 0; if (ctx->running_cs) - mm_dbg ("Got EPS registration state when checking CS registration state"); + mm_obj_dbg (self, "got EPS registration state when checking CS registration state"); else if (ctx->running_ps) - mm_dbg ("Got EPS registration state when checking PS registration state"); + mm_obj_dbg (self, "got EPS registration state when checking PS registration state"); + else if (ctx->running_5gs) + mm_obj_dbg (self, "got EPS registration state when checking 5GS registration state"); mm_iface_modem_3gpp_update_eps_registration_state (MM_IFACE_MODEM_3GPP (self), state); + } else if (c5greg) { + tac = lac; + lac = 0; + if (ctx->running_cs) + mm_obj_dbg (self, "got 5GS registration state when checking CS registration state"); + else if (ctx->running_ps) + mm_obj_dbg (self, "got 5GS registration state when checking PS registration state"); + else if (ctx->running_eps) + mm_obj_dbg (self, "got 5GS registration state when checking EPS registration state"); + mm_iface_modem_3gpp_update_5gs_registration_state (MM_IFACE_MODEM_3GPP (self), state); } else { if (act == MM_MODEM_ACCESS_TECHNOLOGY_LTE) { tac = lac; lac = 0; } if (ctx->running_ps) - mm_dbg ("Got CS registration state when checking PS registration state"); + mm_obj_dbg (self, "got CS registration state when checking PS registration state"); else if (ctx->running_eps) - mm_dbg ("Got CS registration state when checking EPS registration state"); + mm_obj_dbg (self, "got CS registration state when checking EPS registration state"); + else if (ctx->running_5gs) + mm_obj_dbg (self, "got CS registration state when checking 5GS registration state"); mm_iface_modem_3gpp_update_cs_registration_state (MM_IFACE_MODEM_3GPP (self), state); } @@ -4908,6 +5111,7 @@ ctx->running_cs = FALSE; ctx->running_ps = FALSE; ctx->running_eps = FALSE; + ctx->running_5gs = FALSE; if (ctx->run_cs) { ctx->running_cs = TRUE; @@ -4948,22 +5152,35 @@ return; } + if (ctx->run_5gs) { + ctx->running_5gs = TRUE; + ctx->run_5gs = FALSE; + /* Check current 5GS-registration state. */ + mm_base_modem_at_command (MM_BASE_MODEM (self), + "+C5GREG?", + 10, + FALSE, + (GAsyncReadyCallback)registration_status_check_ready, + task); + return; + } + /* If all run checks returned errors we fail */ - if ((ctx->cs_supported || ctx->ps_supported || ctx->eps_supported) && - (!ctx->cs_supported || ctx->cs_error) && - (!ctx->ps_supported || ctx->ps_error) && - (!ctx->eps_supported || ctx->eps_error)) { - /* Prefer the EPS, and then PS error if any */ - if (ctx->eps_error) { - g_propagate_error (&error, ctx->eps_error); - ctx->eps_error = NULL; - } else if (ctx->ps_error) { - g_propagate_error (&error, ctx->ps_error); - ctx->ps_error = NULL; - } else if (ctx->cs_error) { - g_propagate_error (&error, ctx->cs_error); - ctx->cs_error = NULL; - } else + if ((ctx->is_cs_supported || ctx->is_ps_supported || ctx->is_eps_supported || ctx->is_5gs_supported) && + (!ctx->is_cs_supported || ctx->error_cs) && + (!ctx->is_ps_supported || ctx->error_ps) && + (!ctx->is_eps_supported || ctx->error_eps) && + (!ctx->is_5gs_supported || ctx->error_5gs)) { + /* When reporting errors, prefer the 5GS, then EPS, then PS, then CS */ + if (ctx->error_5gs) + error = g_steal_pointer (&ctx->error_5gs); + else if (ctx->error_eps) + error = g_steal_pointer (&ctx->error_eps); + else if (ctx->error_ps) + error = g_steal_pointer (&ctx->error_ps); + else if (ctx->error_cs) + error = g_steal_pointer (&ctx->error_cs); + else g_assert_not_reached (); } @@ -4975,23 +5192,26 @@ } static void -modem_3gpp_run_registration_checks (MMIfaceModem3gpp *self, - gboolean cs_supported, - gboolean ps_supported, - gboolean eps_supported, - GAsyncReadyCallback callback, - gpointer user_data) +modem_3gpp_run_registration_checks (MMIfaceModem3gpp *self, + gboolean is_cs_supported, + gboolean is_ps_supported, + gboolean is_eps_supported, + gboolean is_5gs_supported, + GAsyncReadyCallback callback, + gpointer user_data) { RunRegistrationChecksContext *ctx; GTask *task; ctx = g_new0 (RunRegistrationChecksContext, 1); - ctx->cs_supported = cs_supported; - ctx->ps_supported = ps_supported; - ctx->eps_supported = eps_supported; - ctx->run_cs = cs_supported; - ctx->run_ps = ps_supported; - ctx->run_eps = eps_supported; + ctx->is_cs_supported = is_cs_supported; + ctx->is_ps_supported = is_ps_supported; + ctx->is_eps_supported = is_eps_supported; + ctx->is_5gs_supported = is_5gs_supported; + ctx->run_cs = is_cs_supported; + ctx->run_ps = is_ps_supported; + ctx->run_eps = is_eps_supported; + ctx->run_5gs = is_5gs_supported; task = g_task_new (self, NULL, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify)run_registration_checks_context_free); @@ -5084,23 +5304,27 @@ return g_task_propagate_boolean (G_TASK (res), error); } -static gboolean -parse_registration_setup_reply (MMBaseModem *self, - gpointer none, - const gchar *command, - const gchar *response, - gboolean last_command, +static MMBaseModemAtResponseProcessorResult +parse_registration_setup_reply (MMBaseModem *self, + gpointer none, + const gchar *command, + const gchar *response, + gboolean last_command, const GError *error, - GVariant **result, - GError **result_error) + GVariant **result, + GError **result_error) { + *result_error = NULL; + /* If error, try next command */ - if (error) - return FALSE; + if (error) { + *result = NULL; + return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_CONTINUE; + } /* Set COMMAND as result! */ *result = g_variant_new_string (command); - return TRUE; + return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_SUCCESS; } static const MMBaseModemAtCommand cs_registration_sequence[] = { @@ -5171,9 +5395,9 @@ mm_base_modem_at_command_full_finish (MM_BASE_MODEM (self), res, &error); if (error) { - mm_dbg ("%s unsolicited registration events in secondary port failed: '%s'", - ctx->enable ? "Enabling" : "Disabling", - error->message); + mm_obj_dbg (self, "%s unsolicited registration events in secondary port failed: %s", + ctx->enable ? "enabling" : "disabling", + error->message); /* Keep errors reported */ if (ctx->running_cs && !ctx->cs_error) ctx->cs_error = error; @@ -5211,9 +5435,9 @@ error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "AT sequence failed"); - mm_dbg ("%s unsolicited registration events in primary port failed: '%s'", - ctx->enable ? "Enabling" : "Disabling", - error->message); + mm_obj_dbg (self, "%s unsolicited registration events in primary port failed: %s", + ctx->enable ? "enabling" : "disabling", + error->message); /* Keep errors reported */ if (ctx->running_cs) ctx->cs_error = error; @@ -5408,14 +5632,14 @@ /* Complete the pending action, regardless of the CUSD result */ if (self->priv->pending_ussd_action) { - GTask *task; + GTask *pending_task; - task = self->priv->pending_ussd_action; + pending_task = self->priv->pending_ussd_action; self->priv->pending_ussd_action = NULL; - g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_ABORTED, + g_task_return_new_error (pending_task, MM_CORE_ERROR, MM_CORE_ERROR_ABORTED, "USSD session was cancelled"); - g_object_unref (task); + g_object_unref (pending_task); } mm_iface_modem_3gpp_ussd_update_state (MM_IFACE_MODEM_3GPP_USSD (self), @@ -5489,7 +5713,7 @@ response = mm_base_modem_at_command_finish (_self, res, &error); if (error) { /* Some immediate error happened when sending the USSD request */ - mm_dbg ("Error sending USSD request: '%s'", error->message); + mm_obj_dbg (self, "error sending USSD request: '%s'", error->message); g_error_free (error); if (self->priv->pending_ussd_action) { @@ -5499,17 +5723,17 @@ } if (!self->priv->pending_ussd_action) { - mm_dbg ("USSD operation finished already via URCs"); + mm_obj_dbg (self, "USSD operation finished already via URCs"); return; } /* Cache the hint for the next time we send something */ ctx = g_task_get_task_data (self->priv->pending_ussd_action); if (!self->priv->use_unencoded_ussd && ctx->current_is_unencoded) { - mm_dbg ("Will assume we want unencoded USSD commands"); + mm_obj_dbg (self, "will assume we want unencoded USSD commands"); self->priv->use_unencoded_ussd = TRUE; } else if (self->priv->use_unencoded_ussd && !ctx->current_is_unencoded) { - mm_dbg ("Will assume we want encoded USSD commands"); + mm_obj_dbg (self, "will assume we want encoded USSD commands"); self->priv->use_unencoded_ussd = FALSE; } @@ -5663,48 +5887,53 @@ /* USSD Encode/Decode (3GPP/USSD interface) */ static gchar * -modem_3gpp_ussd_encode (MMIfaceModem3gppUssd *self, - const gchar *command, - guint *scheme, - GError **error) +modem_3gpp_ussd_encode (MMIfaceModem3gppUssd *_self, + const gchar *command, + guint *scheme, + GError **error) { - MMBroadbandModem *broadband = MM_BROADBAND_MODEM (self); - GByteArray *ussd_command; - gchar *hex = NULL; - - ussd_command = g_byte_array_new (); + MMBroadbandModem *self = MM_BROADBAND_MODEM (_self); + g_autoptr(GByteArray) ussd_command = NULL; /* Encode to the current charset (as per AT+CSCS, which is what most modems * (except for Huawei it seems) will ask for. */ - if (mm_modem_charset_byte_array_append (ussd_command, - command, - FALSE, - broadband->priv->modem_current_charset)) { - /* The scheme value does NOT represent the encoding used to encode the string - * we're giving. This scheme reflects the encoding that the modem should use when - * sending the data out to the network. We're hardcoding this to GSM-7 because - * USSD commands fit well in GSM-7, unlike USSD responses that may contain code - * points that may only be encoded in UCS-2. */ - *scheme = MM_MODEM_GSM_USSD_SCHEME_7BIT; - /* convert to hex representation */ - hex = mm_utils_bin2hexstr (ussd_command->data, ussd_command->len); + ussd_command = mm_modem_charset_bytearray_from_utf8 (command, self->priv->modem_current_charset, FALSE, error); + if (!ussd_command) { + g_prefix_error (error, "Failed to encode USSD command: "); + return NULL; } - g_byte_array_free (ussd_command, TRUE); + /* The scheme value does NOT represent the encoding used to encode the string + * we're giving. This scheme reflects the encoding that the modem should use when + * sending the data out to the network. We're hardcoding this to GSM-7 because + * USSD commands fit well in GSM-7, unlike USSD responses that may contain code + * points that may only be encoded in UCS-2. */ + *scheme = MM_MODEM_GSM_USSD_SCHEME_7BIT; - return hex; + /* convert to hex representation */ + return (gchar *) mm_utils_bin2hexstr (ussd_command->data, ussd_command->len); } static gchar * -modem_3gpp_ussd_decode (MMIfaceModem3gppUssd *self, - const gchar *reply, - GError **error) -{ - MMBroadbandModem *broadband = MM_BROADBAND_MODEM (self); +modem_3gpp_ussd_decode (MMIfaceModem3gppUssd *self, + const gchar *reply, + GError **error) +{ + MMBroadbandModem *broadband = MM_BROADBAND_MODEM (self); + guint8 *bin = NULL; + gsize bin_len = 0; + g_autoptr(GByteArray) barray = NULL; + + bin = (guint8 *) mm_utils_hexstr2bin (reply, -1, &bin_len, error); + if (!bin) { + g_prefix_error (error, "Couldn't convert HEX string to binary: "); + return NULL; + } + barray = g_byte_array_new_take (bin, bin_len); /* Decode from current charset (as per AT+CSCS, which is what most modems * (except for Huawei it seems) will ask for. */ - return mm_modem_charset_hex_to_utf8 (reply, broadband->priv->modem_current_charset); + return mm_modem_charset_bytearray_to_utf8 (barray, broadband->priv->modem_current_charset, FALSE, error); } /*****************************************************************************/ @@ -5854,7 +6083,7 @@ /* If no pending task, just report the error */ if (error) { - mm_warn ("Invalid USSD message: %s", error->message); + mm_obj_warn (self, "invalid USSD message: %s", error->message); g_error_free (error); } @@ -5868,7 +6097,7 @@ { gchar *str; - mm_dbg ("Unsolicited USSD URC received"); + mm_obj_dbg (self, "unsolicited USSD URC received"); str = g_match_info_fetch (info, 1); cusd_process_string (self, str); g_free (str); @@ -5894,9 +6123,9 @@ if (!ports[i]) continue; /* Set/unset unsolicited CUSD event handler */ - mm_dbg ("(%s) %s unsolicited result code handlers", - mm_port_get_device (MM_PORT (ports[i])), - enable ? "Setting" : "Removing"); + mm_obj_dbg (self, "%s unsolicited result code handlers in %s", + enable ? "setting" : "removing", + mm_port_get_device (MM_PORT (ports[i]))); mm_port_serial_at_add_unsolicited_msg_handler ( ports[i], cusd_regex, @@ -6161,13 +6390,10 @@ if (!mm_3gpp_parse_cpms_test_response (response, &result->mem1, &result->mem2, - &result->mem3)) { + &result->mem3, + &error)) { supported_storages_result_free (result); - g_task_return_new_error (task, - MM_CORE_ERROR, - MM_CORE_ERROR_FAILED, - "Couldn't parse supported storages reply: '%s'", - response); + g_task_return_error (task, error); g_object_unref (task); return; } @@ -6236,14 +6462,14 @@ self->priv->current_sms_mem1_storage = mem1; self->priv->current_sms_mem2_storage = mem2; - mm_dbg ("Current storages initialized:"); + mm_obj_dbg (self, "current storages initialized:"); aux = mm_common_build_sms_storages_string (&mem1, 1); - mm_dbg (" mem1 (list/read/delete) storages: '%s'", aux); + mm_obj_dbg (self, " mem1 (list/read/delete) storages: '%s'", aux); g_free (aux); aux = mm_common_build_sms_storages_string (&mem2, 1); - mm_dbg (" mem2 (write/send) storages: '%s'", aux); + mm_obj_dbg (self, " mem2 (write/send) storages: '%s'", aux); g_free (aux); g_task_return_boolean (task, TRUE); @@ -6402,8 +6628,8 @@ self->priv->current_sms_mem1_storage = mem1; self->priv->mem1_storage_locked = TRUE; } else if (self->priv->current_sms_mem1_storage != MM_SMS_STORAGE_UNKNOWN) { - mm_dbg ("Given sms mem1 storage is unknown. Using current sms mem1 storage value '%s' instead", - mm_sms_storage_get_string (self->priv->current_sms_mem1_storage)); + mm_obj_dbg (self, "given sms mem1 storage is unknown. Using current sms mem1 storage value '%s' instead", + mm_sms_storage_get_string (self->priv->current_sms_mem1_storage)); } else { g_task_return_new_error (task, MM_CORE_ERROR, @@ -6427,9 +6653,8 @@ g_assert (mem1_str != NULL); /* We don't touch 'mem3' here */ - mm_dbg ("Locking SMS storages to: mem1 (%s), mem2 (%s)...", - mem1_str, - mem2_str ? mem2_str : "none"); + mm_obj_dbg (self, "locking SMS storages to: mem1 (%s), mem2 (%s)...", + mem1_str, mem2_str ? mem2_str : "none"); if (mem2_str) cmd = g_strdup_printf ("+CPMS=\"%s\",\"%s\"", mem1_str, mem2_str); @@ -6538,13 +6763,12 @@ mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error); if (error) { - mm_dbg ("Failed to set preferred SMS mode: '%s'; assuming text mode'", - error->message); + mm_obj_dbg (self, "failed to set preferred SMS mode: %s; assuming text mode'", error->message); g_error_free (error); self->priv->modem_messaging_sms_pdu_mode = FALSE; } else - mm_dbg ("Successfully set preferred SMS mode: '%s'", - self->priv->modem_messaging_sms_pdu_mode ? "PDU" : "text"); + mm_obj_dbg (self, "successfully set preferred SMS mode: '%s'", + self->priv->modem_messaging_sms_pdu_mode ? "PDU" : "text"); g_task_return_boolean (task, TRUE); g_object_unref (task); @@ -6583,8 +6807,7 @@ &sms_pdu_supported, &sms_text_supported, &error)) { - mm_dbg ("Failed to query supported SMS modes: '%s'", - error->message); + mm_obj_dbg (self, "failed to query supported SMS modes: %s", error->message); g_error_free (error); } @@ -6592,11 +6815,11 @@ self->priv->modem_messaging_sms_pdu_mode = TRUE; if (!sms_pdu_supported) { if (sms_text_supported) { - mm_dbg ("PDU mode not supported, will try to use Text mode"); + mm_obj_dbg (self, "PDU mode not supported, will try to use Text mode"); self->priv->modem_messaging_sms_pdu_mode = FALSE; } else - mm_dbg ("Neither PDU nor Text modes are reported as supported; " - "will anyway default to PDU mode"); + mm_obj_dbg (self, "neither PDU nor Text modes are reported as supported; " + "will anyway default to PDU mode"); } self->priv->sms_supported_modes_checked = TRUE; @@ -6662,8 +6885,7 @@ if (error) { /* We're really ignoring this error afterwards, as we don't have a callback * passed to the async operation, so just log the error here. */ - mm_warn ("Couldn't retrieve SMS part: '%s'", - error->message); + mm_obj_warn (self, "couldn't retrieve SMS part: '%s'", error->message); g_task_return_error (task, error); g_object_unref (task); return; @@ -6673,23 +6895,22 @@ info = mm_3gpp_parse_cmgr_read_response (response, ctx->idx, &error); if (!info) { - mm_warn ("Couldn't parse SMS part: '%s'", - error->message); + mm_obj_warn (self, "couldn't parse SMS part: '%s'", error->message); g_task_return_error (task, error); g_object_unref (task); return; } - part = mm_sms_part_3gpp_new_from_pdu (info->index, info->pdu, &error); + part = mm_sms_part_3gpp_new_from_pdu (info->index, info->pdu, self, &error); if (part) { - mm_dbg ("Correctly parsed PDU (%d)", ctx->idx); + mm_obj_dbg (self, "correctly parsed PDU (%d)", ctx->idx); mm_iface_modem_messaging_take_part (MM_IFACE_MODEM_MESSAGING (self), part, MM_SMS_STATE_RECEIVED, self->priv->modem_messaging_sms_default_storage); } else { /* Don't treat the error as critical */ - mm_dbg ("Error parsing PDU (%d): %s", ctx->idx, error->message); + mm_obj_dbg (self, "error parsing PDU (%d): %s", ctx->idx, error->message); g_error_free (error); } @@ -6748,7 +6969,7 @@ str = mm_get_string_unquoted_from_match_info (info, 1); storage = mm_common_get_sms_storage_from_string (str, NULL); if (storage == MM_SMS_STORAGE_UNKNOWN) { - mm_dbg ("Skipping CMTI indication, unknown storage '%s' reported", str); + mm_obj_dbg (self, "skipping CMTI indication, unknown storage '%s' reported", str); g_free (str); return; } @@ -6758,7 +6979,7 @@ if (mm_sms_list_has_part (self->priv->modem_messaging_sms_list, storage, idx)) { - mm_dbg ("Skipping CMTI indication, part already processed"); + mm_obj_dbg (self, "skipping CMTI indication, part already processed"); return; } @@ -6786,7 +7007,7 @@ guint length; gchar *pdu; - mm_dbg ("Got new non-stored message indication"); + mm_obj_dbg (self, "got new non-stored message indication"); if (!mm_get_uint_from_match_info (info, 1, &length)) return; @@ -6795,16 +7016,16 @@ if (!pdu) return; - part = mm_sms_part_3gpp_new_from_pdu (SMS_PART_INVALID_INDEX, pdu, &error); + part = mm_sms_part_3gpp_new_from_pdu (SMS_PART_INVALID_INDEX, pdu, self, &error); if (part) { - mm_dbg ("Correctly parsed non-stored PDU"); + mm_obj_dbg (self, "correctly parsed non-stored PDU"); mm_iface_modem_messaging_take_part (MM_IFACE_MODEM_MESSAGING (self), part, MM_SMS_STATE_RECEIVED, MM_SMS_STORAGE_UNKNOWN); } else { /* Don't treat the error as critical */ - mm_dbg ("Error parsing non-stored PDU: %s", error->message); + mm_obj_dbg (self, "error parsing non-stored PDU: %s", error->message); g_error_free (error); } } @@ -6832,9 +7053,9 @@ continue; /* Set/unset unsolicited CMTI event handler */ - mm_dbg ("(%s) %s messaging unsolicited events handlers", - mm_port_get_device (MM_PORT (ports[i])), - enable ? "Setting" : "Removing"); + mm_obj_dbg (self, "%s messaging unsolicited events handlers in %s", + enable ? "setting" : "removing", + mm_port_get_device (MM_PORT (ports[i]))); mm_port_serial_at_add_unsolicited_msg_handler ( ports[i], cmti_regex, @@ -6884,28 +7105,31 @@ return g_task_propagate_boolean (G_TASK (res), error); } -static gboolean -cnmi_response_processor (MMBaseModem *self, - gpointer none, - const gchar *command, - const gchar *response, - gboolean last_command, - const GError *error, - GVariant **result, - GError **result_error) +static MMBaseModemAtResponseProcessorResult +cnmi_response_processor (MMBaseModem *self, + gpointer none, + const gchar *command, + const gchar *response, + gboolean last_command, + const GError *error, + GVariant **result, + GError **result_error) { + *result = NULL; + *result_error = NULL; + if (error) { /* If we get a not-supported error and we're not in the last command, we * won't set 'result_error', so we'll keep on the sequence */ - if (!g_error_matches (error, MM_MESSAGE_ERROR, MM_MESSAGE_ERROR_NOT_SUPPORTED) || - last_command) + if (!g_error_matches (error, MM_MESSAGE_ERROR, MM_MESSAGE_ERROR_NOT_SUPPORTED) || last_command) { *result_error = g_error_copy (error); + return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_FAILURE; + } - return FALSE; + return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_CONTINUE; } - *result = NULL; - return TRUE; + return MM_BASE_MODEM_AT_RESPONSE_PROCESSOR_RESULT_SUCCESS; } static const MMBaseModemAtCommand cnmi_sequence[] = { @@ -6935,14 +7159,14 @@ /* Since the secondary is not required, we don't propagate the error anywhere */ mm_base_modem_at_sequence_full_finish (MM_BASE_MODEM (self), res, NULL, &inner_error); if (inner_error) { - mm_dbg ("(%s) Unable to enable messaging unsolicited events on modem secondary: %s", - mm_port_get_device (MM_PORT (secondary)), - inner_error->message); + mm_obj_dbg (self, "failed to enable messaging unsolicited events on secondary port %s: %s", + mm_port_get_device (MM_PORT (secondary)), + inner_error->message); g_error_free (inner_error); } - mm_dbg ("(%s) Messaging unsolicited events enabled on secondary", - mm_port_get_device (MM_PORT (secondary))); + mm_obj_dbg (self, "messaging unsolicited events enabled on secondary port %s", + mm_port_get_device (MM_PORT (secondary))); g_task_return_boolean (task, TRUE); g_object_unref (task); @@ -6967,13 +7191,13 @@ return; } - mm_dbg ("(%s) Messaging unsolicited events enabled on primary", - mm_port_get_device (MM_PORT (primary))); + mm_obj_dbg (self, "messaging unsolicited events enabled on primary port %s", + mm_port_get_device (MM_PORT (primary))); /* Try to enable unsolicited events for secondary port */ if (secondary) { - mm_dbg ("(%s) Enabling messaging unsolicited events on secondary port", - mm_port_get_device (MM_PORT (secondary))); + mm_obj_dbg (self, "enabling messaging unsolicited events on secondary port %s", + mm_port_get_device (MM_PORT (secondary))); mm_base_modem_at_sequence_full ( MM_BASE_MODEM (self), secondary, @@ -7002,8 +7226,8 @@ primary = mm_base_modem_peek_port_primary (MM_BASE_MODEM (self)); /* Enable unsolicited events for primary port */ - mm_dbg ("(%s) Enabling messaging unsolicited events on primary port", - mm_port_get_device (MM_PORT (primary))); + mm_obj_dbg (self, "enabling messaging unsolicited events on primary port %s", + mm_port_get_device (MM_PORT (primary))); mm_base_modem_at_sequence_full ( MM_BASE_MODEM (self), primary, @@ -7097,72 +7321,82 @@ ctx = g_task_get_task_data (task); while (g_match_info_matches (match_info)) { - MMSmsPart *part; - guint matches, idx; - gchar *number, *timestamp, *text, *ucs2_text, *stat; - gsize ucs2_len = 0; - GByteArray *raw; + MMSmsPart *part; + guint matches; + guint idx; + g_autofree gchar *number_enc = NULL; + g_autofree gchar *number = NULL; + g_autofree gchar *timestamp = NULL; + g_autofree gchar *text_enc = NULL; + g_autofree gchar *text = NULL; + g_autofree gchar *stat = NULL; + g_autoptr(GByteArray) raw = NULL; + g_autoptr(GError) inner_error = NULL; matches = g_match_info_get_match_count (match_info); if (matches != 7) { - mm_dbg ("Failed to match entire CMGL response (count %d)", matches); + mm_obj_dbg (self, "failed to match entire CMGL response (count %d)", matches); goto next; } if (!mm_get_uint_from_match_info (match_info, 1, &idx)) { - mm_dbg ("Failed to convert message index"); + mm_obj_dbg (self, "failed to convert message index"); goto next; } /* Get part state */ stat = mm_get_string_unquoted_from_match_info (match_info, 2); if (!stat) { - mm_dbg ("Failed to get part status"); + mm_obj_dbg (self, "failed to get part status"); goto next; } /* Get and parse number */ - number = mm_get_string_unquoted_from_match_info (match_info, 3); + number_enc = mm_get_string_unquoted_from_match_info (match_info, 3); + if (!number_enc) { + mm_obj_dbg (self, "failed to get message sender number"); + goto next; + } + number = mm_modem_charset_str_to_utf8 (number_enc, -1, self->priv->modem_current_charset, FALSE, &inner_error); if (!number) { - mm_dbg ("Failed to get message sender number"); - g_free (stat); + mm_obj_dbg (self, "failed to convert message sender number to UTF-8: %s", inner_error->message); goto next; } - number = mm_broadband_modem_take_and_convert_to_utf8 (MM_BROADBAND_MODEM (self), - number); - /* Get and parse timestamp (always expected in ASCII) */ timestamp = mm_get_string_unquoted_from_match_info (match_info, 5); + if (timestamp && !g_str_is_ascii (timestamp)) { + mm_obj_dbg (self, "failed to parse input timestamp as ASCII"); + goto next; + } /* Get and parse text */ - text = mm_broadband_modem_take_and_convert_to_utf8 (MM_BROADBAND_MODEM (self), - g_match_info_fetch (match_info, 6)); + text_enc = g_match_info_fetch (match_info, 6); + text = mm_modem_charset_str_to_utf8 (text_enc, -1, self->priv->modem_current_charset, FALSE, &inner_error); + if (!text) { + mm_obj_dbg (self, "failed to convert message text to UTF-8: %s", inner_error->message); + goto next; + } /* The raw SMS data can only be GSM, UCS2, or unknown (8-bit), so we * need to convert to UCS2 here. */ - ucs2_text = g_convert (text, -1, "UCS-2BE//TRANSLIT", "UTF-8", NULL, &ucs2_len, NULL); - g_assert (ucs2_text); - raw = g_byte_array_sized_new (ucs2_len); - g_byte_array_append (raw, (const guint8 *) ucs2_text, ucs2_len); - g_free (ucs2_text); + raw = mm_modem_charset_bytearray_from_utf8 (text, MM_MODEM_CHARSET_UCS2, FALSE, NULL); + g_assert (raw); /* all take() methods pass ownership of the value as well */ - part = mm_sms_part_new (idx, - sms_pdu_type_from_str (stat)); - mm_sms_part_take_number (part, number); - mm_sms_part_take_timestamp (part, timestamp); - mm_sms_part_take_text (part, text); - mm_sms_part_take_data (part, raw); + part = mm_sms_part_new (idx, sms_pdu_type_from_str (stat)); + mm_sms_part_take_number (part, g_steal_pointer (&number)); + mm_sms_part_take_timestamp (part, g_steal_pointer (×tamp)); + mm_sms_part_take_text (part, g_steal_pointer (&text)); + mm_sms_part_take_data (part, g_steal_pointer (&raw)); mm_sms_part_set_class (part, -1); - mm_dbg ("Correctly parsed SMS list entry (%d)", idx); + mm_obj_dbg (self, "correctly parsed SMS list entry (%d)", idx); mm_iface_modem_messaging_take_part (MM_IFACE_MODEM_MESSAGING (self), part, sms_state_from_str (stat), ctx->list_storage); - g_free (stat); next: g_match_info_next (match_info, NULL); } @@ -7225,16 +7459,16 @@ MM3gppPduInfo *info = l->data; MMSmsPart *part; - part = mm_sms_part_3gpp_new_from_pdu (info->index, info->pdu, &error); + part = mm_sms_part_3gpp_new_from_pdu (info->index, info->pdu, self, &error); if (part) { - mm_dbg ("Correctly parsed PDU (%d)", info->index); + mm_obj_dbg (self, "correctly parsed PDU (%d)", info->index); mm_iface_modem_messaging_take_part (MM_IFACE_MODEM_MESSAGING (self), part, sms_state_from_index (info->status), ctx->list_storage); } else { /* Don't treat the error as critical */ - mm_dbg ("Error parsing PDU (%d): %s", info->index, error->message); + mm_obj_dbg (self, "error parsing PDU (%d): %s", info->index, error->message); g_clear_error (&error); } } @@ -7292,8 +7526,7 @@ task = g_task_new (self, NULL, callback, user_data); g_task_set_task_data (task, ctx, g_free); - mm_dbg ("Listing SMS parts in storage '%s'", - mm_sms_storage_get_string (storage)); + mm_obj_dbg (self, "listing SMS parts in storage '%s'", mm_sms_storage_get_string (storage)); /* First, request to set the proper storage to read from */ mm_broadband_modem_lock_sms_storages (MM_BROADBAND_MODEM (self), @@ -7431,7 +7664,7 @@ } static void -clcc_ready (MMBaseModem *modem, +clcc_ready (MMBaseModem *self, GAsyncResult *res, GTask *task) { @@ -7439,8 +7672,8 @@ GError *error = NULL; GList *call_info_list = NULL; - response = mm_base_modem_at_command_finish (modem, res, &error); - if (!response || !mm_3gpp_parse_clcc_response (response, &call_info_list, &error)) + response = mm_base_modem_at_command_finish (self, res, &error); + if (!response || !mm_3gpp_parse_clcc_response (response, self, &call_info_list, &error)) g_task_return_error (task, error); else g_task_return_pointer (task, call_info_list, (GDestroyNotify)mm_3gpp_call_info_list_free); @@ -7488,7 +7721,7 @@ call_info.number = NULL; str = g_match_info_fetch (info, 1); - mm_dbg ("Call terminated: %s", str); + mm_obj_dbg (self, "call terminated: %s", str); g_free (str); mm_iface_modem_voice_report_call (MM_IFACE_MODEM_VOICE (self), &call_info); @@ -7514,9 +7747,9 @@ if (!ports[i]) continue; - mm_dbg ("(%s) %s voice in-call unsolicited events handlers", - mm_port_get_device (MM_PORT (ports[i])), - enable ? "Setting" : "Removing"); + mm_obj_dbg (self, "%s voice in-call unsolicited events handlers in %s", + enable ? "setting" : "removing", + mm_port_get_device (MM_PORT (ports[i]))); mm_port_serial_at_add_unsolicited_msg_handler ( ports[i], in_call_event_regex, @@ -7541,7 +7774,7 @@ if (!self->priv->in_call_ports_ctx) { PortsContext *ctx; - mm_dbg ("Setting up in-call ports context"); + mm_obj_dbg (self, "setting up in-call ports context"); ctx = ports_context_new (); if (!ports_context_open (self, ctx, FALSE, TRUE, FALSE, &error)) { ports_context_unref (ctx); @@ -7551,7 +7784,7 @@ self->priv->in_call_ports_ctx = ctx; } } else - mm_dbg ("In-call ports context already set up"); + mm_obj_dbg (self, "in-call ports context already set up"); task = g_task_new (self, NULL, callback, user_data); if (error) @@ -7571,11 +7804,11 @@ self = MM_BROADBAND_MODEM (_self); if (self->priv->in_call_ports_ctx) { - mm_dbg ("Cleaning up in-call ports context"); + mm_obj_dbg (self, "cleaning up in-call ports context"); set_voice_in_call_unsolicited_events_handlers (self, self->priv->in_call_ports_ctx, FALSE); g_clear_pointer (&self->priv->in_call_ports_ctx, (GDestroyNotify) ports_context_unref); } else - mm_dbg ("In-call ports context already cleaned up"); + mm_obj_dbg (self, "in-call ports context already cleaned up"); task = g_task_new (self, NULL, callback, user_data); g_task_return_boolean (task, TRUE); @@ -7605,7 +7838,7 @@ call_info.state = MM_CALL_STATE_WAITING; call_info.number = mm_get_string_unquoted_from_match_info (info, 1); - mm_dbg ("Call waiting (%s)", call_info.number); + mm_obj_dbg (self, "call waiting (%s)", call_info.number); mm_iface_modem_voice_report_call (MM_IFACE_MODEM_VOICE (self), &call_info); g_free (call_info.number); @@ -7623,7 +7856,7 @@ call_info.state = MM_CALL_STATE_RINGING_IN; call_info.number = NULL; - mm_dbg ("Ringing"); + mm_obj_dbg (self, "ringing"); mm_iface_modem_voice_report_call (MM_IFACE_MODEM_VOICE (self), &call_info); } @@ -7637,7 +7870,7 @@ /* We could have "VOICE" or "DATA". Now consider only "VOICE" */ str = mm_get_string_unquoted_from_match_info (info, 1); - mm_dbg ("Ringing (%s)", str); + mm_obj_dbg (self, "ringing (%s)", str); g_free (str); call_info.index = 0; @@ -7660,7 +7893,7 @@ call_info.state = MM_CALL_STATE_RINGING_IN; call_info.number = mm_get_string_unquoted_from_match_info (info, 1); - mm_dbg ("Ringing (%s)", call_info.number); + mm_obj_dbg (self, "ringing (%s)", call_info.number); mm_iface_modem_voice_report_call (MM_IFACE_MODEM_VOICE (self), &call_info); g_free (call_info.number); @@ -7693,9 +7926,9 @@ continue; /* Set/unset unsolicited CMTI event handler */ - mm_dbg ("(%s) %s voice unsolicited events handlers", - mm_port_get_device (MM_PORT (ports[i])), - enable ? "Setting" : "Removing"); + mm_obj_dbg (self, "%s voice unsolicited events handlers in %s", + enable ? "setting" : "removing", + mm_port_get_device (MM_PORT (ports[i]))); mm_port_serial_at_add_unsolicited_msg_handler ( ports[i], cring_regex, @@ -7798,9 +8031,9 @@ ctx = g_task_get_task_data (task); if (!mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, &error)) { - mm_dbg ("Couldn't %s voice event reporting: '%s'", - ctx->enable ? "enable" : "disable", - error->message); + mm_obj_dbg (self, "couldn't %s voice event reporting: '%s'", + ctx->enable ? "enable" : "disable", + error->message); g_error_free (error); } @@ -7821,42 +8054,42 @@ /* CLIP on primary port */ if (!ctx->clip_primary_done && ctx->clip_command && ctx->primary) { - mm_dbg ("%s +CLIP calling line reporting in primary port...", ctx->enable ? "Enabling" : "Disabling"); + mm_obj_dbg (self, "%s +CLIP calling line reporting in primary port...", ctx->enable ? "enabling" : "disabling"); ctx->clip_primary_done = TRUE; command = ctx->clip_command; port = ctx->primary; } /* CLIP on secondary port */ else if (!ctx->clip_secondary_done && ctx->clip_command && ctx->secondary) { - mm_dbg ("%s +CLIP calling line reporting in primary port...", ctx->enable ? "Enabling" : "Disabling"); + mm_obj_dbg (self, "%s +CLIP calling line reporting in secondary port...", ctx->enable ? "enabling" : "disabling"); ctx->clip_secondary_done = TRUE; command = ctx->clip_command; port = ctx->secondary; } /* CRC on primary port */ else if (!ctx->crc_primary_done && ctx->crc_command && ctx->primary) { - mm_dbg ("%s +CRC extended format of incoming call indications in primary port...", ctx->enable ? "Enabling" : "Disabling"); + mm_obj_dbg (self, "%s +CRC extended format of incoming call indications in primary port...", ctx->enable ? "enabling" : "disabling"); ctx->crc_primary_done = TRUE; command = ctx->crc_command; port = ctx->primary; } /* CRC on secondary port */ else if (!ctx->crc_secondary_done && ctx->crc_command && ctx->secondary) { - mm_dbg ("%s +CRC extended format of incoming call indications in secondary port...", ctx->enable ? "Enabling" : "Disabling"); + mm_obj_dbg (self, "%s +CRC extended format of incoming call indications in secondary port...", ctx->enable ? "enabling" : "disabling"); ctx->crc_secondary_done = TRUE; command = ctx->crc_command; port = ctx->secondary; } /* CCWA on primary port */ else if (!ctx->ccwa_primary_done && ctx->ccwa_command && ctx->primary) { - mm_dbg ("%s +CCWA call waiting indications in primary port...", ctx->enable ? "Enabling" : "Disabling"); + mm_obj_dbg (self, "%s +CCWA call waiting indications in primary port...", ctx->enable ? "enabling" : "disabling"); ctx->ccwa_primary_done = TRUE; command = ctx->ccwa_command; port = ctx->primary; } /* CCWA on secondary port */ else if (!ctx->ccwa_secondary_done && ctx->ccwa_command && ctx->secondary) { - mm_dbg ("%s +CCWA call waiting indications in secondary port...", ctx->enable ? "Enabling" : "Disabling"); + mm_obj_dbg (self, "%s +CCWA call waiting indications in secondary port...", ctx->enable ? "enabling" : "disabling"); ctx->ccwa_secondary_done = TRUE; command = ctx->ccwa_command; port = ctx->secondary; @@ -8180,7 +8413,7 @@ if (!response) return FALSE; - return mm_3gpp_parse_ccwa_service_query_response (response, status, error); + return mm_3gpp_parse_ccwa_service_query_response (response, self, status, error); } static void @@ -8216,7 +8449,7 @@ result = mm_strip_tag (result, "+GSN:"); mm_parse_gsn (result, NULL, NULL, &esn); - mm_dbg ("loaded ESN: %s", esn); + mm_obj_dbg (self, "loaded ESN: %s", esn); return esn; } @@ -8225,7 +8458,7 @@ GAsyncReadyCallback callback, gpointer user_data) { - mm_dbg ("loading ESN..."); + mm_obj_dbg (self, "loading ESN..."); mm_base_modem_at_command (MM_BASE_MODEM (self), "+GSN", 3, @@ -8251,7 +8484,7 @@ result = mm_strip_tag (result, "+GSN:"); mm_parse_gsn (result, NULL, &meid, NULL); - mm_dbg ("loaded MEID: %s", meid); + mm_obj_dbg (self, "loaded MEID: %s", meid); return meid; } @@ -8261,7 +8494,7 @@ gpointer user_data) { /* Some devices return both the MEID and the ESN in the +GSN response */ - mm_dbg ("loading MEID..."); + mm_obj_dbg (self, "loading MEID..."); mm_base_modem_at_command (MM_BASE_MODEM (self), "+GSN", 3, @@ -8881,6 +9114,7 @@ GAsyncResult *res, GTask *task) { + MMBroadbandModem *self; QcdmResult *result = NULL; guint32 sid = MM_MODEM_CDMA_SID_UNKNOWN; guint32 nid = MM_MODEM_CDMA_NID_UNKNOWN; @@ -8889,9 +9123,11 @@ GError *error = NULL; GByteArray *response; + self = g_task_get_source_object (task); + response = mm_port_serial_qcdm_command_finish (port, res, &error); if (error) { - mm_dbg ("Failed to get cdma status: %s", error->message); + mm_obj_dbg (self, "failed to get cdma status: %s", error->message); g_clear_error (&error); /* Fall back to AT+CSS */ @@ -8904,7 +9140,7 @@ &err); if (!result) { if (err != QCDM_SUCCESS) - mm_dbg ("Failed to parse cdma status command result: %d", err); + mm_obj_dbg (self, "failed to parse cdma status command result: %d", err); g_byte_array_unref (response); /* Fall back to AT+CSS */ @@ -8925,9 +9161,9 @@ nid = MM_MODEM_CDMA_NID_UNKNOWN; } - mm_dbg ("CDMA 1x Status RX state: %d", rxstate); - mm_dbg ("CDMA 1x Status SID: %d", sid); - mm_dbg ("CDMA 1x Status NID: %d", nid); + mm_obj_dbg (self, "CDMA 1x Status RX state: %d", rxstate); + mm_obj_dbg (self, "CDMA 1x Status SID: %d", sid); + mm_obj_dbg (self, "CDMA 1x Status NID: %d", nid); cdma1x_serving_system_complete_and_free (task, sid, @@ -8956,7 +9192,7 @@ } if (!mm_port_serial_open (MM_PORT_SERIAL (qcdm), &error)) { - mm_dbg ("Failed to open QCDM port for serving-system request: %s", error->message); + mm_obj_dbg (self, "failed to open QCDM port for serving-system request: %s", error->message); g_error_free (error); /* Fall back to AT+CSS */ @@ -9128,7 +9364,7 @@ response = mm_strip_tag (response, "$SPERI:"); if (!response || !mm_cdma_parse_eri (response, &roaming, NULL, NULL)) { - mm_warn ("Couldn't parse SPERI response '%s'", response); + mm_obj_warn (self, "couldn't parse SPERI response '%s'", response); g_task_return_pointer (task, detailed_registration_state_result_new (ctx), g_free); @@ -9286,7 +9522,7 @@ /* Skip QCDM steps if no QCDM port */ if (!ctx->has_qcdm_port) { - mm_dbg ("Will skip all QCDM-based registration checks"); + mm_obj_dbg (self, "will skip all QCDM-based registration checks"); results->skip_qcdm_call_manager_step = TRUE; results->skip_qcdm_hdr_step = TRUE; } @@ -9300,14 +9536,12 @@ * for the specific step, or subclass this setup and return * FALSE themselves. */ if (ctx->has_sprint_commands) { - mm_dbg ("Will skip CDMA1x Serving System check, " - "we do have Sprint commands"); + mm_obj_dbg (self, "will skip CDMA1x Serving System check, we do have Sprint commands"); results->skip_at_cdma1x_serving_system_step = TRUE; } else { /* If there aren't Sprint specific commands, and the detailed * registration state getter wasn't subclassed, skip the step */ - mm_dbg ("Will skip generic detailed registration check, we " - "don't have Sprint commands"); + mm_obj_dbg (self, "will skip generic detailed registration check, we don't have Sprint commands"); results->skip_detailed_registration_state = TRUE; } } @@ -9510,7 +9744,7 @@ mm_iface_modem_cdma_run_registration_checks_finish (MM_IFACE_MODEM_CDMA (self), res, &error); if (error) { - mm_dbg ("CDMA registration check failed: '%s'", error->message); + mm_obj_dbg (self, "CDMA registration check failed: %s", error->message); mm_iface_modem_cdma_update_cdma1x_registration_state ( MM_IFACE_MODEM_CDMA (self), MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN, @@ -9531,10 +9765,9 @@ /* If we got registered in at least one CDMA network, end registration checks */ if (REG_IS_DONE (self->priv->modem_cdma_cdma1x_registration_state) || REG_IS_DONE (self->priv->modem_cdma_evdo_registration_state)) { - mm_dbg ("Modem is currently registered in a CDMA network " - "(CDMA1x: '%s', EV-DO: '%s')", - REG_IS_DONE (self->priv->modem_cdma_cdma1x_registration_state) ? "yes" : "no", - REG_IS_DONE (self->priv->modem_cdma_evdo_registration_state) ? "yes" : "no"); + mm_obj_dbg (self, "registered in a CDMA network (CDMA1x: '%s', EV-DO: '%s')", + REG_IS_DONE (self->priv->modem_cdma_cdma1x_registration_state) ? "yes" : "no", + REG_IS_DONE (self->priv->modem_cdma_evdo_registration_state) ? "yes" : "no"); g_task_return_boolean (task, TRUE); g_object_unref (task); return; @@ -9542,7 +9775,7 @@ /* Don't spend too much time waiting to get registered */ if (g_timer_elapsed (ctx->timer, NULL) > ctx->max_registration_time) { - mm_dbg ("CDMA registration check timed out"); + mm_obj_dbg (self, "CDMA registration check timed out"); mm_iface_modem_cdma_update_cdma1x_registration_state ( MM_IFACE_MODEM_CDMA (self), MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN, @@ -9554,14 +9787,14 @@ mm_iface_modem_cdma_update_access_technologies ( MM_IFACE_MODEM_CDMA (self), MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN); - error = mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_NETWORK_TIMEOUT); + error = mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_NETWORK_TIMEOUT, self); g_task_return_error (task, error); g_object_unref (task); return; } /* Check again in a few seconds. */ - mm_dbg ("Modem not yet registered in a CDMA network... will recheck soon"); + mm_obj_dbg (self, "not yet registered in a CDMA network... will recheck soon"); g_timeout_add_seconds (3, (GSourceFunc)run_cdma_registration_checks_again, task); @@ -9812,19 +10045,22 @@ MMSignal **gsm, MMSignal **umts, MMSignal **lte, + MMSignal **nr5g, GError **error) { const gchar *response; response = mm_base_modem_at_command_finish (MM_BASE_MODEM (self), res, error); - if (!response || !mm_3gpp_cesq_response_to_signal_info (response, gsm, umts, lte, error)) + if (!response || !mm_3gpp_cesq_response_to_signal_info (response, self, gsm, umts, lte, error)) return FALSE; - /* No 3GPP2 support */ if (cdma) *cdma = NULL; if (evdo) *evdo = NULL; + if (nr5g) + *nr5g = NULL; + return TRUE; } @@ -9870,7 +10106,7 @@ MMPortSerialAt *ports[2]; GRegex *regex; GPtrArray *array; - gint i, j; + guint i, j; ports[0] = mm_base_modem_peek_port_primary (MM_BASE_MODEM (self)); ports[1] = mm_base_modem_peek_port_secondary (MM_BASE_MODEM (self)); @@ -9969,34 +10205,6 @@ return g_task_propagate_pointer (G_TASK (res), error); } -static gboolean -open_ports_initialization (MMBroadbandModem *self, - PortsContext *ctx, - GError **error) -{ - ctx->primary = mm_base_modem_get_port_primary (MM_BASE_MODEM (self)); - if (!ctx->primary) { - g_set_error (error, - MM_CORE_ERROR, - MM_CORE_ERROR_FAILED, - "Couldn't get primary port"); - return FALSE; - } - - /* Open and send first commands to the primary serial port. - * We do keep the primary port open during the whole initialization - * sequence. Note that this port is not really passed to the interfaces, - * they will get the primary port themselves. */ - if (!mm_port_serial_open (MM_PORT_SERIAL (ctx->primary), error)) { - g_prefix_error (error, "Couldn't open primary port: "); - return FALSE; - } - - ctx->primary_open = TRUE; - - return TRUE; -} - static void initialization_started (MMBroadbandModem *self, GAsyncReadyCallback callback, @@ -10135,7 +10343,7 @@ self->priv->modem_init_run = TRUE; /* After the modem init sequence, give a 500ms period for the modem to settle */ - mm_dbg ("Giving some time to settle the modem..."); + mm_obj_dbg (self, "giving some time to settle the modem..."); g_timeout_add (500, (GSourceFunc)enabling_after_modem_init_timeout, task); } @@ -10159,7 +10367,7 @@ ctx = g_task_get_task_data (task); if (ctx->modem_init_required) { - mm_dbg ("Running modem initialization sequence..."); + mm_obj_dbg (self, "running initialization sequence..."); MM_BROADBAND_MODEM_GET_CLASS (self)->enabling_modem_init (self, (GAsyncReadyCallback)enabling_modem_init_ready, task); @@ -10188,13 +10396,13 @@ * did it (i.e. don't reinitialize if the modem got disabled and enabled * again) */ if (self->priv->modem_init_run) - mm_dbg ("Skipping modem initialization: not first enabling"); + mm_obj_dbg (self, "skipping initialization: not first enabling"); else if (mm_base_modem_get_hotplugged (MM_BASE_MODEM (self))) { self->priv->modem_init_run = TRUE; - mm_dbg ("Skipping modem initialization: device hotplugged"); + mm_obj_dbg (self, "skipping initialization: device hotplugged"); } else if (!MM_BROADBAND_MODEM_GET_CLASS (self)->enabling_modem_init || !MM_BROADBAND_MODEM_GET_CLASS (self)->enabling_modem_init_finish) - mm_dbg ("Skipping modem initialization: not required"); + mm_obj_dbg (self, "skipping initialization: not required"); else ctx->modem_init_required = TRUE; @@ -10210,7 +10418,7 @@ } /* Ports were correctly opened, now flash the primary port */ - mm_dbg ("Flashing primary AT port before enabling..."); + mm_obj_dbg (self, "flashing primary AT port before enabling..."); mm_port_serial_flash (MM_PORT_SERIAL (ctx->ports->primary), 100, FALSE, @@ -10228,11 +10436,11 @@ GError *error = NULL; if (!mm_iface_modem_3gpp_run_registration_checks_finish (self, res, &error)) { - mm_warn ("Initial 3GPP registration check failed: %s", error->message); + mm_obj_warn (self, "initial 3GPP registration check failed: %s", error->message); g_error_free (error); return; } - mm_dbg ("Initial 3GPP registration checks finished"); + mm_obj_dbg (self, "initial 3GPP registration checks finished"); } static void @@ -10242,11 +10450,11 @@ GError *error = NULL; if (!mm_iface_modem_cdma_run_registration_checks_finish (self, res, &error)) { - mm_warn ("Initial CDMA registration check failed: %s", error->message); + mm_obj_warn (self, "initial CDMA registration check failed: %s", error->message); g_error_free (error); return; } - mm_dbg ("Initial CDMA registration checks finished"); + mm_obj_dbg (self, "initial CDMA registration checks finished"); } static gboolean @@ -10274,9 +10482,13 @@ /*****************************************************************************/ typedef enum { + /* When user requests a disable operation, the process starts here */ DISABLING_STEP_FIRST, DISABLING_STEP_WAIT_FOR_FINAL_STATE, DISABLING_STEP_DISCONNECT_BEARERS, + /* When the disabling is launched due to a failed enable, the process + * starts here */ + DISABLING_STEP_FIRST_AFTER_ENABLE_FAILED, DISABLING_STEP_IFACE_SIMPLE, DISABLING_STEP_IFACE_FIRMWARE, DISABLING_STEP_IFACE_VOICE, @@ -10294,9 +10506,10 @@ typedef struct { MMBroadbandModem *self; - DisablingStep step; - MMModemState previous_state; - gboolean disabled; + gboolean state_updates; + DisablingStep step; + MMModemState previous_state; + gboolean disabled; } DisablingContext; static void disabling_step (GTask *task); @@ -10308,19 +10521,22 @@ if (MM_BROADBAND_MODEM_GET_CLASS (ctx->self)->disabling_stopped && !MM_BROADBAND_MODEM_GET_CLASS (ctx->self)->disabling_stopped (ctx->self, &error)) { - mm_warn ("Error when stopping the disabling sequence: %s", error->message); + mm_obj_warn (ctx->self, "error when stopping the disabling sequence: %s", error->message); g_error_free (error); } - if (ctx->disabled) - mm_iface_modem_update_state (MM_IFACE_MODEM (ctx->self), - MM_MODEM_STATE_DISABLED, - MM_MODEM_STATE_CHANGE_REASON_USER_REQUESTED); - else if (ctx->previous_state != MM_MODEM_STATE_DISABLED) { - /* Fallback to previous state */ - mm_iface_modem_update_state (MM_IFACE_MODEM (ctx->self), - ctx->previous_state, - MM_MODEM_STATE_CHANGE_REASON_UNKNOWN); + /* Only perform state updates if we're asked to do so */ + if (ctx->state_updates) { + if (ctx->disabled) + mm_iface_modem_update_state (MM_IFACE_MODEM (ctx->self), + MM_MODEM_STATE_DISABLED, + MM_MODEM_STATE_CHANGE_REASON_USER_REQUESTED); + else if (ctx->previous_state != MM_MODEM_STATE_DISABLED) { + /* Fallback to previous state */ + mm_iface_modem_update_state (MM_IFACE_MODEM (ctx->self), + ctx->previous_state, + MM_MODEM_STATE_CHANGE_REASON_UNKNOWN); + } } g_object_unref (ctx->self); @@ -10328,42 +10544,34 @@ } static gboolean -disable_finish (MMBaseModem *self, - GAsyncResult *res, - GError **error) +common_disable_finish (MMBroadbandModem *self, + GAsyncResult *res, + GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } #undef INTERFACE_DISABLE_READY_FN -#define INTERFACE_DISABLE_READY_FN(NAME,TYPE,FATAL_ERRORS) \ - static void \ - NAME##_disable_ready (MMBroadbandModem *self, \ - GAsyncResult *result, \ - GTask *task) \ - { \ - DisablingContext *ctx; \ - GError *error = NULL; \ - \ - if (!mm_##NAME##_disable_finish (TYPE (self), \ - result, \ - &error)) { \ - if (FATAL_ERRORS) { \ - g_task_return_error (task, error); \ - g_object_unref (task); \ - return; \ - } \ - \ - mm_dbg ("Couldn't disable interface: '%s'", \ - error->message); \ - g_error_free (error); \ - return; \ - } \ - \ - /* Go on to next step */ \ - ctx = g_task_get_task_data (task); \ - ctx->step++; \ - disabling_step (task); \ +#define INTERFACE_DISABLE_READY_FN(NAME,TYPE,WARN_ERRORS) \ + static void \ + NAME##_disable_ready (MMBroadbandModem *self, \ + GAsyncResult *result, \ + GTask *task) \ + { \ + DisablingContext *ctx; \ + g_autoptr(GError) error = NULL; \ + \ + if (!mm_##NAME##_disable_finish (TYPE (self), result, &error)) { \ + if (WARN_ERRORS) \ + mm_obj_warn (self, "couldn't disable interface: %s", error->message); \ + else \ + mm_obj_dbg (self, "couldn't disable interface: %s", error->message); \ + } \ + \ + /* Go on to next step */ \ + ctx = g_task_get_task_data (task); \ + ctx->step++; \ + disabling_step (task); \ } INTERFACE_DISABLE_READY_FN (iface_modem, MM_IFACE_MODEM, TRUE) @@ -10426,12 +10634,22 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + case MM_MODEM_STATE_INITIALIZING: + case MM_MODEM_STATE_DISABLING: + case MM_MODEM_STATE_ENABLING: + case MM_MODEM_STATE_ENABLED: + case MM_MODEM_STATE_SEARCHING: + case MM_MODEM_STATE_REGISTERED: + case MM_MODEM_STATE_DISCONNECTING: + case MM_MODEM_STATE_CONNECTING: + case MM_MODEM_STATE_CONNECTED: default: break; } /* We're in a final state now, go on */ + g_assert (ctx->state_updates); mm_iface_modem_update_state (MM_IFACE_MODEM (ctx->self), MM_MODEM_STATE_DISABLING, MM_MODEM_STATE_CHANGE_REASON_USER_REQUESTED); @@ -10445,19 +10663,19 @@ { DisablingContext *ctx; - /* Don't run new steps if we're cancelled */ - if (g_task_return_error_if_cancelled (task)) { - g_object_unref (task); - return; - } ctx = g_task_get_task_data (task); switch (ctx->step) { case DISABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_WAIT_FOR_FINAL_STATE: + /* cancellability allowed at this point */ + if (g_task_return_error_if_cancelled (task)) { + g_object_unref (task); + return; + } mm_iface_modem_wait_for_final_state (MM_IFACE_MODEM (ctx->self), MM_MODEM_STATE_UNKNOWN, /* just any */ (GAsyncReadyCallback)disabling_wait_for_final_state_ready, @@ -10465,6 +10683,11 @@ return; case DISABLING_STEP_DISCONNECT_BEARERS: + /* cancellability allowed at this point */ + if (g_task_return_error_if_cancelled (task)) { + g_object_unref (task); + return; + } if (ctx->self->priv->modem_bearer_list) { mm_bearer_list_disconnect_all_bearers ( ctx->self->priv->modem_bearer_list, @@ -10472,161 +10695,166 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ + + case DISABLING_STEP_FIRST_AFTER_ENABLE_FAILED: + /* From this point onwards, the disabling sequence will NEVER fail, all + * errors will be treated as non-fatal, including a possible task + * cancellation. */ + g_task_set_check_cancellable (task, FALSE); + ctx->step++; + /* fall through */ case DISABLING_STEP_IFACE_SIMPLE: - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_IFACE_FIRMWARE: - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_IFACE_VOICE: if (ctx->self->priv->modem_voice_dbus_skeleton) { - mm_dbg ("Modem has voice capabilities, disabling the Voice interface..."); - /* Disabling the Modem Voice interface */ + mm_obj_dbg (ctx->self, "modem has voice capabilities, disabling the Voice interface..."); mm_iface_modem_voice_disable (MM_IFACE_MODEM_VOICE (ctx->self), (GAsyncReadyCallback)iface_modem_voice_disable_ready, task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_IFACE_SIGNAL: if (ctx->self->priv->modem_signal_dbus_skeleton) { - mm_dbg ("Modem has extended signal reporting capabilities, disabling the Signal interface..."); - /* Disabling the Modem Signal interface */ + mm_obj_dbg (ctx->self, "modem has extended signal reporting capabilities, disabling the Signal interface..."); mm_iface_modem_signal_disable (MM_IFACE_MODEM_SIGNAL (ctx->self), (GAsyncReadyCallback)iface_modem_signal_disable_ready, task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_IFACE_OMA: if (ctx->self->priv->modem_oma_dbus_skeleton) { - mm_dbg ("Modem has OMA capabilities, disabling the OMA interface..."); - /* Disabling the Modem Oma interface */ + mm_obj_dbg (ctx->self, "modem has OMA capabilities, disabling the OMA interface..."); mm_iface_modem_oma_disable (MM_IFACE_MODEM_OMA (ctx->self), (GAsyncReadyCallback)iface_modem_oma_disable_ready, task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_IFACE_TIME: if (ctx->self->priv->modem_time_dbus_skeleton) { - mm_dbg ("Modem has time capabilities, disabling the Time interface..."); - /* Disabling the Modem Time interface */ + mm_obj_dbg (ctx->self, "modem has time capabilities, disabling the Time interface..."); mm_iface_modem_time_disable (MM_IFACE_MODEM_TIME (ctx->self), (GAsyncReadyCallback)iface_modem_time_disable_ready, task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_IFACE_MESSAGING: if (ctx->self->priv->modem_messaging_dbus_skeleton) { - mm_dbg ("Modem has messaging capabilities, disabling the Messaging interface..."); - /* Disabling the Modem Messaging interface */ + mm_obj_dbg (ctx->self, "modem has messaging capabilities, disabling the Messaging interface..."); mm_iface_modem_messaging_disable (MM_IFACE_MODEM_MESSAGING (ctx->self), (GAsyncReadyCallback)iface_modem_messaging_disable_ready, task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_IFACE_LOCATION: if (ctx->self->priv->modem_location_dbus_skeleton) { - mm_dbg ("Modem has location capabilities, disabling the Location interface..."); - /* Disabling the Modem Location interface */ + mm_obj_dbg (ctx->self, "modem has location capabilities, disabling the Location interface..."); mm_iface_modem_location_disable (MM_IFACE_MODEM_LOCATION (ctx->self), (GAsyncReadyCallback)iface_modem_location_disable_ready, task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_IFACE_CDMA: if (ctx->self->priv->modem_cdma_dbus_skeleton) { - mm_dbg ("Modem has CDMA capabilities, disabling the Modem CDMA interface..."); - /* Disabling the Modem CDMA interface */ + mm_obj_dbg (ctx->self, "modem has CDMA capabilities, disabling the Modem CDMA interface..."); mm_iface_modem_cdma_disable (MM_IFACE_MODEM_CDMA (ctx->self), (GAsyncReadyCallback)iface_modem_cdma_disable_ready, task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_IFACE_3GPP_USSD: if (ctx->self->priv->modem_3gpp_ussd_dbus_skeleton) { - mm_dbg ("Modem has 3GPP/USSD capabilities, disabling the Modem 3GPP/USSD interface..."); - /* Disabling the Modem 3GPP USSD interface */ + mm_obj_dbg (ctx->self, "modem has 3GPP/USSD capabilities, disabling the Modem 3GPP/USSD interface..."); mm_iface_modem_3gpp_ussd_disable (MM_IFACE_MODEM_3GPP_USSD (ctx->self), (GAsyncReadyCallback)iface_modem_3gpp_ussd_disable_ready, task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_IFACE_3GPP: if (ctx->self->priv->modem_3gpp_dbus_skeleton) { - mm_dbg ("Modem has 3GPP capabilities, disabling the Modem 3GPP interface..."); - /* Disabling the Modem 3GPP interface */ + mm_obj_dbg (ctx->self, "modem has 3GPP capabilities, disabling the Modem 3GPP interface..."); mm_iface_modem_3gpp_disable (MM_IFACE_MODEM_3GPP (ctx->self), (GAsyncReadyCallback)iface_modem_3gpp_disable_ready, task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_IFACE_MODEM: /* This skeleton may be NULL when mm_base_modem_disable() gets called at * the same time as modem object disposal. */ if (ctx->self->priv->modem_dbus_skeleton) { - /* Disabling the Modem interface */ + mm_obj_dbg (ctx->self, "disabling the Modem interface..."); mm_iface_modem_disable (MM_IFACE_MODEM (ctx->self), (GAsyncReadyCallback)iface_modem_disable_ready, task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_LAST: - ctx->disabled = TRUE; /* All disabled without errors! */ + ctx->disabled = TRUE; g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); } static void -disable (MMBaseModem *self, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) +common_disable (MMBroadbandModem *self, + gboolean state_updates, + DisablingStep first_step, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) { DisablingContext *ctx; - GTask *task; + GTask *task; ctx = g_new0 (DisablingContext, 1); ctx->self = g_object_ref (self); - ctx->step = DISABLING_STEP_FIRST; + ctx->state_updates = state_updates; + ctx->step = first_step; task = g_task_new (self, cancellable, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify)disabling_context_free); @@ -10634,6 +10862,55 @@ disabling_step (task); } +/* Implicit disabling after failed enable */ + +static gboolean +enable_failed_finish (MMBroadbandModem *self, + GAsyncResult *res, + GError **error) +{ + /* The implicit disabling should never ever fail */ + g_assert (common_disable_finish (self, res, NULL)); + return TRUE; +} + +static void +enable_failed (MMBroadbandModem *self, + GAsyncReadyCallback callback, + gpointer user_data) +{ + common_disable (self, + FALSE, /* don't perform state updates */ + DISABLING_STEP_FIRST_AFTER_ENABLE_FAILED, + NULL, /* no cancellable */ + callback, + user_data); +} + +/* User-requested disable operation */ + +static gboolean +disable_finish (MMBaseModem *self, + GAsyncResult *res, + GError **error) +{ + return common_disable_finish (MM_BROADBAND_MODEM (self), res, error); +} + +static void +disable (MMBaseModem *self, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + common_disable (MM_BROADBAND_MODEM (self), + TRUE, /* perform state updates */ + DISABLING_STEP_FIRST, + cancellable, + callback, + user_data); +} + /*****************************************************************************/ typedef enum { @@ -10657,9 +10934,10 @@ typedef struct { MMBroadbandModem *self; - EnablingStep step; - MMModemState previous_state; - gboolean enabled; + EnablingStep step; + MMModemState previous_state; + gboolean enabled; + GError *saved_error; } EnablingContext; static void enabling_step (GTask *task); @@ -10667,6 +10945,8 @@ static void enabling_context_free (EnablingContext *ctx) { + g_assert (!ctx->saved_error); + if (ctx->enabled) mm_iface_modem_update_state (MM_IFACE_MODEM (ctx->self), MM_MODEM_STATE_ENABLED, @@ -10690,34 +10970,51 @@ return g_task_propagate_boolean (G_TASK (res), error); } +static void +enable_failed_ready (MMBroadbandModem *self, + GAsyncResult *res, + GTask *task) +{ + EnablingContext *ctx; + + ctx = g_task_get_task_data (task); + + /* The disabling run after a failed enable will never fail */ + g_assert (enable_failed_finish (self, res, NULL)); + + g_assert (ctx->saved_error); + g_task_return_error (task, g_steal_pointer (&ctx->saved_error)); + g_object_unref (task); +} + #undef INTERFACE_ENABLE_READY_FN -#define INTERFACE_ENABLE_READY_FN(NAME,TYPE,FATAL_ERRORS) \ - static void \ - NAME##_enable_ready (MMBroadbandModem *self, \ - GAsyncResult *result, \ - GTask *task) \ - { \ - EnablingContext *ctx; \ - GError *error = NULL; \ - \ - if (!mm_##NAME##_enable_finish (TYPE (self), \ - result, \ - &error)) { \ - if (FATAL_ERRORS) { \ - g_task_return_error (task, error); \ - g_object_unref (task); \ - return; \ - } \ - \ - mm_dbg ("Couldn't enable interface: '%s'", \ - error->message); \ - g_error_free (error); \ - } \ - \ - /* Go on to next step */ \ - ctx = g_task_get_task_data (task); \ - ctx->step++; \ - enabling_step (task); \ +#define INTERFACE_ENABLE_READY_FN(NAME,TYPE,FATAL_ERRORS) \ + static void \ + NAME##_enable_ready (MMBroadbandModem *self, \ + GAsyncResult *result, \ + GTask *task) \ + { \ + EnablingContext *ctx; \ + g_autoptr(GError) error = NULL; \ + \ + ctx = g_task_get_task_data (task); \ + \ + if (!mm_##NAME##_enable_finish (TYPE (self), result, &error)) { \ + if (FATAL_ERRORS) { \ + mm_obj_warn (self, "couldn't enable interface: '%s'", error->message); \ + g_assert (!ctx->saved_error); \ + ctx->saved_error = g_steal_pointer (&error); \ + mm_obj_dbg (self, "running implicit disable after failed enable..."); \ + enable_failed (self, (GAsyncReadyCallback) enable_failed_ready, task); \ + return; \ + } \ + \ + mm_obj_dbg (self, "couldn't enable interface: '%s'", error->message); \ + } \ + \ + /* Go on to next step */ \ + ctx->step++; \ + enabling_step (task); \ } INTERFACE_ENABLE_READY_FN (iface_modem, MM_IFACE_MODEM, TRUE) @@ -10800,8 +11097,8 @@ switch (ctx->step) { case ENABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_WAIT_FOR_FINAL_STATE: mm_iface_modem_wait_for_final_state (MM_IFACE_MODEM (ctx->self), @@ -10818,10 +11115,13 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_IFACE_MODEM: + /* From now on, the failure to enable one of the mandatory interfaces + * will trigger the implicit disabling process */ + g_assert (ctx->self->priv->modem_dbus_skeleton != NULL); /* Enabling the Modem interface */ mm_iface_modem_enable (MM_IFACE_MODEM (ctx->self), @@ -10832,7 +11132,7 @@ case ENABLING_STEP_IFACE_3GPP: if (ctx->self->priv->modem_3gpp_dbus_skeleton) { - mm_dbg ("Modem has 3GPP capabilities, enabling the Modem 3GPP interface..."); + mm_obj_dbg (ctx->self, "modem has 3GPP capabilities, enabling the Modem 3GPP interface..."); /* Enabling the Modem 3GPP interface */ mm_iface_modem_3gpp_enable (MM_IFACE_MODEM_3GPP (ctx->self), g_task_get_cancellable (task), @@ -10840,23 +11140,23 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_IFACE_3GPP_USSD: if (ctx->self->priv->modem_3gpp_ussd_dbus_skeleton) { - mm_dbg ("Modem has 3GPP/USSD capabilities, enabling the Modem 3GPP/USSD interface..."); + mm_obj_dbg (ctx->self, "modem has 3GPP/USSD capabilities, enabling the Modem 3GPP/USSD interface..."); mm_iface_modem_3gpp_ussd_enable (MM_IFACE_MODEM_3GPP_USSD (ctx->self), (GAsyncReadyCallback)iface_modem_3gpp_ussd_enable_ready, task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_IFACE_CDMA: if (ctx->self->priv->modem_cdma_dbus_skeleton) { - mm_dbg ("Modem has CDMA capabilities, enabling the Modem CDMA interface..."); + mm_obj_dbg (ctx->self, "modem has CDMA capabilities, enabling the Modem CDMA interface..."); /* Enabling the Modem CDMA interface */ mm_iface_modem_cdma_enable (MM_IFACE_MODEM_CDMA (ctx->self), g_task_get_cancellable (task), @@ -10864,12 +11164,12 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_IFACE_LOCATION: if (ctx->self->priv->modem_location_dbus_skeleton) { - mm_dbg ("Modem has location capabilities, enabling the Location interface..."); + mm_obj_dbg (ctx->self, "modem has location capabilities, enabling the Location interface..."); /* Enabling the Modem Location interface */ mm_iface_modem_location_enable (MM_IFACE_MODEM_LOCATION (ctx->self), g_task_get_cancellable (task), @@ -10877,12 +11177,12 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_IFACE_MESSAGING: if (ctx->self->priv->modem_messaging_dbus_skeleton) { - mm_dbg ("Modem has messaging capabilities, enabling the Messaging interface..."); + mm_obj_dbg (ctx->self, "modem has messaging capabilities, enabling the Messaging interface..."); /* Enabling the Modem Messaging interface */ mm_iface_modem_messaging_enable (MM_IFACE_MODEM_MESSAGING (ctx->self), g_task_get_cancellable (task), @@ -10890,12 +11190,12 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_IFACE_TIME: if (ctx->self->priv->modem_time_dbus_skeleton) { - mm_dbg ("Modem has time capabilities, enabling the Time interface..."); + mm_obj_dbg (ctx->self, "modem has time capabilities, enabling the Time interface..."); /* Enabling the Modem Time interface */ mm_iface_modem_time_enable (MM_IFACE_MODEM_TIME (ctx->self), g_task_get_cancellable (task), @@ -10903,12 +11203,12 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_IFACE_SIGNAL: if (ctx->self->priv->modem_signal_dbus_skeleton) { - mm_dbg ("Modem has extended signal reporting capabilities, enabling the Signal interface..."); + mm_obj_dbg (ctx->self, "modem has extended signal reporting capabilities, enabling the Signal interface..."); /* Enabling the Modem Signal interface */ mm_iface_modem_signal_enable (MM_IFACE_MODEM_SIGNAL (ctx->self), g_task_get_cancellable (task), @@ -10916,12 +11216,12 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_IFACE_OMA: if (ctx->self->priv->modem_oma_dbus_skeleton) { - mm_dbg ("Modem has OMA capabilities, enabling the OMA interface..."); + mm_obj_dbg (ctx->self, "modem has OMA capabilities, enabling the OMA interface..."); /* Enabling the Modem Oma interface */ mm_iface_modem_oma_enable (MM_IFACE_MODEM_OMA (ctx->self), g_task_get_cancellable (task), @@ -10929,12 +11229,12 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_IFACE_VOICE: if (ctx->self->priv->modem_voice_dbus_skeleton) { - mm_dbg ("Modem has voice capabilities, enabling the Voice interface..."); + mm_obj_dbg (ctx->self, "modem has voice capabilities, enabling the Voice interface..."); /* Enabling the Modem Voice interface */ mm_iface_modem_voice_enable (MM_IFACE_MODEM_VOICE (ctx->self), g_task_get_cancellable (task), @@ -10942,16 +11242,16 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_IFACE_FIRMWARE: - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_IFACE_SIMPLE: - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_LAST: ctx->enabled = TRUE; @@ -10969,6 +11269,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -11033,6 +11336,9 @@ /* Just return success, don't relaunch enabling */ g_task_return_boolean (task, TRUE); break; + + default: + g_assert_not_reached (); } g_object_unref (task); @@ -11078,7 +11384,7 @@ if (ctx->ports_ctx && MM_BROADBAND_MODEM_GET_CLASS (ctx->self)->initialization_stopped && !MM_BROADBAND_MODEM_GET_CLASS (ctx->self)->initialization_stopped (ctx->self, ctx->ports_ctx, &error)) { - mm_warn ("Error when stopping the initialization sequence: %s", error->message); + mm_obj_warn (ctx->self, "error when stopping the initialization sequence: %s", error->message); g_error_free (error); } @@ -11108,7 +11414,7 @@ /* May return NULL without error */ ports_ctx = MM_BROADBAND_MODEM_GET_CLASS (self)->initialization_started_finish (self, result, &error); if (error) { - mm_warn ("Couldn't start initialization: %s", error->message); + mm_obj_warn (self, "couldn't start initialization: %s", error->message); g_error_free (error); /* There is no Modem interface yet, so just update the variable directly */ @@ -11144,7 +11450,7 @@ MMModemStateFailedReason failed_reason = MM_MODEM_STATE_FAILED_REASON_UNKNOWN; /* Report the new FAILED state */ - mm_warn ("Modem couldn't be initialized: %s", error->message); + mm_obj_warn (self, "modem couldn't be initialized: %s", error->message); if (g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, @@ -11203,8 +11509,8 @@ \ if (!mm_##NAME##_initialize_finish (TYPE (self), result, &error)) { \ if (FATAL_ERRORS) { \ - mm_warn ("Couldn't initialize interface: '%s'", \ - error->message); \ + mm_obj_warn (self, "couldn't initialize interface: '%s'", \ + error->message); \ g_error_free (error); \ \ /* Report the new FAILED state */ \ @@ -11217,8 +11523,8 @@ return; \ } \ \ - mm_dbg ("Couldn't initialize interface: '%s'", \ - error->message); \ + mm_obj_dbg (self, "couldn't initialize interface: '%s'", \ + error->message); \ /* Just shutdown this interface */ \ mm_##NAME##_shutdown (TYPE (self)); \ g_error_free (error); \ @@ -11258,14 +11564,14 @@ switch (ctx->step) { case INITIALIZE_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZE_STEP_SETUP_PORTS: if (MM_BROADBAND_MODEM_GET_CLASS (ctx->self)->setup_ports) MM_BROADBAND_MODEM_GET_CLASS (ctx->self)->setup_ports (ctx->self); - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZE_STEP_STARTED: if (MM_BROADBAND_MODEM_GET_CLASS (ctx->self)->initialization_started && @@ -11275,8 +11581,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZE_STEP_SETUP_SIMPLE_STATUS: /* Simple status must be created before any interface initialization, @@ -11284,8 +11590,8 @@ */ if (!ctx->self->priv->modem_simple_status) ctx->self->priv->modem_simple_status = mm_simple_status_new (); - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZE_STEP_IFACE_MODEM: /* Initialize the Modem interface */ @@ -11305,8 +11611,8 @@ return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZE_STEP_IFACE_3GPP_USSD: if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (ctx->self))) { @@ -11316,8 +11622,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZE_STEP_IFACE_CDMA: if (mm_iface_modem_is_cdma (MM_IFACE_MODEM (ctx->self))) { @@ -11328,8 +11634,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZE_STEP_IFACE_LOCATION: /* Initialize the Location interface */ @@ -11373,9 +11679,9 @@ case INITIALIZE_STEP_FALLBACK_LIMITED: /* All the initialization steps after this one will be run both on - * successful and locked/failed initializations. - * Fall down to next step */ + * successful and locked/failed initializations. */ ctx->step++; + /* fall through */ case INITIALIZE_STEP_IFACE_VOICE: /* Initialize the Voice interface */ @@ -11408,15 +11714,16 @@ if (is_sim_hot_swap_supported) { if (!is_sim_hot_swap_configured) { - mm_warn ("SIM hot swap supported but not configured. Skipping opening ports"); + mm_obj_warn (ctx->self, "SIM hot swap supported but not configured. Skipping opening ports"); } else { PortsContext *ports; GError *error = NULL; - mm_dbg ("Creating ports context for SIM hot swap"); + mm_obj_dbg (ctx->self, "creating ports context for SIM hot swap"); ports = ports_context_new (); if (!ports_context_open (ctx->self, ports, FALSE, FALSE, FALSE, &error)) { - mm_warn ("Couldn't open ports during Modem SIM hot swap enabling: %s", error? error->message : "unknown reason"); + mm_obj_warn (ctx->self, "couldn't open ports during Modem SIM hot swap enabling: %s", + error ? error->message : "unknown reason"); g_error_free (error); } else { ctx->self->priv->sim_hot_swap_ports_ctx = ports_context_ref (ports); @@ -11426,16 +11733,16 @@ } } } else - mm_dbg ("Ports context for SIM hot swap already available"); + mm_obj_dbg (ctx->self, "ports context for SIM hot swap already available"); - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZE_STEP_IFACE_SIMPLE: if (ctx->self->priv->modem_state != MM_MODEM_STATE_FAILED) mm_iface_modem_simple_initialize (MM_IFACE_MODEM_SIMPLE (ctx->self)); - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZE_STEP_LAST: if (ctx->self->priv->modem_state == MM_MODEM_STATE_FAILED) { @@ -11464,13 +11771,13 @@ if (reason == MM_MODEM_STATE_FAILED_REASON_SIM_MISSING) { if (!is_sim_hot_swap_supported) { - mm_dbg ("SIM is missing, but this modem does not support SIM hot swap."); + mm_obj_dbg (ctx->self, "SIM is missing, but this modem does not support SIM hot swap."); } else if (!is_sim_hot_swap_configured) { - mm_warn ("SIM is missing, but SIM hot swap could not be configured."); + mm_obj_warn (ctx->self, "SIM is missing, but SIM hot swap could not be configured."); } else if (!ctx->self->priv->sim_hot_swap_ports_ctx) { - mm_err ("SIM is missing and SIM hot swap is configured, but ports are not opened."); + mm_obj_err (ctx->self, "SIM is missing and SIM hot swap is configured, but ports are not opened."); } else { - mm_dbg ("SIM is missing, but SIM hot swap is enabled. Waiting for SIM..."); + mm_obj_dbg (ctx->self, "SIM is missing, but SIM hot swap is enabled; waiting for SIM..."); error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_WRONG_STATE, "Modem is unusable due to SIM missing, " @@ -11525,6 +11832,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -11590,6 +11900,9 @@ /* Just return success, don't relaunch initialization */ g_task_return_boolean (task, TRUE); break; + + default: + g_assert_not_reached (); } g_object_unref (task); @@ -11597,43 +11910,31 @@ /*****************************************************************************/ -gchar * -mm_broadband_modem_take_and_convert_to_utf8 (MMBroadbandModem *self, - gchar *str) -{ - /* should only be used AFTER current charset is set */ - if (self->priv->modem_current_charset == MM_MODEM_CHARSET_UNKNOWN) - return str; - - return mm_charset_take_and_convert_to_utf8 (str, - self->priv->modem_current_charset); -} - -gchar * -mm_broadband_modem_take_and_convert_to_current_charset (MMBroadbandModem *self, - gchar *str) -{ - /* should only be used AFTER current charset is set */ - if (self->priv->modem_current_charset == MM_MODEM_CHARSET_UNKNOWN) - return str; - - return mm_utf8_take_and_convert_to_charset (str, self->priv->modem_current_charset); -} - MMModemCharset mm_broadband_modem_get_current_charset (MMBroadbandModem *self) { return self->priv->modem_current_charset; } +/*****************************************************************************/ + gchar * -mm_broadband_modem_create_device_identifier (MMBroadbandModem *self, - const gchar *ati, - const gchar *ati1) -{ +mm_broadband_modem_create_device_identifier (MMBroadbandModem *self, + const gchar *ati, + const gchar *ati1, + GError **error) +{ + /* do nothing if device has gone already */ + if (!self->priv->modem_dbus_skeleton) { + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, + "Modem interface skeleton unavailable"); + return NULL; + } + return (mm_create_device_identifier ( mm_base_modem_get_vendor_id (MM_BASE_MODEM (self)), mm_base_modem_get_product_id (MM_BASE_MODEM (self)), + self, ati, ati1, mm_gdbus_modem_get_equipment_identifier ( @@ -11646,36 +11947,18 @@ MM_GDBUS_MODEM (self->priv->modem_dbus_skeleton)))); } - /*****************************************************************************/ -static void -after_hotswap_event_disable_ready (MMBaseModem *self, - GAsyncResult *res, - gpointer user_data) -{ - GError *error = NULL; - mm_base_modem_disable_finish (self, res, &error); - if (error) { - mm_err ("Disable modem error: %s", error->message); - g_error_free (error); - } else { - mm_base_modem_set_valid (self, FALSE); - } -} void -mm_broadband_modem_update_sim_hot_swap_detected (MMBroadbandModem *self) +mm_broadband_modem_sim_hot_swap_detected (MMBroadbandModem *self) { if (self->priv->sim_hot_swap_ports_ctx) { - mm_dbg ("Releasing SIM hot swap ports context"); + mm_obj_dbg (self, "releasing SIM hot swap ports context"); ports_context_unref (self->priv->sim_hot_swap_ports_ctx); self->priv->sim_hot_swap_ports_ctx = NULL; } - mm_base_modem_set_reprobe (MM_BASE_MODEM (self), TRUE); - mm_base_modem_disable (MM_BASE_MODEM (self), - (GAsyncReadyCallback) after_hotswap_event_disable_ready, - NULL); + mm_base_modem_process_sim_event (MM_BASE_MODEM (self)); } /*****************************************************************************/ @@ -11757,6 +12040,10 @@ g_clear_object (&self->priv->modem_sim); self->priv->modem_sim = g_value_dup_object (value); break; + case PROP_MODEM_SIM_SLOTS: + g_clear_pointer (&self->priv->modem_sim_slots, g_ptr_array_unref); + self->priv->modem_sim_slots = g_value_dup_boxed (value); + break; case PROP_MODEM_BEARER_LIST: g_clear_object (&self->priv->modem_bearer_list); self->priv->modem_bearer_list = g_value_dup_object (value); @@ -11776,6 +12063,9 @@ case PROP_MODEM_3GPP_EPS_NETWORK_SUPPORTED: self->priv->modem_3gpp_eps_network_supported = g_value_get_boolean (value); break; + case PROP_MODEM_3GPP_5GS_NETWORK_SUPPORTED: + self->priv->modem_3gpp_5gs_network_supported = g_value_get_boolean (value); + break; case PROP_MODEM_3GPP_IGNORED_FACILITY_LOCKS: self->priv->modem_3gpp_ignored_facility_locks = g_value_get_flags (value); break; @@ -11834,6 +12124,9 @@ case PROP_MODEM_CARRIER_CONFIG_MAPPING: self->priv->carrier_config_mapping = g_value_dup_string (value); break; + case PROP_MODEM_FIRMWARE_IGNORE_CARRIER: + self->priv->modem_firmware_ignore_carrier = g_value_get_boolean (value); + break; case PROP_FLOW_CONTROL: self->priv->flow_control = g_value_get_flags (value); break; @@ -11894,6 +12187,9 @@ case PROP_MODEM_SIM: g_value_set_object (value, self->priv->modem_sim); break; + case PROP_MODEM_SIM_SLOTS: + g_value_set_boxed (value, self->priv->modem_sim_slots); + break; case PROP_MODEM_BEARER_LIST: g_value_set_object (value, self->priv->modem_bearer_list); break; @@ -11912,6 +12208,9 @@ case PROP_MODEM_3GPP_EPS_NETWORK_SUPPORTED: g_value_set_boolean (value, self->priv->modem_3gpp_eps_network_supported); break; + case PROP_MODEM_3GPP_5GS_NETWORK_SUPPORTED: + g_value_set_boolean (value, self->priv->modem_3gpp_5gs_network_supported); + break; case PROP_MODEM_3GPP_IGNORED_FACILITY_LOCKS: g_value_set_flags (value, self->priv->modem_3gpp_ignored_facility_locks); break; @@ -11966,6 +12265,9 @@ case PROP_MODEM_CARRIER_CONFIG_MAPPING: g_value_set_string (value, self->priv->carrier_config_mapping); break; + case PROP_MODEM_FIRMWARE_IGNORE_CARRIER: + g_value_set_boolean (value, self->priv->modem_firmware_ignore_carrier); + break; case PROP_FLOW_CONTROL: g_value_set_flags (value, self->priv->flow_control); break; @@ -11992,6 +12294,7 @@ self->priv->modem_3gpp_cs_network_supported = TRUE; self->priv->modem_3gpp_ps_network_supported = TRUE; self->priv->modem_3gpp_eps_network_supported = FALSE; + self->priv->modem_3gpp_5gs_network_supported = FALSE; self->priv->modem_3gpp_ignored_facility_locks = MM_MODEM_3GPP_FACILITY_NONE; self->priv->modem_cdma_cdma1x_registration_state = MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN; self->priv->modem_cdma_evdo_registration_state = MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN; @@ -12094,6 +12397,7 @@ g_clear_object (&self->priv->modem_3gpp_initial_eps_bearer); g_clear_object (&self->priv->modem_sim); + g_clear_pointer (&self->priv->modem_sim_slots, g_ptr_array_unref); g_clear_object (&self->priv->modem_bearer_list); g_clear_object (&self->priv->modem_messaging_sms_list); g_clear_object (&self->priv->modem_voice_call_list); @@ -12456,6 +12760,10 @@ MM_IFACE_MODEM_SIM); g_object_class_override_property (object_class, + PROP_MODEM_SIM_SLOTS, + MM_IFACE_MODEM_SIM_SLOTS); + + g_object_class_override_property (object_class, PROP_MODEM_BEARER_LIST, MM_IFACE_MODEM_BEARER_LIST); @@ -12480,6 +12788,10 @@ MM_IFACE_MODEM_3GPP_EPS_NETWORK_SUPPORTED); g_object_class_override_property (object_class, + PROP_MODEM_3GPP_5GS_NETWORK_SUPPORTED, + MM_IFACE_MODEM_3GPP_5GS_NETWORK_SUPPORTED); + + g_object_class_override_property (object_class, PROP_MODEM_3GPP_IGNORED_FACILITY_LOCKS, MM_IFACE_MODEM_3GPP_IGNORED_FACILITY_LOCKS); @@ -12551,6 +12863,10 @@ PROP_MODEM_CARRIER_CONFIG_MAPPING, MM_IFACE_MODEM_CARRIER_CONFIG_MAPPING); + g_object_class_override_property (object_class, + PROP_MODEM_FIRMWARE_IGNORE_CARRIER, + MM_IFACE_MODEM_FIRMWARE_IGNORE_CARRIER); + properties[PROP_FLOW_CONTROL] = g_param_spec_flags (MM_BROADBAND_MODEM_FLOW_CONTROL, "Flow control", diff -Nru modemmanager-1.12.8/src/mm-broadband-modem.h modemmanager-1.16.6/src/mm-broadband-modem.h --- modemmanager-1.12.8/src/mm-broadband-modem.h 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/src/mm-broadband-modem.h 2021-06-06 21:40:59.000000000 +0800 @@ -92,6 +92,7 @@ }; GType mm_broadband_modem_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMBroadbandModem, g_object_unref) MMBroadbandModem *mm_broadband_modem_new (const gchar *device, const gchar **drivers, @@ -99,25 +100,14 @@ guint16 vendor_id, guint16 product_id); -/* Convert the given string, which comes in the charset currently set in the - * modem, to UTF-8. Given in the API so that subclasses can also use it directly. - */ -gchar *mm_broadband_modem_take_and_convert_to_utf8 (MMBroadbandModem *self, - gchar *str); - -/* Convert the given string, which comes in UTF-8, to the charset currently set - * in the modem. Given in the API so that subclasses can also use it directly. - */ -gchar *mm_broadband_modem_take_and_convert_to_current_charset (MMBroadbandModem *self, - gchar *str); - MMModemCharset mm_broadband_modem_get_current_charset (MMBroadbandModem *self); /* Create a unique device identifier string using the ATI and ATI1 replies and some * additional internal info */ -gchar *mm_broadband_modem_create_device_identifier (MMBroadbandModem *self, - const gchar *ati, - const gchar *ati1); +gchar *mm_broadband_modem_create_device_identifier (MMBroadbandModem *self, + const gchar *ati, + const gchar *ati1, + GError **error); /* Locking/unlocking SMS storages */ void mm_broadband_modem_lock_sms_storages (MMBroadbandModem *self, @@ -132,6 +122,6 @@ gboolean mem1, gboolean mem2); /* Helper to update SIM hot swap */ -void mm_broadband_modem_update_sim_hot_swap_detected (MMBroadbandModem *self); +void mm_broadband_modem_sim_hot_swap_detected (MMBroadbandModem *self); #endif /* MM_BROADBAND_MODEM_H */ diff -Nru modemmanager-1.12.8/src/mm-call-list.h modemmanager-1.16.6/src/mm-call-list.h --- modemmanager-1.12.8/src/mm-call-list.h 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/src/mm-call-list.h 2021-06-06 21:40:59.000000000 +0800 @@ -55,6 +55,7 @@ }; GType mm_call_list_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMCallList, g_object_unref) MMCallList *mm_call_list_new (MMBaseModem *modem); diff -Nru modemmanager-1.12.8/src/mm-charsets.c modemmanager-1.16.6/src/mm-charsets.c --- modemmanager-1.12.8/src/mm-charsets.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-charsets.c 2021-06-06 21:40:59.000000000 +0800 @@ -11,6 +11,7 @@ * GNU General Public License for more details: * * Copyright (C) 2010 Red Hat, Inc. + * Copyright (C) 2020 Aleksander Morgado */ #include @@ -26,227 +27,77 @@ #include "mm-charsets.h" #include "mm-log.h" -typedef struct { - const char *gsm_name; - const char *other_name; - const char *iconv_from_name; - const char *iconv_to_name; - MMModemCharset charset; -} CharsetEntry; - -static CharsetEntry charset_map[] = { - { "UTF-8", "UTF8", "UTF-8", "UTF-8//TRANSLIT", MM_MODEM_CHARSET_UTF8 }, - { "UCS2", NULL, "UCS-2BE", "UCS-2BE//TRANSLIT", MM_MODEM_CHARSET_UCS2 }, - { "IRA", "ASCII", "ASCII", "ASCII//TRANSLIT", MM_MODEM_CHARSET_IRA }, - { "GSM", NULL, NULL, NULL, MM_MODEM_CHARSET_GSM }, - { "8859-1", NULL, "ISO8859-1", "ISO8859-1//TRANSLIT", MM_MODEM_CHARSET_8859_1 }, - { "PCCP437", "CP437", "CP437", "CP437//TRANSLIT", MM_MODEM_CHARSET_PCCP437 }, - { "PCDN", "CP850", "CP850", "CP850//TRANSLIT", MM_MODEM_CHARSET_PCDN }, - { "HEX", NULL, NULL, NULL, MM_MODEM_CHARSET_HEX }, - { NULL, NULL, NULL, NULL, MM_MODEM_CHARSET_UNKNOWN } -}; - -const char * -mm_modem_charset_to_string (MMModemCharset charset) -{ - CharsetEntry *iter = &charset_map[0]; +/* Common fallback character when transliteration is enabled */ +static const gchar *translit_fallback = "?"; - g_return_val_if_fail (charset != MM_MODEM_CHARSET_UNKNOWN, NULL); +/******************************************************************************/ +/* Expected charset settings */ - while (iter->gsm_name) { - if (iter->charset == charset) - return iter->gsm_name; - iter++; - } - g_warn_if_reached (); - return NULL; -} +typedef struct { + MMModemCharset charset; + const gchar *gsm_name; + const gchar *other_name; + const gchar *iconv_name; +} CharsetSettings; + +static const CharsetSettings charset_settings[] = { + { MM_MODEM_CHARSET_UTF8, "UTF-8", "UTF8", "UTF-8" }, + { MM_MODEM_CHARSET_UCS2, "UCS2", NULL, "UCS-2BE" }, + { MM_MODEM_CHARSET_IRA, "IRA", "ASCII", "ASCII" }, + { MM_MODEM_CHARSET_GSM, "GSM", NULL, NULL }, + { MM_MODEM_CHARSET_8859_1, "8859-1", NULL, "ISO8859-1" }, + { MM_MODEM_CHARSET_PCCP437, "PCCP437", "CP437", "CP437" }, + { MM_MODEM_CHARSET_PCDN, "PCDN", "CP850", "CP850" }, + { MM_MODEM_CHARSET_UTF16, "UTF-16", "UTF16", "UTF-16BE" }, +}; MMModemCharset -mm_modem_charset_from_string (const char *string) +mm_modem_charset_from_string (const gchar *string) { - CharsetEntry *iter = &charset_map[0]; + guint i; g_return_val_if_fail (string != NULL, MM_MODEM_CHARSET_UNKNOWN); - while (iter->gsm_name) { - if (strcasestr (string, iter->gsm_name)) - return iter->charset; - if (iter->other_name && strcasestr (string, iter->other_name)) - return iter->charset; - iter++; + for (i = 0; i < G_N_ELEMENTS (charset_settings); i++) { + if (strcasestr (string, charset_settings[i].gsm_name)) + return charset_settings[i].charset; + if (charset_settings[i].other_name && strcasestr (string, charset_settings[i].other_name)) + return charset_settings[i].charset; } return MM_MODEM_CHARSET_UNKNOWN; } -static const char * -charset_iconv_to (MMModemCharset charset) -{ - CharsetEntry *iter = &charset_map[0]; - - g_return_val_if_fail (charset != MM_MODEM_CHARSET_UNKNOWN, NULL); - - while (iter->gsm_name) { - if (iter->charset == charset) - return iter->iconv_to_name; - iter++; - } - g_warn_if_reached (); - return NULL; -} - -static const char * -charset_iconv_from (MMModemCharset charset) +static const CharsetSettings * +lookup_charset_settings (MMModemCharset charset) { - CharsetEntry *iter = &charset_map[0]; + guint i; g_return_val_if_fail (charset != MM_MODEM_CHARSET_UNKNOWN, NULL); - - while (iter->gsm_name) { - if (iter->charset == charset) - return iter->iconv_from_name; - iter++; + for (i = 0; i < G_N_ELEMENTS (charset_settings); i++) { + if (charset_settings[i].charset == charset) + return &charset_settings[i]; } g_warn_if_reached (); return NULL; } -gboolean -mm_modem_charset_byte_array_append (GByteArray *array, - const char *utf8, - gboolean quoted, - MMModemCharset charset) -{ - const char *iconv_to; - char *converted; - GError *error = NULL; - gsize written = 0; - - g_return_val_if_fail (array != NULL, FALSE); - g_return_val_if_fail (utf8 != NULL, FALSE); - - iconv_to = charset_iconv_to (charset); - g_return_val_if_fail (iconv_to != NULL, FALSE); - - converted = g_convert (utf8, -1, iconv_to, "UTF-8", NULL, &written, &error); - if (!converted) { - if (error) { - mm_warn ("failed to convert '%s' to %s character set: (%d) %s", - utf8, iconv_to, error->code, error->message); - g_error_free (error); - } - return FALSE; - } - - if (quoted) - g_byte_array_append (array, (const guint8 *) "\"", 1); - g_byte_array_append (array, (const guint8 *) converted, written); - if (quoted) - g_byte_array_append (array, (const guint8 *) "\"", 1); - - g_free (converted); - return TRUE; -} - -gchar * -mm_modem_charset_byte_array_to_utf8 (GByteArray *array, - MMModemCharset charset) -{ - char *converted; - const char *iconv_from; - GError *error = NULL; - - g_return_val_if_fail (array != NULL, NULL); - g_return_val_if_fail (charset != MM_MODEM_CHARSET_UNKNOWN, NULL); - - iconv_from = charset_iconv_from (charset); - g_return_val_if_fail (iconv_from != NULL, FALSE); - - converted = g_convert ((const gchar *)array->data, array->len, - "UTF-8//TRANSLIT", iconv_from, - NULL, NULL, &error); - if (!converted || error) { - g_clear_error (&error); - converted = NULL; - } - - return converted; -} - -char * -mm_modem_charset_hex_to_utf8 (const char *src, MMModemCharset charset) -{ - char *unconverted, *converted; - const char *iconv_from; - gsize unconverted_len = 0; - GError *error = NULL; - - g_return_val_if_fail (src != NULL, NULL); - g_return_val_if_fail (charset != MM_MODEM_CHARSET_UNKNOWN, NULL); - - iconv_from = charset_iconv_from (charset); - g_return_val_if_fail (iconv_from != NULL, FALSE); - - unconverted = mm_utils_hexstr2bin (src, &unconverted_len); - if (!unconverted) - return NULL; - - if (charset == MM_MODEM_CHARSET_UTF8 || charset == MM_MODEM_CHARSET_IRA) - return unconverted; - - converted = g_convert (unconverted, unconverted_len, - "UTF-8//TRANSLIT", iconv_from, - NULL, NULL, &error); - if (!converted || error) { - g_clear_error (&error); - converted = NULL; - } - - g_free (unconverted); - - return converted; -} - -char * -mm_modem_charset_utf8_to_hex (const char *src, MMModemCharset charset) +const gchar * +mm_modem_charset_to_string (MMModemCharset charset) { - gsize converted_len = 0; - char *converted; - const char *iconv_to; - GError *error = NULL; - gchar *hex; - - g_return_val_if_fail (src != NULL, NULL); - g_return_val_if_fail (charset != MM_MODEM_CHARSET_UNKNOWN, NULL); + const CharsetSettings *settings; - iconv_to = charset_iconv_from (charset); - g_return_val_if_fail (iconv_to != NULL, FALSE); - - if (charset == MM_MODEM_CHARSET_UTF8 || charset == MM_MODEM_CHARSET_IRA) - return g_strdup (src); - - converted = g_convert (src, strlen (src), - iconv_to, "UTF-8//TRANSLIT", - NULL, &converted_len, &error); - if (!converted || error) { - g_clear_error (&error); - g_free (converted); - return NULL; - } - - /* Get hex representation of the string */ - hex = mm_utils_bin2hexstr ((guint8 *)converted, converted_len); - g_free (converted); - return hex; + settings = lookup_charset_settings (charset); + return settings ? settings->gsm_name : NULL; } +/******************************************************************************/ /* GSM 03.38 encoding conversion stuff */ #define GSM_DEF_ALPHABET_SIZE 128 #define GSM_EXT_ALPHABET_SIZE 10 typedef struct GsmUtf8Mapping { - gchar chars[3]; + gchar chars[3]; guint8 len; guint8 gsm; /* only used for extended GSM charset */ } GsmUtf8Mapping; @@ -330,7 +181,8 @@ }; static guint8 -gsm_def_char_to_utf8 (const guint8 gsm, guint8 out_utf8[2]) +gsm_def_char_to_utf8 (const guint8 gsm, + guint8 out_utf8[2]) { g_return_val_if_fail (gsm < GSM_DEF_ALPHABET_SIZE, 0); memcpy (&out_utf8[0], &gsm_def_utf8_alphabet[gsm].chars[0], gsm_def_utf8_alphabet[gsm].len); @@ -338,9 +190,11 @@ } static gboolean -utf8_to_gsm_def_char (const char *utf8, guint32 len, guint8 *out_gsm) +utf8_to_gsm_def_char (const gchar *utf8, + guint32 len, + guint8 *out_gsm) { - int i; + gint i; if (len > 0 && len < 4) { for (i = 0; i < GSM_DEF_ALPHABET_SIZE; i++) { @@ -355,6 +209,22 @@ return FALSE; } +static gboolean +translit_gsm_nul_byte (GByteArray *gsm) +{ + guint i; + guint n_replaces = 0; + + for (i = 0; i < gsm->len; i++) { + if (gsm->data[i] == 0x00) { + utf8_to_gsm_def_char (translit_fallback, strlen (translit_fallback), &gsm->data[i]); + n_replaces++; + } + } + + return (n_replaces > 0); +} + #define EONE(a, g) { {a, 0x00, 0x00}, 1, g } #define ETHR(a, b, c, g) { {a, b, c}, 3, g } @@ -377,7 +247,8 @@ #define GSM_ESCAPE_CHAR 0x1b static guint8 -gsm_ext_char_to_utf8 (const guint8 gsm, guint8 out_utf8[3]) +gsm_ext_char_to_utf8 (const guint8 gsm, + guint8 out_utf8[3]) { int i; @@ -391,7 +262,9 @@ } static gboolean -utf8_to_gsm_ext_char (const char *utf8, guint32 len, guint8 *out_gsm) +utf8_to_gsm_ext_char (const gchar *utf8, + guint32 len, + guint8 *out_gsm) { int i; @@ -408,11 +281,14 @@ return FALSE; } -guint8 * -mm_charset_gsm_unpacked_to_utf8 (const guint8 *gsm, guint32 len) +static guint8 * +charset_gsm_unpacked_to_utf8 (const guint8 *gsm, + guint32 len, + gboolean translit, + GError **error) { - int i; - GByteArray *utf8; + g_autoptr(GByteArray) utf8 = NULL; + guint i; g_return_val_if_fail (gsm != NULL, NULL); g_return_val_if_fail (len < 4096, NULL); @@ -458,25 +334,36 @@ if (ulen) g_byte_array_append (utf8, &uchars[0], ulen); - else - g_byte_array_append (utf8, (guint8 *) "?", 1); + else if (translit) + g_byte_array_append (utf8, (guint8 *) translit_fallback, strlen (translit_fallback)); + else { + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS, + "Invalid conversion from GSM7"); + return NULL; + } } - g_byte_array_append (utf8, (guint8 *) "\0", 1); /* NULL terminator */ - return g_byte_array_free (utf8, FALSE); + /* Always make sure returned string is NUL terminated */ + g_byte_array_append (utf8, (guint8 *) "\0", 1); + return g_byte_array_free (g_steal_pointer (&utf8), FALSE); } -guint8 * -mm_charset_utf8_to_unpacked_gsm (const char *utf8, guint32 *out_len) +static guint8 * +charset_utf8_to_unpacked_gsm (const gchar *utf8, + gboolean translit, + guint32 *out_len, + GError **error) { - GByteArray *gsm; - const char *c = utf8, *next = c; - static const guint8 gesc = GSM_ESCAPE_CHAR; - int i = 0; - - g_return_val_if_fail (utf8 != NULL, NULL); - g_return_val_if_fail (out_len != NULL, NULL); - g_return_val_if_fail (g_utf8_validate (utf8, -1, NULL), NULL); + g_autoptr(GByteArray) gsm = NULL; + const gchar *c; + const gchar *next; + static const guint8 gesc = GSM_ESCAPE_CHAR; + + if (!utf8 || !g_utf8_validate (utf8, -1, NULL)) { + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS, + "Couldn't convert UTF-8 to GSM: input UTF-8 validation failed"); + return NULL; + } /* worst case initial length */ gsm = g_byte_array_sized_new (g_utf8_strlen (utf8, -1) * 2 + 1); @@ -484,10 +371,13 @@ if (*utf8 == 0x00) { /* Zero-length string */ g_byte_array_append (gsm, (guint8 *) "\0", 1); - *out_len = 0; - return g_byte_array_free (gsm, FALSE); + if (out_len) + *out_len = 0; + return g_byte_array_free (g_steal_pointer (&gsm), FALSE); } + next = utf8; + c = utf8; while (next && *next) { guint8 gch = 0x3f; /* 0x3f == '?' */ @@ -498,19 +388,37 @@ /* Add the escape char */ g_byte_array_append (gsm, &gesc, 1); g_byte_array_append (gsm, &gch, 1); - } else if (utf8_to_gsm_def_char (c, next - c, &gch)) + } else if (utf8_to_gsm_def_char (c, next - c, &gch)) { g_byte_array_append (gsm, &gch, 1); + } else if (translit) { + /* add ? */ + g_byte_array_append (gsm, &gch, 1); + } else { + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS, + "Couldn't convert UTF-8 char to GSM"); + return NULL; + } c = next; - i++; } - *out_len = gsm->len; - return g_byte_array_free (gsm, FALSE); + /* Output length doesn't consider terminating NUL byte */ + if (out_len) + *out_len = gsm->len; + + /* Always make sure returned string is NUL terminated */ + g_byte_array_append (gsm, (guint8 *) "\0", 1); + return g_byte_array_free (g_steal_pointer (&gsm), FALSE); } +/******************************************************************************/ +/* Checks to see whether conversion to a target charset may be done without + * any loss. */ + static gboolean -gsm_is_subset (gunichar c, const char *utf8, gsize ulen) +gsm_is_subset (gunichar c, + const gchar *utf8, + gsize ulen) { guint8 gsm; @@ -522,25 +430,41 @@ } static gboolean -ira_is_subset (gunichar c, const char *utf8, gsize ulen) +ira_is_subset (gunichar c, + const gchar *utf8, + gsize ulen) { return (ulen == 1); } static gboolean -ucs2_is_subset (gunichar c, const char *utf8, gsize ulen) +ucs2_is_subset (gunichar c, + const gchar *utf8, + gsize ulen) { return (c <= 0xFFFF); } static gboolean -iso88591_is_subset (gunichar c, const char *utf8, gsize ulen) +utf16_is_subset (gunichar c, + const gchar *utf8, + gsize ulen) +{ + return TRUE; +} + +static gboolean +iso88591_is_subset (gunichar c, + const gchar *utf8, + gsize ulen) { return (c <= 0xFF); } static gboolean -pccp437_is_subset (gunichar c, const char *utf8, gsize ulen) +pccp437_is_subset (gunichar c, + const gchar *utf8, + gsize ulen) { static const gunichar t[] = { 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7, 0x00ea, @@ -559,7 +483,7 @@ 0x2321, 0x00f7, 0x2248, 0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0 }; - int i; + guint i; if (c <= 0x7F) return TRUE; @@ -571,7 +495,9 @@ } static gboolean -pcdn_is_subset (gunichar c, const char *utf8, gsize ulen) +pcdn_is_subset (gunichar c, + const gchar *utf8, + gsize ulen) { static const gunichar t[] = { 0x00c7, 0x00fc, 0x00e9, 0x00e2, 0x00e4, 0x00e0, 0x00e5, 0x00e7, 0x00ea, @@ -590,7 +516,7 @@ 0x00a7, 0x00f7, 0x00b8, 0x00b0, 0x00a8, 0x00b7, 0x00b9, 0x00b3, 0x00b2, 0x25a0, 0x00a0 }; - int i; + guint i; if (c <= 0x7F) return TRUE; @@ -603,33 +529,27 @@ typedef struct { MMModemCharset cs; - gboolean (*func) (gunichar c, const char *utf8, gsize ulen); - guint charsize; + gboolean (*func) (gunichar c, + const gchar *utf8, + gsize ulen); } SubsetEntry; -SubsetEntry subset_table[] = { - { MM_MODEM_CHARSET_GSM, gsm_is_subset }, - { MM_MODEM_CHARSET_IRA, ira_is_subset }, - { MM_MODEM_CHARSET_UCS2, ucs2_is_subset }, +const SubsetEntry subset_table[] = { + { MM_MODEM_CHARSET_GSM, gsm_is_subset }, + { MM_MODEM_CHARSET_IRA, ira_is_subset }, + { MM_MODEM_CHARSET_UCS2, ucs2_is_subset }, + { MM_MODEM_CHARSET_UTF16, utf16_is_subset }, { MM_MODEM_CHARSET_8859_1, iso88591_is_subset }, - { MM_MODEM_CHARSET_PCCP437, pccp437_is_subset }, - { MM_MODEM_CHARSET_PCDN, pcdn_is_subset }, - { MM_MODEM_CHARSET_UNKNOWN, NULL }, + { MM_MODEM_CHARSET_PCCP437, pccp437_is_subset }, + { MM_MODEM_CHARSET_PCDN, pcdn_is_subset }, }; -/** - * mm_charset_can_covert_to: - * @utf8: UTF-8 valid string. - * @charset: the #MMModemCharset to validate the conversion from @utf8. - * - * Returns: %TRUE if the conversion is possible without errors, %FALSE otherwise. - */ gboolean -mm_charset_can_convert_to (const char *utf8, - MMModemCharset charset) +mm_charset_can_convert_to (const gchar *utf8, + MMModemCharset charset) { - const char *p = utf8; - SubsetEntry *e; + const gchar *p; + guint i; g_return_val_if_fail (charset != MM_MODEM_CHARSET_UNKNOWN, FALSE); g_return_val_if_fail (utf8 != NULL, FALSE); @@ -638,11 +558,13 @@ return TRUE; /* Find the charset in our subset table */ - for (e = &subset_table[0]; - e->cs != charset && e->cs != MM_MODEM_CHARSET_UNKNOWN; - e++); - g_return_val_if_fail (e->cs != MM_MODEM_CHARSET_UNKNOWN, FALSE); + for (i = 0; i < G_N_ELEMENTS (subset_table); i++) { + if (subset_table[i].cs == charset) + break; + } + g_return_val_if_fail (i < G_N_ELEMENTS (subset_table), FALSE); + p = utf8; while (*p) { gunichar c; const char *end; @@ -656,7 +578,7 @@ while (*++end); } - if (!e->func (c, p, (end - p))) + if (!subset_table[i].func (c, p, (end - p))) return FALSE; p = end; @@ -665,14 +587,17 @@ return TRUE; } +/******************************************************************************/ +/* GSM-7 pack/unpack operations */ + guint8 * mm_charset_gsm_unpack (const guint8 *gsm, - guint32 num_septets, - guint8 start_offset, /* in _bits_ */ - guint32 *out_unpacked_len) + guint32 num_septets, + guint8 start_offset, /* in _bits_ */ + guint32 *out_unpacked_len) { GByteArray *unpacked; - int i; + guint i; unpacked = g_byte_array_sized_new (num_septets + 1); @@ -703,13 +628,13 @@ guint8 * mm_charset_gsm_pack (const guint8 *src, - guint32 src_len, - guint8 start_offset, - guint32 *out_packed_len) + guint32 src_len, + guint8 start_offset, + guint32 *out_packed_len) { guint8 *packed; guint octet = 0, lshift, plen; - int i = 0; + guint i = 0; g_return_val_if_fail (start_offset < 8, NULL); @@ -737,202 +662,265 @@ return packed; } -/* We do all our best to get the given string, which is possibly given in the - * specified charset, to UTF8. It may happen that the given string is really - * the hex representation of the charset-encoded string, so we need to cope with - * that case. */ -gchar * -mm_charset_take_and_convert_to_utf8 (gchar *str, MMModemCharset charset) -{ - gchar *utf8 = NULL; +/*****************************************************************************/ +/* Main conversion functions */ - if (!str) +static guint8 * +charset_iconv_from_utf8 (const gchar *utf8, + const CharsetSettings *settings, + gboolean translit, + guint *out_size, + GError **error) +{ + g_autoptr(GError) inner_error = NULL; + gsize bytes_written = 0; + g_autofree guint8 *encoded = NULL; + + encoded = (guint8 *) g_convert (utf8, -1, + settings->iconv_name, "UTF-8", + NULL, &bytes_written, &inner_error); + if (encoded) { + if (out_size) + *out_size = (guint) bytes_written; + return g_steal_pointer (&encoded); + } + + if (!translit) { + g_propagate_error (error, g_steal_pointer (&inner_error)); + g_prefix_error (error, "Couldn't convert from UTF-8 to %s: ", settings->gsm_name); return NULL; + } - switch (charset) { - case MM_MODEM_CHARSET_UNKNOWN: - g_warn_if_reached (); - utf8 = str; - break; - - case MM_MODEM_CHARSET_HEX: - /* We'll assume that the HEX string is really valid ASCII at the end */ - utf8 = str; - break; - - case MM_MODEM_CHARSET_GSM: - case MM_MODEM_CHARSET_8859_1: - case MM_MODEM_CHARSET_PCCP437: - case MM_MODEM_CHARSET_PCDN: { - const gchar *iconv_from; - GError *error = NULL; - - iconv_from = charset_iconv_from (charset); - utf8 = g_convert (str, strlen (str), - "UTF-8//TRANSLIT", iconv_from, - NULL, NULL, &error); - if (!utf8 || error) { - g_clear_error (&error); - utf8 = NULL; - } - - g_free (str); - break; - } - - case MM_MODEM_CHARSET_UCS2: { - gsize len; - gboolean possibly_hex = TRUE; - gsize bread = 0, bwritten = 0; - - /* If the string comes in hex-UCS-2, len needs to be a multiple of 4 */ - len = strlen (str); - if ((len < 4) || ((len % 4) != 0)) - possibly_hex = FALSE; - else { - const gchar *p = str; + encoded = (guint8 *) g_convert_with_fallback (utf8, -1, + settings->iconv_name, "UTF-8", translit_fallback, + NULL, &bytes_written, error); + if (encoded) { + if (out_size) + *out_size = (guint) bytes_written; + return g_steal_pointer (&encoded); + } - /* All chars in the string must be hex */ - while (*p && possibly_hex) - possibly_hex = isxdigit (*p++); - } + g_prefix_error (error, "Couldn't convert from UTF-8 to %s with translit: ", settings->gsm_name); + return NULL; +} - /* If hex, then we expect hex-encoded UCS-2 */ - if (possibly_hex) { - utf8 = mm_modem_charset_hex_to_utf8 (str, charset); - if (utf8) { - g_free (str); - break; - } - } +GByteArray * +mm_modem_charset_bytearray_from_utf8 (const gchar *utf8, + MMModemCharset charset, + gboolean translit, + GError **error) +{ + const CharsetSettings *settings; + guint8 *encoded = NULL; + guint encoded_size = 0; + + settings = lookup_charset_settings (charset); + + if (charset == MM_MODEM_CHARSET_UNKNOWN) { + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS, + "Cannot convert from UTF-8: unknown target charset"); + return NULL; + } - /* If not hex, then it might be raw UCS-2 (very unlikely) or ASCII/UTF-8 - * (much more likely). Try to convert to UTF-8 and if that fails, use - * the partial conversion length to re-convert the part of the string - * that is UTF-8, if any. - */ - utf8 = g_convert (str, strlen (str), - "UTF-8//TRANSLIT", "UTF-8//TRANSLIT", - &bread, &bwritten, NULL); - - /* Valid conversion, or we didn't get enough valid UTF-8 */ - if (utf8 || (bwritten <= 2)) { - g_free (str); + switch (charset) { + case MM_MODEM_CHARSET_GSM: + encoded = charset_utf8_to_unpacked_gsm (utf8, translit, &encoded_size, error); break; - } + case MM_MODEM_CHARSET_IRA: + case MM_MODEM_CHARSET_8859_1: + case MM_MODEM_CHARSET_UTF8: + case MM_MODEM_CHARSET_UCS2: + case MM_MODEM_CHARSET_PCCP437: + case MM_MODEM_CHARSET_PCDN: + case MM_MODEM_CHARSET_UTF16: + encoded = charset_iconv_from_utf8 (utf8, settings, translit, &encoded_size, error); + break; + case MM_MODEM_CHARSET_UNKNOWN: + default: + g_assert_not_reached (); + } - /* Last try; chop off the original string at the conversion failure - * location and get what we can. - */ - str[bread] = '\0'; - utf8 = g_convert (str, strlen (str), - "UTF-8//TRANSLIT", "UTF-8//TRANSLIT", - NULL, NULL, NULL); - g_free (str); - break; + return g_byte_array_new_take (encoded, encoded_size); +} + +gchar * +mm_modem_charset_str_from_utf8 (const gchar *utf8, + MMModemCharset charset, + gboolean translit, + GError **error) +{ + g_autoptr(GByteArray) bytearray = NULL; + + if (charset == MM_MODEM_CHARSET_UNKNOWN) { + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS, + "Cannot convert from UTF-8: unknown target charset"); + return NULL; } - /* If the given charset is ASCII or UTF8, we really expect the final string - * already here */ - case MM_MODEM_CHARSET_IRA: - case MM_MODEM_CHARSET_UTF8: - utf8 = str; - break; + bytearray = mm_modem_charset_bytearray_from_utf8 (utf8, charset, translit, error); + if (!bytearray) + return NULL; + + switch (charset) { + case MM_MODEM_CHARSET_GSM: + /* Note: strings encoded in unpacked GSM-7 can be used as plain + * strings as long as the string doesn't contain character '@', which + * is the one encoded as 0x00. At this point, we perform transliteration + * of the NUL bytes in the GSM-7 bytearray, and we fail the operation + * if one or more replacements were done and transliteration wasn't + * requested */ + if (translit_gsm_nul_byte (bytearray) && !translit) { + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS, + "Cannot convert to GSM-7 string: transliteration required for embedded '@'"); + return NULL; + } + /* fall through */ + case MM_MODEM_CHARSET_IRA: + case MM_MODEM_CHARSET_8859_1: + case MM_MODEM_CHARSET_UTF8: + case MM_MODEM_CHARSET_PCCP437: + case MM_MODEM_CHARSET_PCDN: + return (gchar *) g_byte_array_free (g_steal_pointer (&bytearray), FALSE); + case MM_MODEM_CHARSET_UCS2: + case MM_MODEM_CHARSET_UTF16: + return mm_utils_bin2hexstr (bytearray->data, bytearray->len); + default: + case MM_MODEM_CHARSET_UNKNOWN: + g_assert_not_reached (); } +} - /* Validate UTF-8 always before returning. This result will be exposed in DBus - * very likely... */ - if (utf8 && !g_utf8_validate (utf8, -1, NULL)) { - /* Better return NULL than an invalid UTF-8 string */ - g_free (utf8); - utf8 = NULL; +static gchar * +charset_iconv_to_utf8 (const guint8 *data, + guint32 len, + const CharsetSettings *settings, + gboolean translit, + GError **error) +{ + g_autoptr(GError) inner_error = NULL; + g_autofree gchar *utf8 = NULL; + + utf8 = g_convert ((const gchar *) data, len, + "UTF-8", + settings->iconv_name, + NULL, NULL, &inner_error); + if (utf8) + return g_steal_pointer (&utf8); + + if (!translit) { + g_propagate_error (error, g_steal_pointer (&inner_error)); + g_prefix_error (error, "Couldn't convert from %s to UTF-8: ", settings->gsm_name); + return NULL; } - return utf8; + utf8 = g_convert_with_fallback ((const gchar *) data, len, + "UTF-8", settings->iconv_name, translit_fallback, + NULL, NULL, error); + if (utf8) + return g_steal_pointer (&utf8); + + g_prefix_error (error, "Couldn't convert from %s to UTF-8 with translit: ", settings->gsm_name); + return NULL; } -/* We do all our best to convert the given string, which comes in UTF-8, to the - * specified charset. It may be that the output string needs to be the hex - * representation of the charset-encoded string, so we need to cope with that - * case. */ gchar * -mm_utf8_take_and_convert_to_charset (gchar *str, - MMModemCharset charset) -{ - gchar *encoded = NULL; - - if (!str) +mm_modem_charset_bytearray_to_utf8 (GByteArray *bytearray, + MMModemCharset charset, + gboolean translit, + GError **error) +{ + const CharsetSettings *settings; + g_autofree gchar *utf8 = NULL; + + if (charset == MM_MODEM_CHARSET_UNKNOWN) { + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS, + "Cannot convert from UTF-8: unknown target charset"); return NULL; + } + + settings = lookup_charset_settings (charset); + + switch (charset) { + case MM_MODEM_CHARSET_GSM: + utf8 = (gchar *) charset_gsm_unpacked_to_utf8 (bytearray->data, + bytearray->len, + translit, + error); + break; + case MM_MODEM_CHARSET_IRA: + case MM_MODEM_CHARSET_UTF8: + case MM_MODEM_CHARSET_8859_1: + case MM_MODEM_CHARSET_PCCP437: + case MM_MODEM_CHARSET_PCDN: + case MM_MODEM_CHARSET_UCS2: + case MM_MODEM_CHARSET_UTF16: + utf8 = charset_iconv_to_utf8 (bytearray->data, + bytearray->len, + settings, + translit, + error); + break; + case MM_MODEM_CHARSET_UNKNOWN: + default: + g_assert_not_reached (); + } + + if (utf8 && g_utf8_validate (utf8, -1, NULL)) + return g_steal_pointer (&utf8); + + g_prefix_error (error, "Invalid conversion from %s to UTF-8: ", settings->gsm_name); + return NULL; +} - /* Validate UTF-8 always before converting */ - if (!g_utf8_validate (str, -1, NULL)) { - /* Better return NULL than an invalid encoded string */ - g_free (str); +gchar * +mm_modem_charset_str_to_utf8 (const gchar *str, + gssize len, + MMModemCharset charset, + gboolean translit, + GError **error) +{ + g_autoptr(GByteArray) bytearray = NULL; + + if (charset == MM_MODEM_CHARSET_UNKNOWN) { + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS, + "Cannot convert from UTF-8: unknown target charset"); return NULL; } + /* Note: if the input string is GSM-7 encoded and it contains the '@' + * character, using -1 to indicate string length won't work properly, + * as '@' is encoded as 0x00. Whenever possible, if using GSM-7, + * give a proper len value or otherwise use the bytearray_to_utf8() + * method instead. */ + if (len < 0) + len = strlen (str); + switch (charset) { - case MM_MODEM_CHARSET_UNKNOWN: - g_warn_if_reached (); - encoded = str; - break; - - case MM_MODEM_CHARSET_HEX: - /* FIXME: What encoding is this? */ - g_warn_if_reached (); - encoded = str; - break; - - case MM_MODEM_CHARSET_GSM: - case MM_MODEM_CHARSET_8859_1: - case MM_MODEM_CHARSET_PCCP437: - case MM_MODEM_CHARSET_PCDN: { - const gchar *iconv_to; - GError *error = NULL; - - iconv_to = charset_iconv_from (charset); - encoded = g_convert (str, strlen (str), - iconv_to, "UTF-8", - NULL, NULL, &error); - if (!encoded || error) { - g_clear_error (&error); - encoded = NULL; - } - - g_free (str); - break; - } - - case MM_MODEM_CHARSET_UCS2: { - const gchar *iconv_to; - gsize encoded_len = 0; - GError *error = NULL; - gchar *hex; - - iconv_to = charset_iconv_from (charset); - encoded = g_convert (str, strlen (str), - iconv_to, "UTF-8", - NULL, &encoded_len, &error); - if (!encoded || error) { - g_clear_error (&error); - encoded = NULL; - } - - /* Get hex representation of the string */ - hex = mm_utils_bin2hexstr ((guint8 *)encoded, encoded_len); - g_free (encoded); - encoded = hex; - g_free (str); - break; - } - - /* If the given charset is ASCII or UTF8, we really expect the final string - * already here. */ - case MM_MODEM_CHARSET_IRA: - case MM_MODEM_CHARSET_UTF8: - encoded = str; - break; + case MM_MODEM_CHARSET_GSM: + case MM_MODEM_CHARSET_IRA: + case MM_MODEM_CHARSET_8859_1: + case MM_MODEM_CHARSET_UTF8: + case MM_MODEM_CHARSET_PCCP437: + case MM_MODEM_CHARSET_PCDN: + bytearray = g_byte_array_sized_new (len); + g_byte_array_append (bytearray, (const guint8 *)str, len); + break; + case MM_MODEM_CHARSET_UCS2: + case MM_MODEM_CHARSET_UTF16: { + guint8 *bin = NULL; + gsize bin_len; + + bin = (guint8 *) mm_utils_hexstr2bin (str, len, &bin_len, error); + if (!bin) + return NULL; + + bytearray = g_byte_array_new_take (bin, bin_len); + break; + } + case MM_MODEM_CHARSET_UNKNOWN: + default: + g_assert_not_reached (); } - return encoded; + return mm_modem_charset_bytearray_to_utf8 (bytearray, charset, translit, error); } diff -Nru modemmanager-1.12.8/src/mm-charsets.h modemmanager-1.16.6/src/mm-charsets.h --- modemmanager-1.12.8/src/mm-charsets.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-charsets.h 2021-06-06 21:40:59.000000000 +0800 @@ -18,67 +18,94 @@ #include +/*****************************************************************************************/ + typedef enum { - MM_MODEM_CHARSET_UNKNOWN = 0x00000000, - MM_MODEM_CHARSET_GSM = 0x00000001, - MM_MODEM_CHARSET_IRA = 0x00000002, - MM_MODEM_CHARSET_8859_1 = 0x00000004, - MM_MODEM_CHARSET_UTF8 = 0x00000008, - MM_MODEM_CHARSET_UCS2 = 0x00000010, - MM_MODEM_CHARSET_PCCP437 = 0x00000020, - MM_MODEM_CHARSET_PCDN = 0x00000040, - MM_MODEM_CHARSET_HEX = 0x00000080 + MM_MODEM_CHARSET_UNKNOWN = 0, + MM_MODEM_CHARSET_GSM = 1 << 0, + MM_MODEM_CHARSET_IRA = 1 << 1, + MM_MODEM_CHARSET_8859_1 = 1 << 2, + MM_MODEM_CHARSET_UTF8 = 1 << 3, + MM_MODEM_CHARSET_UCS2 = 1 << 4, + MM_MODEM_CHARSET_PCCP437 = 1 << 5, + MM_MODEM_CHARSET_PCDN = 1 << 6, + MM_MODEM_CHARSET_UTF16 = 1 << 7, } MMModemCharset; -const char *mm_modem_charset_to_string (MMModemCharset charset); - -MMModemCharset mm_modem_charset_from_string (const char *string); - -/* Append the given string to the given byte array but re-encode it - * into the given charset first. The original string is assumed to be - * UTF-8 encoded. - */ -gboolean mm_modem_charset_byte_array_append (GByteArray *array, - const char *utf8, - gboolean quoted, - MMModemCharset charset); - -/* Take a string encoded in the given charset in binary form, and - * convert it to UTF-8. */ -gchar *mm_modem_charset_byte_array_to_utf8 (GByteArray *array, - MMModemCharset charset); - -/* Take a string in hex representation ("00430052" or "A4BE11" for example) - * and convert it from the given character set to UTF-8. - */ -char *mm_modem_charset_hex_to_utf8 (const char *src, MMModemCharset charset); - -/* Take a string in UTF-8 and convert it to the given charset in hex - * representation. - */ -char *mm_modem_charset_utf8_to_hex (const char *src, MMModemCharset charset); +const gchar *mm_modem_charset_to_string (MMModemCharset charset); +MMModemCharset mm_modem_charset_from_string (const gchar *string); -guint8 *mm_charset_utf8_to_unpacked_gsm (const char *utf8, guint32 *out_len); - -guint8 *mm_charset_gsm_unpacked_to_utf8 (const guint8 *gsm, guint32 len); +/*****************************************************************************************/ /* Checks whether conversion to the given charset may be done without errors */ -gboolean mm_charset_can_convert_to (const char *utf8, - MMModemCharset charset); +gboolean mm_charset_can_convert_to (const gchar *utf8, + MMModemCharset charset); guint8 *mm_charset_gsm_unpack (const guint8 *gsm, - guint32 num_septets, - guint8 start_offset, /* in bits */ - guint32 *out_unpacked_len); + guint32 num_septets, + guint8 start_offset, /* in bits */ + guint32 *out_unpacked_len); guint8 *mm_charset_gsm_pack (const guint8 *src, - guint32 src_len, - guint8 start_offset, /* in bits */ - guint32 *out_packed_len); - -gchar *mm_charset_take_and_convert_to_utf8 (gchar *str, MMModemCharset charset); - -gchar *mm_utf8_take_and_convert_to_charset (gchar *str, - MMModemCharset charset); + guint32 src_len, + guint8 start_offset, /* in bits */ + guint32 *out_packed_len); + +/*****************************************************************************************/ + +/* + * Convert the given UTF-8 encoded string into the given charset. + * + * The output is given as a bytearray, because the target charset may allow + * embedded NUL bytes (e.g. UTF-16). + * + * The output encoded string is not guaranteed to be NUL-terminated, instead + * the bytearray length itself gives the correct string length. + */ +GByteArray *mm_modem_charset_bytearray_from_utf8 (const gchar *utf8, + MMModemCharset charset, + gboolean translit, + GError **error); + +/* + * Convert the given UTF-8 encoded string into the given charset. + * + * The output is given as a C string, and those charsets that allow + * embedded NUL bytes (e.g. UTF-16) will be hex-encoded. + * + * The output encoded string is guaranteed to be NUL-terminated, and so no + * explicit output length is returned. + */ +gchar *mm_modem_charset_str_from_utf8 (const gchar *utf8, + MMModemCharset charset, + gboolean translit, + GError **error); + +/* + * Convert into an UTF-8 encoded string the input byte array, which is + * encoded in the given charset. + * + * The output string is guaranteed to be valid UTF-8 and NUL-terminated. + */ +gchar *mm_modem_charset_bytearray_to_utf8 (GByteArray *bytearray, + MMModemCharset charset, + gboolean translit, + GError **error); + +/* + * Convert into an UTF-8 encoded string the input string, which is + * encoded in the given charset. Those charsets that allow embedded NUL + * bytes (e.g. UTF-16) need to be hex-encoded. + * + * If the input string is NUL-terminated, len may be given as -1; otherwise + * len needs to specify the number of valid bytes in the input string. + * + * The output string is guaranteed to be valid UTF-8 and NUL-terminated. + */ +gchar *mm_modem_charset_str_to_utf8 (const gchar *str, + gssize len, + MMModemCharset charset, + gboolean translit, + GError **error); #endif /* MM_CHARSETS_H */ diff -Nru modemmanager-1.12.8/src/mm-context.c modemmanager-1.16.6/src/mm-context.c --- modemmanager-1.12.8/src/mm-context.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-context.c 2021-06-06 21:40:59.000000000 +0800 @@ -38,7 +38,7 @@ static gboolean help_flag; static gboolean version_flag; static gboolean debug; -static MMFilterRule filter_policy = MM_FILTER_POLICY_DEFAULT; +static MMFilterRule filter_policy = MM_FILTER_POLICY_STRICT; static gboolean no_auto_scan = NO_AUTO_SCAN_DEFAULT; static const gchar *initial_kernel_events; @@ -48,8 +48,8 @@ gpointer data, GError **error) { - if (!g_ascii_strcasecmp (value, "default")) { - filter_policy = MM_FILTER_POLICY_DEFAULT; + if (!g_ascii_strcasecmp (value, "legacy")) { + filter_policy = MM_FILTER_POLICY_LEGACY; return TRUE; } @@ -77,7 +77,7 @@ static const GOptionEntry entries[] = { { "filter-policy", 0, 0, G_OPTION_ARG_CALLBACK, filter_policy_option_arg, - "Filter policy: one of DEFAULT, WHITELIST-ONLY, STRICT, PARANOID", + "Filter policy: one of LEGACY, WHITELIST-ONLY, STRICT, PARANOID", "[POLICY]" }, { @@ -178,7 +178,7 @@ GOptionGroup *group; group = g_option_group_new ("log", - "Logging options", + "Logging options:", "Show logging options", NULL, NULL); @@ -222,6 +222,12 @@ static gboolean test_session; static gboolean test_enable; static gchar *test_plugin_dir; +#if defined WITH_UDEV +static gboolean test_no_udev; +#endif +#if defined WITH_SYSTEMD_SUSPEND_RESUME +static gboolean test_no_suspend_resume; +#endif static const GOptionEntry test_entries[] = { { @@ -239,6 +245,20 @@ "Path to look for plugins", "[PATH]" }, +#if defined WITH_UDEV + { + "test-no-udev", 0, 0, G_OPTION_ARG_NONE, &test_no_udev, + "Run without udev support even if available", + NULL + }, +#endif +#if defined WITH_SYSTEMD_SUSPEND_RESUME + { + "test-no-suspend-resume", 0, 0, G_OPTION_ARG_NONE, &test_no_suspend_resume, + "Disable suspend/resume support at runtime even if available", + NULL + }, +#endif { NULL } }; @@ -248,7 +268,7 @@ GOptionGroup *group; group = g_option_group_new ("test", - "Test options", + "Test options:", "Show Test options", NULL, NULL); @@ -274,14 +294,29 @@ return test_plugin_dir ? test_plugin_dir : PLUGINDIR; } +#if defined WITH_UDEV +gboolean +mm_context_get_test_no_udev (void) +{ + return test_no_udev; +} +#endif + +#if defined WITH_SYSTEMD_SUSPEND_RESUME +gboolean +mm_context_get_test_no_suspend_resume (void) +{ + return test_no_suspend_resume; +} +#endif + /*****************************************************************************/ static void print_version (void) { - g_print ("\n" - "ModemManager " MM_DIST_VERSION "\n" - "Copyright (C) 2008-2019 The ModemManager authors\n" + g_print ("ModemManager " MM_DIST_VERSION "\n" + "Copyright (C) 2008-2021 The ModemManager authors\n" "License GPLv2+: GNU GPL version 2 or later \n" "This is free software: you are free to change and redistribute it.\n" "There is NO WARRANTY, to the extent permitted by law.\n" @@ -346,5 +381,8 @@ g_warning ("error: --initial-kernel-events must be used only if --no-auto-scan is also used"); exit (1); } + /* Force skipping autoscan if running test without udev */ + if (test_no_udev) + no_auto_scan = TRUE; #endif } diff -Nru modemmanager-1.12.8/src/mm-context.h modemmanager-1.16.6/src/mm-context.h --- modemmanager-1.12.8/src/mm-context.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-context.h 2021-06-06 21:40:59.000000000 +0800 @@ -43,8 +43,14 @@ gboolean mm_context_get_log_relative_timestamps (void); /* Testing support */ -gboolean mm_context_get_test_session (void); -gboolean mm_context_get_test_enable (void); -const gchar *mm_context_get_test_plugin_dir (void); +gboolean mm_context_get_test_session (void); +gboolean mm_context_get_test_enable (void); +const gchar *mm_context_get_test_plugin_dir (void); +#if defined WITH_UDEV +gboolean mm_context_get_test_no_udev (void); +#endif +#if defined WITH_SYSTEMD_SUSPEND_RESUME +gboolean mm_context_get_test_no_suspend_resume (void); +#endif #endif /* MM_CONTEXT_H */ diff -Nru modemmanager-1.12.8/src/mm-device.c modemmanager-1.16.6/src/mm-device.c --- modemmanager-1.12.8/src/mm-device.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-device.c 2021-06-06 21:40:59.000000000 +0800 @@ -25,13 +25,17 @@ #include "mm-device.h" #include "mm-plugin.h" -#include "mm-log.h" +#include "mm-log-object.h" -G_DEFINE_TYPE (MMDevice, mm_device, G_TYPE_OBJECT); +static void log_object_iface_init (MMLogObjectInterface *iface); + +G_DEFINE_TYPE_EXTENDED (MMDevice, mm_device, G_TYPE_OBJECT, 0, + G_IMPLEMENT_INTERFACE (MM_TYPE_LOG_OBJECT, log_object_iface_init)) enum { PROP_0, PROP_UID, + PROP_OBJECT_MANAGER, PROP_PLUGIN, PROP_MODEM, PROP_HOTPLUGGED, @@ -56,6 +60,9 @@ /* Unique id */ gchar *uid; + /* The object manager */ + GDBusObjectManagerServer *object_manager; + /* If USB, device vid/pid */ guint16 vendor; guint16 product; @@ -74,9 +81,6 @@ MMBaseModem *modem; gulong modem_valid_id; - /* When exported, a reference to the object manager */ - GDBusObjectManagerServer *object_manager; - /* Whether the device was hot-plugged. */ gboolean hotplugged; @@ -85,37 +89,64 @@ /* Virtual ports */ gchar **virtual_ports; + + /* Scheduled reprobe */ + guint reprobe_id; }; /*****************************************************************************/ static MMPortProbe * -device_find_probe_with_device (MMDevice *self, - MMKernelDevice *kernel_port, - gboolean lookup_ignored) +probe_list_lookup_by_device (GList *port_probes, + MMKernelDevice *kernel_port) { GList *l; - for (l = self->priv->port_probes; l; l = g_list_next (l)) { + for (l = port_probes; l; l = g_list_next (l)) { MMPortProbe *probe = MM_PORT_PROBE (l->data); if (mm_kernel_device_cmp (mm_port_probe_peek_port (probe), kernel_port)) return probe; } + return NULL; +} - if (!lookup_ignored) - return NULL; - - for (l = self->priv->ignored_port_probes; l; l = g_list_next (l)) { - MMPortProbe *probe = MM_PORT_PROBE (l->data); +static MMPortProbe * +probe_list_lookup_by_name (GList *port_probes, + const gchar *subsystem, + const gchar *name) +{ + GList *l; - if (mm_kernel_device_cmp (mm_port_probe_peek_port (probe), kernel_port)) + for (l = port_probes; l; l = g_list_next (l)) { + MMPortProbe *probe = MM_PORT_PROBE (l->data); + MMKernelDevice *probe_device; + + probe_device = mm_port_probe_peek_port (probe); + if ((g_strcmp0 (subsystem, mm_kernel_device_get_subsystem (probe_device)) == 0) && + (g_strcmp0 (name, mm_kernel_device_get_name (probe_device)) == 0)) return probe; } - return NULL; } +static MMPortProbe * +device_find_probe_with_device (MMDevice *self, + MMKernelDevice *kernel_port, + gboolean lookup_ignored) +{ + MMPortProbe *probe; + + probe = probe_list_lookup_by_device (self->priv->port_probes, kernel_port); + if (probe) + return probe; + + if (!lookup_ignored) + return NULL; + + return probe_list_lookup_by_device (self->priv->ignored_port_probes, kernel_port); +} + gboolean mm_device_owns_port (MMDevice *self, MMKernelDevice *kernel_port) @@ -123,6 +154,28 @@ return !!device_find_probe_with_device (self, kernel_port, TRUE); } +static MMPortProbe * +device_find_probe_with_name (MMDevice *self, + const gchar *subsystem, + const gchar *name) +{ + MMPortProbe *probe; + + probe = probe_list_lookup_by_name (self->priv->port_probes, subsystem, name); + if (probe) + return probe; + + return probe_list_lookup_by_name (self->priv->ignored_port_probes, subsystem, name); +} + +gboolean +mm_device_owns_port_name (MMDevice *self, + const gchar *subsystem, + const gchar *name) +{ + return !!device_find_probe_with_name (self, subsystem, name); +} + static void add_port_driver (MMDevice *self, MMKernelDevice *kernel_port) @@ -183,12 +236,13 @@ } void -mm_device_release_port (MMDevice *self, - MMKernelDevice *kernel_port) +mm_device_release_port_name (MMDevice *self, + const gchar *subsystem, + const gchar *name) { MMPortProbe *probe; - probe = device_find_probe_with_device (self, kernel_port, TRUE); + probe = device_find_probe_with_name (self, subsystem, name); if (probe) { /* Found, remove from lists and destroy probe */ if (g_list_find (self->priv->port_probes, probe)) @@ -211,10 +265,8 @@ probe = device_find_probe_with_device (self, kernel_port, FALSE); if (probe) { /* Found, remove from list and add to the ignored list */ - mm_dbg ("[device %s] fully ignoring port '%s/%s' from now on", - self->priv->uid, - mm_kernel_device_get_subsystem (kernel_port), - mm_kernel_device_get_name (kernel_port)); + mm_obj_dbg (self, "fully ignoring port %s from now on", + mm_kernel_device_get_name (kernel_port)); self->priv->port_probes = g_list_remove (self->priv->port_probes, probe); self->priv->ignored_port_probes = g_list_prepend (self->priv->ignored_port_probes, probe); } @@ -236,7 +288,7 @@ g_object_set (self->priv->modem, MM_BASE_MODEM_CONNECTION, NULL, NULL); - mm_dbg ("[device %s] unexported modem from path '%s'", self->priv->uid, path); + mm_obj_dbg (self, "unexported modem from path '%s'", path); g_free (path); } } @@ -247,15 +299,14 @@ export_modem (MMDevice *self) { GDBusConnection *connection = NULL; - static guint32 id = 0; - gchar *path; + gchar *path; g_assert (MM_IS_BASE_MODEM (self->priv->modem)); g_assert (G_IS_DBUS_OBJECT_MANAGER (self->priv->object_manager)); /* If modem not yet valid (not fully initialized), don't export it */ if (!mm_base_modem_get_valid (self->priv->modem)) { - mm_dbg ("[device %s] modem not yet fully initialized", self->priv->uid); + mm_obj_dbg (self, "modem not yet fully initialized"); return; } @@ -265,13 +316,13 @@ NULL); if (path) { g_free (path); - mm_dbg ("[device %s] modem already exported", self->priv->uid); + mm_obj_dbg (self, "modem already exported"); return; } /* No outstanding port tasks, so if the modem is valid we can export it */ - path = g_strdup_printf (MM_DBUS_MODEM_PREFIX "/%d", id++); + path = g_strdup_printf (MM_DBUS_MODEM_PREFIX "/%d", mm_base_modem_get_dbus_id (self->priv->modem)); g_object_get (self->priv->object_manager, "connection", &connection, NULL); @@ -284,14 +335,13 @@ g_dbus_object_manager_server_export (self->priv->object_manager, G_DBUS_OBJECT_SKELETON (self->priv->modem)); - mm_dbg ("[device %s] exported modem at path '%s'", self->priv->uid, path); - mm_dbg ("[device %s] plugin: %s", self->priv->uid, mm_base_modem_get_plugin (self->priv->modem)); - mm_dbg ("[device %s] vid:pid: 0x%04X:0x%04X", - self->priv->uid, - (mm_base_modem_get_vendor_id (self->priv->modem) & 0xFFFF), - (mm_base_modem_get_product_id (self->priv->modem) & 0xFFFF)); + mm_obj_dbg (self, " exported modem at path '%s'", path); + mm_obj_dbg (self, " plugin: %s", mm_base_modem_get_plugin (self->priv->modem)); + mm_obj_dbg (self, " vid:pid: 0x%04X:0x%04X", + (mm_base_modem_get_vendor_id (self->priv->modem) & 0xFFFF), + (mm_base_modem_get_product_id (self->priv->modem) & 0xFFFF)); if (self->priv->virtual) - mm_dbg ("[device %s] virtual", self->priv->uid); + mm_obj_dbg (self, " virtual"); g_free (path); } @@ -322,38 +372,39 @@ unexport_modem (self); clear_modem (self); - g_clear_object (&(self->priv->object_manager)); } /*****************************************************************************/ +#define REPROBE_SECS 2 + +static gboolean +reprobe (MMDevice *self) +{ + GError *error = NULL; + + self->priv->reprobe_id = 0; + + mm_obj_dbg (self, "Reprobing modem..."); + if (!mm_device_create_modem (self, &error)) { + mm_obj_warn (self, "could not recreate modem: %s", error->message); + g_error_free (error); + } else + mm_obj_dbg (self, "modem recreated"); + + return G_SOURCE_REMOVE; +} + static void modem_valid (MMBaseModem *modem, GParamSpec *pspec, MMDevice *self) { if (!mm_base_modem_get_valid (modem)) { - GDBusObjectManagerServer *object_manager; - - object_manager = g_object_ref (self->priv->object_manager); - /* Modem no longer valid */ mm_device_remove_modem (self); - - if (mm_base_modem_get_reprobe (modem)) { - GError *error = NULL; - - if (!mm_device_create_modem (self, object_manager, &error)) { - mm_warn ("Could not recreate modem for device '%s': %s", - self->priv->uid, - error ? error->message : "unknown"); - g_error_free (error); - } else { - mm_dbg ("Modem recreated for device '%s'", self->priv->uid); - } - } - - g_object_unref (object_manager); + if (mm_base_modem_get_reprobe (modem)) + self->priv->reprobe_id = g_timeout_add_seconds (REPROBE_SECS, (GSourceFunc)reprobe, self); } else { /* Modem now valid, export it, but only if we really have it around. * It may happen that the initialization sequence fails because the @@ -362,17 +413,15 @@ if (self->priv->modem) export_modem (self); else - mm_dbg ("[device %s] not exporting modem; no longer available", self->priv->uid); + mm_obj_dbg (self, "not exporting modem; no longer available"); } } gboolean -mm_device_create_modem (MMDevice *self, - GDBusObjectManagerServer *object_manager, - GError **error) +mm_device_create_modem (MMDevice *self, + GError **error) { g_assert (self->priv->modem == NULL); - g_assert (self->priv->object_manager == NULL); if (self->priv->inhibited) { g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, @@ -389,10 +438,9 @@ return FALSE; } - mm_info ("[device %s] creating modem with plugin '%s' and '%u' ports", - self->priv->uid, - mm_plugin_get_name (self->priv->plugin), - g_list_length (self->priv->port_probes)); + mm_obj_info (self, "creating modem with plugin '%s' and '%u' ports", + mm_plugin_get_name (self->priv->plugin), + g_list_length (self->priv->port_probes)); } else { if (!self->priv->virtual_ports) { g_set_error (error, @@ -402,23 +450,18 @@ return FALSE; } - mm_info ("[device %s] creating virtual modem with plugin '%s' and '%u' ports", - self->priv->uid, - mm_plugin_get_name (self->priv->plugin), - g_strv_length (self->priv->virtual_ports)); + mm_obj_info (self, "creating virtual modem with plugin '%s' and '%u' ports", + mm_plugin_get_name (self->priv->plugin), + g_strv_length (self->priv->virtual_ports)); } self->priv->modem = mm_plugin_create_modem (self->priv->plugin, self, error); - if (self->priv->modem) { - /* Keep the object manager */ - self->priv->object_manager = g_object_ref (object_manager); - + if (self->priv->modem) /* We want to get notified when the modem becomes valid/invalid */ self->priv->modem_valid_id = g_signal_connect (self->priv->modem, "notify::" MM_BASE_MODEM_VALID, G_CALLBACK (modem_valid), self); - } return !!self->priv->modem; } @@ -600,13 +643,12 @@ } gboolean -mm_device_uninhibit (MMDevice *self, - GDBusObjectManagerServer *object_manager, - GError **error) +mm_device_uninhibit (MMDevice *self, + GError **error) { g_assert (self->priv->inhibited); self->priv->inhibited = FALSE; - return mm_device_create_modem (self, object_manager, error); + return mm_device_create_modem (self, error); } /*****************************************************************************/ @@ -643,17 +685,30 @@ /*****************************************************************************/ +static gchar * +log_object_build_id (MMLogObject *_self) +{ + MMDevice *self; + + self = MM_DEVICE (_self); + return g_strdup_printf ("device %s", self->priv->uid); +} + +/*****************************************************************************/ + MMDevice * -mm_device_new (const gchar *uid, - gboolean hotplugged, - gboolean virtual) +mm_device_new (const gchar *uid, + gboolean hotplugged, + gboolean virtual, + GDBusObjectManagerServer *object_manager) { g_return_val_if_fail (uid != NULL, NULL); return MM_DEVICE (g_object_new (MM_TYPE_DEVICE, - MM_DEVICE_UID, uid, - MM_DEVICE_HOTPLUGGED, hotplugged, - MM_DEVICE_VIRTUAL, virtual, + MM_DEVICE_UID, uid, + MM_DEVICE_HOTPLUGGED, hotplugged, + MM_DEVICE_VIRTUAL, virtual, + MM_DEVICE_OBJECT_MANAGER, object_manager, NULL)); } @@ -677,6 +732,10 @@ /* construct only */ self->priv->uid = g_value_dup_string (value); break; + case PROP_OBJECT_MANAGER: + /* construct only */ + self->priv->object_manager = g_value_dup_object (value); + break; case PROP_PLUGIN: g_clear_object (&(self->priv->plugin)); self->priv->plugin = g_value_dup_object (value); @@ -712,6 +771,9 @@ case PROP_UID: g_value_set_string (value, self->priv->uid); break; + case PROP_OBJECT_MANAGER: + g_value_set_object (value, self->priv->object_manager); + break; case PROP_PLUGIN: g_value_set_object (value, self->priv->plugin); break; @@ -738,6 +800,11 @@ { MMDevice *self = MM_DEVICE (object); + if (self->priv->reprobe_id) { + g_source_remove (self->priv->reprobe_id); + self->priv->reprobe_id = 0; + } + g_clear_object (&(self->priv->object_manager)); g_clear_object (&(self->priv->plugin)); g_list_free_full (self->priv->port_probes, g_object_unref); self->priv->port_probes = NULL; @@ -762,6 +829,12 @@ } static void +log_object_iface_init (MMLogObjectInterface *iface) +{ + iface->build_id = log_object_build_id; +} + +static void mm_device_class_init (MMDeviceClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); @@ -782,6 +855,14 @@ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property (object_class, PROP_UID, properties[PROP_UID]); + properties[PROP_OBJECT_MANAGER] = + g_param_spec_object (MM_DEVICE_OBJECT_MANAGER, + "Object manager", + "GDBus object manager server", + G_TYPE_DBUS_OBJECT_MANAGER_SERVER, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); + g_object_class_install_property (object_class, PROP_OBJECT_MANAGER, properties[PROP_OBJECT_MANAGER]); + properties[PROP_PLUGIN] = g_param_spec_object (MM_DEVICE_PLUGIN, "Plugin", diff -Nru modemmanager-1.12.8/src/mm-device.h modemmanager-1.16.6/src/mm-device.h --- modemmanager-1.12.8/src/mm-device.h 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-device.h 2021-06-06 21:40:59.000000000 +0800 @@ -33,12 +33,13 @@ typedef struct _MMDeviceClass MMDeviceClass; typedef struct _MMDevicePrivate MMDevicePrivate; -#define MM_DEVICE_UID "uid" -#define MM_DEVICE_PLUGIN "plugin" -#define MM_DEVICE_MODEM "modem" -#define MM_DEVICE_HOTPLUGGED "hotplugged" -#define MM_DEVICE_VIRTUAL "virtual" -#define MM_DEVICE_INHIBITED "inhibited" +#define MM_DEVICE_UID "uid" +#define MM_DEVICE_PLUGIN "plugin" +#define MM_DEVICE_MODEM "modem" +#define MM_DEVICE_HOTPLUGGED "hotplugged" +#define MM_DEVICE_VIRTUAL "virtual" +#define MM_DEVICE_INHIBITED "inhibited" +#define MM_DEVICE_OBJECT_MANAGER "object-manager" #define MM_DEVICE_PORT_GRABBED "port-grabbed" #define MM_DEVICE_PORT_RELEASED "port-released" @@ -59,24 +60,30 @@ }; GType mm_device_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMDevice, g_object_unref) -MMDevice *mm_device_new (const gchar *uid, - gboolean hotplugged, - gboolean virtual); - -void mm_device_grab_port (MMDevice *self, - MMKernelDevice *kernel_port); -void mm_device_release_port (MMDevice *self, - MMKernelDevice *kernel_port); -gboolean mm_device_owns_port (MMDevice *self, - MMKernelDevice *kernel_port); -void mm_device_ignore_port (MMDevice *self, - MMKernelDevice *kernel_port); - -gboolean mm_device_create_modem (MMDevice *self, - GDBusObjectManagerServer *object_manager, - GError **error); -void mm_device_remove_modem (MMDevice *self); +MMDevice *mm_device_new (const gchar *uid, + gboolean hotplugged, + gboolean virtual, + GDBusObjectManagerServer *object_manager); + +void mm_device_grab_port (MMDevice *self, + MMKernelDevice *kernel_port); +gboolean mm_device_owns_port (MMDevice *self, + MMKernelDevice *kernel_port); +void mm_device_ignore_port (MMDevice *self, + MMKernelDevice *kernel_port); + +gboolean mm_device_owns_port_name (MMDevice *self, + const gchar *subsystem, + const gchar *name); +void mm_device_release_port_name (MMDevice *self, + const gchar *subsystem, + const gchar *name); + +gboolean mm_device_create_modem (MMDevice *self, + GError **error); +void mm_device_remove_modem (MMDevice *self); void mm_device_inhibit (MMDevice *self, GAsyncReadyCallback callback, @@ -85,7 +92,6 @@ GAsyncResult *res, GError **error); gboolean mm_device_uninhibit (MMDevice *self, - GDBusObjectManagerServer *object_manager, GError **error); diff -Nru modemmanager-1.12.8/src/mm-error-helpers.c modemmanager-1.16.6/src/mm-error-helpers.c --- modemmanager-1.12.8/src/mm-error-helpers.c 2020-02-26 20:11:44.000000000 +0800 +++ modemmanager-1.16.6/src/mm-error-helpers.c 2021-06-06 21:40:59.000000000 +0800 @@ -29,7 +29,8 @@ /* --- Connection errors --- */ GError * -mm_connection_error_for_code (MMConnectionError code) +mm_connection_error_for_code (MMConnectionError code, + gpointer log_object) { const gchar *msg; @@ -51,7 +52,7 @@ break; default: - mm_dbg ("Invalid connection error code: %u", code); + mm_obj_dbg (log_object, "invalid connection error code: %u", code); /* uhm... make something up (yes, ok, lie!). */ code = MM_CONNECTION_ERROR_NO_CARRIER; msg = "No carrier"; @@ -149,7 +150,8 @@ }; GError * -mm_mobile_equipment_error_for_code (MMMobileEquipmentError code) +mm_mobile_equipment_error_for_code (MMMobileEquipmentError code, + gpointer log_object) { guint i; @@ -162,14 +164,15 @@ } /* Not found? Then, default */ - mm_dbg ("Invalid mobile equipment error code: %u", (guint)code); + mm_obj_dbg (log_object, "invalid mobile equipment error code: %u", (guint)code); return g_error_new (MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_UNKNOWN, "Unknown error"); } GError * -mm_mobile_equipment_error_for_string (const gchar *str) +mm_mobile_equipment_error_for_string (const gchar *str, + gpointer log_object) { MMMobileEquipmentError code = MM_MOBILE_EQUIPMENT_ERROR_UNKNOWN; const gchar *msg = NULL; @@ -198,7 +201,7 @@ /* Not found? Then, default */ if (!msg) { - mm_dbg ("Invalid mobile equipment error string: '%s' (%s)", str, buf); + mm_obj_dbg (log_object, "invalid mobile equipment error string: '%s' (%s)", str, buf); code = MM_MOBILE_EQUIPMENT_ERROR_UNKNOWN; msg = "Unknown error"; } @@ -236,7 +239,8 @@ }; GError * -mm_message_error_for_code (MMMessageError code) +mm_message_error_for_code (MMMessageError code, + gpointer log_object) { guint i; @@ -249,14 +253,15 @@ } /* Not found? Then, default */ - mm_dbg ("Invalid message error code: %u", (guint)code); + mm_obj_dbg (log_object, "invalid message error code: %u", (guint)code); return g_error_new (MM_MESSAGE_ERROR, MM_MESSAGE_ERROR_UNKNOWN, "Unknown error"); } GError * -mm_message_error_for_string (const gchar *str) +mm_message_error_for_string (const gchar *str, + gpointer log_object) { MMMessageError code = MM_MESSAGE_ERROR_UNKNOWN; const gchar *msg = NULL; @@ -285,7 +290,7 @@ /* Not found? Then, default */ if (!msg) { - mm_dbg ("Invalid message error string: '%s' (%s)", str, buf); + mm_obj_dbg (log_object, "invalid message error string: '%s' (%s)", str, buf); code = MM_MESSAGE_ERROR_UNKNOWN; msg = "Unknown error"; } diff -Nru modemmanager-1.12.8/src/mm-error-helpers.h modemmanager-1.16.6/src/mm-error-helpers.h --- modemmanager-1.12.8/src/mm-error-helpers.h 2016-03-24 18:25:04.000000000 +0800 +++ modemmanager-1.16.6/src/mm-error-helpers.h 2021-06-06 21:40:59.000000000 +0800 @@ -23,10 +23,10 @@ #include #include -GError *mm_connection_error_for_code (MMConnectionError code); -GError *mm_mobile_equipment_error_for_code (MMMobileEquipmentError code); -GError *mm_mobile_equipment_error_for_string (const gchar *str); -GError *mm_message_error_for_code (MMMessageError code); -GError *mm_message_error_for_string (const gchar *str); +GError *mm_connection_error_for_code (MMConnectionError code, gpointer log_object); +GError *mm_mobile_equipment_error_for_code (MMMobileEquipmentError code, gpointer log_object); +GError *mm_mobile_equipment_error_for_string (const gchar *str, gpointer log_object); +GError *mm_message_error_for_code (MMMessageError code, gpointer log_object); +GError *mm_message_error_for_string (const gchar *str, gpointer log_object); #endif /* MM_ERROR_HELPERS_H */ diff -Nru modemmanager-1.12.8/src/mm-filter.c modemmanager-1.16.6/src/mm-filter.c --- modemmanager-1.12.8/src/mm-filter.c 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/src/mm-filter.c 2021-06-06 21:40:59.000000000 +0800 @@ -21,11 +21,14 @@ #include "mm-daemon-enums-types.h" #include "mm-filter.h" -#include "mm-log.h" +#include "mm-log-object.h" #define FILTER_PORT_MAYBE_FORBIDDEN "maybe-forbidden" -G_DEFINE_TYPE (MMFilter, mm_filter, G_TYPE_OBJECT) +static void log_object_iface_init (MMLogObjectInterface *iface); + +G_DEFINE_TYPE_EXTENDED (MMFilter, mm_filter, G_TYPE_OBJECT, 0, + G_IMPLEMENT_INTERFACE (MM_TYPE_LOG_OBJECT, log_object_iface_init)) enum { PROP_0, @@ -36,6 +39,7 @@ struct _MMFilterPrivate { MMFilterRule enabled_rules; GList *plugin_whitelist_tags; + GArray *plugin_whitelist_vendor_ids; GArray *plugin_whitelist_product_ids; }; @@ -46,12 +50,33 @@ const gchar *tag) { if (!g_list_find_custom (self->priv->plugin_whitelist_tags, tag, (GCompareFunc) g_strcmp0)) { - mm_dbg ("[filter] registered plugin whitelist tag: %s", tag); + mm_obj_dbg (self, "registered plugin whitelist tag: %s", tag); self->priv->plugin_whitelist_tags = g_list_prepend (self->priv->plugin_whitelist_tags, g_strdup (tag)); } } void +mm_filter_register_plugin_whitelist_vendor_id (MMFilter *self, + guint16 vid) +{ + guint i; + + if (!self->priv->plugin_whitelist_vendor_ids) + self->priv->plugin_whitelist_vendor_ids = g_array_sized_new (FALSE, FALSE, sizeof (guint16), 64); + + for (i = 0; i < self->priv->plugin_whitelist_vendor_ids->len; i++) { + guint16 item; + + item = g_array_index (self->priv->plugin_whitelist_vendor_ids, guint16, i); + if (item == vid) + return; + } + + g_array_append_val (self->priv->plugin_whitelist_vendor_ids, vid); + mm_obj_dbg (self, "registered plugin whitelist vendor id: %04x", vid); +} + +void mm_filter_register_plugin_whitelist_product_id (MMFilter *self, guint16 vid, guint16 pid) @@ -73,7 +98,7 @@ new_item.l = vid; new_item.r = pid; g_array_append_val (self->priv->plugin_whitelist_product_ids, new_item); - mm_dbg ("[filter] registered plugin whitelist product id: %04x:%04x", vid, pid); + mm_obj_dbg (self, "registered plugin whitelist product id: %04x:%04x", vid, pid); } /*****************************************************************************/ @@ -95,14 +120,14 @@ if ((self->priv->enabled_rules & MM_FILTER_RULE_EXPLICIT_WHITELIST) && (mm_kernel_device_get_global_property_as_boolean (port, ID_MM_DEVICE_PROCESS) || mm_kernel_device_get_property_as_boolean (port, ID_MM_DEVICE_PROCESS))) { - mm_dbg ("[filter] (%s/%s) port allowed: device is whitelisted", subsystem, name); + mm_obj_dbg (self, "(%s/%s) port allowed: device is whitelisted", subsystem, name); return TRUE; } /* If the device is explicitly blacklisted, we ignore every port. */ if ((self->priv->enabled_rules & MM_FILTER_RULE_EXPLICIT_BLACKLIST) && (mm_kernel_device_get_global_property_as_boolean (port, ID_MM_DEVICE_IGNORE))) { - mm_dbg ("[filter] (%s/%s): port filtered: device is blacklisted", subsystem, name); + mm_obj_dbg (self, "(%s/%s): port filtered: device is blacklisted", subsystem, name); return FALSE; } @@ -115,7 +140,7 @@ for (l = self->priv->plugin_whitelist_tags; l; l = g_list_next (l)) { if (mm_kernel_device_get_global_property_as_boolean (port, (const gchar *)(l->data)) || mm_kernel_device_get_property_as_boolean (port, (const gchar *)(l->data))) { - mm_dbg ("[filter] (%s/%s) port allowed: device is whitelisted by plugin (tag)", subsystem, name); + mm_obj_dbg (self, "(%s/%s) port allowed: device is whitelisted by plugin (tag)", subsystem, name); return TRUE; } } @@ -132,7 +157,21 @@ item = &g_array_index (self->priv->plugin_whitelist_product_ids, mm_uint16_pair, i); if (item->l == vid && item->r == pid) { - mm_dbg ("[filter] (%s/%s) port allowed: device is whitelisted by plugin (vid/pid)", subsystem, name); + mm_obj_dbg (self, "(%s/%s) port allowed: device is whitelisted by plugin (vid/pid)", subsystem, name); + return TRUE; + } + } + } + + if (vid && self->priv->plugin_whitelist_vendor_ids) { + guint i; + + for (i = 0; i < self->priv->plugin_whitelist_vendor_ids->len; i++) { + guint16 item; + + item = g_array_index (self->priv->plugin_whitelist_vendor_ids, guint16, i); + if (item == vid) { + mm_obj_dbg (self, "(%s/%s) port allowed: device is whitelisted by plugin (vid)", subsystem, name); return TRUE; } } @@ -142,22 +181,35 @@ /* If this is a virtual device, don't allow it */ if ((self->priv->enabled_rules & MM_FILTER_RULE_VIRTUAL) && (!mm_kernel_device_get_physdev_sysfs_path (port))) { - mm_dbg ("[filter] (%s/%s) port filtered: virtual device", subsystem, name); + mm_obj_dbg (self, "(%s/%s) port filtered: virtual device", subsystem, name); return FALSE; } /* If this is a net device, we always allow it */ if ((self->priv->enabled_rules & MM_FILTER_RULE_NET) && (g_strcmp0 (subsystem, "net") == 0)) { - mm_dbg ("[filter] (%s/%s) port allowed: net device", subsystem, name); + mm_obj_dbg (self, "(%s/%s) port allowed: net device", subsystem, name); return TRUE; } /* If this is a cdc-wdm device, we always allow it */ - if ((self->priv->enabled_rules & MM_FILTER_RULE_CDC_WDM) && - (g_strcmp0 (subsystem, "usb") == 0 || g_strcmp0 (subsystem, "usbmisc") == 0) && - (name && g_str_has_prefix (name, "cdc-wdm"))) { - mm_dbg ("[filter] (%s/%s) port allowed: cdc-wdm device", subsystem, name); + if ((self->priv->enabled_rules & MM_FILTER_RULE_USBMISC) && + (g_strcmp0 (subsystem, "usbmisc") == 0)) { + mm_obj_dbg (self, "(%s/%s) port allowed: usbmisc device", subsystem, name); + return TRUE; + } + + /* If this is a rpmsg channel device, we always allow it */ + if ((self->priv->enabled_rules & MM_FILTER_RULE_RPMSG) && + (g_strcmp0 (subsystem, "rpmsg") == 0)) { + mm_obj_dbg (self, "(%s/%s) port allowed: rpmsg device", subsystem, name); + return TRUE; + } + + /* If this is a wwan port/device, we always allow it */ + if ((self->priv->enabled_rules & MM_FILTER_RULE_WWAN) && + (g_strcmp0 (subsystem, "wwan") == 0)) { + mm_obj_dbg (self, "(%s/%s) port allowed: wwan device", subsystem, name); return TRUE; } @@ -172,7 +224,7 @@ /* Ignore blacklisted tty devices. */ if ((self->priv->enabled_rules & MM_FILTER_RULE_TTY_BLACKLIST) && (mm_kernel_device_get_global_property_as_boolean (port, ID_MM_TTY_BLACKLIST))) { - mm_dbg ("[filter] (%s/%s): port filtered: tty is blacklisted", subsystem, name); + mm_obj_dbg (self, "(%s/%s): port filtered: tty is blacklisted", subsystem, name); return FALSE; } @@ -180,7 +232,7 @@ * automatic scan. */ if ((self->priv->enabled_rules & MM_FILTER_RULE_TTY_MANUAL_SCAN_ONLY) && (!manual_scan && mm_kernel_device_get_global_property_as_boolean (port, ID_MM_TTY_MANUAL_SCAN_ONLY))) { - mm_dbg ("[filter] (%s/%s): port filtered: tty probed only in manual scan", subsystem, name); + mm_obj_dbg (self, "(%s/%s): port filtered: tty probed only in manual scan", subsystem, name); return FALSE; } @@ -193,13 +245,13 @@ !g_strcmp0 (physdev_subsystem, "pci") || !g_strcmp0 (physdev_subsystem, "pnp") || !g_strcmp0 (physdev_subsystem, "sdio"))) { - mm_dbg ("[filter] (%s/%s): port filtered: tty platform driver", subsystem, name); + mm_obj_dbg (self, "(%s/%s): port filtered: tty platform driver", subsystem, name); return FALSE; } /* Default allowed? */ if (self->priv->enabled_rules & MM_FILTER_RULE_TTY_DEFAULT_ALLOWED) { - mm_dbg ("[filter] (%s/%s) port allowed", subsystem, name); + mm_obj_dbg (self, "(%s/%s) port allowed", subsystem, name); return TRUE; } @@ -213,7 +265,7 @@ !g_strcmp0 (driver, "qcaux") || !g_strcmp0 (driver, "nozomi") || !g_strcmp0 (driver, "sierra"))) { - mm_dbg ("[filter] (%s/%s): port allowed: modem-specific kernel driver detected", subsystem, name); + mm_obj_dbg (self, "(%s/%s): port allowed: modem-specific kernel driver detected", subsystem, name); return TRUE; } @@ -246,7 +298,7 @@ (mm_kernel_device_get_interface_subclass (port) != 2) || (mm_kernel_device_get_interface_protocol (port) < 1) || (mm_kernel_device_get_interface_protocol (port) > 6))) { - mm_dbg ("[filter] (%s/%s): port filtered: cdc-acm interface is not AT-capable", subsystem, name); + mm_obj_dbg (self, "(%s/%s): port filtered: cdc-acm interface is not AT-capable", subsystem, name); return FALSE; } @@ -260,7 +312,7 @@ } /* Otherwise forbidden */ - mm_dbg ("[filter] (%s/%s) port filtered: forbidden port type", subsystem, name); + mm_obj_dbg (self, "(%s/%s) port filtered: forbidden port type", subsystem, name); return FALSE; } @@ -303,7 +355,7 @@ /* Check whether this device holds a NET port in addition to this TTY */ if ((self->priv->enabled_rules & MM_FILTER_RULE_TTY_WITH_NET) && device_has_net_port (device)) { - mm_dbg ("[filter] (%s/%s): port allowed: device also exports a net interface", subsystem, name); + mm_obj_dbg (self, "(%s/%s): port allowed: device also exports a net interface", subsystem, name); return TRUE; } @@ -312,11 +364,11 @@ if ((self->priv->enabled_rules & MM_FILTER_RULE_TTY_ACM_INTERFACE) && (!g_strcmp0 (driver, "cdc_acm")) && device_has_multiple_ports (device)) { - mm_dbg ("[filter] (%s/%s): port allowed: device exports multiple interfaces", subsystem, name); + mm_obj_dbg (self, "(%s/%s): port allowed: device exports multiple interfaces", subsystem, name); return TRUE; } - mm_dbg ("[filter] (%s/%s) port filtered: forbidden", subsystem, name); + mm_obj_dbg (self, "(%s/%s) port filtered: forbidden", subsystem, name); return FALSE; } @@ -368,6 +420,14 @@ /*****************************************************************************/ +static gchar * +log_object_build_id (MMLogObject *_self) +{ + return g_strdup ("filter"); +} + +/*****************************************************************************/ + /* If TTY rule enabled, either DEFAULT_ALLOWED or DEFAULT_FORBIDDEN must be set. */ #define VALIDATE_RULE_TTY(rules) (!(rules & MM_FILTER_RULE_TTY) || \ ((rules & (MM_FILTER_RULE_TTY_DEFAULT_ALLOWED | MM_FILTER_RULE_TTY_DEFAULT_FORBIDDEN)) && \ @@ -396,29 +456,31 @@ #define RULE_ENABLED_STR(flag) ((self->priv->enabled_rules & flag) ? "yes" : "no") - mm_dbg ("[filter] created"); - mm_dbg ("[filter] explicit whitelist: %s", RULE_ENABLED_STR (MM_FILTER_RULE_EXPLICIT_WHITELIST)); - mm_dbg ("[filter] explicit blacklist: %s", RULE_ENABLED_STR (MM_FILTER_RULE_EXPLICIT_BLACKLIST)); - mm_dbg ("[filter] plugin whitelist: %s", RULE_ENABLED_STR (MM_FILTER_RULE_PLUGIN_WHITELIST)); - mm_dbg ("[filter] virtual devices forbidden: %s", RULE_ENABLED_STR (MM_FILTER_RULE_VIRTUAL)); - mm_dbg ("[filter] net devices allowed: %s", RULE_ENABLED_STR (MM_FILTER_RULE_NET)); - mm_dbg ("[filter] cdc-wdm devices allowed: %s", RULE_ENABLED_STR (MM_FILTER_RULE_CDC_WDM)); + mm_obj_dbg (self, "created"); + mm_obj_dbg (self, " explicit whitelist: %s", RULE_ENABLED_STR (MM_FILTER_RULE_EXPLICIT_WHITELIST)); + mm_obj_dbg (self, " explicit blacklist: %s", RULE_ENABLED_STR (MM_FILTER_RULE_EXPLICIT_BLACKLIST)); + mm_obj_dbg (self, " plugin whitelist: %s", RULE_ENABLED_STR (MM_FILTER_RULE_PLUGIN_WHITELIST)); + mm_obj_dbg (self, " virtual devices forbidden: %s", RULE_ENABLED_STR (MM_FILTER_RULE_VIRTUAL)); + mm_obj_dbg (self, " net devices allowed: %s", RULE_ENABLED_STR (MM_FILTER_RULE_NET)); + mm_obj_dbg (self, " usbmisc devices allowed: %s", RULE_ENABLED_STR (MM_FILTER_RULE_USBMISC)); + mm_obj_dbg (self, " rpmsg devices allowed: %s", RULE_ENABLED_STR (MM_FILTER_RULE_RPMSG)); + mm_obj_dbg (self, " wwan devices allowed: %s", RULE_ENABLED_STR (MM_FILTER_RULE_WWAN)); if (self->priv->enabled_rules & MM_FILTER_RULE_TTY) { - mm_dbg ("[filter] tty devices:"); - mm_dbg ("[filter] blacklist applied: %s", RULE_ENABLED_STR (MM_FILTER_RULE_TTY_BLACKLIST)); - mm_dbg ("[filter] manual scan only applied: %s", RULE_ENABLED_STR (MM_FILTER_RULE_TTY_MANUAL_SCAN_ONLY)); - mm_dbg ("[filter] platform driver check: %s", RULE_ENABLED_STR (MM_FILTER_RULE_TTY_PLATFORM_DRIVER)); - mm_dbg ("[filter] driver check: %s", RULE_ENABLED_STR (MM_FILTER_RULE_TTY_DRIVER)); - mm_dbg ("[filter] cdc-acm interface check: %s", RULE_ENABLED_STR (MM_FILTER_RULE_TTY_ACM_INTERFACE)); - mm_dbg ("[filter] with net check: %s", RULE_ENABLED_STR (MM_FILTER_RULE_TTY_WITH_NET)); + mm_obj_dbg (self, " tty devices:"); + mm_obj_dbg (self, " blacklist applied: %s", RULE_ENABLED_STR (MM_FILTER_RULE_TTY_BLACKLIST)); + mm_obj_dbg (self, " manual scan only applied: %s", RULE_ENABLED_STR (MM_FILTER_RULE_TTY_MANUAL_SCAN_ONLY)); + mm_obj_dbg (self, " platform driver check: %s", RULE_ENABLED_STR (MM_FILTER_RULE_TTY_PLATFORM_DRIVER)); + mm_obj_dbg (self, " driver check: %s", RULE_ENABLED_STR (MM_FILTER_RULE_TTY_DRIVER)); + mm_obj_dbg (self, " cdc-acm interface check: %s", RULE_ENABLED_STR (MM_FILTER_RULE_TTY_ACM_INTERFACE)); + mm_obj_dbg (self, " with net check: %s", RULE_ENABLED_STR (MM_FILTER_RULE_TTY_WITH_NET)); if (self->priv->enabled_rules & MM_FILTER_RULE_TTY_DEFAULT_ALLOWED) - mm_dbg ("[filter] default: allowed"); + mm_obj_dbg (self, " default: allowed"); else if (self->priv->enabled_rules & MM_FILTER_RULE_TTY_DEFAULT_FORBIDDEN) - mm_dbg ("[filter] default: forbidden"); + mm_obj_dbg (self, " default: forbidden"); else g_assert_not_reached (); } else - mm_dbg ("[filter] tty devices: no"); + mm_obj_dbg (self, " tty devices: no"); #undef RULE_ENABLED_STR @@ -472,6 +534,7 @@ { MMFilter *self = MM_FILTER (object); + g_clear_pointer (&self->priv->plugin_whitelist_vendor_ids, g_array_unref); g_clear_pointer (&self->priv->plugin_whitelist_product_ids, g_array_unref); g_list_free_full (self->priv->plugin_whitelist_tags, g_free); @@ -479,6 +542,12 @@ } static void +log_object_iface_init (MMLogObjectInterface *iface) +{ + iface->build_id = log_object_build_id; +} + +static void mm_filter_class_init (MMFilterClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); diff -Nru modemmanager-1.12.8/src/mm-filter.h modemmanager-1.16.6/src/mm-filter.h --- modemmanager-1.12.8/src/mm-filter.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-filter.h 2021-06-06 21:40:59.000000000 +0800 @@ -43,6 +43,7 @@ } MMFilterClass; GType mm_filter_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMFilter, g_object_unref) typedef enum { /*< underscore_name=mm_filter_rule >*/ MM_FILTER_RULE_NONE = 0, @@ -51,16 +52,18 @@ MM_FILTER_RULE_PLUGIN_WHITELIST = 1 << 2, MM_FILTER_RULE_VIRTUAL = 1 << 3, MM_FILTER_RULE_NET = 1 << 4, - MM_FILTER_RULE_CDC_WDM = 1 << 5, - MM_FILTER_RULE_TTY = 1 << 6, - MM_FILTER_RULE_TTY_BLACKLIST = 1 << 7, - MM_FILTER_RULE_TTY_MANUAL_SCAN_ONLY = 1 << 8, - MM_FILTER_RULE_TTY_PLATFORM_DRIVER = 1 << 9, - MM_FILTER_RULE_TTY_DEFAULT_ALLOWED = 1 << 10, - MM_FILTER_RULE_TTY_DRIVER = 1 << 11, - MM_FILTER_RULE_TTY_ACM_INTERFACE = 1 << 12, - MM_FILTER_RULE_TTY_WITH_NET = 1 << 13, - MM_FILTER_RULE_TTY_DEFAULT_FORBIDDEN = 1 << 14, + MM_FILTER_RULE_USBMISC = 1 << 5, + MM_FILTER_RULE_RPMSG = 1 << 6, + MM_FILTER_RULE_TTY = 1 << 7, + MM_FILTER_RULE_TTY_BLACKLIST = 1 << 8, + MM_FILTER_RULE_TTY_MANUAL_SCAN_ONLY = 1 << 9, + MM_FILTER_RULE_TTY_PLATFORM_DRIVER = 1 << 10, + MM_FILTER_RULE_TTY_DEFAULT_ALLOWED = 1 << 11, + MM_FILTER_RULE_TTY_DRIVER = 1 << 12, + MM_FILTER_RULE_TTY_ACM_INTERFACE = 1 << 13, + MM_FILTER_RULE_TTY_WITH_NET = 1 << 14, + MM_FILTER_RULE_TTY_DEFAULT_FORBIDDEN = 1 << 15, + MM_FILTER_RULE_WWAN = 1 << 16, } MMFilterRule; #define MM_FILTER_RULE_ALL \ @@ -69,7 +72,8 @@ MM_FILTER_RULE_PLUGIN_WHITELIST | \ MM_FILTER_RULE_VIRTUAL | \ MM_FILTER_RULE_NET | \ - MM_FILTER_RULE_CDC_WDM | \ + MM_FILTER_RULE_USBMISC | \ + MM_FILTER_RULE_RPMSG | \ MM_FILTER_RULE_TTY | \ MM_FILTER_RULE_TTY_BLACKLIST | \ MM_FILTER_RULE_TTY_MANUAL_SCAN_ONLY | \ @@ -78,21 +82,24 @@ MM_FILTER_RULE_TTY_DRIVER | \ MM_FILTER_RULE_TTY_ACM_INTERFACE | \ MM_FILTER_RULE_TTY_WITH_NET | \ - MM_FILTER_RULE_TTY_DEFAULT_FORBIDDEN) + MM_FILTER_RULE_TTY_DEFAULT_FORBIDDEN | \ + MM_FILTER_RULE_WWAN) -/* This is the default ModemManager policy that tries to automatically probe +/* This is the legacy ModemManager policy that tries to automatically probe * device ports unless they're blacklisted in some way or another. */ -#define MM_FILTER_POLICY_DEFAULT \ +#define MM_FILTER_POLICY_LEGACY \ (MM_FILTER_RULE_EXPLICIT_WHITELIST | \ MM_FILTER_RULE_EXPLICIT_BLACKLIST | \ MM_FILTER_RULE_VIRTUAL | \ MM_FILTER_RULE_NET | \ - MM_FILTER_RULE_CDC_WDM | \ + MM_FILTER_RULE_USBMISC | \ + MM_FILTER_RULE_RPMSG | \ MM_FILTER_RULE_TTY | \ MM_FILTER_RULE_TTY_BLACKLIST | \ MM_FILTER_RULE_TTY_MANUAL_SCAN_ONLY | \ MM_FILTER_RULE_TTY_PLATFORM_DRIVER | \ - MM_FILTER_RULE_TTY_DEFAULT_ALLOWED) + MM_FILTER_RULE_TTY_DEFAULT_ALLOWED | \ + MM_FILTER_RULE_WWAN) /* This is a stricter policy which will only automatically probe device ports * if they are allowed by any of the automatic whitelist rules. */ @@ -102,13 +109,15 @@ MM_FILTER_RULE_PLUGIN_WHITELIST | \ MM_FILTER_RULE_VIRTUAL | \ MM_FILTER_RULE_NET | \ - MM_FILTER_RULE_CDC_WDM | \ + MM_FILTER_RULE_USBMISC | \ + MM_FILTER_RULE_RPMSG | \ MM_FILTER_RULE_TTY | \ MM_FILTER_RULE_TTY_PLATFORM_DRIVER | \ MM_FILTER_RULE_TTY_DRIVER | \ MM_FILTER_RULE_TTY_ACM_INTERFACE | \ MM_FILTER_RULE_TTY_WITH_NET | \ - MM_FILTER_RULE_TTY_DEFAULT_FORBIDDEN) + MM_FILTER_RULE_TTY_DEFAULT_FORBIDDEN | \ + MM_FILTER_RULE_WWAN) /* This is equivalent to the strict policy, but also applying the device * blacklists explicitly */ @@ -118,7 +127,8 @@ MM_FILTER_RULE_PLUGIN_WHITELIST | \ MM_FILTER_RULE_VIRTUAL | \ MM_FILTER_RULE_NET | \ - MM_FILTER_RULE_CDC_WDM | \ + MM_FILTER_RULE_USBMISC | \ + MM_FILTER_RULE_RPMSG | \ MM_FILTER_RULE_TTY | \ MM_FILTER_RULE_TTY_BLACKLIST | \ MM_FILTER_RULE_TTY_MANUAL_SCAN_ONLY | \ @@ -126,7 +136,8 @@ MM_FILTER_RULE_TTY_DRIVER | \ MM_FILTER_RULE_TTY_ACM_INTERFACE | \ MM_FILTER_RULE_TTY_WITH_NET | \ - MM_FILTER_RULE_TTY_DEFAULT_FORBIDDEN) + MM_FILTER_RULE_TTY_DEFAULT_FORBIDDEN | \ + MM_FILTER_RULE_WWAN) /* This policy only allows using device ports explicitly whitelisted via * udev rules. i.e. ModemManager won't do any kind of automatic probing. */ @@ -145,6 +156,8 @@ void mm_filter_register_plugin_whitelist_tag (MMFilter *self, const gchar *tag); +void mm_filter_register_plugin_whitelist_vendor_id (MMFilter *self, + guint16 vid); void mm_filter_register_plugin_whitelist_product_id (MMFilter *self, guint16 vid, guint16 pid); diff -Nru modemmanager-1.12.8/src/mm-iface-modem-3gpp-ussd.c modemmanager-1.16.6/src/mm-iface-modem-3gpp-ussd.c --- modemmanager-1.12.8/src/mm-iface-modem-3gpp-ussd.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-3gpp-ussd.c 2021-06-06 21:40:59.000000000 +0800 @@ -26,7 +26,7 @@ #include "mm-iface-modem-3gpp-ussd.h" #include "mm-base-modem.h" #include "mm-modem-helpers.h" -#include "mm-log.h" +#include "mm-log-object.h" #define SUPPORT_CHECKED_TAG "3gpp-ussd-support-checked-tag" #define SUPPORTED_TAG "3gpp-ussd-supported-tag" @@ -89,6 +89,10 @@ case MM_MODEM_STATE_CONNECTING: case MM_MODEM_STATE_CONNECTED: break; + + default: + g_assert_not_reached (); + return FALSE; } return TRUE; @@ -522,7 +526,7 @@ MM_IFACE_MODEM_3GPP_USSD_GET_INTERFACE (self)->disable_unsolicited_events_finish (self, res, &error); if (error) { /* This error shouldn't be treated as critical */ - mm_dbg ("Couldn't disable unsolicited USSD events: '%s'", error->message); + mm_obj_dbg (self, "couldn't disable unsolicited USSD events: %s", error->message); g_error_free (error); } @@ -543,7 +547,7 @@ MM_IFACE_MODEM_3GPP_USSD_GET_INTERFACE (self)->cleanup_unsolicited_events_finish (self, res, &error); if (error) { /* This error shouldn't be treated as critical */ - mm_dbg ("Couldn't cleanup unsolicited USSD events: '%s'", error->message); + mm_obj_dbg (self, "couldn't cleanup unsolicited USSD events: %s", error->message); g_error_free (error); } @@ -564,8 +568,8 @@ switch (ctx->step) { case DISABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_DISABLE_UNSOLICITED_EVENTS: MM_IFACE_MODEM_3GPP_USSD_GET_INTERFACE (self)->disable_unsolicited_events ( @@ -588,6 +592,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -666,7 +673,7 @@ MM_IFACE_MODEM_3GPP_USSD_GET_INTERFACE (self)->setup_unsolicited_events_finish (self, res, &error); if (error) { /* This error shouldn't be treated as critical */ - mm_dbg ("Couldn't setup unsolicited USSD events: '%s'", error->message); + mm_obj_dbg (self, "couldn't setup unsolicited USSD events: %s", error->message); g_error_free (error); } @@ -687,7 +694,7 @@ MM_IFACE_MODEM_3GPP_USSD_GET_INTERFACE (self)->enable_unsolicited_events_finish (self, res, &error); if (error) { /* This error shouldn't be treated as critical */ - mm_dbg ("Couldn't enable unsolicited USSD events: '%s'", error->message); + mm_obj_dbg (self, "couldn't enable unsolicited USSD events: %s", error->message); g_error_free (error); } @@ -708,8 +715,8 @@ switch (ctx->step) { case ENABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_SETUP_UNSOLICITED_EVENTS: MM_IFACE_MODEM_3GPP_USSD_GET_INTERFACE (self)->setup_unsolicited_events ( @@ -732,6 +739,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -803,7 +813,7 @@ &error)) { if (error) { /* This error shouldn't be treated as critical */ - mm_dbg ("USSD support check failed: '%s'", error->message); + mm_obj_dbg (self, "USSD support check failed: %s", error->message); g_error_free (error); } } else { @@ -838,8 +848,8 @@ supported_quark = (g_quark_from_static_string ( SUPPORTED_TAG)); - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_CHECK_SUPPORT: if (!GPOINTER_TO_UINT (g_object_get_qdata (G_OBJECT (self), @@ -866,8 +876,8 @@ * support it. */ } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_FAIL_IF_UNSUPPORTED: if (!GPOINTER_TO_UINT (g_object_get_qdata (G_OBJECT (self), @@ -880,8 +890,8 @@ return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_LAST: /* We are done without errors! */ @@ -907,6 +917,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); diff -Nru modemmanager-1.12.8/src/mm-iface-modem-3gpp-ussd.h modemmanager-1.16.6/src/mm-iface-modem-3gpp-ussd.h --- modemmanager-1.12.8/src/mm-iface-modem-3gpp-ussd.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-3gpp-ussd.h 2021-06-06 21:40:59.000000000 +0800 @@ -107,6 +107,7 @@ }; GType mm_iface_modem_3gpp_ussd_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMIfaceModem3gppUssd, g_object_unref) /* Initialize USSD interface (async) */ void mm_iface_modem_3gpp_ussd_initialize (MMIfaceModem3gppUssd *self, diff -Nru modemmanager-1.12.8/src/mm-iface-modem-3gpp.c modemmanager-1.16.6/src/mm-iface-modem-3gpp.c --- modemmanager-1.12.8/src/mm-iface-modem-3gpp.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-3gpp.c 2021-06-06 21:40:59.000000000 +0800 @@ -28,15 +28,72 @@ #include "mm-error-helpers.h" #include "mm-log.h" -#define REGISTRATION_CHECK_TIMEOUT_SEC 30 - #define SUBSYSTEM_3GPP "3gpp" -#define REGISTRATION_STATE_CONTEXT_TAG "3gpp-registration-state-context-tag" -#define REGISTRATION_CHECK_CONTEXT_TAG "3gpp-registration-check-context-tag" +/* When comparing EPS bearer settings take into account that PASSWORD may not always + * be readable, and apply very loose matching for all fields. Also, some implementations + * may allow configuring roaming allowance in the initial EPS bearer, but that is also + * not common. */ +#define MM_BEARER_PROPERTIES_CMP_FLAGS_EPS \ + (MM_BEARER_PROPERTIES_CMP_FLAGS_LOOSE | \ + MM_BEARER_PROPERTIES_CMP_FLAGS_NO_PASSWORD | \ + MM_BEARER_PROPERTIES_CMP_FLAGS_NO_ALLOW_ROAMING | \ + MM_BEARER_PROPERTIES_CMP_FLAGS_NO_RM_PROTOCOL) + +/*****************************************************************************/ +/* Private data context */ + +#define PRIVATE_TAG "iface-modem-3gpp-private-tag" +static GQuark private_quark; + +typedef struct { + /* Registration state */ + MMModem3gppRegistrationState state_cs; + MMModem3gppRegistrationState state_ps; + MMModem3gppRegistrationState state_eps; + MMModem3gppRegistrationState state_5gs; + gboolean manual_registration; + gchar *manual_registration_operator_id; + GCancellable *pending_registration_cancellable; + gboolean reloading_registration_info; + /* Registration checks */ + guint check_timeout_source; + gboolean check_running; +} Private; + +static void +private_free (Private *priv) +{ + g_free (priv->manual_registration_operator_id); + if (priv->pending_registration_cancellable) { + g_cancellable_cancel (priv->pending_registration_cancellable); + g_object_unref (priv->pending_registration_cancellable); + } + if (priv->check_timeout_source) + g_source_remove (priv->check_timeout_source); + g_slice_free (Private, priv); +} + +static Private * +get_private (MMIfaceModem3gpp *self) +{ + Private *priv; + + if (G_UNLIKELY (!private_quark)) + private_quark = g_quark_from_static_string (PRIVATE_TAG); + + priv = g_object_get_qdata (G_OBJECT (self), private_quark); + if (!priv) { + priv = g_slice_new0 (Private); + priv->state_cs = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; + priv->state_ps = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; + priv->state_eps = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; + priv->state_5gs = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; + g_object_set_qdata_full (G_OBJECT (self), private_quark, priv, (GDestroyNotify)private_free); + } -static GQuark registration_state_context_quark; -static GQuark registration_check_context_quark; + return priv; +} /*****************************************************************************/ @@ -69,52 +126,6 @@ /*****************************************************************************/ -typedef struct { - MMModem3gppRegistrationState cs; - MMModem3gppRegistrationState ps; - MMModem3gppRegistrationState eps; - gboolean manual_registration; - GCancellable *pending_registration_cancellable; - gboolean reloading_registration_info; -} RegistrationStateContext; - -static void -registration_state_context_free (RegistrationStateContext *ctx) -{ - if (ctx->pending_registration_cancellable) { - g_cancellable_cancel (ctx->pending_registration_cancellable); - g_object_unref (ctx->pending_registration_cancellable); - } - g_slice_free (RegistrationStateContext, ctx); -} - -static RegistrationStateContext * -get_registration_state_context (MMIfaceModem3gpp *self) -{ - RegistrationStateContext *ctx; - - if (G_UNLIKELY (!registration_state_context_quark)) - registration_state_context_quark = (g_quark_from_static_string ( - REGISTRATION_STATE_CONTEXT_TAG)); - - ctx = g_object_get_qdata (G_OBJECT (self), registration_state_context_quark); - if (!ctx) { - /* Create context and keep it as object data */ - ctx = g_slice_new0 (RegistrationStateContext); - ctx->cs = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; - ctx->ps = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; - ctx->eps = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; - - g_object_set_qdata_full ( - G_OBJECT (self), - registration_state_context_quark, - ctx, - (GDestroyNotify)registration_state_context_free); - } - - return ctx; -} - #define REG_STATE_IS_REGISTERED(state) \ (state == MM_MODEM_3GPP_REGISTRATION_STATE_HOME || \ state == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING || \ @@ -129,59 +140,52 @@ state == MM_MODEM_3GPP_REGISTRATION_STATE_DENIED) static MMModem3gppRegistrationState -get_consolidated_reg_state (RegistrationStateContext *ctx) +get_consolidated_reg_state (MMIfaceModem3gpp *self) { - MMModem3gppRegistrationState consolidated = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; + Private *priv; + + priv = get_private (self); /* Some devices (Blackberries for example) will respond to +CGREG, but * return ERROR for +CREG, probably because their firmware is just stupid. * So here we prefer the +CREG response, but if we never got a successful * +CREG response, we'll take +CGREG instead. */ - if (ctx->cs == MM_MODEM_3GPP_REGISTRATION_STATE_HOME || - ctx->cs == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING) { - consolidated = ctx->cs; - goto out; - } - if (ctx->ps == MM_MODEM_3GPP_REGISTRATION_STATE_HOME || - ctx->ps == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING) { - consolidated = ctx->ps; - goto out; - } - if (ctx->eps == MM_MODEM_3GPP_REGISTRATION_STATE_HOME || - ctx->eps == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING) { - consolidated = ctx->eps; - goto out; - } + if (priv->state_cs == MM_MODEM_3GPP_REGISTRATION_STATE_HOME || priv->state_cs == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING) + return priv->state_cs; + if (priv->state_ps == MM_MODEM_3GPP_REGISTRATION_STATE_HOME || priv->state_ps == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING) + return priv->state_ps; + if (priv->state_eps == MM_MODEM_3GPP_REGISTRATION_STATE_HOME || priv->state_eps == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING) + return priv->state_eps; + if (priv->state_5gs == MM_MODEM_3GPP_REGISTRATION_STATE_HOME || priv->state_5gs == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING) + return priv->state_5gs; /* Searching? */ - if (ctx->cs == MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING || - ctx->ps == MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING || - ctx->eps == MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING) { - consolidated = MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING; - goto out; - } + if (priv->state_cs == MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING || + priv->state_ps == MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING || + priv->state_eps == MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING || + priv->state_5gs == MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING) + return MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING; /* If at least one state is DENIED and the others are UNKNOWN or IDLE, use DENIED */ - if ((ctx->cs == MM_MODEM_3GPP_REGISTRATION_STATE_DENIED || - ctx->ps == MM_MODEM_3GPP_REGISTRATION_STATE_DENIED || - ctx->eps == MM_MODEM_3GPP_REGISTRATION_STATE_DENIED) && - REG_STATE_IS_UNKNOWN_IDLE_DENIED (ctx->cs) && - REG_STATE_IS_UNKNOWN_IDLE_DENIED (ctx->ps) && - REG_STATE_IS_UNKNOWN_IDLE_DENIED (ctx->eps)) { - consolidated = MM_MODEM_3GPP_REGISTRATION_STATE_DENIED; - goto out; - } + if ((priv->state_cs == MM_MODEM_3GPP_REGISTRATION_STATE_DENIED || + priv->state_ps == MM_MODEM_3GPP_REGISTRATION_STATE_DENIED || + priv->state_eps == MM_MODEM_3GPP_REGISTRATION_STATE_DENIED || + priv->state_5gs == MM_MODEM_3GPP_REGISTRATION_STATE_DENIED) && + REG_STATE_IS_UNKNOWN_IDLE_DENIED (priv->state_cs) && + REG_STATE_IS_UNKNOWN_IDLE_DENIED (priv->state_ps) && + REG_STATE_IS_UNKNOWN_IDLE_DENIED (priv->state_eps) && + REG_STATE_IS_UNKNOWN_IDLE_DENIED (priv->state_5gs)) + return MM_MODEM_3GPP_REGISTRATION_STATE_DENIED; /* Emergency services? */ - if (ctx->cs == MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY || - ctx->ps == MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY || - ctx->eps == MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY) { - consolidated = MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY; - goto out; - } + if (priv->state_cs == MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY || + priv->state_ps == MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY || + priv->state_eps == MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY || + priv->state_5gs == MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY) + return MM_MODEM_3GPP_REGISTRATION_STATE_EMERGENCY_ONLY; - /* Support for additional registration states reported when on LTE. + /* Support for additional registration states reported when on LTE/5GNR. * * For example, we may see the modem registered in LTE (EPS==HOME), and we * may get "SMS only" reported for CS. @@ -193,32 +197,23 @@ * We also warn in that case, because ideally we should always report the * LTE registration state first, not this one. */ - if (ctx->cs == MM_MODEM_3GPP_REGISTRATION_STATE_HOME_SMS_ONLY || - ctx->cs == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_SMS_ONLY || - ctx->cs == MM_MODEM_3GPP_REGISTRATION_STATE_HOME_CSFB_NOT_PREFERRED || - ctx->cs == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_CSFB_NOT_PREFERRED) { - mm_warn ("3GPP CSFB registration state is consolidated: %s", - mm_modem_3gpp_registration_state_get_string (ctx->cs)); - consolidated = ctx->cs; - goto out; + if (priv->state_cs == MM_MODEM_3GPP_REGISTRATION_STATE_HOME_SMS_ONLY || + priv->state_cs == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_SMS_ONLY || + priv->state_cs == MM_MODEM_3GPP_REGISTRATION_STATE_HOME_CSFB_NOT_PREFERRED || + priv->state_cs == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_CSFB_NOT_PREFERRED) { + mm_obj_warn (self, "3GPP CSFB registration state is consolidated: %s", + mm_modem_3gpp_registration_state_get_string (priv->state_cs)); + return priv->state_cs; } /* Idle? */ - if (ctx->cs == MM_MODEM_3GPP_REGISTRATION_STATE_IDLE || - ctx->ps == MM_MODEM_3GPP_REGISTRATION_STATE_IDLE || - ctx->eps == MM_MODEM_3GPP_REGISTRATION_STATE_IDLE) { - consolidated = MM_MODEM_3GPP_REGISTRATION_STATE_IDLE; - goto out; - } - - out: - mm_dbg ("building consolidated registration state: cs '%s', ps '%s', eps '%s' --> '%s'", - mm_modem_3gpp_registration_state_get_string (ctx->cs), - mm_modem_3gpp_registration_state_get_string (ctx->ps), - mm_modem_3gpp_registration_state_get_string (ctx->eps), - mm_modem_3gpp_registration_state_get_string (consolidated)); + if (priv->state_cs == MM_MODEM_3GPP_REGISTRATION_STATE_IDLE || + priv->state_ps == MM_MODEM_3GPP_REGISTRATION_STATE_IDLE || + priv->state_eps == MM_MODEM_3GPP_REGISTRATION_STATE_IDLE || + priv->state_5gs == MM_MODEM_3GPP_REGISTRATION_STATE_IDLE) + return MM_MODEM_3GPP_REGISTRATION_STATE_IDLE; - return consolidated; + return MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; } /*****************************************************************************/ @@ -226,10 +221,10 @@ typedef struct { MMIfaceModem3gpp *self; MmGdbusModem3gpp *skeleton; - GCancellable *cancellable; - gchar *operator_id; - GTimer *timer; - guint max_registration_time; + GCancellable *cancellable; + gchar *operator_id; + GTimer *timer; + guint max_registration_time; } RegisterInNetworkContext; static void @@ -239,13 +234,12 @@ g_timer_destroy (ctx->timer); if (ctx->cancellable) { - RegistrationStateContext *registration_state_context; + Private *priv; /* Clear our cancellable if still around */ - registration_state_context = get_registration_state_context (ctx->self); - if (registration_state_context->pending_registration_cancellable == ctx->cancellable) - g_clear_object (®istration_state_context->pending_registration_cancellable); - + priv = get_private (ctx->self); + if (priv->pending_registration_cancellable == ctx->cancellable) + g_clear_object (&priv->pending_registration_cancellable); g_object_unref (ctx->cancellable); } @@ -257,7 +251,7 @@ } static void -register_in_network_context_complete_failed (GTask *task, +register_in_network_context_complete_failed (GTask *task, GError *error) { RegisterInNetworkContext *ctx; @@ -275,61 +269,42 @@ } gboolean -mm_iface_modem_3gpp_register_in_network_finish (MMIfaceModem3gpp *self, - GAsyncResult *res, - GError **error) +mm_iface_modem_3gpp_register_in_network_finish (MMIfaceModem3gpp *self, + GAsyncResult *res, + GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } -static void run_registration_checks_ready (MMIfaceModem3gpp *self, - GAsyncResult *res, - GTask *task); - -static gboolean -run_registration_checks_again (GTask *task) -{ - RegisterInNetworkContext *ctx; - - ctx = g_task_get_task_data (task); - - /* Get fresh registration state */ - mm_iface_modem_3gpp_run_registration_checks ( - ctx->self, - (GAsyncReadyCallback)run_registration_checks_ready, - task); - return G_SOURCE_REMOVE; -} +static gboolean run_registration_checks (GTask *task); static void run_registration_checks_ready (MMIfaceModem3gpp *self, - GAsyncResult *res, - GTask *task) + GAsyncResult *res, + GTask *task) { - RegisterInNetworkContext *ctx; - GError *error = NULL; - RegistrationStateContext *registration_state_context; - MMModem3gppRegistrationState current_registration_state; + RegisterInNetworkContext *ctx; + GError *error = NULL; + MMModem3gppRegistrationState current_registration_state; ctx = g_task_get_task_data (task); mm_iface_modem_3gpp_run_registration_checks_finish (MM_IFACE_MODEM_3GPP (self), res, &error); if (error) { - mm_dbg ("3GPP registration check failed: '%s'", error->message); + mm_obj_dbg (self, "3GPP registration check failed: %s", error->message); register_in_network_context_complete_failed (task, error); return; } - registration_state_context = get_registration_state_context (ctx->self); - current_registration_state = get_consolidated_reg_state (registration_state_context); + current_registration_state = get_consolidated_reg_state (ctx->self); /* If we got a final state and it's denied, we can assume the registration is * finished */ if (current_registration_state == MM_MODEM_3GPP_REGISTRATION_STATE_DENIED) { - mm_dbg ("Registration denied"); + mm_obj_dbg (self, "registration denied"); register_in_network_context_complete_failed ( task, - mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_NETWORK_NOT_ALLOWED)); + mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_NETWORK_NOT_ALLOWED, self)); return; } @@ -340,7 +315,7 @@ * wouldn't be an explicit refresh triggered from the modem interface as * the modem never got un-registered during the sequence. */ mm_iface_modem_refresh_signal (MM_IFACE_MODEM (ctx->self)); - mm_dbg ("Modem is currently registered in a 3GPP network"); + mm_obj_dbg (self, "currently registered in a 3GPP network"); g_task_return_boolean (task, TRUE); g_object_unref (task); return; @@ -348,10 +323,10 @@ /* Don't spend too much time waiting to get registered */ if (g_timer_elapsed (ctx->timer, NULL) > ctx->max_registration_time) { - mm_dbg ("3GPP registration check timed out"); + mm_obj_dbg (self, "3GPP registration check timed out"); register_in_network_context_complete_failed ( task, - mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_NETWORK_TIMEOUT)); + mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_NETWORK_TIMEOUT, self)); return; } @@ -361,14 +336,29 @@ * This 3s timeout will catch results from automatic registrations as * well. */ - mm_dbg ("Modem not yet registered in a 3GPP network... will recheck soon"); - g_timeout_add_seconds (3, (GSourceFunc)run_registration_checks_again, task); + mm_obj_dbg (self, "not yet registered in a 3GPP network... will recheck soon"); + g_timeout_add_seconds (3, (GSourceFunc)run_registration_checks, task); +} + +static gboolean +run_registration_checks (GTask *task) +{ + RegisterInNetworkContext *ctx; + + ctx = g_task_get_task_data (task); + + /* Get fresh registration state */ + mm_iface_modem_3gpp_run_registration_checks ( + ctx->self, + (GAsyncReadyCallback)run_registration_checks_ready, + task); + return G_SOURCE_REMOVE; } static void register_in_network_ready (MMIfaceModem3gpp *self, - GAsyncResult *res, - GTask *task) + GAsyncResult *res, + GTask *task) { GError *error = NULL; @@ -380,24 +370,25 @@ /* Now try to gather current registration status until we're registered or * the time goes off */ - mm_iface_modem_3gpp_run_registration_checks ( - self, - (GAsyncReadyCallback)run_registration_checks_ready, - task); + run_registration_checks (task); } void -mm_iface_modem_3gpp_register_in_network (MMIfaceModem3gpp *self, - const gchar *operator_id, - guint max_registration_time, - GAsyncReadyCallback callback, - gpointer user_data) -{ - RegisterInNetworkContext *ctx; - const gchar *current_operator_code; - RegistrationStateContext *registration_state_context; - GError *error = NULL; - GTask *task; +mm_iface_modem_3gpp_register_in_network (MMIfaceModem3gpp *self, + const gchar *operator_id, + gboolean force_registration, + guint max_registration_time, + GAsyncReadyCallback callback, + gpointer user_data) +{ + RegisterInNetworkContext *ctx; + const gchar *current_operator_code; + GError *error = NULL; + GTask *task; + Private *priv; + MMModem3gppRegistrationState reg_state; + + priv = get_private (self); ctx = g_slice_new0 (RegisterInNetworkContext); ctx->self = g_object_ref (self); @@ -427,62 +418,61 @@ return; } - /* Get registration state context */ - registration_state_context = get_registration_state_context (self); - /* (Try to) cancel previous registration request */ - if (registration_state_context->pending_registration_cancellable) { - g_cancellable_cancel (registration_state_context->pending_registration_cancellable); - g_clear_object (®istration_state_context->pending_registration_cancellable); + if (priv->pending_registration_cancellable) { + g_cancellable_cancel (priv->pending_registration_cancellable); + g_clear_object (&priv->pending_registration_cancellable); } current_operator_code = mm_gdbus_modem3gpp_get_operator_code (ctx->skeleton); + reg_state = mm_gdbus_modem3gpp_get_registration_state (ctx->skeleton); /* Manual registration requested? */ if (ctx->operator_id) { - /* If already registered with the requested operator, we're done */ - if (current_operator_code && - g_str_equal (current_operator_code, ctx->operator_id)) { - registration_state_context->manual_registration = TRUE; - mm_dbg ("Already registered in selected network '%s'...", - current_operator_code); + /* If already registered manually with the requested operator, we're done */ + if (!force_registration && + (g_strcmp0 (current_operator_code, ctx->operator_id) == 0) && + REG_STATE_IS_REGISTERED (reg_state) && + priv->manual_registration) { + mm_obj_dbg (self, "already registered manually in selected network '%s', manual registration not launched...", + current_operator_code); g_task_return_boolean (task, TRUE); g_object_unref (task); return; } /* Manual registration to a new operator required */ - mm_dbg ("Launching manual network registration (%s)...", - ctx->operator_id); - registration_state_context->manual_registration = TRUE; + mm_obj_dbg (self, "launching manual network registration (%s)...", ctx->operator_id); + g_free (priv->manual_registration_operator_id); + priv->manual_registration_operator_id = g_strdup (ctx->operator_id); + priv->manual_registration = TRUE; } /* Automatic registration requested? */ else { - MMModem3gppRegistrationState reg_state = mm_gdbus_modem3gpp_get_registration_state (ctx->skeleton); - /* If the modem is already registered and the last time it was asked * automatic registration, we're done */ - if ((current_operator_code || REG_STATE_IS_REGISTERED (reg_state)) && - !registration_state_context->manual_registration) { - mm_dbg ("Already registered in network '%s'," - " automatic registration not launched...", - current_operator_code); + if (!force_registration && + (current_operator_code || REG_STATE_IS_REGISTERED (reg_state)) && + !priv->manual_registration) { + mm_obj_dbg (self, "already registered automatically in network '%s'," + " automatic registration not launched...", + current_operator_code); g_task_return_boolean (task, TRUE); g_object_unref (task); return; } /* Automatic registration to a new operator requested */ - mm_dbg ("Launching automatic network registration..."); - registration_state_context->manual_registration = FALSE; + mm_obj_dbg (self, "launching automatic network registration..."); + g_clear_pointer (&priv->manual_registration_operator_id, g_free); + priv->manual_registration = FALSE; } ctx->cancellable = g_cancellable_new (); /* Keep an accessible reference to the cancellable, so that we can cancel * previous request when needed */ - registration_state_context->pending_registration_cancellable = - g_object_ref (ctx->cancellable); + priv->pending_registration_cancellable = g_object_ref (ctx->cancellable); ctx->timer = g_timer_new (); MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->register_in_network ( @@ -493,6 +483,39 @@ task); } +/*****************************************************************************/ +/* Request to reregister using the last settings */ + +#define REREGISTER_IN_NETWORK_TIMEOUT 120 + +gboolean +mm_iface_modem_3gpp_reregister_in_network_finish (MMIfaceModem3gpp *self, + GAsyncResult *res, + GError **error) +{ + return mm_iface_modem_3gpp_register_in_network_finish (self, res, error); +} + +void +mm_iface_modem_3gpp_reregister_in_network (MMIfaceModem3gpp *self, + GAsyncReadyCallback callback, + gpointer user_data) +{ + Private *priv; + + /* Relaunch registration using the last used settings */ + priv = get_private (self); + mm_iface_modem_3gpp_register_in_network (self, + priv->manual_registration_operator_id, + TRUE, /* if already registered with same settings, force re-registration */ + REREGISTER_IN_NETWORK_TIMEOUT, + callback, + user_data); +} + + +/*****************************************************************************/ + typedef struct { MmGdbusModem3gpp *skeleton; GDBusMethodInvocation *invocation; @@ -568,6 +591,7 @@ case MM_MODEM_STATE_REGISTERED: mm_iface_modem_3gpp_register_in_network (MM_IFACE_MODEM_3GPP (self), ctx->operator_id, + FALSE, /* if already registered with same settings, do nothing */ 60, (GAsyncReadyCallback)handle_register_ready, ctx); @@ -599,6 +623,9 @@ "Cannot register modem: " "modem is connected"); break; + + default: + g_assert_not_reached (); } handle_register_context_free (ctx); @@ -771,6 +798,9 @@ (GAsyncReadyCallback)handle_scan_ready, ctx); return; + + default: + g_assert_not_reached (); } handle_scan_context_free (ctx); @@ -953,6 +983,45 @@ } static void +log_initial_eps_bearer_settings (MMIfaceModem3gpp *self, + MMBearerProperties *properties) +{ + const gchar *apn; + MMBearerAllowedAuth allowed_auth; + const gchar *user; + const gchar *password; + MMBearerIpFamily ip_family; + + apn = mm_bearer_properties_get_apn (properties); + if (apn) + mm_obj_dbg (self, " APN: '%s'", apn); + + allowed_auth = mm_bearer_properties_get_allowed_auth (properties); + if (allowed_auth != MM_BEARER_ALLOWED_AUTH_UNKNOWN) { + g_autofree gchar *allowed_auth_str = NULL; + + allowed_auth_str = mm_bearer_allowed_auth_build_string_from_mask (allowed_auth); + mm_obj_dbg (self, " allowed auth: '%s'", allowed_auth_str); + } + + user = mm_bearer_properties_get_user (properties); + if (user) + mm_obj_dbg (self, " user: '%s'", user); + + password = mm_bearer_properties_get_password (properties); + if (password) + mm_obj_dbg (self, " password: '%s'", password); + + ip_family = mm_bearer_properties_get_ip_type (properties); + if (ip_family != MM_BEARER_IP_FAMILY_NONE) { + g_autofree gchar *ip_family_str = NULL; + + ip_family_str = mm_bearer_ip_family_build_string_from_mask (ip_family); + mm_obj_dbg (self, " ip family: '%s'", ip_family_str); + } +} + +static void after_set_load_initial_eps_bearer_settings_ready (MMIfaceModem3gpp *self, GAsyncResult *res, HandleSetInitialEpsBearerSettingsContext *ctx) @@ -967,7 +1036,12 @@ return; } - if (!mm_bearer_properties_cmp (new_config, ctx->config)) { + mm_obj_dbg (self, "Updated initial EPS bearer settings:"); + log_initial_eps_bearer_settings (self, new_config); + + if (!mm_bearer_properties_cmp (new_config, ctx->config, MM_BEARER_PROPERTIES_CMP_FLAGS_EPS)) { + mm_obj_dbg (self, "Requested initial EPS bearer settings:"); + log_initial_eps_bearer_settings (self, ctx->config); g_dbus_method_invocation_return_error_literal (ctx->invocation, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "Initial EPS bearer settings were not updated"); } else { @@ -1044,15 +1118,11 @@ return; } - /* If the user doesn't specify explicit auth settings, assume NONE as default */ - if (mm_bearer_properties_get_allowed_auth (ctx->config) == MM_BEARER_ALLOWED_AUTH_UNKNOWN) - mm_bearer_properties_set_allowed_auth (ctx->config, MM_BEARER_ALLOWED_AUTH_NONE); - old_dictionary = mm_gdbus_modem3gpp_get_initial_eps_bearer_settings (ctx->skeleton); if (old_dictionary) old_config = mm_bearer_properties_new_from_dictionary (old_dictionary, NULL); - if (old_config && mm_bearer_properties_cmp (ctx->config, old_config)) { + if (old_config && mm_bearer_properties_cmp (ctx->config, old_config, MM_BEARER_PROPERTIES_CMP_FLAGS_EPS)) { mm_gdbus_modem3gpp_complete_set_initial_eps_bearer_settings (ctx->skeleton, ctx->invocation); handle_set_initial_eps_bearer_settings_context_free (ctx); } else { @@ -1104,27 +1174,31 @@ GAsyncReadyCallback callback, gpointer user_data) { - gboolean cs_supported = FALSE; - gboolean ps_supported = FALSE; - gboolean eps_supported = FALSE; + gboolean is_cs_supported = FALSE; + gboolean is_ps_supported = FALSE; + gboolean is_eps_supported = FALSE; + gboolean is_5gs_supported = FALSE; g_assert (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->run_registration_checks != NULL); g_object_get (self, - MM_IFACE_MODEM_3GPP_CS_NETWORK_SUPPORTED, &cs_supported, - MM_IFACE_MODEM_3GPP_PS_NETWORK_SUPPORTED, &ps_supported, - MM_IFACE_MODEM_3GPP_EPS_NETWORK_SUPPORTED, &eps_supported, + MM_IFACE_MODEM_3GPP_CS_NETWORK_SUPPORTED, &is_cs_supported, + MM_IFACE_MODEM_3GPP_PS_NETWORK_SUPPORTED, &is_ps_supported, + MM_IFACE_MODEM_3GPP_EPS_NETWORK_SUPPORTED, &is_eps_supported, + MM_IFACE_MODEM_3GPP_5GS_NETWORK_SUPPORTED, &is_5gs_supported, NULL); - mm_dbg ("Running registration checks (CS: '%s', PS: '%s', EPS: '%s')", - cs_supported ? "yes" : "no", - ps_supported ? "yes" : "no", - eps_supported ? "yes" : "no"); + mm_obj_dbg (self, "running registration checks (CS: '%s', PS: '%s', EPS: '%s', 5GS: '%s')", + is_cs_supported ? "yes" : "no", + is_ps_supported ? "yes" : "no", + is_eps_supported ? "yes" : "no", + is_5gs_supported ? "yes" : "no"); MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->run_registration_checks (self, - cs_supported, - ps_supported, - eps_supported, + is_cs_supported, + is_ps_supported, + is_eps_supported, + is_5gs_supported, callback, user_data); } @@ -1168,7 +1242,7 @@ str = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_operator_name_finish (self, res, &error); if (error) { - mm_warn ("Couldn't load Operator Name: '%s'", error->message); + mm_obj_warn (self, "couldn't load operator name: %s", error->message); g_error_free (error); } @@ -1195,9 +1269,9 @@ str = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_operator_code_finish (self, res, &error); if (error) { - mm_warn ("Couldn't load Operator Code: '%s'", error->message); + mm_obj_warn (self, "couldn't load operator code: %s", error->message); } else if (!mm_3gpp_parse_operator_id (str, &mcc, &mnc, &error)) { - mm_dbg ("Unexpected MCC/MNC string '%s': '%s'", str, error->message); + mm_obj_dbg (self, "unexpected operator code string '%s': %s", str, error->message); g_clear_pointer (&str, g_free); } g_clear_error (&error); @@ -1308,14 +1382,13 @@ /*****************************************************************************/ void -mm_iface_modem_3gpp_update_access_technologies (MMIfaceModem3gpp *self, - MMModemAccessTechnology access_tech) +mm_iface_modem_3gpp_update_access_technologies (MMIfaceModem3gpp *self, + MMModemAccessTechnology access_tech) { - MMModem3gppRegistrationState state; - RegistrationStateContext *ctx; + Private *priv; + MMModem3gppRegistrationState state; - ctx = get_registration_state_context (self); - g_assert (ctx); + priv = get_private (self); g_object_get (self, MM_IFACE_MODEM_3GPP_REGISTRATION_STATE, &state, @@ -1323,7 +1396,7 @@ /* Even if registration state didn't change, report access technology, * but only if something valid to report */ - if (REG_STATE_IS_REGISTERED (state) || ctx->reloading_registration_info) { + if (REG_STATE_IS_REGISTERED (state) || priv->reloading_registration_info) { if (access_tech != MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN) mm_iface_modem_update_access_technologies (MM_IFACE_MODEM (self), access_tech, @@ -1336,15 +1409,14 @@ void mm_iface_modem_3gpp_update_location (MMIfaceModem3gpp *self, - gulong location_area_code, - gulong tracking_area_code, - gulong cell_id) + gulong location_area_code, + gulong tracking_area_code, + gulong cell_id) { - MMModem3gppRegistrationState state; - RegistrationStateContext *ctx; + Private *priv; + MMModem3gppRegistrationState state; - ctx = get_registration_state_context (self); - g_assert (ctx); + priv = get_private (self); if (!MM_IS_IFACE_MODEM_LOCATION (self)) return; @@ -1357,8 +1429,8 @@ * location updates, but only if something valid to report. For the case * where we're registering (loading current registration info after a state * change to registered), we also allow LAC/CID updates. */ - if (REG_STATE_IS_REGISTERED (state) || ctx->reloading_registration_info) { - if ((location_area_code > 0 || tracking_area_code > 0) && cell_id > 0) + if (REG_STATE_IS_REGISTERED (state) || priv->reloading_registration_info) { + if (location_area_code || tracking_area_code || cell_id) mm_iface_modem_location_3gpp_update_lac_tac_ci (MM_IFACE_MODEM_LOCATION (self), location_area_code, tracking_area_code, @@ -1371,17 +1443,24 @@ static void update_registration_reload_current_registration_info_ready (MMIfaceModem3gpp *self, - GAsyncResult *res, - gpointer user_data) + GAsyncResult *res, + gpointer user_data) { - MMModem3gppRegistrationState new_state; - RegistrationStateContext *ctx; + Private *priv; + MMModem3gppRegistrationState new_state; + + priv = get_private (self); new_state = GPOINTER_TO_UINT (user_data); - mm_info ("Modem %s: 3GPP Registration state changed (registering -> %s)", - g_dbus_object_get_object_path (G_DBUS_OBJECT (self)), - mm_modem_3gpp_registration_state_get_string (new_state)); + mm_obj_info (self, "3GPP registration state changed (registering -> %s)", + mm_modem_3gpp_registration_state_get_string (new_state)); + mm_obj_dbg (self, "consolidated registration state: cs '%s', ps '%s', eps '%s', 5gs '%s' --> '%s'", + mm_modem_3gpp_registration_state_get_string (priv->state_cs), + mm_modem_3gpp_registration_state_get_string (priv->state_ps), + mm_modem_3gpp_registration_state_get_string (priv->state_eps), + mm_modem_3gpp_registration_state_get_string (priv->state_5gs), + mm_modem_3gpp_registration_state_get_string (new_state)); /* The property in the interface is bound to the property * in the skeleton, so just updating here is enough */ @@ -1394,14 +1473,13 @@ MM_MODEM_STATE_REGISTERED, MM_MODEM_STATE_CHANGE_REASON_UNKNOWN); - ctx = get_registration_state_context (self); - ctx->reloading_registration_info = FALSE; + priv->reloading_registration_info = FALSE; } static void -update_non_registered_state (MMIfaceModem3gpp *self, - MMModem3gppRegistrationState old_state, - MMModem3gppRegistrationState new_state) +update_non_registered_state (MMIfaceModem3gpp *self, + MMModem3gppRegistrationState old_state, + MMModem3gppRegistrationState new_state) { /* Not registered neither in home nor roaming network */ mm_iface_modem_3gpp_clear_current_operator (self); @@ -1422,20 +1500,19 @@ } static void -update_registration_state (MMIfaceModem3gpp *self, - MMModem3gppRegistrationState new_state, - gboolean deferrable) +update_registration_state (MMIfaceModem3gpp *self, + MMModem3gppRegistrationState new_state, + gboolean deferrable) { - MMModem3gppRegistrationState old_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; - RegistrationStateContext *ctx; + Private *priv; + MMModem3gppRegistrationState old_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; + + priv = get_private (self); g_object_get (self, MM_IFACE_MODEM_3GPP_REGISTRATION_STATE, &old_state, NULL); - ctx = get_registration_state_context (self); - g_assert (ctx); - /* Only set new state if different */ if (new_state == old_state) return; @@ -1444,7 +1521,7 @@ MMModemState modem_state; /* If already reloading registration info, skip it */ - if (ctx->reloading_registration_info) + if (priv->reloading_registration_info) return; /* If the modem isn't already enabled, this registration state update @@ -1458,18 +1535,16 @@ MM_IFACE_MODEM_STATE, &modem_state, NULL); if (modem_state < MM_MODEM_STATE_ENABLED) { - mm_dbg ("Modem %s: 3GPP Registration state change ignored as modem isn't enabled", - g_dbus_object_get_object_path (G_DBUS_OBJECT (self))); + mm_obj_dbg (self, "3GPP registration state change ignored as modem isn't enabled"); return; } - mm_info ("Modem %s: 3GPP Registration state changed (%s -> registering)", - g_dbus_object_get_object_path (G_DBUS_OBJECT (self)), - mm_modem_3gpp_registration_state_get_string (old_state)); + mm_obj_info (self, "3GPP registration state changed (%s -> registering)", + mm_modem_3gpp_registration_state_get_string (old_state)); /* Reload current registration info. ONLY update the state to REGISTERED * after having loaded operator code/name/subscription state */ - ctx->reloading_registration_info = TRUE; + priv->reloading_registration_info = TRUE; mm_iface_modem_3gpp_reload_current_registration_info ( self, (GAsyncReadyCallback)update_registration_reload_current_registration_info_ready, @@ -1477,20 +1552,25 @@ return; } - mm_info ("Modem %s: 3GPP Registration state changed (%s -> %s)", - g_dbus_object_get_object_path (G_DBUS_OBJECT (self)), - mm_modem_3gpp_registration_state_get_string (old_state), - mm_modem_3gpp_registration_state_get_string (new_state)); + mm_obj_info (self, "3GPP registration state changed (%s -> %s)", + mm_modem_3gpp_registration_state_get_string (old_state), + mm_modem_3gpp_registration_state_get_string (new_state)); + mm_obj_dbg (self, "consolidated registration state: cs '%s', ps '%s', eps '%s', 5gs '%s' --> '%s'", + mm_modem_3gpp_registration_state_get_string (priv->state_cs), + mm_modem_3gpp_registration_state_get_string (priv->state_ps), + mm_modem_3gpp_registration_state_get_string (priv->state_eps), + mm_modem_3gpp_registration_state_get_string (priv->state_5gs), + mm_modem_3gpp_registration_state_get_string (new_state)); update_non_registered_state (self, old_state, new_state); } void -mm_iface_modem_3gpp_update_cs_registration_state (MMIfaceModem3gpp *self, - MMModem3gppRegistrationState state) +mm_iface_modem_3gpp_update_cs_registration_state (MMIfaceModem3gpp *self, + MMModem3gppRegistrationState state) { - RegistrationStateContext *ctx; - gboolean supported = FALSE; + Private *priv; + gboolean supported = FALSE; g_object_get (self, MM_IFACE_MODEM_3GPP_CS_NETWORK_SUPPORTED, &supported, @@ -1499,17 +1579,17 @@ if (!supported) return; - ctx = get_registration_state_context (self); - ctx->cs = state; - update_registration_state (self, get_consolidated_reg_state (ctx), TRUE); + priv = get_private (self); + priv->state_cs = state; + update_registration_state (self, get_consolidated_reg_state (self), TRUE); } void -mm_iface_modem_3gpp_update_ps_registration_state (MMIfaceModem3gpp *self, - MMModem3gppRegistrationState state) +mm_iface_modem_3gpp_update_ps_registration_state (MMIfaceModem3gpp *self, + MMModem3gppRegistrationState state) { - RegistrationStateContext *ctx; - gboolean supported = FALSE; + Private *priv; + gboolean supported = FALSE; g_object_get (self, MM_IFACE_MODEM_3GPP_PS_NETWORK_SUPPORTED, &supported, @@ -1518,16 +1598,16 @@ if (!supported) return; - ctx = get_registration_state_context (self); - ctx->ps = state; - update_registration_state (self, get_consolidated_reg_state (ctx), TRUE); + priv = get_private (self); + priv->state_ps = state; + update_registration_state (self, get_consolidated_reg_state (self), TRUE); } void -mm_iface_modem_3gpp_update_eps_registration_state (MMIfaceModem3gpp *self, - MMModem3gppRegistrationState state) +mm_iface_modem_3gpp_update_eps_registration_state (MMIfaceModem3gpp *self, + MMModem3gppRegistrationState state) { - RegistrationStateContext *ctx; + Private *priv; gboolean supported = FALSE; g_object_get (self, @@ -1537,54 +1617,63 @@ if (!supported) return; - ctx = get_registration_state_context (self); - ctx->eps = state; - update_registration_state (self, get_consolidated_reg_state (ctx), TRUE); + priv = get_private (self); + priv->state_eps = state; + update_registration_state (self, get_consolidated_reg_state (self), TRUE); } -/*****************************************************************************/ +void +mm_iface_modem_3gpp_update_5gs_registration_state (MMIfaceModem3gpp *self, + MMModem3gppRegistrationState state) +{ + Private *priv; + gboolean supported = FALSE; -typedef struct { - guint timeout_source; - gboolean running; -} RegistrationCheckContext; + g_object_get (self, + MM_IFACE_MODEM_3GPP_5GS_NETWORK_SUPPORTED, &supported, + NULL); -static void -registration_check_context_free (RegistrationCheckContext *ctx) -{ - if (ctx->timeout_source) - g_source_remove (ctx->timeout_source); - g_free (ctx); + if (!supported) + return; + + priv = get_private (self); + priv->state_5gs = state; + update_registration_state (self, get_consolidated_reg_state (self), TRUE); } +/*****************************************************************************/ +/* Periodic registration checks */ + +#define REGISTRATION_CHECK_TIMEOUT_SEC 30 + static void periodic_registration_checks_ready (MMIfaceModem3gpp *self, - GAsyncResult *res) + GAsyncResult *res) { - RegistrationCheckContext *ctx; - GError *error = NULL; + Private *priv; + GError *error = NULL; + + priv = get_private (self); mm_iface_modem_3gpp_run_registration_checks_finish (self, res, &error); if (error) { - mm_dbg ("Couldn't refresh 3GPP registration status: '%s'", error->message); + mm_obj_dbg (self, "couldn't refresh 3GPP registration status: %s", error->message); g_error_free (error); } - /* Remove the running tag */ - ctx = g_object_get_qdata (G_OBJECT (self), registration_check_context_quark); - if (ctx) - ctx->running = FALSE; + priv->check_running = FALSE; } static gboolean periodic_registration_check (MMIfaceModem3gpp *self) { - RegistrationCheckContext *ctx; + Private *priv; + + priv = get_private (self); /* Only launch a new one if not one running already */ - ctx = g_object_get_qdata (G_OBJECT (self), registration_check_context_quark); - if (!ctx->running) { - ctx->running = TRUE; + if (!priv->check_running) { + priv->check_running = TRUE; mm_iface_modem_3gpp_run_registration_checks ( self, (GAsyncReadyCallback)periodic_registration_checks_ready, @@ -1596,43 +1685,36 @@ static void periodic_registration_check_disable (MMIfaceModem3gpp *self) { - if (G_UNLIKELY (!registration_check_context_quark)) - registration_check_context_quark = (g_quark_from_static_string ( - REGISTRATION_CHECK_CONTEXT_TAG)); - - /* Overwriting the data will free the previous context */ - g_object_set_qdata (G_OBJECT (self), - registration_check_context_quark, - NULL); + Private *priv; - mm_dbg ("Periodic 3GPP registration checks disabled"); + priv = get_private (self); + + /* Do nothing if already disabled */ + if (!priv->check_timeout_source) + return; + + g_source_remove (priv->check_timeout_source); + priv->check_timeout_source = 0; + + mm_obj_dbg (self, "periodic 3GPP registration checks disabled"); } static void periodic_registration_check_enable (MMIfaceModem3gpp *self) { - RegistrationCheckContext *ctx; - - if (G_UNLIKELY (!registration_check_context_quark)) - registration_check_context_quark = (g_quark_from_static_string ( - REGISTRATION_CHECK_CONTEXT_TAG)); + Private *priv; - ctx = g_object_get_qdata (G_OBJECT (self), registration_check_context_quark); + priv = get_private (self); - /* If context is already there, we're already enabled */ - if (ctx) + /* Do nothing if already enabled */ + if (priv->check_timeout_source) return; /* Create context and keep it as object data */ - mm_dbg ("Periodic 3GPP registration checks enabled"); - ctx = g_new0 (RegistrationCheckContext, 1); - ctx->timeout_source = g_timeout_add_seconds (REGISTRATION_CHECK_TIMEOUT_SEC, - (GSourceFunc)periodic_registration_check, - self); - g_object_set_qdata_full (G_OBJECT (self), - registration_check_context_quark, - ctx, - (GDestroyNotify)registration_check_context_free); + mm_obj_dbg (self, "periodic 3GPP registration checks enabled"); + priv->check_timeout_source = g_timeout_add_seconds (REGISTRATION_CHECK_TIMEOUT_SEC, + (GSourceFunc)periodic_registration_check, + self); } /*****************************************************************************/ @@ -1680,13 +1762,16 @@ /* skip update? */ if ((!old_bearer && !properties) || - (old_bearer && properties && mm_bearer_properties_cmp (properties, mm_base_bearer_peek_config (MM_BASE_BEARER (old_bearer))))) + (old_bearer && properties && + mm_bearer_properties_cmp (properties, + mm_base_bearer_peek_config (MM_BASE_BEARER (old_bearer)), + MM_BEARER_PROPERTIES_CMP_FLAGS_EPS))) goto out; if (properties) { MMBaseBearer *new_bearer; - mm_dbg ("updating initial EPS bearer..."); + mm_obj_dbg (self, "updating initial EPS bearer..."); g_assert (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->create_initial_eps_bearer); new_bearer = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->create_initial_eps_bearer (self, properties); g_object_set (self, @@ -1695,7 +1780,7 @@ mm_gdbus_modem3gpp_set_initial_eps_bearer (skeleton, mm_base_bearer_get_path (new_bearer)); g_object_unref (new_bearer); } else { - mm_dbg ("clearing initial EPS bearer..."); + mm_obj_dbg (self, "clearing initial EPS bearer..."); g_object_set (self, MM_IFACE_MODEM_3GPP_INITIAL_EPS_BEARER, NULL, NULL); @@ -1707,6 +1792,41 @@ g_object_unref (skeleton); } +static void +reload_initial_eps_bearer_ready (MMIfaceModem3gpp *self, + GAsyncResult *res) +{ + g_autoptr(MMBearerProperties) properties = NULL; + g_autoptr(GError) error = NULL; + + properties = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_finish (self, res, &error); + if (!properties) { + mm_obj_dbg (self, "couldn't load initial default bearer properties: %s", error->message); + return; + } + + mm_iface_modem_3gpp_update_initial_eps_bearer (self, properties); +} + +void +mm_iface_modem_3gpp_reload_initial_eps_bearer (MMIfaceModem3gpp *self) +{ + gboolean eps_supported = FALSE; + + g_object_get (self, + MM_IFACE_MODEM_3GPP_EPS_NETWORK_SUPPORTED, &eps_supported, + NULL); + + if (eps_supported && + MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer && + MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_finish) { + MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer ( + self, + (GAsyncReadyCallback)reload_initial_eps_bearer_ready, + NULL); + } +} + /*****************************************************************************/ typedef struct _DisablingContext DisablingContext; @@ -1757,7 +1877,7 @@ \ MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->NAME##_finish (self, res, &error); \ if (error) { \ - mm_dbg ("Couldn't %s: '%s'", DISPLAY, error->message); \ + mm_obj_dbg (self, "couldn't %s: %s", DISPLAY, error->message); \ g_error_free (error); \ } \ \ @@ -1787,19 +1907,19 @@ switch (ctx->step) { case DISABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_INITIAL_EPS_BEARER: mm_iface_modem_3gpp_update_initial_eps_bearer (self, NULL); - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_PERIODIC_REGISTRATION_CHECKS: /* Disable periodic registration checks, if they were set */ periodic_registration_check_disable (self); - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_DISABLE_UNSOLICITED_REGISTRATION_EVENTS: { gboolean cs_supported = FALSE; @@ -1823,9 +1943,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; - } + } /* fall through */ case DISABLING_STEP_CLEANUP_UNSOLICITED_REGISTRATION_EVENTS: if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->cleanup_unsolicited_registration_events && @@ -1836,8 +1955,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_CLEANUP_UNSOLICITED_EVENTS: if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->cleanup_unsolicited_events && @@ -1848,8 +1967,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_DISABLE_UNSOLICITED_EVENTS: if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->disable_unsolicited_events && @@ -1860,21 +1979,24 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_REGISTRATION_STATE: update_registration_state (self, MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, FALSE); mm_iface_modem_3gpp_update_access_technologies (self, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN); mm_iface_modem_3gpp_update_location (self, 0, 0, 0); - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_LAST: /* We are done without errors! */ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + g_assert_not_reached (); } g_assert_not_reached (); @@ -1958,7 +2080,7 @@ MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->setup_unsolicited_events_finish (self, res, &error); if (error) { /* This error shouldn't be treated as critical */ - mm_dbg ("Setting up unsolicited events failed: '%s'", error->message); + mm_obj_dbg (self, "setting up unsolicited events failed: %s", error->message); g_error_free (error); /* If we get an error setting up unsolicited events, don't even bother trying to @@ -1984,7 +2106,7 @@ MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->enable_unsolicited_events_finish (self, res, &error); if (error) { /* This error shouldn't be treated as critical */ - mm_dbg ("Enabling unsolicited events failed: '%s'", error->message); + mm_obj_dbg (self, "enabling unsolicited events failed: %s", error->message); g_error_free (error); } @@ -2007,7 +2129,7 @@ MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->setup_unsolicited_registration_events_finish (self, res, &error); if (error) { /* This error shouldn't be treated as critical */ - mm_dbg ("Setting up unsolicited registration events failed: '%s'", error->message); + mm_obj_dbg (self, "setting up unsolicited registration events failed: %s", error->message); g_error_free (error); /* If we get an error setting up unsolicited events, don't even bother trying to @@ -2035,7 +2157,7 @@ MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->enable_unsolicited_registration_events_finish (self, res, &error); if (error) { /* This error shouldn't be treated as critical */ - mm_dbg ("Enabling unsolicited registration events failed: '%s'", error->message); + mm_obj_dbg (self, "enabling unsolicited registration events failed: %s", error->message); g_error_free (error); /* If error, setup periodic registration checks */ periodic_registration_check_enable (self); @@ -2060,7 +2182,7 @@ properties = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_finish (self, res, &error); if (!properties) { - mm_dbg ("couldn't load initial default bearer properties: '%s'", error->message); + mm_obj_dbg (self, "couldn't load initial default bearer properties: %s", error->message); g_error_free (error); goto out; } @@ -2091,8 +2213,8 @@ switch (ctx->step) { case ENABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_SETUP_UNSOLICITED_EVENTS: if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->setup_unsolicited_events && @@ -2103,8 +2225,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_ENABLE_UNSOLICITED_EVENTS: if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->enable_unsolicited_events && @@ -2115,8 +2237,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_SETUP_UNSOLICITED_REGISTRATION_EVENTS: if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->setup_unsolicited_registration_events && @@ -2127,8 +2249,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_ENABLE_UNSOLICITED_REGISTRATION_EVENTS: { gboolean cs_supported = FALSE; @@ -2152,9 +2274,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; - } + } /* fall through */ case ENABLING_STEP_INITIAL_EPS_BEARER: { gboolean eps_supported = FALSE; @@ -2172,15 +2293,17 @@ task); return; } - /* Fall down to next step */ ctx->step++; - } + } /* fall through */ case ENABLING_STEP_LAST: /* We are done without errors! */ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -2271,7 +2394,7 @@ config = MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings_finish (self, res, &error); if (!config) { - mm_warn ("couldn't load initial EPS bearer settings: '%s'", error->message); + mm_obj_warn (self, "couldn't load initial EPS bearer settings: %s", error->message); g_error_free (error); } else { GVariant *dictionary; @@ -2303,7 +2426,7 @@ mm_gdbus_modem3gpp_set_eps_ue_mode_operation (ctx->skeleton, uemode); if (error) { - mm_warn ("couldn't load UE mode of operation for EPS: '%s'", error->message); + mm_obj_warn (self, "couldn't load UE mode of operation for EPS: %s", error->message); g_error_free (error); } @@ -2327,7 +2450,7 @@ mm_gdbus_modem3gpp_set_enabled_facility_locks (ctx->skeleton, facilities); if (error) { - mm_warn ("couldn't load facility locks: '%s'", error->message); + mm_obj_warn (self, "couldn't load facility locks: %s", error->message); g_error_free (error); } else { MMBaseSim *sim = NULL; @@ -2367,7 +2490,7 @@ g_free (imei); if (error) { - mm_warn ("couldn't load IMEI: '%s'", error->message); + mm_obj_warn (self, "couldn't load IMEI: %s", error->message); g_error_free (error); } @@ -2393,8 +2516,8 @@ switch (ctx->step) { case INITIALIZATION_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_IMEI: /* IMEI value is meant to be loaded only once during the whole @@ -2409,8 +2532,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_ENABLED_FACILITY_LOCKS: if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_enabled_facility_locks && @@ -2421,8 +2544,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_EPS_UE_MODE_OPERATION: if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_eps_ue_mode_operation && @@ -2433,8 +2556,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_EPS_INITIAL_BEARER_SETTINGS: if (MM_IFACE_MODEM_3GPP_GET_INTERFACE (self)->load_initial_eps_bearer_settings && @@ -2445,9 +2568,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; - + /* fall through */ case INITIALIZATION_STEP_LAST: /* We are done without errors! */ @@ -2477,6 +2599,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -2524,15 +2649,6 @@ g_object_set (self, MM_IFACE_MODEM_3GPP_DBUS_SKELETON, skeleton, NULL); - - /* If the modem is *only* LTE, we assume that CS network is not - * supported */ - if (mm_iface_modem_is_3gpp_lte_only (MM_IFACE_MODEM (self))) { - mm_dbg ("Modem is LTE-only, assuming CS network is not supported"); - g_object_set (self, - MM_IFACE_MODEM_3GPP_CS_NETWORK_SUPPORTED, FALSE, - NULL); - } } ctx = g_new0 (InitializationContext, 1); @@ -2549,14 +2665,6 @@ void mm_iface_modem_3gpp_shutdown (MMIfaceModem3gpp *self) { - /* Remove RegistrationCheckContext object to make sure any pending - * invocation of periodic_registration_check is cancelled before the - * DBus skeleton is removed. */ - if (G_LIKELY (registration_check_context_quark)) - g_object_set_qdata (G_OBJECT (self), - registration_check_context_quark, - NULL); - /* Unexport DBus interface and remove the skeleton */ mm_gdbus_object_skeleton_set_modem3gpp (MM_GDBUS_OBJECT_SKELETON (self), NULL); g_object_set (self, @@ -2616,6 +2724,14 @@ FALSE, G_PARAM_READWRITE)); + g_object_interface_install_property + (g_iface, + g_param_spec_boolean (MM_IFACE_MODEM_3GPP_5GS_NETWORK_SUPPORTED, + "5GS network supported", + "Whether the modem works in the 5GS network", + FALSE, + G_PARAM_READWRITE)); + g_object_interface_install_property (g_iface, g_param_spec_flags (MM_IFACE_MODEM_3GPP_IGNORED_FACILITY_LOCKS, diff -Nru modemmanager-1.12.8/src/mm-iface-modem-3gpp.h modemmanager-1.16.6/src/mm-iface-modem-3gpp.h --- modemmanager-1.12.8/src/mm-iface-modem-3gpp.h 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-3gpp.h 2021-06-06 21:40:59.000000000 +0800 @@ -34,6 +34,7 @@ #define MM_IFACE_MODEM_3GPP_CS_NETWORK_SUPPORTED "iface-modem-3gpp-cs-network-supported" #define MM_IFACE_MODEM_3GPP_PS_NETWORK_SUPPORTED "iface-modem-3gpp-ps-network-supported" #define MM_IFACE_MODEM_3GPP_EPS_NETWORK_SUPPORTED "iface-modem-3gpp-eps-network-supported" +#define MM_IFACE_MODEM_3GPP_5GS_NETWORK_SUPPORTED "iface-modem-3gpp-5gs-network-supported" #define MM_IFACE_MODEM_3GPP_IGNORED_FACILITY_LOCKS "iface-modem-3gpp-ignored-facility-locks" #define MM_IFACE_MODEM_3GPP_INITIAL_EPS_BEARER "iface-modem-3gpp-initial-eps-bearer" @@ -47,7 +48,8 @@ MM_MODEM_ACCESS_TECHNOLOGY_HSUPA | \ MM_MODEM_ACCESS_TECHNOLOGY_HSPA | \ MM_MODEM_ACCESS_TECHNOLOGY_HSPA_PLUS | \ - MM_MODEM_ACCESS_TECHNOLOGY_LTE) + MM_MODEM_ACCESS_TECHNOLOGY_LTE | \ + MM_MODEM_ACCESS_TECHNOLOGY_5GNR) typedef struct _MMIfaceModem3gpp MMIfaceModem3gpp; @@ -167,13 +169,14 @@ MMBaseBearer * (*create_initial_eps_bearer) (MMIfaceModem3gpp *self, MMBearerProperties *properties); - /* Run CS/PS/EPS registration state checks.. + /* Run CS/PS/EPS/5GS registration state checks.. * Note that no registration state is returned, implementations should call * mm_iface_modem_3gpp_update_registration_state(). */ void (* run_registration_checks) (MMIfaceModem3gpp *self, - gboolean cs_supported, - gboolean ps_supported, - gboolean eps_supported, + gboolean is_cs_supported, + gboolean is_ps_supported, + gboolean is_eps_supported, + gboolean is_5gs_supported, GAsyncReadyCallback callback, gpointer user_data); gboolean (*run_registration_checks_finish) (MMIfaceModem3gpp *self, @@ -234,6 +237,7 @@ }; GType mm_iface_modem_3gpp_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMIfaceModem3gpp, g_object_unref) /* Initialize Modem 3GPP interface (async) */ void mm_iface_modem_3gpp_initialize (MMIfaceModem3gpp *self, @@ -274,6 +278,8 @@ MMModem3gppRegistrationState state); void mm_iface_modem_3gpp_update_eps_registration_state (MMIfaceModem3gpp *self, MMModem3gppRegistrationState state); +void mm_iface_modem_3gpp_update_5gs_registration_state (MMIfaceModem3gpp *self, + MMModem3gppRegistrationState state); void mm_iface_modem_3gpp_update_subscription_state (MMIfaceModem3gpp *self, MMModem3gppSubscriptionState state); void mm_iface_modem_3gpp_update_access_technologies (MMIfaceModem3gpp *self, @@ -286,6 +292,7 @@ const GList *pco_list); void mm_iface_modem_3gpp_update_initial_eps_bearer (MMIfaceModem3gpp *self, MMBearerProperties *properties); +void mm_iface_modem_3gpp_reload_initial_eps_bearer (MMIfaceModem3gpp *self); /* Run all registration checks */ void mm_iface_modem_3gpp_run_registration_checks (MMIfaceModem3gpp *self, @@ -305,14 +312,23 @@ void mm_iface_modem_3gpp_clear_current_operator (MMIfaceModem3gpp *self); /* Allow registering in the network */ -gboolean mm_iface_modem_3gpp_register_in_network_finish (MMIfaceModem3gpp *self, - GAsyncResult *res, - GError **error); -void mm_iface_modem_3gpp_register_in_network (MMIfaceModem3gpp *self, - const gchar *operator_id, - guint max_registration_time, - GAsyncReadyCallback callback, - gpointer user_data); +void mm_iface_modem_3gpp_register_in_network (MMIfaceModem3gpp *self, + const gchar *operator_id, + gboolean force_registration, + guint max_registration_time, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean mm_iface_modem_3gpp_register_in_network_finish (MMIfaceModem3gpp *self, + GAsyncResult *res, + GError **error); + +/* Allow re-registering in the network with last settings */ +void mm_iface_modem_3gpp_reregister_in_network (MMIfaceModem3gpp *self, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean mm_iface_modem_3gpp_reregister_in_network_finish (MMIfaceModem3gpp *self, + GAsyncResult *res, + GError **error); /* Bind properties for simple GetStatus() */ void mm_iface_modem_3gpp_bind_simple_status (MMIfaceModem3gpp *self, diff -Nru modemmanager-1.12.8/src/mm-iface-modem-cdma.c modemmanager-1.16.6/src/mm-iface-modem-cdma.c --- modemmanager-1.12.8/src/mm-iface-modem-cdma.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-cdma.c 2021-06-06 21:40:59.000000000 +0800 @@ -23,16 +23,43 @@ #include "mm-iface-modem-cdma.h" #include "mm-base-modem.h" #include "mm-modem-helpers.h" -#include "mm-log.h" - -#define REGISTRATION_CHECK_TIMEOUT_SEC 30 +#include "mm-log-object.h" #define SUBSYSTEM_CDMA1X "cdma1x" #define SUBSYSTEM_EVDO "evdo" -#define REGISTRATION_CHECK_CONTEXT_TAG "cdma-registration-check-context-tag" +/*****************************************************************************/ +/* Private data context */ -static GQuark registration_check_context_quark; +#define PRIVATE_TAG "iface-modem-cdma-private-tag" +static GQuark private_quark; + +typedef struct { + gboolean activation_ongoing; +} Private; + +static void +private_free (Private *priv) +{ + g_slice_free (Private, priv); +} + +static Private * +get_private (MMIfaceModemCdma *self) +{ + Private *priv; + + if (G_UNLIKELY (!private_quark)) + private_quark = g_quark_from_static_string (PRIVATE_TAG); + + priv = g_object_get_qdata (G_OBJECT (self), private_quark); + if (!priv) { + priv = g_slice_new0 (Private); + g_object_set_qdata_full (G_OBJECT (self), private_quark, priv, (GDestroyNotify)private_free); + } + + return priv; +} /*****************************************************************************/ @@ -91,7 +118,11 @@ GAsyncResult *res, HandleActivateContext *ctx) { - GError *error = NULL; + Private *priv; + GError *error = NULL; + + priv = get_private (self); + priv->activation_ongoing = FALSE; if (!MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->activate_finish (self, res,&error)) g_dbus_method_invocation_take_error (ctx->invocation, error); @@ -106,8 +137,11 @@ GAsyncResult *res, HandleActivateContext *ctx) { - MMModemState modem_state; - GError *error = NULL; + Private *priv; + MMModemState modem_state; + GError *error = NULL; + + priv = get_private (MM_IFACE_MODEM_CDMA (self)); if (!mm_base_modem_authorize_finish (self, res, &error)) { g_dbus_method_invocation_take_error (ctx->invocation, error); @@ -115,9 +149,19 @@ return; } + /* Fail if we have already an activation ongoing */ + if (priv->activation_ongoing) { + g_dbus_method_invocation_return_error (ctx->invocation, + MM_CORE_ERROR, + MM_CORE_ERROR_IN_PROGRESS, + "An activation operation is already in progress"); + handle_activate_context_free (ctx); + return; + } + /* If we're already activated, nothing to do */ if (mm_gdbus_modem_cdma_get_activation_state (ctx->skeleton) == MM_MODEM_CDMA_ACTIVATION_STATE_ACTIVATED) { - mm_dbg ("Modem is already activated"); + mm_obj_dbg (self, "already activated"); mm_gdbus_modem_cdma_complete_activate (ctx->skeleton, ctx->invocation); handle_activate_context_free (ctx); return; @@ -135,6 +179,17 @@ return; } + /* Error if carrier code is empty */ + if (!ctx->carrier || !ctx->carrier[0]) { + g_dbus_method_invocation_return_error (ctx->invocation, + MM_CORE_ERROR, + MM_CORE_ERROR_INVALID_ARGS, + "Cannot perform OTA activation: " + "invalid empty carrier code"); + handle_activate_context_free (ctx); + return; + } + modem_state = MM_MODEM_STATE_UNKNOWN; g_object_get (self, MM_IFACE_MODEM_STATE, &modem_state, @@ -160,6 +215,7 @@ case MM_MODEM_STATE_ENABLED: case MM_MODEM_STATE_SEARCHING: case MM_MODEM_STATE_REGISTERED: + priv->activation_ongoing = TRUE; MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->activate ( MM_IFACE_MODEM_CDMA (self), ctx->carrier, @@ -193,6 +249,9 @@ "Cannot perform OTA activation: " "modem is connected"); break; + + default: + g_assert_not_reached (); } handle_activate_context_free (ctx); @@ -245,7 +304,11 @@ GAsyncResult *res, HandleActivateManualContext *ctx) { - GError *error = NULL; + Private *priv; + GError *error = NULL; + + priv = get_private (self); + priv->activation_ongoing = FALSE; if (!MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->activate_manual_finish (self, res,&error)) g_dbus_method_invocation_take_error (ctx->invocation, error); @@ -261,8 +324,11 @@ HandleActivateManualContext *ctx) { MMCdmaManualActivationProperties *properties; - MMModemState modem_state; - GError *error = NULL; + Private *priv; + MMModemState modem_state; + GError *error = NULL; + + priv = get_private (MM_IFACE_MODEM_CDMA (self)); if (!mm_base_modem_authorize_finish (self, res, &error)) { g_dbus_method_invocation_take_error (ctx->invocation, error); @@ -270,9 +336,19 @@ return; } + /* Fail if we have already an activation ongoing */ + if (priv->activation_ongoing) { + g_dbus_method_invocation_return_error (ctx->invocation, + MM_CORE_ERROR, + MM_CORE_ERROR_IN_PROGRESS, + "An activation operation is already in progress"); + handle_activate_manual_context_free (ctx); + return; + } + /* If we're already activated, nothing to do */ if (mm_gdbus_modem_cdma_get_activation_state (ctx->skeleton) == MM_MODEM_CDMA_ACTIVATION_STATE_ACTIVATED) { - mm_dbg ("Modem is already activated"); + mm_obj_dbg (self, "already activated"); mm_gdbus_modem_cdma_complete_activate_manual (ctx->skeleton, ctx->invocation); handle_activate_manual_context_free (ctx); return; @@ -322,6 +398,7 @@ case MM_MODEM_STATE_ENABLED: case MM_MODEM_STATE_SEARCHING: case MM_MODEM_STATE_REGISTERED: + priv->activation_ongoing = TRUE; MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->activate_manual ( MM_IFACE_MODEM_CDMA (self), properties, @@ -356,6 +433,9 @@ "Cannot perform manual activation: " "modem is connected"); break; + + default: + g_assert_not_reached (); } g_object_unref (properties); @@ -432,6 +512,11 @@ /*****************************************************************************/ +#define REGISTRATION_CHECK_TIMEOUT_SEC 30 +#define REGISTRATION_CHECK_CONTEXT_TAG "cdma-registration-check-context-tag" + +static GQuark registration_check_context_quark; + typedef struct _RunRegistrationChecksContext RunRegistrationChecksContext; static void registration_check_step (GTask *task); @@ -532,7 +617,7 @@ &ctx->call_manager_system_mode, &ctx->call_manager_operating_mode, &error)) { - mm_dbg ("Could not get call manager state: %s", error->message); + mm_obj_dbg (self, "could not get call manager state: %s", error->message); g_error_free (error); /* Fallback to AT-based check */ ctx->step = REGISTRATION_CHECK_STEP_AT_CDMA_SERVICE_STATUS; @@ -569,7 +654,7 @@ &ctx->hdr_session_state, &ctx->hdr_almp_state, &error)) { - mm_dbg ("Could not get HDR state: %s", error->message); + mm_obj_dbg (self, "could not get HDR state: %s", error->message); g_error_free (error); /* Fallback to AT-based check */ ctx->step = REGISTRATION_CHECK_STEP_AT_CDMA_SERVICE_STATUS; @@ -585,14 +670,16 @@ static void parse_qcdm_results (GTask *task) { + MMIfaceModemCdma *self; RunRegistrationChecksContext *ctx; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); - mm_dbg ("QCDM CM System Mode: %d", ctx->call_manager_system_mode); - mm_dbg ("QCDM HDR Hybrid Mode: %d", ctx->hdr_hybrid_mode); - mm_dbg ("QCDM HDR Session State: %d", ctx->hdr_session_state); - mm_dbg ("QCDM HDR ALMP State: %d", ctx->hdr_almp_state); + mm_obj_dbg (self, "QCDM CM System Mode: %d", ctx->call_manager_system_mode); + mm_obj_dbg (self, "QCDM HDR Hybrid Mode: %d", ctx->hdr_hybrid_mode); + mm_obj_dbg (self, "QCDM HDR Session State: %d", ctx->hdr_session_state); + mm_obj_dbg (self, "QCDM HDR ALMP State: %d", ctx->hdr_almp_state); /* Set QCDM-obtained registration info */ switch (ctx->call_manager_system_mode) { @@ -640,7 +727,7 @@ res, &has_service, &error)) { - mm_warn ("Could not get service status: %s", error->message); + mm_obj_warn (self, "could not get service status: %s", error->message); g_task_return_error (task, error); g_object_unref (task); return; @@ -648,7 +735,7 @@ if (!has_service) { /* There is no CDMA service at all, end registration checks */ - mm_dbg ("No CDMA service found"); + mm_obj_dbg (self, "no CDMA service found"); ctx->step = REGISTRATION_CHECK_STEP_LAST; } else /* If we do have service, go on to next step */ @@ -681,7 +768,7 @@ if (!g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_NO_NETWORK)) { - mm_warn ("Could not get serving system: %s", error->message); + mm_obj_warn (self, "could not get serving system: %s", error->message); g_task_return_error (task, error); g_object_unref (task); return; @@ -701,15 +788,17 @@ static void parse_at_results (GTask *task) { + MMIfaceModemCdma *self; RunRegistrationChecksContext *ctx; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); /* 99999 means unknown/no service */ if (ctx->cdma1x_sid == MM_MODEM_CDMA_SID_UNKNOWN && ctx->cdma1x_nid == MM_MODEM_CDMA_NID_UNKNOWN) { /* Not registered in CDMA network, end registration checks */ - mm_dbg ("Not registered in any CDMA network"); + mm_obj_dbg (self, "no registered in any CDMA network"); ctx->step = REGISTRATION_CHECK_STEP_LAST; } else { /* We're registered on the CDMA 1x network (at least) */ @@ -741,7 +830,7 @@ &error)) { /* This error is NOT fatal. If we get an error here, we'll just fallback * to the non-detailed values we already got. */ - mm_dbg ("Could not get more detailed registration state: %s", error->message); + mm_obj_dbg (self, "could not get more detailed registration state: %s", error->message); } else { ctx->cdma1x_state = detailed_cdma1x_state; ctx->evdo_state = detailed_evdo_state; @@ -763,8 +852,8 @@ switch (ctx->step) { case REGISTRATION_CHECK_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case REGISTRATION_CHECK_STEP_SETUP_REGISTRATION_CHECKS: /* Allow implementations to run an initial setup check. This setup allows @@ -779,11 +868,11 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case REGISTRATION_CHECK_STEP_QCDM_CALL_MANAGER_STATE: - mm_dbg ("Starting QCDM-based registration checks"); + mm_obj_dbg (self, "starting QCDM-based registration checks..."); if (!ctx->skip_qcdm_call_manager_step && MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->get_call_manager_state && MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->get_call_manager_state_finish) { @@ -795,7 +884,7 @@ return; } /* Fallback to AT-based check */ - mm_dbg (" Skipping all QCDM-based checks and falling back to AT-based checks"); + mm_obj_dbg (self, " skipping all QCDM-based checks and falling back to AT-based checks"); ctx->step = REGISTRATION_CHECK_STEP_AT_CDMA_SERVICE_STATUS; registration_check_step (task); return; @@ -812,9 +901,9 @@ task); return; } - mm_dbg (" Skipping HDR check"); - /* Fall down to next step */ + mm_obj_dbg (self, " skipping HDR check"); ctx->step++; + /* fall through */ case REGISTRATION_CHECK_STEP_QCDM_CDMA1X_SERVING_SYSTEM: /* We only care about SID/NID here; nothing to do with registration @@ -828,9 +917,9 @@ task); return; } - mm_dbg (" Skipping CDMA1x Serving System check"); - /* Fall down to next step */ + mm_obj_dbg (self, " skipping CDMA1x serving system check"); ctx->step++; + /* fall through */ case REGISTRATION_CHECK_STEP_QCDM_LAST: /* When we get all QCDM results, parse them */ @@ -838,8 +927,7 @@ return; case REGISTRATION_CHECK_STEP_AT_CDMA_SERVICE_STATUS: - mm_dbg ("Starting AT-based registration checks"); - + mm_obj_dbg (self, "starting AT-based registration checks"); /* If we don't have means to get service status, just assume we do have * CDMA service and keep on */ if (!ctx->skip_at_cdma_service_status_step && @@ -851,9 +939,9 @@ task); return; } - mm_dbg (" Skipping CDMA service status check, assuming with service"); - /* Fall down to next step */ + mm_obj_dbg (self, " skipping CDMA service status check, assuming with service"); ctx->step++; + /* fall through */ case REGISTRATION_CHECK_STEP_AT_CDMA1X_SERVING_SYSTEM: /* Now that we have some sort of service, check if the the device is @@ -875,9 +963,9 @@ task); return; } - mm_dbg (" Skipping CDMA1x Serving System check"); - /* Fall down to next step */ + mm_obj_dbg (self, " skipping CDMA1x Serving System check"); ctx->step++; + /* fall through */ case REGISTRATION_CHECK_STEP_AT_LAST: /* When we get all AT results, parse them */ @@ -885,7 +973,7 @@ return; case REGISTRATION_CHECK_STEP_DETAILED_REGISTRATION_STATE: - mm_dbg ("Starting detailed registration state check"); + mm_obj_dbg (self, "starting detailed registration state check"); /* We let classes implementing this interface to look for more detailed * registration info. */ if (!ctx->skip_detailed_registration_state && @@ -903,13 +991,13 @@ task); return; } - mm_dbg (" Skipping detailed registration state check"); - /* Fall down to next step */ + mm_obj_dbg (self, " skipping detailed registration state check"); ctx->step++; + /* fall through */ case REGISTRATION_CHECK_STEP_LAST: /* We are done without errors! */ - mm_dbg ("All CDMA registration state checks done"); + mm_obj_dbg (self, "all CDMA registration state checks done"); mm_iface_modem_cdma_update_cdma1x_registration_state (self, ctx->cdma1x_state, ctx->cdma1x_sid, @@ -920,6 +1008,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -955,9 +1046,9 @@ MM_IFACE_MODEM_CDMA_CDMA1X_NETWORK_SUPPORTED, &cdma1x_supported, NULL); - mm_dbg ("Running registration checks (CDMA1x: '%s', EV-DO: '%s')", - cdma1x_supported ? "yes" : "no", - evdo_supported ? "yes" : "no"); + mm_obj_dbg (self, "running registration checks (CDMA1x: '%s', EV-DO: '%s')", + cdma1x_supported ? "yes" : "no", + evdo_supported ? "yes" : "no"); if (MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->run_registration_checks && MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->run_registration_checks_finish) { @@ -1069,6 +1160,9 @@ MM_MODEM_STATE_ENABLED, MM_MODEM_STATE_CHANGE_REASON_UNKNOWN); break; + default: + g_assert_not_reached (); + break; } } @@ -1120,6 +1214,9 @@ MM_MODEM_STATE_ENABLED, MM_MODEM_STATE_CHANGE_REASON_UNKNOWN); break; + default: + g_assert_not_reached (); + break; } } @@ -1150,7 +1247,7 @@ mm_iface_modem_cdma_run_registration_checks_finish (self, res, &error); if (error) { - mm_dbg ("Couldn't refresh CDMA registration status: '%s'", error->message); + mm_obj_dbg (self, "couldn't refresh CDMA registration status: %s", error->message); g_error_free (error); } @@ -1189,7 +1286,7 @@ registration_check_context_quark, NULL); - mm_dbg ("Periodic CDMA registration checks disabled"); + mm_obj_dbg (self, "periodic CDMA registration checks disabled"); } static void @@ -1208,7 +1305,7 @@ return; /* Create context and keep it as object data */ - mm_dbg ("Periodic CDMA registration checks enabled"); + mm_obj_dbg (self, "periodic CDMA registration checks enabled"); ctx = g_new0 (RegistrationCheckContext, 1); ctx->timeout_source = g_timeout_add_seconds (REGISTRATION_CHECK_TIMEOUT_SEC, (GSourceFunc)periodic_registration_check, @@ -1245,11 +1342,11 @@ return; if (activation_error) { - mm_dbg ("Activation failed: %s", activation_error->message); + mm_obj_dbg (self, "activation failed: %s", activation_error->message); if (activation_error->domain == MM_CDMA_ACTIVATION_ERROR) error = activation_error->code; else { - mm_warn ("Error given is not an activation error"); + mm_obj_warn (self, "error given is not an activation error"); error = MM_CDMA_ACTIVATION_ERROR_UNKNOWN; } } @@ -1312,7 +1409,7 @@ MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->disable_unsolicited_events_finish (self, res, &error); if (error) { - mm_dbg ("Couldn't disable unsolicited events: '%s'", error->message); + mm_obj_dbg (self, "couldn't disable unsolicited events: %s", error->message); g_error_free (error); } @@ -1332,7 +1429,7 @@ MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->cleanup_unsolicited_events_finish (self, res, &error); if (error) { - mm_dbg ("Couldn't cleanup unsolicited events: '%s'", error->message); + mm_obj_dbg (self, "couldn't cleanup unsolicited events: %s", error->message); g_error_free (error); } @@ -1353,13 +1450,13 @@ switch (ctx->step) { case DISABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_PERIODIC_REGISTRATION_CHECKS: periodic_registration_check_disable (self); - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_DISABLE_UNSOLICITED_EVENTS: if (MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->disable_unsolicited_events && @@ -1370,8 +1467,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_CLEANUP_UNSOLICITED_EVENTS: if (MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->cleanup_unsolicited_events && @@ -1382,14 +1479,17 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_LAST: /* We are done without errors! */ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -1470,7 +1570,7 @@ MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->setup_unsolicited_events_finish (self, res, &error); if (error) { /* This error shouldn't be treated as critical */ - mm_dbg ("Setting up unsolicited events failed: '%s'", error->message); + mm_obj_dbg (self, "setting up unsolicited events failed: %s", error->message); g_error_free (error); } @@ -1491,7 +1591,7 @@ MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->enable_unsolicited_events_finish (self, res, &error); if (error) { /* This error shouldn't be treated as critical */ - mm_dbg ("Enabling unsolicited events failed: '%s'", error->message); + mm_obj_dbg (self, "enabling unsolicited events failed: %s", error->message); g_error_free (error); } @@ -1518,8 +1618,8 @@ switch (ctx->step) { case ENABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_SETUP_UNSOLICITED_EVENTS: if (MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->setup_unsolicited_events && @@ -1530,8 +1630,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_ENABLE_UNSOLICITED_EVENTS: if (MM_IFACE_MODEM_CDMA_GET_INTERFACE (self)->enable_unsolicited_events && @@ -1542,19 +1642,22 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_PERIODIC_REGISTRATION_CHECKS: periodic_registration_check_enable (self); - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_LAST: /* We are done without errors! */ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -1633,7 +1736,7 @@ g_free (val); \ \ if (error) { \ - mm_warn ("couldn't load %s: '%s'", DISPLAY, error->message); \ + mm_obj_warn (self, "couldn't load %s: %s", DISPLAY, error->message); \ g_error_free (error); \ } \ \ @@ -1660,7 +1763,7 @@ mm_gdbus_modem_cdma_set_activation_state (ctx->skeleton, state); if (error) { - mm_warn ("couldn't load activation state: '%s'", error->message); + mm_obj_warn (self, "couldn't load activation state: %s", error->message); g_error_free (error); } @@ -1686,8 +1789,8 @@ switch (ctx->step) { case INITIALIZATION_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_MEID: /* MEID value is meant to be loaded only once during the whole @@ -1702,8 +1805,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_ESN: /* ESN value is meant to be loaded only once during the whole @@ -1718,8 +1821,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_ACTIVATION_STATE: /* Initial activation state is meant to be loaded only once during the @@ -1734,8 +1837,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_LAST: /* We are done without errors! */ @@ -1757,6 +1860,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); diff -Nru modemmanager-1.12.8/src/mm-iface-modem-cdma.h modemmanager-1.16.6/src/mm-iface-modem-cdma.h --- modemmanager-1.12.8/src/mm-iface-modem-cdma.h 2017-09-14 22:00:54.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-cdma.h 2021-06-06 21:40:59.000000000 +0800 @@ -229,6 +229,7 @@ }; GType mm_iface_modem_cdma_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMIfaceModemCdma, g_object_unref) /* Initialize CDMA interface (async) */ void mm_iface_modem_cdma_initialize (MMIfaceModemCdma *self, diff -Nru modemmanager-1.12.8/src/mm-iface-modem-firmware.c modemmanager-1.16.6/src/mm-iface-modem-firmware.c --- modemmanager-1.12.8/src/mm-iface-modem-firmware.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-firmware.c 2021-06-06 21:40:59.000000000 +0800 @@ -19,7 +19,14 @@ #include "mm-iface-modem.h" #include "mm-iface-modem-firmware.h" -#include "mm-log.h" +#include "mm-log-object.h" + +#if defined WITH_QMI +# include "mm-broadband-modem-qmi.h" +#endif +#if defined WITH_MBIM +# include "mm-broadband-modem-mbim.h" +#endif /*****************************************************************************/ @@ -70,16 +77,19 @@ handle_list_context_free (ctx); return; } - mm_dbg ("Couldn't load current firmware image: %s", error->message); + mm_obj_dbg (self, "couldn't load current firmware image: %s", error->message); g_clear_error (&error); } /* Build array of dicts */ g_variant_builder_init (&builder, G_VARIANT_TYPE ("aa{sv}")); - for (l = ctx->list; l; l = g_list_next (l)) - g_variant_builder_add_value ( - &builder, - mm_firmware_properties_get_dictionary (MM_FIRMWARE_PROPERTIES (l->data))); + for (l = ctx->list; l; l = g_list_next (l)) { + GVariant *dict; + + dict = mm_firmware_properties_get_dictionary (MM_FIRMWARE_PROPERTIES (l->data)); + g_variant_builder_add_value (&builder, dict); + g_variant_unref (dict); + } mm_gdbus_modem_firmware_complete_list ( ctx->skeleton, @@ -104,7 +114,7 @@ handle_list_context_free (ctx); return; } - mm_dbg ("Couldn't load firmware image list: %s", error->message); + mm_obj_dbg (self, "couldn't load firmware image list: %s", error->message); g_clear_error (&error); } @@ -287,18 +297,23 @@ MMFirmwareUpdateSettings *update_settings, GError **error) { - const gchar *firmware_revision; - const gchar *carrier_revision; - gchar *combined; + const gchar *firmware_revision; + const gchar *carrier_revision = NULL; + g_autofree gchar *combined = NULL; + gboolean ignore_carrier = FALSE; firmware_revision = mm_iface_modem_get_revision (MM_IFACE_MODEM (self)); if (!firmware_revision) { - g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, - "Unknown revision"); + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "Unknown revision"); return FALSE; } - mm_iface_modem_get_carrier_config (MM_IFACE_MODEM (self), NULL, &carrier_revision); + g_object_get (self, + MM_IFACE_MODEM_FIRMWARE_IGNORE_CARRIER, &ignore_carrier, + NULL); + + if (!ignore_carrier) + mm_iface_modem_get_carrier_config (MM_IFACE_MODEM (self), NULL, &carrier_revision); if (!carrier_revision) { mm_firmware_update_settings_set_version (update_settings, firmware_revision); @@ -307,7 +322,6 @@ combined = g_strdup_printf ("%s - %s", firmware_revision, carrier_revision); mm_firmware_update_settings_set_version (update_settings, combined); - g_free (combined); return TRUE; } @@ -316,53 +330,75 @@ MMFirmwareUpdateSettings *update_settings, GError **error) { - guint16 vid; - guint16 pid; - guint16 rid; - GPtrArray *ids; - MMPort *primary = NULL; - const gchar *subsystem; - const gchar *aux; + static const gchar *supported_subsystems[] = { "USB", "PCI" }; + guint16 vid; + guint16 pid; + guint16 rid; + MMPort *primary = NULL; + const gchar *subsystem; + const gchar *carrier_config = NULL; + g_autoptr(GPtrArray) ids = NULL; + guint i; + gboolean ignore_carrier = FALSE; vid = mm_base_modem_get_vendor_id (self); pid = mm_base_modem_get_product_id (self); #if defined WITH_QMI - primary = MM_PORT (mm_base_modem_peek_port_qmi (self)); + if (MM_IS_BROADBAND_MODEM_QMI (self)) + primary = MM_PORT (mm_broadband_modem_qmi_peek_port_qmi (MM_BROADBAND_MODEM_QMI (self))); #endif #if defined WITH_MBIM - if (!primary) - primary = MM_PORT (mm_base_modem_peek_port_mbim (self)); + if (!primary && MM_IS_BROADBAND_MODEM_MBIM (self)) + primary = MM_PORT (mm_broadband_modem_mbim_peek_port_mbim (MM_BROADBAND_MODEM_MBIM (self))); #endif if (!primary) primary = MM_PORT (mm_base_modem_peek_port_primary (self)); g_assert (primary != NULL); rid = mm_kernel_device_get_physdev_revision (mm_port_peek_kernel_device (primary)); + subsystem = mm_kernel_device_get_physdev_subsystem (mm_port_peek_kernel_device (primary)); - if (g_strcmp0 (subsystem, "usb")) { + if (!subsystem) { + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, + "Unknown device subsystem"); + return FALSE; + } + + for (i = 0; i < G_N_ELEMENTS (supported_subsystems); i++) { + if (g_ascii_strcasecmp (supported_subsystems[i], subsystem) == 0) + break; + } + if (i == G_N_ELEMENTS (supported_subsystems)) { g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "Unsupported subsystem: %s", subsystem); return FALSE; } - mm_iface_modem_get_carrier_config (MM_IFACE_MODEM (self), &aux, NULL); + g_object_get (self, + MM_IFACE_MODEM_FIRMWARE_IGNORE_CARRIER, &ignore_carrier, + NULL); + + if (!ignore_carrier) + mm_iface_modem_get_carrier_config (MM_IFACE_MODEM (self), &carrier_config, NULL); ids = g_ptr_array_new_with_free_func (g_free); - if (aux) { - gchar *carrier; + if (carrier_config) { + g_autofree gchar *carrier = NULL; - carrier = g_ascii_strup (aux, -1); - g_ptr_array_add (ids, g_strdup_printf ("USB\\VID_%04X&PID_%04X&REV_%04X&CARRIER_%s", vid, pid, rid, carrier)); - g_free (carrier); - } - g_ptr_array_add (ids, g_strdup_printf ("USB\\VID_%04X&PID_%04X&REV_%04X", vid, pid, rid)); - g_ptr_array_add (ids, g_strdup_printf ("USB\\VID_%04X&PID_%04X", vid, pid)); - g_ptr_array_add (ids, g_strdup_printf ("USB\\VID_%04X", vid)); + carrier = g_ascii_strup (carrier_config, -1); + g_ptr_array_add (ids, g_strdup_printf ("%s\\VID_%04X&PID_%04X&REV_%04X&CARRIER_%s", + supported_subsystems[i], vid, pid, rid, carrier)); + } + g_ptr_array_add (ids, g_strdup_printf ("%s\\VID_%04X&PID_%04X&REV_%04X", + supported_subsystems[i], vid, pid, rid)); + g_ptr_array_add (ids, g_strdup_printf ("%s\\VID_%04X&PID_%04X", + supported_subsystems[i], vid, pid)); + g_ptr_array_add (ids, g_strdup_printf ("%s\\VID_%04X", + supported_subsystems[i], vid)); g_ptr_array_add (ids, NULL); mm_firmware_update_settings_set_device_ids (update_settings, (const gchar **)ids->pdata); - g_ptr_array_unref (ids); return TRUE; } @@ -380,7 +416,7 @@ update_settings = MM_IFACE_MODEM_FIRMWARE_GET_INTERFACE (self)->load_update_settings_finish (self, res, &error); if (!update_settings) { - mm_dbg ("Couldn't load update settings: '%s'", error->message); + mm_obj_dbg (self, "couldn't load update settings: %s", error->message); g_error_free (error); goto out; } @@ -388,7 +424,7 @@ /* If the plugin didn't specify custom device ids, add the default ones ourselves */ if (!mm_firmware_update_settings_get_device_ids (update_settings) && !add_generic_device_ids (MM_BASE_MODEM (self), update_settings, &error)) { - mm_warn ("Couldn't build device ids: '%s'", error->message); + mm_obj_warn (self, "couldn't build device ids: %s", error->message); g_error_free (error); g_clear_object (&update_settings); goto out; @@ -397,7 +433,7 @@ /* If the plugin didn't specify custom version, add the default one ourselves */ if (!mm_firmware_update_settings_get_version (update_settings) && !add_generic_version (MM_BASE_MODEM (self), update_settings, &error)) { - mm_warn ("Couldn't set version: '%s'", error->message); + mm_obj_warn (self, "couldn't set version: %s", error->message); g_error_free (error); g_clear_object (&update_settings); goto out; @@ -434,8 +470,8 @@ switch (ctx->step) { case INITIALIZATION_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_UPDATE_SETTINGS: if (MM_IFACE_MODEM_FIRMWARE_GET_INTERFACE (self)->load_update_settings && @@ -446,8 +482,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_LAST: /* We are done without errors! */ @@ -465,6 +501,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -533,6 +572,14 @@ MM_GDBUS_TYPE_MODEM_FIRMWARE_SKELETON, G_PARAM_READWRITE)); + g_object_interface_install_property + (g_iface, + g_param_spec_boolean (MM_IFACE_MODEM_FIRMWARE_IGNORE_CARRIER, + "Ignore carrier info in firmware details", + "Whether carrier info (version, name) should be ignored when showing the firmware details", + FALSE, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + initialized = TRUE; } diff -Nru modemmanager-1.12.8/src/mm-iface-modem-firmware.h modemmanager-1.16.6/src/mm-iface-modem-firmware.h --- modemmanager-1.12.8/src/mm-iface-modem-firmware.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-firmware.h 2021-06-06 21:40:59.000000000 +0800 @@ -27,7 +27,8 @@ #define MM_IS_IFACE_MODEM_FIRMWARE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_IFACE_MODEM_FIRMWARE)) #define MM_IFACE_MODEM_FIRMWARE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), MM_TYPE_IFACE_MODEM_FIRMWARE, MMIfaceModemFirmware)) -#define MM_IFACE_MODEM_FIRMWARE_DBUS_SKELETON "iface-modem-firmware-dbus-skeleton" +#define MM_IFACE_MODEM_FIRMWARE_DBUS_SKELETON "iface-modem-firmware-dbus-skeleton" +#define MM_IFACE_MODEM_FIRMWARE_IGNORE_CARRIER "iface-modem-firmware-ignore-carrier" typedef struct _MMIfaceModemFirmware MMIfaceModemFirmware; @@ -69,6 +70,7 @@ }; GType mm_iface_modem_firmware_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMIfaceModemFirmware, g_object_unref) /* Initialize Firmware interface (async) */ void mm_iface_modem_firmware_initialize (MMIfaceModemFirmware *self, diff -Nru modemmanager-1.12.8/src/mm-iface-modem-location.c modemmanager-1.16.6/src/mm-iface-modem-location.c --- modemmanager-1.12.8/src/mm-iface-modem-location.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-location.c 2021-06-06 21:40:59.000000000 +0800 @@ -21,7 +21,7 @@ #include "mm-iface-modem.h" #include "mm-iface-modem-location.h" -#include "mm-log.h" +#include "mm-log-object.h" #include "mm-modem-helpers.h" #define MM_LOCATION_GPS_REFRESH_TIME_SECS 30 @@ -128,15 +128,19 @@ while (g_variant_iter_next (&iter, "{uv}", &source, &value)) { switch (source) { case MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI: + g_assert (!location_3gpp_value); location_3gpp_value = value; break; case MM_MODEM_LOCATION_SOURCE_GPS_NMEA: + g_assert (!location_gps_nmea_value); location_gps_nmea_value = value; break; case MM_MODEM_LOCATION_SOURCE_GPS_RAW: + g_assert (!location_gps_raw_value); location_gps_raw_value = value; break; case MM_MODEM_LOCATION_SOURCE_CDMA_BS: + g_assert (!location_cdma_bs_value); location_cdma_bs_value = value; break; case MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED: @@ -231,11 +235,7 @@ MMLocationGpsNmea *location_gps_nmea, MMLocationGpsRaw *location_gps_raw) { - const gchar *dbus_path; - - dbus_path = g_dbus_object_get_object_path (G_DBUS_OBJECT (self)); - mm_dbg ("Modem %s: GPS location updated", - dbus_path); + mm_obj_dbg (self, "GPS location updated"); /* We only update the property if we are supposed to signal * location */ @@ -249,14 +249,14 @@ NULL)); } -void -mm_iface_modem_location_gps_update (MMIfaceModemLocation *self, - const gchar *nmea_trace) +static void +location_gps_update_nmea (MMIfaceModemLocation *self, + const gchar *nmea_trace) { MmGdbusModemLocation *skeleton; - LocationContext *ctx; - gboolean update_nmea = FALSE; - gboolean update_raw = FALSE; + LocationContext *ctx; + gboolean update_nmea = FALSE; + gboolean update_raw = FALSE; ctx = get_location_context (self); g_object_get (self, @@ -269,7 +269,7 @@ g_assert (ctx->location_gps_nmea != NULL); if (mm_location_gps_nmea_add_trace (ctx->location_gps_nmea, nmea_trace) && (ctx->location_gps_nmea_last_time == 0 || - time (NULL) - ctx->location_gps_nmea_last_time >= mm_gdbus_modem_location_get_gps_refresh_rate (skeleton))) { + time (NULL) - ctx->location_gps_nmea_last_time >= (glong)mm_gdbus_modem_location_get_gps_refresh_rate (skeleton))) { ctx->location_gps_nmea_last_time = time (NULL); update_nmea = TRUE; } @@ -279,7 +279,7 @@ g_assert (ctx->location_gps_raw != NULL); if (mm_location_gps_raw_add_trace (ctx->location_gps_raw, nmea_trace) && (ctx->location_gps_raw_last_time == 0 || - time (NULL) - ctx->location_gps_raw_last_time >= mm_gdbus_modem_location_get_gps_refresh_rate (skeleton))) { + time (NULL) - ctx->location_gps_raw_last_time >= (glong)mm_gdbus_modem_location_get_gps_refresh_rate (skeleton))) { ctx->location_gps_raw_last_time = time (NULL); update_raw = TRUE; } @@ -294,6 +294,50 @@ g_object_unref (skeleton); } +void +mm_iface_modem_location_gps_update (MMIfaceModemLocation *self, + const gchar *nmea_trace) +{ + /* Helper to debug GPS location related issues. Don't depend on a real GPS + * fix for debugging, just use some random values to update */ +#if 0 + { + const gchar *prefix = NULL; + const gchar *lat = NULL; + + /* lat N/S just to test which one is used */ + if (g_str_has_prefix (nmea_trace, "$GPGGA")) { + prefix = "GPGGA"; + lat = "S"; + } else if (g_str_has_prefix (nmea_trace, "$GNGGA")) { + prefix = "GNGGA"; + lat = "N"; + } + + if (prefix && lat) { + g_autoptr(GString) str = NULL; + g_autoptr(GDateTime) now = NULL; + + mm_obj_dbg (self, "GGA trace detected: %s", nmea_trace); + + now = g_date_time_new_now_utc (); + str = g_string_new (""); + g_string_append_printf (str, + "$%s,%02u%02u%02u,4807.038,%s,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47", + prefix, + g_date_time_get_hour (now), + g_date_time_get_minute (now), + g_date_time_get_second (now), + lat); + location_gps_update_nmea (self, str->str); + return; + } + } +#endif + + location_gps_update_nmea (self, nmea_trace); +} + /*****************************************************************************/ static void @@ -301,17 +345,13 @@ MmGdbusModemLocation *skeleton, MMLocation3gpp *location_3gpp) { - const gchar *dbus_path; - - dbus_path = g_dbus_object_get_object_path (G_DBUS_OBJECT (self)); - mm_dbg ("Modem %s: 3GPP location updated " - "(MCC: '%u', MNC: '%u', Location area code: '%lX', Tracking area code: '%lX', Cell ID: '%lX')", - dbus_path, - mm_location_3gpp_get_mobile_country_code (location_3gpp), - mm_location_3gpp_get_mobile_network_code (location_3gpp), - mm_location_3gpp_get_location_area_code (location_3gpp), - mm_location_3gpp_get_tracking_area_code (location_3gpp), - mm_location_3gpp_get_cell_id (location_3gpp)); + mm_obj_dbg (self, "3GPP location updated " + "(MCC: '%u', MNC: '%u', location area code: '%lX', tracking area code: '%lX', cell ID: '%lX')", + mm_location_3gpp_get_mobile_country_code (location_3gpp), + mm_location_3gpp_get_mobile_network_code (location_3gpp), + mm_location_3gpp_get_location_area_code (location_3gpp), + mm_location_3gpp_get_tracking_area_code (location_3gpp), + mm_location_3gpp_get_cell_id (location_3gpp)); /* We only update the property if we are supposed to signal * location */ @@ -356,32 +396,70 @@ void mm_iface_modem_location_3gpp_update_lac_tac_ci (MMIfaceModemLocation *self, - gulong location_area_code, - gulong tracking_area_code, - gulong cell_id) -{ - MmGdbusModemLocation *skeleton; - LocationContext *ctx; + gulong location_area_code, + gulong tracking_area_code, + gulong cell_id) +{ + g_autoptr(MmGdbusModemLocationSkeleton) skeleton = NULL; + LocationContext *ctx; + guint changed = 0; + gulong old_location_area_code; + gulong old_tracking_area_code; + gulong old_cell_id; - ctx = get_location_context (self); g_object_get (self, MM_IFACE_MODEM_LOCATION_DBUS_SKELETON, &skeleton, NULL); - if (!skeleton) + if (!skeleton || !(mm_gdbus_modem_location_get_enabled (MM_GDBUS_MODEM_LOCATION (skeleton)) & MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI)) return; - if (mm_gdbus_modem_location_get_enabled (skeleton) & MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI) { - guint changed = 0; + ctx = get_location_context (self); + g_assert (ctx->location_3gpp != NULL); - g_assert (ctx->location_3gpp != NULL); - changed += mm_location_3gpp_set_location_area_code (ctx->location_3gpp, location_area_code); - changed += mm_location_3gpp_set_tracking_area_code (ctx->location_3gpp, tracking_area_code); - changed += mm_location_3gpp_set_cell_id (ctx->location_3gpp, cell_id); - if (changed) - notify_3gpp_location_update (self, skeleton, ctx->location_3gpp); + old_location_area_code = mm_location_3gpp_get_location_area_code (ctx->location_3gpp); + old_tracking_area_code = mm_location_3gpp_get_tracking_area_code (ctx->location_3gpp); + old_cell_id = mm_location_3gpp_get_cell_id (ctx->location_3gpp); + + /* Update LAC if given, and clear TAC unless a TAC is also given */ + if (location_area_code) { + if (old_location_area_code != location_area_code) { + mm_obj_dbg (self, "3GPP location area code updated: '%lX->%lX'", old_location_area_code, location_area_code); + mm_location_3gpp_set_location_area_code (ctx->location_3gpp, location_area_code); + changed++; + } + if (!tracking_area_code) { + if (old_tracking_area_code != 0) { + mm_obj_dbg (self, "3GPP tracking area code cleared: '%lX->%lX'", old_tracking_area_code, tracking_area_code); + mm_location_3gpp_set_tracking_area_code (ctx->location_3gpp, 0); + changed++; + } + } + } + /* Update TAC if given, and clear LAC unless a LAC is also given */ + if (tracking_area_code) { + if (old_tracking_area_code != tracking_area_code) { + mm_obj_dbg (self, "3GPP tracking area code updated: '%lX->%lX'", old_tracking_area_code, tracking_area_code); + mm_location_3gpp_set_tracking_area_code (ctx->location_3gpp, tracking_area_code); + changed++; + } + if (!location_area_code) { + if (old_location_area_code != 0) { + mm_obj_dbg (self, "3GPP location area code cleared: '%lX->%lX'", old_location_area_code, location_area_code); + mm_location_3gpp_set_location_area_code (ctx->location_3gpp, 0); + changed++; + } + } } - g_object_unref (skeleton); + /* Cell ID only updated if given. It is assumed that if LAC or TAC are given, CID is also given */ + if (cell_id && (old_cell_id != cell_id)) { + mm_obj_dbg (self, "3GPP cell id updated: '%lX->%lX'", old_cell_id, cell_id); + mm_location_3gpp_set_cell_id (ctx->location_3gpp, cell_id); + changed++; + } + + if (changed) + notify_3gpp_location_update (self, MM_GDBUS_MODEM_LOCATION (skeleton), ctx->location_3gpp); } void @@ -413,14 +491,9 @@ MmGdbusModemLocation *skeleton, MMLocationCdmaBs *location_cdma_bs) { - const gchar *dbus_path; - - dbus_path = g_dbus_object_get_object_path (G_DBUS_OBJECT (self)); - mm_dbg ("Modem %s: CDMA BS location updated " - "(Longitude: '%lf', Latitude: '%lf')", - dbus_path, - mm_location_cdma_bs_get_longitude (location_cdma_bs), - mm_location_cdma_bs_get_latitude (location_cdma_bs)); + mm_obj_dbg (self, "CDMA base station location updated (longitude: '%lf', latitude: '%lf')", + mm_location_cdma_bs_get_longitude (location_cdma_bs), + mm_location_cdma_bs_get_latitude (location_cdma_bs)); /* We only update the property if we are supposed to signal * location */ @@ -523,6 +596,7 @@ case MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED: case MM_MODEM_LOCATION_SOURCE_AGPS_MSA: case MM_MODEM_LOCATION_SOURCE_AGPS_MSB: + case MM_MODEM_LOCATION_SOURCE_NONE: /* Nothing to setup in the context */ default: break; @@ -663,7 +737,7 @@ } source_str = mm_modem_location_source_build_string_from_mask (ctx->current); - mm_dbg ("Enabled location '%s' gathering...", source_str); + mm_obj_dbg (self, "enabled location '%s' gathering...", source_str); g_free (source_str); } else if (ctx->to_disable & ctx->current) { /* Remove from mask */ @@ -683,7 +757,7 @@ } source_str = mm_modem_location_source_build_string_from_mask (ctx->current); - mm_dbg ("Disabled location '%s' gathering...", source_str); + mm_obj_dbg (self, "disabled location '%s' gathering...", source_str); g_free (source_str); } @@ -748,7 +822,7 @@ if (mask & source) { /* Source set in mask, need to enable if disabled */ if (currently_enabled & source) - mm_dbg ("Location '%s' gathering is already enabled...", str); + mm_obj_dbg (self, "location '%s' gathering is already enabled...", str); else ctx->to_enable |= source; } else { @@ -756,7 +830,7 @@ if (currently_enabled & source) ctx->to_disable |= source; else - mm_dbg ("Location '%s' gathering is already disabled...", str); + mm_obj_dbg (self, "location '%s' gathering is already disabled...", str); } g_free (str); @@ -798,13 +872,13 @@ if (ctx->to_enable != MM_MODEM_LOCATION_SOURCE_NONE) { str = mm_modem_location_source_build_string_from_mask (ctx->to_enable); - mm_dbg ("Need to enable the following location sources: '%s'", str); + mm_obj_dbg (self, "need to enable the following location sources: '%s'", str); g_free (str); } if (ctx->to_disable != MM_MODEM_LOCATION_SOURCE_NONE) { str = mm_modem_location_source_build_string_from_mask (ctx->to_disable); - mm_dbg ("Need to disable the following location sources: '%s'", str); + mm_obj_dbg (self, "need to disable the following location sources: '%s'", str); g_free (str); } @@ -895,8 +969,8 @@ /* Enable/disable location signaling */ location_ctx = get_location_context (ctx->self); if (mm_gdbus_modem_location_get_signals_location (ctx->skeleton) != ctx->signal_location) { - mm_dbg ("%s location signaling", - ctx->signal_location ? "Enabling" : "Disabling"); + mm_obj_dbg (self, "%s location signaling", + ctx->signal_location ? "enabling" : "disabling"); mm_gdbus_modem_location_set_signals_location (ctx->skeleton, ctx->signal_location); if (ctx->signal_location) @@ -914,7 +988,7 @@ } str = mm_modem_location_source_build_string_from_mask (ctx->sources); - mm_dbg ("Setting up location sources: '%s'", str); + mm_obj_dbg (self, "setting up location sources: '%s'", str); g_free (str); /* Go on to enable or disable the requested sources */ @@ -1397,8 +1471,8 @@ switch (ctx->step) { case DISABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_DISABLE_GATHERING: setup_gathering (self, @@ -1413,6 +1487,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -1516,8 +1593,8 @@ switch (ctx->step) { case ENABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_ENABLE_GATHERING: { MMModemLocationSource default_sources; @@ -1542,6 +1619,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -1619,7 +1699,7 @@ servers = MM_IFACE_MODEM_LOCATION_GET_INTERFACE (self)->load_assistance_data_servers_finish (self, res, &error); if (error) { - mm_warn ("couldn't load assistance data servers: '%s'", error->message); + mm_obj_warn (self, "couldn't load assistance data servers: %s", error->message); g_error_free (error); } @@ -1644,7 +1724,7 @@ mask = MM_IFACE_MODEM_LOCATION_GET_INTERFACE (self)->load_supported_assistance_data_finish (self, res, &error); if (error) { - mm_warn ("couldn't load supported assistance data types: '%s'", error->message); + mm_obj_warn (self, "couldn't load supported assistance data types: %s", error->message); g_error_free (error); } @@ -1668,7 +1748,7 @@ supl = MM_IFACE_MODEM_LOCATION_GET_INTERFACE (self)->load_supl_server_finish (self, res, &error); if (error) { - mm_warn ("couldn't load SUPL server: '%s'", error->message); + mm_obj_warn (self, "couldn't load SUPL server: %s", error->message); g_error_free (error); } @@ -1692,7 +1772,7 @@ ctx->capabilities = MM_IFACE_MODEM_LOCATION_GET_INTERFACE (self)->load_capabilities_finish (self, res, &error); if (error) { - mm_warn ("couldn't load location capabilities: '%s'", error->message); + mm_obj_warn (self, "couldn't load location capabilities: %s", error->message); g_error_free (error); } @@ -1720,8 +1800,8 @@ switch (ctx->step) { case INITIALIZATION_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_CAPABILITIES: /* Location capabilities value is meant to be loaded only once during @@ -1736,8 +1816,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_VALIDATE_CAPABILITIES: /* If the modem doesn't support any location capabilities, we won't export @@ -1750,8 +1830,8 @@ g_object_unref (task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_SUPL_SERVER: /* If the modem supports A-GPS, load SUPL server */ @@ -1765,8 +1845,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_SUPPORTED_ASSISTANCE_DATA: /* If the modem supports any GPS-related technology, check assistance data types supported */ @@ -1782,8 +1862,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_ASSISTANCE_DATA_SERVERS: /* If any assistance data supported, load servers */ @@ -1796,8 +1876,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_GPS_REFRESH_RATE: /* If we have GPS capabilities, expose the GPS refresh rate */ @@ -1806,8 +1886,8 @@ /* Set the default rate in the interface */ mm_gdbus_modem_location_set_gps_refresh_rate (ctx->skeleton, MM_LOCATION_GPS_REFRESH_TIME_SECS); - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_LAST: /* We are done without errors! */ @@ -1841,6 +1921,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); diff -Nru modemmanager-1.12.8/src/mm-iface-modem-location.h modemmanager-1.16.6/src/mm-iface-modem-location.h --- modemmanager-1.12.8/src/mm-iface-modem-location.h 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-location.h 2021-06-06 21:40:59.000000000 +0800 @@ -106,6 +106,7 @@ }; GType mm_iface_modem_location_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMIfaceModemLocation, g_object_unref) /* Initialize Location interface (async) */ void mm_iface_modem_location_initialize (MMIfaceModemLocation *self, diff -Nru modemmanager-1.12.8/src/mm-iface-modem-messaging.c modemmanager-1.16.6/src/mm-iface-modem-messaging.c --- modemmanager-1.12.8/src/mm-iface-modem-messaging.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-messaging.c 2021-06-06 21:40:59.000000000 +0800 @@ -20,7 +20,7 @@ #include "mm-iface-modem.h" #include "mm-iface-modem-messaging.h" #include "mm-sms-list.h" -#include "mm-log.h" +#include "mm-log-object.h" #define SUPPORT_CHECKED_TAG "messaging-support-checked-tag" #define SUPPORTED_TAG "messaging-supported-tag" @@ -410,29 +410,27 @@ gboolean mm_iface_modem_messaging_take_part (MMIfaceModemMessaging *self, - MMSmsPart *sms_part, - MMSmsState state, - MMSmsStorage storage) -{ - MMSmsList *list = NULL; - GError *error = NULL; - gboolean added; + MMSmsPart *sms_part, + MMSmsState state, + MMSmsStorage storage) +{ + g_autoptr(MMSmsList) list = NULL; + g_autoptr(GError) error = NULL; + gboolean added = FALSE; g_object_get (self, MM_IFACE_MODEM_MESSAGING_SMS_LIST, &list, NULL); - if (!list) - return FALSE; - added = mm_sms_list_take_part (list, sms_part, state, storage, &error); - if (!added) { - mm_dbg ("Couldn't take part in SMS list: '%s'", error->message); - g_error_free (error); + if (list) { + added = mm_sms_list_take_part (list, sms_part, state, storage, &error); + if (!added) + mm_obj_dbg (self, "couldn't take part in SMS list: %s", error->message); + } - /* If part wasn't taken, we need to free the part ourselves */ + /* If part wasn't taken, we need to free the part ourselves */ + if (!added) mm_sms_part_free (sms_part); - } - g_object_unref (list); return added; } @@ -503,24 +501,20 @@ } static void -sms_added (MMSmsList *list, - const gchar *sms_path, - gboolean received, +sms_added (MMSmsList *list, + const gchar *sms_path, + gboolean received, MmGdbusModemMessaging *skeleton) { - mm_dbg ("Added %s SMS at '%s'", - received ? "received" : "local", - sms_path); update_message_list (skeleton, list); mm_gdbus_modem_messaging_emit_added (skeleton, sms_path, received); } static void -sms_deleted (MMSmsList *list, - const gchar *sms_path, +sms_deleted (MMSmsList *list, + const gchar *sms_path, MmGdbusModemMessaging *skeleton) { - mm_dbg ("Deleted SMS at '%s'", sms_path); update_message_list (skeleton, list); mm_gdbus_modem_messaging_emit_deleted (skeleton, sms_path); } @@ -611,8 +605,8 @@ switch (ctx->step) { case DISABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_DISABLE_UNSOLICITED_EVENTS: /* Allow cleaning up unsolicited events */ @@ -624,8 +618,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_CLEANUP_UNSOLICITED_EVENTS: /* Allow cleaning up unsolicited events */ @@ -637,8 +631,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_LAST: /* Clear SMS list */ @@ -650,6 +644,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -759,11 +756,11 @@ StorageContext *storage_ctx; storage_ctx = get_storage_context (self); - mm_dbg ("Couldn't load SMS parts from storage '%s': '%s'", - mm_sms_storage_get_string (g_array_index (storage_ctx->supported_mem1, - MMSmsStorage, - ctx->mem1_storage_index)), - error->message); + mm_obj_dbg (self, "couldn't load SMS parts from storage '%s': %s", + mm_sms_storage_get_string (g_array_index (storage_ctx->supported_mem1, + MMSmsStorage, + ctx->mem1_storage_index)), + error->message); g_error_free (error); } @@ -781,7 +778,7 @@ GError *error = NULL; if (!MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (self)->set_default_storage_finish (self, res, &error)) { - mm_warn ("Could not set default storage: '%s'", error->message); + mm_obj_warn (self, "could not set default storage: %s", error->message); g_error_free (error); } @@ -863,7 +860,7 @@ /* Not critical! */ if (!MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (self)->enable_unsolicited_events_finish (self, res, &error)) { - mm_dbg ("Couldn't enable unsolicited events: '%s'", error->message); + mm_obj_dbg (self, "couldn't enable unsolicited events: %s", error->message); g_error_free (error); } @@ -955,9 +952,8 @@ g_object_unref (list); - /* Fall down to next step */ ctx->step++; - } + } /* fall through */ case ENABLING_STEP_SETUP_SMS_FORMAT: /* Allow setting SMS format to use */ @@ -969,8 +965,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_STORAGE_DEFAULTS: { MMSmsStorage default_storage; @@ -987,7 +983,7 @@ NULL); if (default_storage == MM_SMS_STORAGE_UNKNOWN) - mm_info ("Cannot set default storage, none of the suggested ones supported"); + mm_obj_warn (self, "cannot set default storage, none of the suggested ones supported"); else if (MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (self)->set_default_storage && MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (self)->set_default_storage_finish) { MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (self)->set_default_storage ( @@ -998,9 +994,8 @@ return; } - /* Fall down to next step */ ctx->step++; - } + } /* fall through */ case ENABLING_STEP_LOAD_INITIAL_SMS_PARTS: /* Allow loading the initial list of SMS parts */ @@ -1009,8 +1004,8 @@ load_initial_sms_parts_from_storages (task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_SETUP_UNSOLICITED_EVENTS: /* Allow setting up unsolicited events */ @@ -1022,8 +1017,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_ENABLE_UNSOLICITED_EVENTS: /* Allow setting up unsolicited events */ @@ -1035,14 +1030,17 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_LAST: /* We are done without errors! */ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -1137,7 +1135,7 @@ &storage_ctx->supported_mem2, &storage_ctx->supported_mem3, &error)) { - mm_dbg ("Couldn't load supported storages: '%s'", error->message); + mm_obj_dbg (self, "couldn't load supported storages: %s", error->message); g_error_free (error); } else { gchar *mem1; @@ -1151,17 +1149,17 @@ skip_unknown_storages (storage_ctx->supported_mem2); skip_unknown_storages (storage_ctx->supported_mem3); - mem1 = mm_common_build_sms_storages_string ((MMSmsStorage *)storage_ctx->supported_mem1->data, + mem1 = mm_common_build_sms_storages_string ((MMSmsStorage *)(gpointer)storage_ctx->supported_mem1->data, storage_ctx->supported_mem1->len); - mem2 = mm_common_build_sms_storages_string ((MMSmsStorage *)storage_ctx->supported_mem2->data, + mem2 = mm_common_build_sms_storages_string ((MMSmsStorage *)(gpointer)storage_ctx->supported_mem2->data, storage_ctx->supported_mem2->len); - mem3 = mm_common_build_sms_storages_string ((MMSmsStorage *)storage_ctx->supported_mem3->data, + mem3 = mm_common_build_sms_storages_string ((MMSmsStorage *)(gpointer)storage_ctx->supported_mem3->data, storage_ctx->supported_mem3->len); - mm_dbg ("Supported storages loaded:"); - mm_dbg (" mem1 (list/read/delete) storages: '%s'", mem1); - mm_dbg (" mem2 (write/send) storages: '%s'", mem2); - mm_dbg (" mem3 (reception) storages: '%s'", mem3); + mm_obj_dbg (self, "supported storages loaded:"); + mm_obj_dbg (self, " mem1 (list/read/delete) storages: '%s'", mem1); + mm_obj_dbg (self, " mem2 (write/send) storages: '%s'", mem2); + mm_obj_dbg (self, " mem3 (reception) storages: '%s'", mem3); g_free (mem1); g_free (mem2); g_free (mem3); @@ -1211,7 +1209,7 @@ &error)) { if (error) { /* This error shouldn't be treated as critical */ - mm_dbg ("Messaging support check failed: '%s'", error->message); + mm_obj_dbg (self, "messaging support check failed: %s", error->message); g_error_free (error); } } else { @@ -1239,11 +1237,10 @@ self, res, &error)) { - mm_dbg ("Couldn't initialize current storages: '%s'", error->message); + mm_obj_dbg (self, "couldn't initialize current storages: %s", error->message); g_error_free (error); - } else { - mm_dbg ("Current storages initialized"); - } + } else + mm_obj_dbg (self, "current storages initialized"); /* Go on to next step */ ctx = g_task_get_task_data (task); @@ -1276,8 +1273,8 @@ supported_quark = (g_quark_from_static_string ( SUPPORTED_TAG)); - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_CHECK_SUPPORT: if (!GPOINTER_TO_UINT (g_object_get_qdata (G_OBJECT (self), @@ -1303,8 +1300,8 @@ /* If there is no implementation to check support, assume we DON'T * support it. */ } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_FAIL_IF_UNSUPPORTED: if (!GPOINTER_TO_UINT (g_object_get_qdata (G_OBJECT (self), @@ -1316,8 +1313,8 @@ g_object_unref (task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_LOAD_SUPPORTED_STORAGES: if (MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (self)->load_supported_storages && @@ -1328,8 +1325,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_INIT_CURRENT_STORAGES: if (MM_IFACE_MODEM_MESSAGING_GET_INTERFACE (self)->init_current_storages && @@ -1340,8 +1337,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_LAST: /* We are done without errors! */ @@ -1367,6 +1364,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); diff -Nru modemmanager-1.12.8/src/mm-iface-modem-messaging.h modemmanager-1.16.6/src/mm-iface-modem-messaging.h --- modemmanager-1.12.8/src/mm-iface-modem-messaging.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-messaging.h 2021-06-06 21:40:59.000000000 +0800 @@ -134,6 +134,7 @@ }; GType mm_iface_modem_messaging_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMIfaceModemMessaging, g_object_unref) /* Initialize Messaging interface (async) */ void mm_iface_modem_messaging_initialize (MMIfaceModemMessaging *self, diff -Nru modemmanager-1.12.8/src/mm-iface-modem-oma.c modemmanager-1.16.6/src/mm-iface-modem-oma.c --- modemmanager-1.12.8/src/mm-iface-modem-oma.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-oma.c 2021-06-06 21:40:59.000000000 +0800 @@ -19,7 +19,7 @@ #include "mm-iface-modem.h" #include "mm-iface-modem-oma.h" -#include "mm-log.h" +#include "mm-log-object.h" #define SUPPORT_CHECKED_TAG "oma-support-checked-tag" #define SUPPORTED_TAG "oma-supported-tag" @@ -124,10 +124,9 @@ old_session_state = mm_gdbus_modem_oma_get_session_state (skeleton); if (old_session_state != new_session_state) { - mm_info ("Modem %s: OMA session state changed (%s -> %s)", - g_dbus_object_get_object_path (G_DBUS_OBJECT (self)), - mm_oma_session_state_get_string (old_session_state), - mm_oma_session_state_get_string (new_session_state)); + mm_obj_info (self, "OMA session state changed (%s -> %s)", + mm_oma_session_state_get_string (old_session_state), + mm_oma_session_state_get_string (new_session_state)); /* Flush current change before signaling the state change, * so that clients get the proper state already in the @@ -220,7 +219,7 @@ } str = mm_oma_feature_build_string_from_mask (ctx->features); - mm_dbg ("Setting up OMA features: '%s'", str); + mm_obj_dbg (self, "setting up OMA features: '%s'", str); g_free (str); MM_IFACE_MODEM_OMA_GET_INTERFACE (ctx->self)->setup ( @@ -342,8 +341,8 @@ return; } - mm_dbg ("Starting client-initiated OMA session (%s)", - mm_oma_session_type_get_string (ctx->session_type)); + mm_obj_dbg (self, "starting client-initiated OMA session (%s)", + mm_oma_session_type_get_string (ctx->session_type)); MM_IFACE_MODEM_OMA_GET_INTERFACE (ctx->self)->start_client_initiated_session ( ctx->self, ctx->session_type, @@ -501,10 +500,10 @@ return; } - mm_dbg ("%s network-initiated OMA session (%s, %u)", - ctx->accept ? "Accepting" : "Rejecting", - mm_oma_session_type_get_string (ctx->session_type), - ctx->session_id); + mm_obj_dbg (self, "%s network-initiated OMA session (%s, %u)", + ctx->accept ? "accepting" : "rejecting", + mm_oma_session_type_get_string (ctx->session_type), + ctx->session_id); MM_IFACE_MODEM_OMA_GET_INTERFACE (ctx->self)->accept_network_initiated_session ( ctx->self, ctx->session_id, @@ -615,7 +614,7 @@ return; } - mm_dbg ("Cancelling OMA session"); + mm_obj_dbg (self, "cancelling OMA session"); MM_IFACE_MODEM_OMA_GET_INTERFACE (ctx->self)->cancel_session ( ctx->self, (GAsyncReadyCallback)cancel_session_ready, @@ -728,8 +727,8 @@ switch (ctx->step) { case DISABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_DISABLE_UNSOLICITED_EVENTS: /* Allow cleaning up unsolicited events */ @@ -741,8 +740,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_CLEANUP_UNSOLICITED_EVENTS: /* Allow cleaning up unsolicited events */ @@ -754,14 +753,17 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_LAST: /* We are done without errors! */ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -887,7 +889,7 @@ /* Not critical! */ if (!MM_IFACE_MODEM_OMA_GET_INTERFACE (self)->enable_unsolicited_events_finish (self, res, &error)) { - mm_dbg ("Couldn't enable unsolicited events: '%s'", error->message); + mm_obj_dbg (self, "couldn't enable unsolicited events: %s", error->message); g_error_free (error); } @@ -914,8 +916,8 @@ switch (ctx->step) { case ENABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_LOAD_FEATURES: if (MM_IFACE_MODEM_OMA_GET_INTERFACE (self)->load_features && @@ -926,8 +928,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_SETUP_UNSOLICITED_EVENTS: /* Allow setting up unsolicited events */ @@ -939,8 +941,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_ENABLE_UNSOLICITED_EVENTS: /* Allow setting up unsolicited events */ @@ -952,14 +954,17 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_LAST: /* We are done without errors! */ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -1030,7 +1035,7 @@ if (!MM_IFACE_MODEM_OMA_GET_INTERFACE (self)->check_support_finish (self, res, &error)) { if (error) { /* This error shouldn't be treated as critical */ - mm_dbg ("OMA support check failed: '%s'", error->message); + mm_obj_dbg (self, "OMA support check failed: %s", error->message); g_error_free (error); } } else { @@ -1071,8 +1076,8 @@ supported_quark = (g_quark_from_static_string ( SUPPORTED_TAG)); - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_CHECK_SUPPORT: if (!GPOINTER_TO_UINT (g_object_get_qdata (G_OBJECT (self), @@ -1098,8 +1103,8 @@ /* If there is no implementation to check support, assume we DON'T * support it. */ } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_FAIL_IF_UNSUPPORTED: if (!GPOINTER_TO_UINT (g_object_get_qdata (G_OBJECT (self), @@ -1111,8 +1116,8 @@ g_object_unref (task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_LAST: /* We are done without errors! */ @@ -1142,6 +1147,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); diff -Nru modemmanager-1.12.8/src/mm-iface-modem-oma.h modemmanager-1.16.6/src/mm-iface-modem-oma.h --- modemmanager-1.12.8/src/mm-iface-modem-oma.h 2017-09-14 22:00:54.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-oma.h 2021-06-06 21:40:59.000000000 +0800 @@ -120,6 +120,7 @@ }; GType mm_iface_modem_oma_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMIfaceModemOma, g_object_unref) /* Initialize Oma interface (async) */ void mm_iface_modem_oma_initialize (MMIfaceModemOma *self, diff -Nru modemmanager-1.12.8/src/mm-iface-modem-signal.c modemmanager-1.16.6/src/mm-iface-modem-signal.c --- modemmanager-1.12.8/src/mm-iface-modem-signal.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-signal.c 2021-06-06 21:40:59.000000000 +0800 @@ -19,7 +19,7 @@ #include "mm-iface-modem.h" #include "mm-iface-modem-signal.h" -#include "mm-log.h" +#include "mm-log-object.h" #define SUPPORT_CHECKED_TAG "signal-support-checked-tag" #define SUPPORTED_TAG "signal-supported-tag" @@ -55,7 +55,7 @@ static void clear_values (MMIfaceModemSignal *self) { - MmGdbusModemSignal *skeleton; + g_autoptr(MmGdbusModemSignalSkeleton) skeleton = NULL; g_object_get (self, MM_IFACE_MODEM_SIGNAL_DBUS_SKELETON, &skeleton, @@ -63,26 +63,32 @@ if (!skeleton) return; - mm_gdbus_modem_signal_set_cdma (skeleton, NULL); - mm_gdbus_modem_signal_set_evdo (skeleton, NULL); - mm_gdbus_modem_signal_set_gsm (skeleton, NULL); - mm_gdbus_modem_signal_set_umts (skeleton, NULL); - mm_gdbus_modem_signal_set_lte (skeleton, NULL); - g_object_unref (skeleton); + mm_gdbus_modem_signal_set_cdma (MM_GDBUS_MODEM_SIGNAL (skeleton), NULL); + mm_gdbus_modem_signal_set_evdo (MM_GDBUS_MODEM_SIGNAL (skeleton), NULL); + mm_gdbus_modem_signal_set_gsm (MM_GDBUS_MODEM_SIGNAL (skeleton), NULL); + mm_gdbus_modem_signal_set_umts (MM_GDBUS_MODEM_SIGNAL (skeleton), NULL); + mm_gdbus_modem_signal_set_lte (MM_GDBUS_MODEM_SIGNAL (skeleton), NULL); + mm_gdbus_modem_signal_set_nr5g (MM_GDBUS_MODEM_SIGNAL (skeleton), NULL); } static void load_values_ready (MMIfaceModemSignal *self, - GAsyncResult *res) + GAsyncResult *res) { - GVariant *dictionary; - GError *error = NULL; - MMSignal *cdma = NULL; - MMSignal *evdo = NULL; - MMSignal *gsm = NULL; - MMSignal *umts = NULL; - MMSignal *lte = NULL; - MmGdbusModemSignal *skeleton; + g_autoptr(GError) error = NULL; + g_autoptr(MMSignal) cdma = NULL; + g_autoptr(GVariant) dict_cdma = NULL; + g_autoptr(MMSignal) evdo = NULL; + g_autoptr(GVariant) dict_evdo = NULL; + g_autoptr(MMSignal) gsm = NULL; + g_autoptr(GVariant) dict_gsm = NULL; + g_autoptr(MMSignal) umts = NULL; + g_autoptr(GVariant) dict_umts = NULL; + g_autoptr(MMSignal) lte = NULL; + g_autoptr(GVariant) dict_lte = NULL; + g_autoptr(MMSignal) nr5g = NULL; + g_autoptr(GVariant) dict_nr5g = NULL; + g_autoptr(MmGdbusModemSignalSkeleton) skeleton = NULL; if (!MM_IFACE_MODEM_SIGNAL_GET_INTERFACE (self)->load_values_finish ( self, @@ -92,9 +98,9 @@ &gsm, &umts, <e, + &nr5g, &error)) { - mm_warn ("Couldn't load extended signal information: %s", error->message); - g_error_free (error); + mm_obj_warn (self, "couldn't load extended signal information: %s", error->message); clear_values (self); return; } @@ -103,55 +109,36 @@ MM_IFACE_MODEM_SIGNAL_DBUS_SKELETON, &skeleton, NULL); if (!skeleton) { - mm_warn ("Cannot update extended signal information: " - "Couldn't get interface skeleton"); + mm_obj_warn (self, "cannot update extended signal information: couldn't get interface skeleton"); return; } - if (cdma) { - dictionary = mm_signal_get_dictionary (cdma); - mm_gdbus_modem_signal_set_cdma (skeleton, dictionary); - g_variant_unref (dictionary); - g_object_unref (cdma); - } else - mm_gdbus_modem_signal_set_cdma (skeleton, NULL); - - if (evdo) { - dictionary = mm_signal_get_dictionary (evdo); - mm_gdbus_modem_signal_set_evdo (skeleton, dictionary); - g_variant_unref (dictionary); - g_object_unref (evdo); - } else - mm_gdbus_modem_signal_set_evdo (skeleton, NULL); - - if (gsm) { - dictionary = mm_signal_get_dictionary (gsm); - mm_gdbus_modem_signal_set_gsm (skeleton, dictionary); - g_variant_unref (dictionary); - g_object_unref (gsm); - } else - mm_gdbus_modem_signal_set_gsm (skeleton, NULL); - - if (umts) { - dictionary = mm_signal_get_dictionary (umts); - mm_gdbus_modem_signal_set_umts (skeleton, dictionary); - g_variant_unref (dictionary); - g_object_unref (umts); - } else - mm_gdbus_modem_signal_set_umts (skeleton, NULL); - - if (lte) { - dictionary = mm_signal_get_dictionary (lte); - mm_gdbus_modem_signal_set_lte (skeleton, dictionary); - g_variant_unref (dictionary); - g_object_unref (lte); - } else - mm_gdbus_modem_signal_set_lte (skeleton, NULL); + if (cdma) + dict_cdma = mm_signal_get_dictionary (cdma); + mm_gdbus_modem_signal_set_cdma (MM_GDBUS_MODEM_SIGNAL (skeleton), dict_cdma); + + if (evdo) + dict_evdo = mm_signal_get_dictionary (evdo); + mm_gdbus_modem_signal_set_evdo (MM_GDBUS_MODEM_SIGNAL (skeleton), dict_evdo); + + if (gsm) + dict_gsm = mm_signal_get_dictionary (gsm); + mm_gdbus_modem_signal_set_gsm (MM_GDBUS_MODEM_SIGNAL (skeleton), dict_gsm); + + if (umts) + dict_umts = mm_signal_get_dictionary (umts); + mm_gdbus_modem_signal_set_umts (MM_GDBUS_MODEM_SIGNAL (skeleton), dict_umts); + + if (lte) + dict_lte = mm_signal_get_dictionary (lte); + mm_gdbus_modem_signal_set_lte (MM_GDBUS_MODEM_SIGNAL (skeleton), dict_lte); + + if (nr5g) + dict_nr5g = mm_signal_get_dictionary (nr5g); + mm_gdbus_modem_signal_set_nr5g (MM_GDBUS_MODEM_SIGNAL (skeleton), dict_nr5g); /* Flush right away */ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (skeleton)); - - g_object_unref (skeleton); } static gboolean @@ -168,11 +155,13 @@ static void teardown_refresh_context (MMIfaceModemSignal *self) { - mm_dbg ("Extended signal information reporting disabled"); clear_values (self); if (G_UNLIKELY (!refresh_context_quark)) refresh_context_quark = g_quark_from_static_string (REFRESH_CONTEXT_TAG); - g_object_set_qdata (G_OBJECT (self), refresh_context_quark, NULL); + if (g_object_get_qdata (G_OBJECT (self), refresh_context_quark)) { + mm_obj_dbg (self, "extended signal information reporting disabled"); + g_object_set_qdata (G_OBJECT (self), refresh_context_quark, NULL); + } } static gboolean @@ -208,14 +197,14 @@ /* User disabling? */ if (new_rate == 0) { - mm_dbg ("Extended signal information reporting disabled (rate: 0 seconds)"); + mm_obj_dbg (self, "extended signal information reporting disabled (rate: 0 seconds)"); clear_values (self); g_object_set_qdata (G_OBJECT (self), refresh_context_quark, NULL); return TRUE; } if (modem_state < MM_MODEM_STATE_ENABLING) { - mm_dbg ("Extended signal information reporting disabled (modem not yet enabled)"); + mm_obj_dbg (self, "extended signal information reporting disabled (modem not yet enabled)"); return TRUE; } @@ -236,7 +225,7 @@ } /* Update refresh context */ - mm_dbg ("Extended signal information reporting enabled (rate: %u seconds)", new_rate); + mm_obj_dbg (self, "extended signal information reporting enabled (rate: %u seconds)", new_rate); ctx->rate = new_rate; if (ctx->timeout_source) g_source_remove (ctx->timeout_source); @@ -400,7 +389,7 @@ if (!MM_IFACE_MODEM_SIGNAL_GET_INTERFACE (self)->check_support_finish (self, res, &error)) { if (error) { /* This error shouldn't be treated as critical */ - mm_dbg ("Extended signal support check failed: '%s'", error->message); + mm_obj_dbg (self, "extended signal support check failed: %s", error->message); g_error_free (error); } } else { @@ -441,8 +430,8 @@ supported_quark = (g_quark_from_static_string ( SUPPORTED_TAG)); - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_CHECK_SUPPORT: if (!GPOINTER_TO_UINT (g_object_get_qdata (G_OBJECT (self), @@ -468,8 +457,8 @@ /* If there is no implementation to check support, assume we DON'T * support it. */ } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_FAIL_IF_UNSUPPORTED: if (!GPOINTER_TO_UINT (g_object_get_qdata (G_OBJECT (self), @@ -481,8 +470,8 @@ g_object_unref (task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_LAST: /* We are done without errors! */ @@ -499,6 +488,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -520,7 +512,6 @@ NULL); if (!skeleton) { skeleton = mm_gdbus_modem_signal_skeleton_new (); - clear_values (self); g_object_set (self, MM_IFACE_MODEM_SIGNAL_DBUS_SKELETON, skeleton, NULL); diff -Nru modemmanager-1.12.8/src/mm-iface-modem-signal.h modemmanager-1.16.6/src/mm-iface-modem-signal.h --- modemmanager-1.12.8/src/mm-iface-modem-signal.h 2016-11-22 05:55:13.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-signal.h 2021-06-06 21:40:59.000000000 +0800 @@ -54,10 +54,12 @@ MMSignal **gsm, MMSignal **umts, MMSignal **lte, + MMSignal **nr5g, GError **error); }; GType mm_iface_modem_signal_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMIfaceModemSignal, g_object_unref) /* Initialize Signal interface (async) */ void mm_iface_modem_signal_initialize (MMIfaceModemSignal *self, diff -Nru modemmanager-1.12.8/src/mm-iface-modem-simple.c modemmanager-1.16.6/src/mm-iface-modem-simple.c --- modemmanager-1.12.8/src/mm-iface-modem-simple.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-simple.c 2021-06-06 21:40:59.000000000 +0800 @@ -26,7 +26,7 @@ #include "mm-iface-modem-3gpp.h" #include "mm-iface-modem-cdma.h" #include "mm-iface-modem-simple.h" -#include "mm-log.h" +#include "mm-log-object.h" /*****************************************************************************/ /* Private data context */ @@ -154,6 +154,7 @@ mm_iface_modem_3gpp_register_in_network ( MM_IFACE_MODEM_3GPP (self), ctx->operator_id, + FALSE, /* if already registered with same settings, do nothing */ ctx->max_try_time, (GAsyncReadyCallback)register_in_3gpp_network_ready, task); @@ -163,7 +164,7 @@ /* No more tries of anything */ g_task_return_error ( task, - mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_NETWORK_TIMEOUT)); + mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_NETWORK_TIMEOUT, self)); g_object_unref (task); } @@ -279,7 +280,7 @@ GError *error = NULL; if (!mm_base_bearer_connect_finish (bearer, res, &error)) { - mm_dbg ("Couldn't connect bearer: '%s'", error->message); + mm_obj_dbg (ctx->self, "couldn't connect bearer: %s", error->message); g_dbus_method_invocation_take_error (ctx->invocation, error); connection_context_free (ctx); return; @@ -536,12 +537,12 @@ switch (ctx->step) { case CONNECTION_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case CONNECTION_STEP_UNLOCK_CHECK: - mm_info ("Simple connect state (%d/%d): Unlock check", - ctx->step, CONNECTION_STEP_LAST); + mm_obj_info (ctx->self, "simple connect state (%d/%d): unlock check", + ctx->step, CONNECTION_STEP_LAST); mm_iface_modem_update_lock_info (MM_IFACE_MODEM (ctx->self), MM_MODEM_LOCK_UNKNOWN, /* ask */ (GAsyncReadyCallback)update_lock_info_ready, @@ -549,8 +550,8 @@ return; case CONNECTION_STEP_WAIT_FOR_INITIALIZED: - mm_info ("Simple connect state (%d/%d): Wait to get fully initialized", - ctx->step, CONNECTION_STEP_LAST); + mm_obj_info (ctx->self, "simple connect state (%d/%d): wait to get fully initialized", + ctx->step, CONNECTION_STEP_LAST); mm_iface_modem_wait_for_final_state (MM_IFACE_MODEM (ctx->self), MM_MODEM_STATE_DISABLED, /* disabled == initialized */ (GAsyncReadyCallback)wait_for_initialized_ready, @@ -558,16 +559,16 @@ return; case CONNECTION_STEP_ENABLE: - mm_info ("Simple connect state (%d/%d): Enable", - ctx->step, CONNECTION_STEP_LAST); + mm_obj_info (ctx->self, "simple connect state (%d/%d): enable", + ctx->step, CONNECTION_STEP_LAST); mm_base_modem_enable (MM_BASE_MODEM (ctx->self), (GAsyncReadyCallback)enable_ready, ctx); return; case CONNECTION_STEP_WAIT_FOR_ENABLED: - mm_info ("Simple connect state (%d/%d): Wait to get fully enabled", - ctx->step, CONNECTION_STEP_LAST); + mm_obj_info (ctx->self, "simple connect state (%d/%d): wait to get fully enabled", + ctx->step, CONNECTION_STEP_LAST); mm_iface_modem_wait_for_final_state (MM_IFACE_MODEM (ctx->self), MM_MODEM_STATE_UNKNOWN, /* just a final state */ (GAsyncReadyCallback)wait_for_enabled_ready, @@ -575,9 +576,8 @@ return; case CONNECTION_STEP_REGISTER: - mm_info ("Simple connect state (%d/%d): Register", - ctx->step, CONNECTION_STEP_LAST); - + mm_obj_info (ctx->self, "simple connect state (%d/%d): register", + ctx->step, CONNECTION_STEP_LAST); if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (ctx->self)) || mm_iface_modem_is_cdma (MM_IFACE_MODEM (ctx->self))) { /* 3GPP or CDMA registration */ @@ -590,17 +590,16 @@ } /* If not 3GPP and not CDMA, this will possibly be a POTS modem, - * which won't require any specific registration anywhere. - * So, fall down to next step */ + * which won't require any specific registration anywhere. */ ctx->step++; + /* fall through */ case CONNECTION_STEP_BEARER: { MMBearerList *list = NULL; MMBearerProperties *bearer_properties; - mm_info ("Simple connect state (%d/%d): Bearer", - ctx->step, CONNECTION_STEP_LAST); - + mm_obj_info (ctx->self, "simple connect state (%d/%d): bearer", + ctx->step, CONNECTION_STEP_LAST); g_object_get (ctx->self, MM_IFACE_MODEM_BEARER_LIST, &list, NULL); @@ -619,7 +618,7 @@ /* Check if the bearer we want to create is already in the list */ ctx->bearer = mm_bearer_list_find_by_properties (list, bearer_properties); if (!ctx->bearer) { - mm_dbg ("Creating new bearer..."); + mm_obj_dbg (ctx->self, "creating new bearer..."); /* If we don't have enough space to create the bearer, try to remove * a disconnected bearer first. */ if (mm_bearer_list_get_max (list) == mm_bearer_list_get_count (list)) { @@ -637,13 +636,13 @@ if (!mm_bearer_list_delete_bearer (list, mm_base_bearer_get_path (foreach_ctx.found), &error)) { - mm_dbg ("Couldn't delete disconnected bearer at '%s': '%s'", - mm_base_bearer_get_path (foreach_ctx.found), - error->message); + mm_obj_dbg (ctx->self, "couldn't delete disconnected bearer at '%s': %s", + mm_base_bearer_get_path (foreach_ctx.found), + error->message); g_error_free (error); } else - mm_dbg ("Deleted disconnected bearer at '%s'", - mm_base_bearer_get_path (foreach_ctx.found)); + mm_obj_dbg (ctx->self, "deleted disconnected bearer at '%s'", + mm_base_bearer_get_path (foreach_ctx.found)); g_object_unref (foreach_ctx.found); } @@ -671,17 +670,16 @@ return; } - mm_dbg ("Using already existing bearer at '%s'...", - mm_base_bearer_get_path (ctx->bearer)); + mm_obj_dbg (ctx->self, "Using already existing bearer at '%s'...", + mm_base_bearer_get_path (ctx->bearer)); g_object_unref (list); g_object_unref (bearer_properties); - /* Fall down to next step */ ctx->step++; - } + } /* fall through */ case CONNECTION_STEP_CONNECT: - mm_info ("Simple connect state (%d/%d): Connect", - ctx->step, CONNECTION_STEP_LAST); + mm_obj_info (ctx->self, "simple connect state (%d/%d): connect", + ctx->step, CONNECTION_STEP_LAST); /* At this point, we can cleanup the cancellation point in the Simple interface, * because the bearer connection has its own cancellation setup. */ @@ -696,15 +694,15 @@ return; } - mm_dbg ("Bearer at '%s' is already connected...", - mm_base_bearer_get_path (ctx->bearer)); + mm_obj_dbg (ctx->self, "bearer at '%s' is already connected...", + mm_base_bearer_get_path (ctx->bearer)); - /* Fall down to next step */ ctx->step++; + /* fall through */ case CONNECTION_STEP_LAST: - mm_info ("Simple connect state (%d/%d): All done", - ctx->step, CONNECTION_STEP_LAST); + mm_obj_info (ctx->self, "simple connect state (%d/%d): all done", + ctx->step, CONNECTION_STEP_LAST); /* All done, yey! */ mm_gdbus_modem_simple_complete_connect ( ctx->skeleton, @@ -712,6 +710,9 @@ mm_base_bearer_get_path (ctx->bearer)); connection_context_free (ctx); return; + + default: + break; } g_assert_not_reached (); @@ -749,7 +750,7 @@ MM_IFACE_MODEM_STATE, ¤t, NULL); - mm_info ("Simple connect started..."); + mm_obj_info (self, "simple connect started..."); /* Log about all the parameters being used for the simple connect */ { @@ -759,33 +760,29 @@ #define VALIDATE_UNSPECIFIED(str) (str ? str : "unspecified") - mm_dbg (" PIN: %s", VALIDATE_UNSPECIFIED (mm_simple_connect_properties_get_pin (ctx->properties))); - - mm_dbg (" Operator ID: %s", VALIDATE_UNSPECIFIED (mm_simple_connect_properties_get_operator_id (ctx->properties))); - - mm_dbg (" Allowed roaming: %s", mm_simple_connect_properties_get_allow_roaming (ctx->properties) ? "yes" : "no"); - - mm_dbg (" APN: %s", VALIDATE_UNSPECIFIED (mm_simple_connect_properties_get_apn (ctx->properties))); + mm_obj_dbg (self, " PIN: %s", VALIDATE_UNSPECIFIED (mm_simple_connect_properties_get_pin (ctx->properties))); + mm_obj_dbg (self, " operator ID: %s", VALIDATE_UNSPECIFIED (mm_simple_connect_properties_get_operator_id (ctx->properties))); + mm_obj_dbg (self, " allowed roaming: %s", mm_simple_connect_properties_get_allow_roaming (ctx->properties) ? "yes" : "no"); + mm_obj_dbg (self, " APN: %s", VALIDATE_UNSPECIFIED (mm_simple_connect_properties_get_apn (ctx->properties))); ip_family = mm_simple_connect_properties_get_ip_type (ctx->properties); if (ip_family != MM_BEARER_IP_FAMILY_NONE) { str = mm_bearer_ip_family_build_string_from_mask (ip_family); - mm_dbg (" IP family: %s", str); + mm_obj_dbg (self, " IP family: %s", str); g_free (str); } else - mm_dbg (" IP family: %s", VALIDATE_UNSPECIFIED (NULL)); + mm_obj_dbg (self, " IP family: %s", VALIDATE_UNSPECIFIED (NULL)); allowed_auth = mm_simple_connect_properties_get_allowed_auth (ctx->properties); if (allowed_auth != MM_BEARER_ALLOWED_AUTH_UNKNOWN) { str = mm_bearer_allowed_auth_build_string_from_mask (allowed_auth); - mm_dbg (" Allowed authentication: %s", str); + mm_obj_dbg (self, " allowed authentication: %s", str); g_free (str); } else - mm_dbg (" Allowed authentication: %s", VALIDATE_UNSPECIFIED (NULL)); - - mm_dbg (" User: %s", VALIDATE_UNSPECIFIED (mm_simple_connect_properties_get_user (ctx->properties))); + mm_obj_dbg (self, " allowed authentication: %s", VALIDATE_UNSPECIFIED (NULL)); - mm_dbg (" Password: %s", VALIDATE_UNSPECIFIED (mm_simple_connect_properties_get_password (ctx->properties))); + mm_obj_dbg (self, " User: %s", VALIDATE_UNSPECIFIED (mm_simple_connect_properties_get_user (ctx->properties))); + mm_obj_dbg (self, " Password: %s", VALIDATE_UNSPECIFIED (mm_simple_connect_properties_get_password (ctx->properties))); #undef VALIDATE_UNSPECIFIED } @@ -823,6 +820,10 @@ case MM_MODEM_STATE_CONNECTED: ctx->step = CONNECTION_STEP_ENABLE + 1; break; + + default: + g_assert_not_reached (); + break; } connection_step (ctx); } @@ -841,7 +842,7 @@ ctx->self = g_object_ref (self); ctx->dictionary = g_variant_ref (dictionary); - mm_dbg ("User request to connect modem"); + mm_obj_dbg (self, "user request to connect modem"); mm_base_modem_authorize (MM_BASE_MODEM (self), invocation, @@ -1002,10 +1003,10 @@ * We will detect the '/' string and set the bearer path as NULL in the * context if so, and otherwise use the given input string as path */ if (g_strcmp0 (bearer_path, "/") != 0) { - mm_dbg ("User request to disconnect modem (bearer '%s')", bearer_path); + mm_obj_dbg (self, "user request to disconnect modem (bearer '%s')", bearer_path); ctx->bearer_path = g_strdup (bearer_path); } else - mm_dbg ("User request to disconnect modem (all bearers)"); + mm_obj_dbg (self, "user request to disconnect modem (all bearers)"); mm_base_modem_authorize (MM_BASE_MODEM (self), invocation, diff -Nru modemmanager-1.12.8/src/mm-iface-modem-simple.h modemmanager-1.16.6/src/mm-iface-modem-simple.h --- modemmanager-1.12.8/src/mm-iface-modem-simple.h 2016-03-24 18:25:04.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-simple.h 2021-06-06 21:40:59.000000000 +0800 @@ -34,6 +34,7 @@ }; GType mm_iface_modem_simple_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMIfaceModemSimple, g_object_unref) /* Initialize Modem Simple interface */ void mm_iface_modem_simple_initialize (MMIfaceModemSimple *self); diff -Nru modemmanager-1.12.8/src/mm-iface-modem-time.c modemmanager-1.16.6/src/mm-iface-modem-time.c --- modemmanager-1.12.8/src/mm-iface-modem-time.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-time.c 2021-06-06 21:40:59.000000000 +0800 @@ -19,7 +19,7 @@ #include "mm-iface-modem.h" #include "mm-iface-modem-time.h" -#include "mm-log.h" +#include "mm-log-object.h" #define SUPPORT_CHECKED_TAG "time-support-checked-tag" #define SUPPORTED_TAG "time-supported-tag" @@ -194,7 +194,7 @@ load_network_timezone_ready (MMIfaceModemTime *self, GAsyncResult *res) { - GError *error = NULL; + g_autoptr(GError) error = NULL; MMNetworkTimezone *tz; /* Finish the async operation */ @@ -202,8 +202,7 @@ if (!tz) { NetworkTimezoneContext *ctx; - mm_dbg ("Couldn't load network timezone: %s", error->message); - g_error_free (error); + mm_obj_dbg (self, "couldn't load network timezone: %s", error->message); /* Note: may be NULL if the polling has been removed while processing the async operation */ ctx = (NetworkTimezoneContext *) g_object_get_qdata (G_OBJECT (self), network_timezone_context_quark); @@ -216,7 +215,7 @@ /* If no more retries, we don't do anything else */ if (ctx->network_timezone_poll_retries == 0 || !g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_RETRY)) { - mm_warn ("Couldn't load network timezone from the current network"); + mm_obj_warn (self, "couldn't load network timezone from the current network"); return; } @@ -255,7 +254,7 @@ ctx = (NetworkTimezoneContext *) g_object_get_qdata (G_OBJECT (self), network_timezone_context_quark); - mm_dbg ("Network timezone polling started"); + mm_obj_dbg (self, "network timezone polling started"); ctx->network_timezone_poll_retries = NETWORK_TIMEZONE_POLL_RETRIES; ctx->network_timezone_poll_id = g_timeout_add_seconds (NETWORK_TIMEZONE_POLL_INTERVAL_SEC, (GSourceFunc)network_timezone_poll_cb, self); } @@ -268,7 +267,7 @@ ctx = (NetworkTimezoneContext *) g_object_get_qdata (G_OBJECT (self), network_timezone_context_quark); if (ctx->network_timezone_poll_id) { - mm_dbg ("Network timezone polling stopped"); + mm_obj_dbg (self, "network timezone polling stopped"); g_source_remove (ctx->network_timezone_poll_id); ctx->network_timezone_poll_id = 0; } @@ -322,7 +321,7 @@ /* If loading network timezone not supported, just finish here */ if (!MM_IFACE_MODEM_TIME_GET_INTERFACE (self)->load_network_timezone || !MM_IFACE_MODEM_TIME_GET_INTERFACE (self)->load_network_timezone_finish) { - mm_dbg ("Loading network timezone is not supported"); + mm_obj_dbg (self, "loading network timezone is not supported"); return; } @@ -480,14 +479,14 @@ switch (ctx->step) { case DISABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_CANCEL_NETWORK_TIMEZONE_UPDATE: /* Stop and cleanup context */ stop_network_timezone (self); - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_DISABLE_UNSOLICITED_EVENTS: /* Allow cleaning up unsolicited events */ @@ -499,8 +498,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_CLEANUP_UNSOLICITED_EVENTS: /* Allow cleaning up unsolicited events */ @@ -512,14 +511,17 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_LAST: /* We are done without errors! */ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -619,7 +621,7 @@ /* Not critical! */ if (!MM_IFACE_MODEM_TIME_GET_INTERFACE (self)->enable_unsolicited_events_finish (self, res, &error)) { - mm_dbg ("Couldn't enable unsolicited events: '%s'", error->message); + mm_obj_dbg (self, "couldn't enable unsolicited events: %s", error->message); g_error_free (error); } @@ -646,14 +648,14 @@ switch (ctx->step) { case ENABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_SETUP_NETWORK_TIMEZONE_RETRIEVAL: /* We start it and schedule it to run asynchronously */ start_network_timezone (self); - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_SETUP_UNSOLICITED_EVENTS: /* Allow setting up unsolicited events */ @@ -665,8 +667,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_ENABLE_UNSOLICITED_EVENTS: /* Allow setting up unsolicited events */ @@ -678,14 +680,17 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_LAST: /* We are done without errors! */ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -758,7 +763,7 @@ &error)) { if (error) { /* This error shouldn't be treated as critical */ - mm_dbg ("Time support check failed: '%s'", error->message); + mm_obj_dbg (self, "time support check failed: %s", error->message); g_error_free (error); } } else { @@ -799,8 +804,8 @@ supported_quark = (g_quark_from_static_string ( SUPPORTED_TAG)); - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_CHECK_SUPPORT: if (!GPOINTER_TO_UINT (g_object_get_qdata (G_OBJECT (self), @@ -826,8 +831,8 @@ /* If there is no implementation to check support, assume we DON'T * support it. */ } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_FAIL_IF_UNSUPPORTED: if (!GPOINTER_TO_UINT (g_object_get_qdata (G_OBJECT (self), @@ -839,8 +844,8 @@ g_object_unref (task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_LAST: /* We are done without errors! */ @@ -858,6 +863,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); diff -Nru modemmanager-1.12.8/src/mm-iface-modem-time.h modemmanager-1.16.6/src/mm-iface-modem-time.h --- modemmanager-1.12.8/src/mm-iface-modem-time.h 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-time.h 2021-06-06 21:40:59.000000000 +0800 @@ -94,6 +94,7 @@ }; GType mm_iface_modem_time_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMIfaceModemTime, g_object_unref) /* Initialize Time interface (async) */ void mm_iface_modem_time_initialize (MMIfaceModemTime *self, diff -Nru modemmanager-1.12.8/src/mm-iface-modem-voice.c modemmanager-1.16.6/src/mm-iface-modem-voice.c --- modemmanager-1.12.8/src/mm-iface-modem-voice.c 2020-03-14 16:37:06.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-voice.c 2021-06-06 21:40:59.000000000 +0800 @@ -21,7 +21,7 @@ #include "mm-iface-modem.h" #include "mm-iface-modem-voice.h" #include "mm-call-list.h" -#include "mm-log.h" +#include "mm-log-object.h" #define CALL_LIST_POLLING_CONTEXT_TAG "voice-call-list-polling-context-tag" #define IN_CALL_EVENT_CONTEXT_TAG "voice-in-call-event-context-tag" @@ -89,14 +89,14 @@ /* If we're not in emergency mode, the call (emergency or normal) is always allowed */ if (!emergency_only) { - mm_dbg ("voice call to %s allowed", number); + mm_obj_dbg (self, "voice call to %s allowed", number); call_allowed = TRUE; goto out; } for (i = 0; i < G_N_ELEMENTS (always_valid_emergency_numbers); i++) { if (g_strcmp0 (number, always_valid_emergency_numbers[i]) == 0) { - mm_dbg ("voice call to %s allowed: emergency call number always valid", number); + mm_obj_dbg (self, "voice call to %s allowed: emergency call number always valid", number); call_allowed = TRUE; goto out; } @@ -110,22 +110,22 @@ /* If no SIM available, some additional numbers may be valid emergency numbers */ for (i = 0; i < G_N_ELEMENTS (no_sim_valid_emergency_numbers); i++) { if (g_strcmp0 (number, no_sim_valid_emergency_numbers[i]) == 0) { - mm_dbg ("voice call to %s allowed: emergency call number valid when no SIM", number); + mm_obj_dbg (self, "voice call to %s allowed: emergency call number valid when no SIM", number); call_allowed = TRUE; goto out; } } - mm_dbg ("voice call to %s NOT allowed: not a valid emergency call number when no SIM", number); + mm_obj_dbg (self, "voice call to %s NOT allowed: not a valid emergency call number when no SIM", number); goto out; } /* Check if the number is programmed in EF_ECC */ if (mm_base_sim_is_emergency_number (sim, number)) { - mm_dbg ("voice call to %s allowed: emergency call number programmed in the SIM", number); + mm_obj_dbg (self, "voice call to %s allowed: emergency call number programmed in the SIM", number); call_allowed = TRUE; } else - mm_dbg ("voice call to %s NOT allowed: not a valid emergency call number programmed in the SIM", number); + mm_obj_dbg (self, "voice call to %s NOT allowed: not a valid emergency call number programmed in the SIM", number); out: @@ -188,8 +188,9 @@ /* Common helper to match call info against a known call object */ static gboolean -match_single_call_info (const MMCallInfo *call_info, - MMBaseCall *call) +match_single_call_info (MMIfaceModemVoice *self, + const MMCallInfo *call_info, + MMBaseCall *call) { MMCallState state; MMCallDirection direction; @@ -242,20 +243,20 @@ !match_terminated) return FALSE; - mm_dbg ("call info matched (matched direction/state %s, matched number %s" - ", matched index %s, matched terminated %s) with call at '%s'", - match_direction_and_state ? "yes" : "no", - match_number ? "yes" : "no", - match_index ? "yes" : "no", - match_terminated ? "yes" : "no", - mm_base_call_get_path (call)); + mm_obj_dbg (self, "call info matched (matched direction/state %s, matched number %s" + ", matched index %s, matched terminated %s) with call at '%s'", + match_direction_and_state ? "yes" : "no", + match_number ? "yes" : "no", + match_index ? "yes" : "no", + match_terminated ? "yes" : "no", + mm_base_call_get_path (call)); /* Early detect if a known incoming call that was created * from a plain CRING URC (i.e. without caller number) * needs to have the number provided. */ if (call_info->number && !number) { - mm_dbg (" number set: %s", call_info->number); + mm_obj_dbg (self, " number set: %s", call_info->number); mm_base_call_set_number (call, call_info->number); } @@ -263,20 +264,20 @@ * not have a known call index yet. */ if (call_info->index && !idx) { - mm_dbg (" index set: %u", call_info->index); + mm_obj_dbg (self, " index set: %u", call_info->index); mm_base_call_set_index (call, call_info->index); } /* Update state if it changed */ if (call_info->state != state) { - mm_dbg (" state updated: %s", mm_call_state_get_string (call_info->state)); + mm_obj_dbg (self, " state updated: %s", mm_call_state_get_string (call_info->state)); mm_base_call_change_state (call, call_info->state, MM_CALL_STATE_REASON_UNKNOWN); } /* refresh if incoming and new state is not terminated */ if ((call_info->state != MM_CALL_STATE_TERMINATED) && (direction == MM_CALL_DIRECTION_INCOMING)) { - mm_dbg (" incoming refreshed"); + mm_obj_dbg (self, " incoming refreshed"); mm_base_call_incoming_refresh (call); } @@ -286,7 +287,8 @@ /*****************************************************************************/ typedef struct { - const MMCallInfo *call_info; + MMIfaceModemVoice *self; + const MMCallInfo *call_info; } ReportCallForeachContext; static void @@ -302,7 +304,7 @@ return; /* Reset call info in context if the call info matches an existing call */ - if (match_single_call_info (ctx->call_info, call)) + if (match_single_call_info (ctx->self, ctx->call_info, call)) ctx->call_info = NULL; } @@ -322,22 +324,23 @@ g_assert (call_info->state != MM_CALL_STATE_UNKNOWN); /* Early debugging of the call state update */ - mm_dbg ("call at index %u: direction %s, state %s, number %s", - call_info->index, - mm_call_direction_get_string (call_info->direction), - mm_call_state_get_string (call_info->state), - call_info->number ? call_info->number : "n/a"); + mm_obj_dbg (self, "call at index %u: direction %s, state %s, number %s", + call_info->index, + mm_call_direction_get_string (call_info->direction), + mm_call_state_get_string (call_info->state), + call_info->number ? call_info->number : "n/a"); g_object_get (MM_BASE_MODEM (self), MM_IFACE_MODEM_VOICE_CALL_LIST, &list, NULL); if (!list) { - mm_warn ("Cannot process call state update: missing call list"); + mm_obj_warn (self, "cannot process call state update: missing call list"); return; } /* Iterate over all known calls and try to match a known one */ + ctx.self = self; ctx.call_info = call_info; mm_call_list_foreach (list, (MMCallListForeachFunc)report_call_foreach, &ctx); @@ -349,13 +352,13 @@ * reported a NEW incoming call. If that's not the case, we'll ignore the report. */ if ((call_info->direction != MM_CALL_DIRECTION_INCOMING) || ((call_info->state != MM_CALL_STATE_WAITING) && (call_info->state != MM_CALL_STATE_RINGING_IN))) { - mm_dbg ("unhandled call state update reported: direction: %s, state %s", - mm_call_direction_get_string (call_info->direction), - mm_call_state_get_string (call_info->state)); + mm_obj_dbg (self, "unhandled call state update reported: direction: %s, state %s", + mm_call_direction_get_string (call_info->direction), + mm_call_state_get_string (call_info->state)); goto out; } - mm_dbg ("Creating new incoming call..."); + mm_obj_dbg (self, "creating new incoming call..."); call = create_incoming_call (self, call_info->number); /* Set the state */ @@ -393,7 +396,8 @@ */ typedef struct { - GList *call_info_list; + MMIfaceModemVoice *self; + GList *call_info_list; } ReportAllCallsForeachContext; static void @@ -413,20 +417,20 @@ MMCallInfo *call_info = (MMCallInfo *)(l->data); /* if match found, delete item from list and halt iteration right away */ - if (match_single_call_info (call_info, call)) { + if (match_single_call_info (ctx->self, call_info, call)) { ctx->call_info_list = g_list_delete_link (ctx->call_info_list, l); return; } } /* not found in list! this call is now terminated */ - mm_dbg ("Call '%s' with direction %s, state %s, number '%s', index %u" - " not found in list, terminating", - mm_base_call_get_path (call), - mm_call_direction_get_string (mm_base_call_get_direction (call)), - mm_call_state_get_string (state), - mm_base_call_get_number (call), - mm_base_call_get_index (call)); + mm_obj_dbg (ctx->self, "call '%s' with direction %s, state %s, number '%s', index %u" + " not found in list, terminating", + mm_base_call_get_path (call), + mm_call_direction_get_string (mm_base_call_get_direction (call)), + mm_call_state_get_string (state), + mm_base_call_get_number (call), + mm_base_call_get_index (call)); mm_base_call_change_state (call, MM_CALL_STATE_TERMINATED, MM_CALL_STATE_REASON_UNKNOWN); } @@ -439,7 +443,7 @@ GList *l; /* Early debugging of the full list of calls */ - mm_dbg ("Reported %u ongoing calls", g_list_length (call_info_list)); + mm_obj_dbg (self, "reported %u ongoing calls", g_list_length (call_info_list)); for (l = call_info_list; l; l = g_list_next (l)) { MMCallInfo *call_info = (MMCallInfo *)(l->data); @@ -447,11 +451,11 @@ g_assert (call_info->index != 0); g_assert (call_info->state != MM_CALL_STATE_UNKNOWN); - mm_dbg ("call at index %u: direction %s, state %s, number %s", - call_info->index, - mm_call_direction_get_string (call_info->direction), - mm_call_state_get_string (call_info->state), - call_info->number ? call_info->number : "n/a"); + mm_obj_dbg (self, "call at index %u: direction %s, state %s, number %s", + call_info->index, + mm_call_direction_get_string (call_info->direction), + mm_call_state_get_string (call_info->state), + call_info->number ? call_info->number : "n/a"); } /* Retrieve list of known calls */ @@ -459,12 +463,13 @@ MM_IFACE_MODEM_VOICE_CALL_LIST, &list, NULL); if (!list) { - mm_warn ("Cannot report all calls: missing call list"); + mm_obj_warn (self, "cannot report all calls: missing call list"); return; } /* Iterate over all the calls already known to us. * Whenever a known call is updated, it will be removed from the call info list */ + ctx.self = self; ctx.call_info_list = g_list_copy (call_info_list); mm_call_list_foreach (list, (MMCallListForeachFunc)report_all_calls_foreach, &ctx); @@ -480,9 +485,9 @@ continue; if (call_info->direction == MM_CALL_DIRECTION_OUTGOING) { - mm_warn ("unexpected outgoing call to number '%s' reported in call list: state %s", - call_info->number ? call_info->number : "n/a", - mm_call_state_get_string (call_info->state)); + mm_obj_warn (self, "unexpected outgoing call to number '%s' reported in call list: state %s", + call_info->number ? call_info->number : "n/a", + mm_call_state_get_string (call_info->state)); continue; } @@ -492,13 +497,13 @@ /* We only expect either RINGING-IN or WAITING states */ if ((call_info->state != MM_CALL_STATE_RINGING_IN) && (call_info->state != MM_CALL_STATE_WAITING)) { - mm_warn ("unexpected incoming call to number '%s' reported in call list: state %s", - call_info->number ? call_info->number : "n/a", - mm_call_state_get_string (call_info->state)); + mm_obj_warn (self, "unexpected incoming call to number '%s' reported in call list: state %s", + call_info->number ? call_info->number : "n/a", + mm_call_state_get_string (call_info->state)); continue; } - mm_dbg ("Creating new incoming call..."); + mm_obj_dbg (self, "creating new incoming call..."); call = create_incoming_call (self, call_info->number); /* Set the state and the index */ @@ -515,9 +520,9 @@ continue; } - mm_warn ("unexpected call to number '%s' reported in call list: state %s, direction unknown", - call_info->number ? call_info->number : "n/a", - mm_call_state_get_string (call_info->state)); + mm_obj_warn (self, "unexpected call to number '%s' reported in call list: state %s, direction unknown", + call_info->number ? call_info->number : "n/a", + mm_call_state_get_string (call_info->state)); } g_list_free (ctx.call_info_list); g_object_unref (list); @@ -556,7 +561,7 @@ MM_IFACE_MODEM_VOICE_CALL_LIST, &list, NULL); if (!list) { - mm_warn ("Cannot report received DTMF: missing call list"); + mm_obj_warn (self, "cannot report received DTMF: missing call list"); return; } @@ -833,6 +838,11 @@ if (!ctx->next_call) ctx->next_call = g_object_ref (call); break; + case MM_CALL_STATE_UNKNOWN: + case MM_CALL_STATE_DIALING: + case MM_CALL_STATE_RINGING_IN: + case MM_CALL_STATE_RINGING_OUT: + case MM_CALL_STATE_TERMINATED: default: break; } @@ -961,6 +971,11 @@ if (!ctx->next_call) ctx->next_call = g_object_ref (call); break; + case MM_CALL_STATE_UNKNOWN: + case MM_CALL_STATE_DIALING: + case MM_CALL_STATE_RINGING_IN: + case MM_CALL_STATE_RINGING_OUT: + case MM_CALL_STATE_TERMINATED: default: break; } @@ -1102,6 +1117,8 @@ break; case MM_CALL_STATE_WAITING: case MM_CALL_STATE_HELD: + case MM_CALL_STATE_UNKNOWN: + case MM_CALL_STATE_TERMINATED: default: break; } @@ -1219,6 +1236,12 @@ case MM_CALL_STATE_HELD: ctx->calls = g_list_append (ctx->calls, g_object_ref (call)); break; + case MM_CALL_STATE_UNKNOWN: + case MM_CALL_STATE_DIALING: + case MM_CALL_STATE_WAITING: + case MM_CALL_STATE_RINGING_IN: + case MM_CALL_STATE_RINGING_OUT: + case MM_CALL_STATE_TERMINATED: default: break; } @@ -1491,6 +1514,12 @@ case MM_CALL_STATE_HELD: ctx->other_calls = g_list_append (ctx->other_calls, g_object_ref (call)); break; + case MM_CALL_STATE_UNKNOWN: + case MM_CALL_STATE_DIALING: + case MM_CALL_STATE_WAITING: + case MM_CALL_STATE_RINGING_IN: + case MM_CALL_STATE_RINGING_OUT: + case MM_CALL_STATE_TERMINATED: default: break; } @@ -1635,6 +1664,12 @@ case MM_CALL_STATE_HELD: ctx->all_calls = g_list_append (ctx->all_calls, g_object_ref (call)); break; + case MM_CALL_STATE_UNKNOWN: + case MM_CALL_STATE_DIALING: + case MM_CALL_STATE_RINGING_IN: + case MM_CALL_STATE_RINGING_OUT: + case MM_CALL_STATE_WAITING: + case MM_CALL_STATE_TERMINATED: default: break; } @@ -1809,7 +1844,7 @@ &ctx->audio_port, &ctx->audio_format, &error)) { - mm_warn ("Couldn't setup in-call audio channel: %s", error->message); + mm_obj_warn (self, "couldn't setup in-call audio channel: %s", error->message); g_clear_error (&error); } @@ -1828,7 +1863,7 @@ ctx = g_task_get_task_data (task); if (!MM_IFACE_MODEM_VOICE_GET_INTERFACE (self)->setup_in_call_unsolicited_events_finish (self, res, &error)) { - mm_warn ("Couldn't setup in-call unsolicited events: %s", error->message); + mm_obj_warn (self, "couldn't setup in-call unsolicited events: %s", error->message); g_clear_error (&error); } @@ -1861,7 +1896,7 @@ self, (GAsyncReadyCallback) setup_in_call_unsolicited_events_ready, task); - break; + return; } ctx->step++; /* fall-through */ @@ -1872,7 +1907,7 @@ self, (GAsyncReadyCallback) setup_in_call_audio_channel_ready, task); - break; + return; } ctx->step++; /* fall-through */ @@ -1880,7 +1915,12 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } + + g_assert_not_reached (); } static void @@ -1939,7 +1979,7 @@ ctx = g_task_get_task_data (task); if (!MM_IFACE_MODEM_VOICE_GET_INTERFACE (self)->cleanup_in_call_unsolicited_events_finish (self, res, &error)) { - mm_warn ("Couldn't cleanup in-call unsolicited events: %s", error->message); + mm_obj_warn (self, "couldn't cleanup in-call unsolicited events: %s", error->message); g_clear_error (&error); } @@ -1958,7 +1998,7 @@ ctx = g_task_get_task_data (task); if (!MM_IFACE_MODEM_VOICE_GET_INTERFACE (self)->cleanup_in_call_audio_channel_finish (self, res, &error)) { - mm_warn ("Couldn't cleanup in-call audio channel: %s", error->message); + mm_obj_warn (self, "couldn't cleanup in-call audio channel: %s", error->message); g_clear_error (&error); } @@ -1991,7 +2031,7 @@ self, (GAsyncReadyCallback) cleanup_in_call_audio_channel_ready, task); - break; + return; } ctx->step++; /* fall-through */ @@ -2002,7 +2042,7 @@ self, (GAsyncReadyCallback) cleanup_in_call_unsolicited_events_ready, task); - break; + return; } ctx->step++; /* fall-through */ @@ -2010,7 +2050,12 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } + + g_assert_not_reached (); } static void @@ -2114,7 +2159,7 @@ MM_IFACE_MODEM_VOICE_CALL_LIST, &list, NULL); if (!list) { - mm_warn ("Cannot update audio settings in active calls: missing internal call list"); + mm_obj_warn (self, "cannot update audio settings in active calls: missing internal call list"); return; } @@ -2150,6 +2195,8 @@ /* NOTE: ringing-in and waiting calls are NOT yet in-call, e.g. there must * be no audio settings enabled and we must not enable in-call URC handling * yet. */ + case MM_CALL_STATE_UNKNOWN: + case MM_CALL_STATE_TERMINATED: default: break; } @@ -2167,10 +2214,10 @@ if (!in_call_cleanup_finish (self, res, &error)) { /* ignore cancelled operations */ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) - mm_warn ("Cannot cleanup in-call modem state: %s", error->message); + mm_obj_warn (self, "cannot cleanup in-call modem state: %s", error->message); g_clear_error (&error); } else { - mm_dbg ("modem is no longer in-call state"); + mm_obj_dbg (self, "modem is no longer in-call state"); ctx->in_call_state = FALSE; g_clear_object (&ctx->audio_port); g_clear_object (&ctx->audio_format); @@ -2191,10 +2238,10 @@ if (!in_call_setup_finish (self, res, &ctx->audio_port, &ctx->audio_format, &error)) { /* ignore cancelled operations */ if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) - mm_warn ("Cannot setup in-call modem state: %s", error->message); + mm_obj_warn (self, "cannot setup in-call modem state: %s", error->message); g_clear_error (&error); } else { - mm_dbg ("modem is now in-call state"); + mm_obj_dbg (self, "modem is now in-call state"); ctx->in_call_state = TRUE; update_audio_settings_in_ongoing_calls (self); } @@ -2216,7 +2263,7 @@ MM_IFACE_MODEM_VOICE_CALL_LIST, &list, NULL); if (!list) { - mm_warn ("Cannot update in-call state: missing internal call list"); + mm_obj_warn (self, "cannot update in-call state: missing internal call list"); goto out; } @@ -2235,7 +2282,7 @@ } /* run setup */ - mm_dbg ("Setting up in-call state..."); + mm_obj_dbg (self, "setting up in-call state..."); ctx->setup_cancellable = g_cancellable_new (); in_call_setup (self, ctx->setup_cancellable, (GAsyncReadyCallback) in_call_setup_ready, NULL); goto out; @@ -2254,7 +2301,7 @@ } /* run cleanup */ - mm_dbg ("Cleaning up in-call state..."); + mm_obj_dbg (self, "cleaning up in-call state..."); ctx->cleanup_cancellable = g_cancellable_new (); in_call_cleanup (self, ctx->cleanup_cancellable, (GAsyncReadyCallback) in_call_cleanup_ready, NULL); goto out; @@ -2364,7 +2411,7 @@ g_assert (MM_IFACE_MODEM_VOICE_GET_INTERFACE (self)->load_call_list_finish); if (!MM_IFACE_MODEM_VOICE_GET_INTERFACE (self)->load_call_list_finish (self, res, &call_info_list, &error)) { - mm_warn ("couldn't load call list: %s", error->message); + mm_obj_warn (self, "couldn't load call list: %s", error->message); g_error_free (error); } else { /* Always report the list even if NULL (it would mean no ongoing calls) */ @@ -2372,11 +2419,13 @@ mm_3gpp_call_info_list_free (call_info_list); } - /* setup the polling again */ - g_assert (!ctx->polling_id); - ctx->polling_id = g_timeout_add_seconds (CALL_LIST_POLLING_TIMEOUT_SECS, - (GSourceFunc) call_list_poll, - self); + /* setup the polling again, but only if it hasn't been done already while + * we reported calls (e.g. a new incoming call may have been detected that + * also triggers the poll setup) */ + if (!ctx->polling_id) + ctx->polling_id = g_timeout_add_seconds (CALL_LIST_POLLING_TIMEOUT_SECS, + (GSourceFunc) call_list_poll, + self); } static void @@ -2393,6 +2442,9 @@ case MM_CALL_STATE_WAITING: *n_calls_establishing = *n_calls_establishing + 1; break; + case MM_CALL_STATE_ACTIVE: + case MM_CALL_STATE_TERMINATED: + case MM_CALL_STATE_UNKNOWN: default: break; } @@ -2413,7 +2465,7 @@ NULL); if (!list) { - mm_warn ("Cannot poll call list: missing internal call list"); + mm_obj_warn (self, "Cannot poll call list: missing internal call list"); goto out; } @@ -2421,14 +2473,14 @@ /* If there is at least ONE call being established, we need the call list */ if (n_calls_establishing > 0) { - mm_dbg ("%u calls being established: call list polling required", n_calls_establishing); + mm_obj_dbg (self, "%u calls being established: call list polling required", n_calls_establishing); ctx->polling_ongoing = TRUE; g_assert (MM_IFACE_MODEM_VOICE_GET_INTERFACE (self)->load_call_list); MM_IFACE_MODEM_VOICE_GET_INTERFACE (self)->load_call_list (self, (GAsyncReadyCallback)load_call_list_ready, NULL); } else - mm_dbg ("no calls being established: call list polling stopped"); + mm_obj_dbg (self, "no calls being established: call list polling stopped"); out: g_clear_object (&list); @@ -2470,7 +2522,6 @@ const gchar *call_path, MmGdbusModemVoice *skeleton) { - mm_dbg ("Added call at '%s'", call_path); update_call_list (skeleton, list); mm_gdbus_modem_voice_emit_call_added (skeleton, call_path); } @@ -2480,7 +2531,6 @@ const gchar *call_path, MmGdbusModemVoice *skeleton) { - mm_dbg ("Deleted call at '%s'", call_path); update_call_list (skeleton, list); mm_gdbus_modem_voice_emit_call_deleted (skeleton, call_path); } @@ -2571,8 +2621,8 @@ switch (ctx->step) { case DISABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_DISABLE_UNSOLICITED_EVENTS: /* Allow cleaning up unsolicited events */ @@ -2584,8 +2634,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_CLEANUP_UNSOLICITED_EVENTS: /* Allow cleaning up unsolicited events */ @@ -2597,14 +2647,17 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case DISABLING_STEP_LAST: /* We are done without errors! */ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -2704,7 +2757,7 @@ /* Not critical! */ if (!MM_IFACE_MODEM_VOICE_GET_INTERFACE (self)->enable_unsolicited_events_finish (self, res, &error)) { - mm_dbg ("Couldn't enable unsolicited events: '%s'", error->message); + mm_obj_dbg (self, "couldn't enable unsolicited events: %s", error->message); g_error_free (error); } @@ -2731,8 +2784,8 @@ switch (ctx->step) { case ENABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_SETUP_UNSOLICITED_EVENTS: /* Allow setting up unsolicited events to get notified of incoming calls */ @@ -2744,8 +2797,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_ENABLE_UNSOLICITED_EVENTS: /* Allow setting up unsolicited events to get notified of incoming calls */ @@ -2757,14 +2810,17 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall through */ case ENABLING_STEP_LAST: /* We are done without errors! */ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -2834,7 +2890,7 @@ if (!MM_IFACE_MODEM_VOICE_GET_INTERFACE (self)->check_support_finish (self, res, &error)) { if (error) { - mm_dbg ("Voice support check failed: '%s'", error->message); + mm_obj_dbg (self, "voice support check failed: %s", error->message); g_error_free (error); } g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, "Voice not supported"); @@ -2865,8 +2921,8 @@ switch (ctx->step) { case INITIALIZATION_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall through */ case INITIALIZATION_STEP_CHECK_SUPPORT: /* Always check voice support when we run initialization, because @@ -2930,7 +2986,7 @@ MM_IFACE_MODEM_VOICE_PERIODIC_CALL_LIST_CHECK_DISABLED, &periodic_call_list_check_disabled, NULL); if (!periodic_call_list_check_disabled) { - mm_dbg ("periodic call list polling will be used if supported"); + mm_obj_dbg (self, "periodic call list polling will be used if supported"); g_signal_connect (list, MM_CALL_ADDED, G_CALLBACK (setup_call_list_polling), @@ -2939,9 +2995,8 @@ } g_object_unref (list); - /* Fall down to next step */ ctx->step++; - } + } /* fall through */ case INITIALIZATION_STEP_LAST: /* Setup all method handlers */ @@ -2964,6 +3019,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); diff -Nru modemmanager-1.12.8/src/mm-iface-modem-voice.h modemmanager-1.16.6/src/mm-iface-modem-voice.h --- modemmanager-1.12.8/src/mm-iface-modem-voice.h 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem-voice.h 2021-06-06 21:40:59.000000000 +0800 @@ -196,6 +196,7 @@ }; GType mm_iface_modem_voice_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMIfaceModemVoice, g_object_unref) /* Initialize Voice interface (async) */ void mm_iface_modem_voice_initialize (MMIfaceModemVoice *self, diff -Nru modemmanager-1.12.8/src/mm-iface-modem.c modemmanager-1.16.6/src/mm-iface-modem.c --- modemmanager-1.12.8/src/mm-iface-modem.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem.c 2021-06-06 21:40:59.000000000 +0800 @@ -13,7 +13,6 @@ * Copyright (C) 2011 Google, Inc. */ - #include #define _LIBMM_INSIDE_MM #include @@ -26,8 +25,15 @@ #include "mm-base-modem-at.h" #include "mm-base-sim.h" #include "mm-bearer-list.h" -#include "mm-log.h" +#include "mm-private-boxed-types.h" +#include "mm-log-object.h" #include "mm-context.h" +#if defined WITH_QMI +# include "mm-broadband-modem-qmi.h" +#endif +#if defined WITH_MBIM +# include "mm-broadband-modem-mbim.h" +#endif #define SIGNAL_QUALITY_RECENT_TIMEOUT_SEC 60 @@ -47,6 +53,89 @@ /*****************************************************************************/ +gboolean +mm_iface_modem_check_for_sim_swap_finish (MMIfaceModem *self, + GAsyncResult *res, + GError **error) +{ + return g_task_propagate_boolean (G_TASK (res), error); +} + +static void +explicit_check_for_sim_swap_ready (MMIfaceModem *self, + GAsyncResult *res, + GTask *task) +{ + GError *error = NULL; + + if (!MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap_finish (self, res, &error)) { + mm_obj_warn (self, "SIM swap check failed: %s", error->message); + g_task_return_error (task, error); + } else { + mm_obj_dbg (self, "SIM swap check completed"); + g_task_return_boolean (task, TRUE); + } + g_object_unref (task); +} + +void +mm_iface_modem_check_for_sim_swap (MMIfaceModem *self, + guint slot_index, + const gchar *iccid, + GAsyncReadyCallback callback, + gpointer user_data) +{ + GTask *task; + + task = g_task_new (self, NULL, callback, user_data); + + /* Slot index 0 is used when slot is not known, assumingly on a modem with just one SIM slot */ + if (slot_index != 0) { + MmGdbusModem *skeleton; + guint primary_slot; + + g_object_get (self, + MM_IFACE_MODEM_DBUS_SKELETON, &skeleton, + NULL); + + if (!skeleton) { + g_task_return_new_error (task, + MM_CORE_ERROR, + MM_CORE_ERROR_FAILED, + "Couldn't get interface skeleton"); + g_object_unref (task); + return; + } + + primary_slot = mm_gdbus_modem_get_primary_sim_slot (MM_GDBUS_MODEM (skeleton)); + g_object_unref (skeleton); + + /* Check that it's really the primary slot whose iccid has changed */ + if (primary_slot && primary_slot != slot_index) { + mm_obj_dbg (self, "checking for SIM swap ignored: status changed in slot %u, but primary is %u", slot_index, primary_slot); + g_task_return_boolean (task, TRUE); + g_object_unref (task); + return; + } + } + + if (MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap && + MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap_finish) { + mm_obj_dbg (self, "start checking for SIM swap in slot %u", slot_index); + MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap ( + self, + iccid, + (GAsyncReadyCallback)explicit_check_for_sim_swap_ready, + task); + return; + } + + g_task_return_boolean (task, FALSE); + g_object_unref (task); +} + +/*****************************************************************************/ + void mm_iface_modem_bind_simple_status (MMIfaceModem *self, MMSimpleStatus *status) @@ -310,7 +399,7 @@ lock = MM_IFACE_MODEM_GET_INTERFACE (self)->load_unlock_required_finish (self, res, &error); if (error) { - mm_dbg ("Couldn't check if unlock required: '%s'", error->message); + mm_obj_dbg (self, "couldn't check if unlock required: %s", error->message); /* For several kinds of errors, just return them directly */ if (error->domain == MM_SERIAL_ERROR || @@ -334,7 +423,7 @@ /* For the remaining ones, retry if possible */ if (ctx->retries < MAX_RETRIES) { ctx->retries++; - mm_dbg ("Retrying (%u) unlock required check", ctx->retries); + mm_obj_dbg (self, "retrying (%u) unlock required check", ctx->retries); g_assert (ctx->pin_check_timeout_id == 0); ctx->pin_check_timeout_id = g_timeout_add_seconds (2, @@ -422,6 +511,7 @@ g_strfreev (paths); g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (skeleton)); + g_object_unref (skeleton); } /*****************************************************************************/ @@ -493,6 +583,8 @@ case MM_BEARER_STATUS_DISCONNECTED: new_state = get_consolidated_subsystem_state (self); break; + default: + g_assert_not_reached (); } mm_iface_modem_update_state (self, @@ -749,11 +841,6 @@ return; } - if (abort_invocation_if_state_not_reached (ctx->self, ctx->invocation, MM_MODEM_STATE_LOCKED)) { - handle_command_context_free (ctx); - return; - } - #if ! defined WITH_AT_COMMAND_VIA_DBUS /* If we are not in Debug mode, report an error */ if (!mm_context_get_debug ()) { @@ -960,6 +1047,117 @@ /*****************************************************************************/ +typedef struct { + MmGdbusModem *skeleton; + GDBusMethodInvocation *invocation; + MMIfaceModem *self; + guint requested_sim_slot; +} HandleSetPrimarySimSlotContext; + +static void +handle_set_primary_sim_slot_context_free (HandleSetPrimarySimSlotContext *ctx) +{ + g_clear_object (&ctx->skeleton); + g_clear_object (&ctx->invocation); + g_clear_object (&ctx->self); + g_free (ctx); +} + +static void +set_primary_sim_slot_ready (MMIfaceModem *self, + GAsyncResult *res, + HandleSetPrimarySimSlotContext *ctx) +{ + g_autoptr(GError) error = NULL; + + if (!MM_IFACE_MODEM_GET_INTERFACE (self)->set_primary_sim_slot_finish (self, res, &error)) { + /* If the implementation returns EXISTS, we're already in the requested SIM slot, + * so we can safely return a success on the operation and skip the reprobing */ + if (!g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_EXISTS)) { + mm_obj_warn (self, "couldn't process primary SIM update request: %s", error->message); + g_dbus_method_invocation_take_error (ctx->invocation, g_steal_pointer (&error)); + handle_set_primary_sim_slot_context_free (ctx); + return; + } + mm_obj_dbg (self, "ignoring SIM update request: %s", error->message); + } else { + /* Notify about the SIM swap, which will disable and reprobe the device. + * There is no need to update the PrimarySimSlot property, as this value will be + * reloaded automatically during the reprobe. */ + mm_base_modem_process_sim_event (MM_BASE_MODEM (self)); + } + + mm_gdbus_modem_complete_set_primary_sim_slot (ctx->skeleton, ctx->invocation); + handle_set_primary_sim_slot_context_free (ctx); +} + +static void +handle_set_primary_sim_slot_auth_ready (MMBaseModem *self, + GAsyncResult *res, + HandleSetPrimarySimSlotContext *ctx) +{ + GError *error = NULL; + const gchar *const *sim_slot_paths; + + if (!mm_base_modem_authorize_finish (self, res, &error)) { + g_dbus_method_invocation_take_error (ctx->invocation, error); + handle_set_primary_sim_slot_context_free (ctx); + return; + } + + /* If SIM switching is not implemented, report an error */ + if (!MM_IFACE_MODEM_GET_INTERFACE (self)->set_primary_sim_slot || + !MM_IFACE_MODEM_GET_INTERFACE (self)->set_primary_sim_slot_finish) { + g_dbus_method_invocation_return_error (ctx->invocation, + MM_CORE_ERROR, + MM_CORE_ERROR_UNSUPPORTED, + "Cannot switch sim: " + "operation not supported"); + handle_set_primary_sim_slot_context_free (ctx); + return; + } + + /* Validate SIM slot number */ + sim_slot_paths = mm_gdbus_modem_get_sim_slots (ctx->skeleton); + if (ctx->requested_sim_slot > g_strv_length ((gchar **)sim_slot_paths)) { + g_dbus_method_invocation_return_error (ctx->invocation, + MM_CORE_ERROR, + MM_CORE_ERROR_INVALID_ARGS, + "Cannot switch sim: requested SIM slot number is out of bounds"); + handle_set_primary_sim_slot_context_free (ctx); + return; + } + + MM_IFACE_MODEM_GET_INTERFACE (self)->set_primary_sim_slot (MM_IFACE_MODEM (self), + ctx->requested_sim_slot, + (GAsyncReadyCallback)set_primary_sim_slot_ready, + ctx); +} + +static gboolean +handle_set_primary_sim_slot (MmGdbusModem *skeleton, + GDBusMethodInvocation *invocation, + guint sim_slot, + MMIfaceModem *self) +{ + HandleSetPrimarySimSlotContext *ctx; + + ctx = g_new0 (HandleSetPrimarySimSlotContext, 1); + ctx->skeleton = g_object_ref (skeleton); + ctx->invocation = g_object_ref (invocation); + ctx->self = g_object_ref (self); + ctx->requested_sim_slot = sim_slot; + + mm_base_modem_authorize (MM_BASE_MODEM (self), + invocation, + MM_AUTHORIZATION_DEVICE_CONTROL, + (GAsyncReadyCallback)handle_set_primary_sim_slot_auth_ready, + ctx); + return TRUE; +} + +/*****************************************************************************/ + void mm_iface_modem_update_access_technologies (MMIfaceModem *self, MMModemAccessTechnology new_access_tech, @@ -993,10 +1191,9 @@ /* Log */ old_access_tech_string = mm_modem_access_technology_build_string_from_mask (old_access_tech); new_access_tech_string = mm_modem_access_technology_build_string_from_mask (built_access_tech); - mm_dbg ("Modem %s: access technology changed (%s -> %s)", - g_dbus_object_get_object_path (G_DBUS_OBJECT (self)), - old_access_tech_string, - new_access_tech_string); + mm_obj_dbg (self, "access technology changed (%s -> %s)", + old_access_tech_string, + new_access_tech_string); g_free (old_access_tech_string); g_free (new_access_tech_string); } @@ -1041,9 +1238,8 @@ /* If value is already not recent, we're done */ if (recent) { - mm_dbg ("Signal quality value not updated in %us, " - "marking as not being recent", - SIGNAL_QUALITY_RECENT_TIMEOUT_SEC); + mm_obj_dbg (self, "signal quality value not updated in %us, marking as not being recent", + SIGNAL_QUALITY_RECENT_TIMEOUT_SEC); mm_gdbus_modem_set_signal_quality (skeleton, g_variant_new ("(ub)", signal_quality, @@ -1066,7 +1262,6 @@ { SignalQualityUpdateContext *ctx; MmGdbusModem *skeleton = NULL; - const gchar *dbus_path; g_object_get (self, MM_IFACE_MODEM_DBUS_SKELETON, &skeleton, @@ -1101,10 +1296,7 @@ signal_quality, expire)); - dbus_path = g_dbus_object_get_object_path (G_DBUS_OBJECT (self)); - mm_dbg ("Modem %s: signal quality updated (%u)", - dbus_path, - signal_quality); + mm_obj_dbg (self, "signal quality updated (%u)", signal_quality); /* Remove any previous expiration refresh timeout */ if (ctx->recent_timeout_source) { @@ -1236,12 +1428,12 @@ &error)) { /* Did the plugin report that polling access technology is unsupported? */ if (g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED)) { - mm_dbg ("Polling to refresh access technologies is unsupported"); + mm_obj_dbg (self, "polling to refresh access technologies is unsupported"); ctx->access_technology_polling_supported = FALSE; } /* Ignore logging any message if the error is in 'in-progress' */ else if (!g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_IN_PROGRESS)) - mm_dbg ("Couldn't refresh access technologies: '%s'", error->message); + mm_obj_dbg (self, "couldn't refresh access technologies: %s", error->message); g_error_free (error); } /* We may have been disabled while this command was running. */ @@ -1266,12 +1458,12 @@ if (error) { /* Did the plugin report that polling signal quality is unsupported? */ if (g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED)) { - mm_dbg ("Polling to refresh signal quality is unsupported"); + mm_obj_dbg (self, "polling to refresh signal quality is unsupported"); ctx->signal_quality_polling_supported = FALSE; } /* Ignore logging any message if the error is in 'in-progress' */ else if (!g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_IN_PROGRESS)) - mm_dbg ("Couldn't refresh signal quality: '%s'", error->message); + mm_obj_dbg (self, "couldn't refresh signal quality: %s", error->message); g_error_free (error); } /* We may have been disabled while this command was running. */ @@ -1295,8 +1487,8 @@ g_assert_not_reached (); case SIGNAL_CHECK_STEP_FIRST: - /* Fall down to next step */ ctx->running_step++; + /* fall-through */ case SIGNAL_CHECK_STEP_SIGNAL_QUALITY: if (ctx->enabled && ctx->signal_quality_polling_supported && @@ -1305,8 +1497,8 @@ self, (GAsyncReadyCallback)signal_quality_check_ready, NULL); return; } - /* Fall down to next step */ ctx->running_step++; + /* fall-through */ case SIGNAL_CHECK_STEP_ACCESS_TECHNOLOGIES: if (ctx->enabled && ctx->access_technology_polling_supported && @@ -1315,8 +1507,8 @@ self, (GAsyncReadyCallback)access_technologies_check_ready, NULL); return; } - /* Fall down to next step */ ctx->running_step++; + /* fall-through */ case SIGNAL_CHECK_STEP_LAST: /* Flag as sequence finished */ @@ -1325,7 +1517,7 @@ /* If we have been disabled while we were running the steps, we don't * do anything else. */ if (!ctx->enabled) { - mm_dbg ("Periodic signal quality and access technology checks not rescheduled: disabled"); + mm_obj_dbg (self, "periodic signal quality and access technology checks not rescheduled: disabled"); return; } @@ -1356,17 +1548,20 @@ if (ctx->initial_check_done && (!ctx->signal_quality_polling_supported || ctx->signal_quality_polling_disabled) && (!ctx->access_technology_polling_supported || ctx->access_technology_polling_disabled)) { - mm_dbg ("Periodic signal quality and access technology checks not rescheduled: unneeded or unsupported"); + mm_obj_dbg (self, "periodic signal quality and access technology checks not rescheduled: unneeded or unsupported"); periodic_signal_check_disable (self, FALSE); return; } - mm_dbg ("Periodic signal quality and access technology checks scheduled"); + mm_obj_dbg (self, "periodic signal quality and access technology checks scheduled"); g_assert (!ctx->timeout_source); ctx->timeout_source = g_timeout_add_seconds (ctx->initial_check_done ? SIGNAL_CHECK_TIMEOUT_SEC : SIGNAL_CHECK_INITIAL_TIMEOUT_SEC, (GSourceFunc) periodic_signal_check_cb, self); return; + + default: + g_assert_not_reached (); } } @@ -1399,17 +1594,17 @@ /* Don't refresh polling if we're not enabled */ ctx = get_signal_check_context (self); if (!ctx->enabled) { - mm_dbg ("Periodic signal check refresh ignored: checks not enabled"); + mm_obj_dbg (self, "periodic signal check refresh ignored: checks not enabled"); return; } /* Don't refresh if we're already doing it */ if (ctx->running_step != SIGNAL_CHECK_STEP_NONE) { - mm_dbg ("Periodic signal check refresh ignored: check already running"); + mm_obj_dbg (self, "periodic signal check refresh ignored: check already running"); return; } - mm_dbg ("Periodic signal check refresh requested"); + mm_obj_dbg (self, "periodic signal check refresh requested"); /* Remove the scheduled timeout as we're going to refresh * right away */ @@ -1452,7 +1647,7 @@ } ctx->enabled = FALSE; - mm_dbg ("Periodic signal checks disabled"); + mm_obj_dbg (self, "periodic signal checks disabled"); } static void @@ -1465,13 +1660,13 @@ /* If polling access technology and signal quality not supported, don't even * bother trying. */ if (!ctx->signal_quality_polling_supported && !ctx->access_technology_polling_supported) { - mm_dbg ("Not enabling periodic signal checks: unsupported"); + mm_obj_dbg (self, "not enabling periodic signal checks: unsupported"); return; } /* Log and flag as enabled */ if (!ctx->enabled) { - mm_dbg ("Periodic signal checks enabled"); + mm_obj_dbg (self, "periodic signal checks enabled"); ctx->enabled = TRUE; } @@ -1515,7 +1710,8 @@ /* While connected we don't want registration status changes to change * the modem's state away from CONNECTED. */ - if ((new_state == MM_MODEM_STATE_SEARCHING || + if ((new_state == MM_MODEM_STATE_ENABLED || + new_state == MM_MODEM_STATE_SEARCHING || new_state == MM_MODEM_STATE_REGISTERED) && bearer_list && old_state > MM_MODEM_STATE_REGISTERED) { @@ -1535,14 +1731,9 @@ /* Update state only if different */ if (new_state != old_state) { - const gchar *dbus_path; - - dbus_path = g_dbus_object_get_object_path (G_DBUS_OBJECT (self)); - mm_info ("Modem%s%s: state changed (%s -> %s)", - dbus_path ? " " : "", - dbus_path ? dbus_path : "", - mm_modem_state_get_string (old_state), - mm_modem_state_get_string (new_state)); + mm_obj_info (self, "state changed (%s -> %s)", + mm_modem_state_get_string (old_state), + mm_modem_state_get_string (new_state)); /* The property in the interface is bound to the property * in the skeleton, so just updating here is enough */ @@ -1707,8 +1898,7 @@ if (i == subsystem_states->len) { SubsystemState s; - mm_dbg ("Will start keeping track of state for subsystem '%s'", - subsystem); + mm_obj_dbg (self, "will start keeping track of state for subsystem '%s'", subsystem); s.subsystem = g_strdup (subsystem); s.state = subsystem_state; g_array_append_val (subsystem_states, s); @@ -2233,7 +2423,7 @@ } capabilities_string = mm_modem_capability_build_string_from_mask (ctx->capabilities); - mm_dbg ("Setting new list of capabilities: '%s'", capabilities_string); + mm_obj_dbg (self, "setting new list of capabilities: %s", capabilities_string); g_free (capabilities_string); MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_capabilities ( @@ -2337,14 +2527,14 @@ if (!current_bands) { /* If we can retry, do it */ if (ctx->retries > 0) { - mm_dbg ("couldn't load current bands: '%s' (will retry)", error->message); + mm_obj_dbg (self, "couldn't load current bands: %s (will retry)", error->message); g_clear_error (&error); set_current_bands_reload_schedule (task); goto out; } /* Errors when reloading bands won't be critical */ - mm_warn ("couldn't load current bands: '%s'", error->message); + mm_obj_warn (self, "couldn't load current bands: %s", error->message); g_clear_error (&error); set_current_bands_complete_with_defaults (task); goto out; @@ -2362,13 +2552,13 @@ /* If we can retry, do it */ if (ctx->retries > 0) { - mm_dbg ("reloaded current bands different to the requested ones (will retry)"); + mm_obj_dbg (self, "reloaded current bands different to the requested ones (will retry)"); set_current_bands_reload_schedule (task); goto out; } - requested_str = mm_common_build_bands_string ((MMModemBand *)requested_bands->data, requested_bands->len); - current_str = mm_common_build_bands_string ((MMModemBand *)current_bands->data, current_bands->len); + requested_str = mm_common_build_bands_string ((const MMModemBand *)(gconstpointer)requested_bands->data, requested_bands->len); + current_str = mm_common_build_bands_string ((const MMModemBand *)(gconstpointer)current_bands->data, current_bands->len); error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "reloaded current bands (%s) different to the requested ones (%s)", current_str, requested_str); @@ -2483,7 +2673,7 @@ gchar *supported_bands_str; supported_bands_str = (mm_common_build_bands_string ( - (const MMModemBand *)supported_bands_array->data, + (const MMModemBand *)(gconstpointer)supported_bands_array->data, supported_bands_array->len)); g_set_error (error, MM_CORE_ERROR, @@ -2544,8 +2734,7 @@ return; } - bands_string = mm_common_build_bands_string ((MMModemBand *)bands_array->data, - bands_array->len); + bands_string = mm_common_build_bands_string ((const MMModemBand *)(gpointer)bands_array->data, bands_array->len); /* Get list of supported bands */ ctx->supported_bands_array = (mm_common_bands_variant_to_garray ( @@ -2580,8 +2769,7 @@ current_bands_array = (mm_common_bands_variant_to_garray ( mm_gdbus_modem_get_current_bands (ctx->skeleton))); if (mm_common_bands_garray_cmp (ctx->bands_array, current_bands_array)) { - mm_dbg ("Requested list of bands (%s) is equal to the current ones, skipping re-set", - bands_string); + mm_obj_dbg (self, "requested list of bands (%s) is equal to the current ones, skipping re-set", bands_string); g_free (bands_string); g_array_unref (current_bands_array); g_task_return_boolean (task, TRUE); @@ -2600,8 +2788,7 @@ if (!validate_bands (ctx->supported_bands_array, ctx->bands_array, &error)) { - mm_dbg ("Requested list of bands (%s) cannot be handled", - bands_string); + mm_obj_dbg (self, "requested list of bands (%s) cannot be handled", bands_string); g_free (bands_string); g_array_unref (current_bands_array); g_task_return_error (task, error); @@ -2609,7 +2796,7 @@ return; } - mm_dbg ("Setting new list of bands: '%s'", bands_string); + mm_obj_dbg (self, "setting new list of bands: %s", bands_string); MM_IFACE_MODEM_GET_INTERFACE (self)->set_current_bands ( self, ctx->bands_array, @@ -2754,14 +2941,14 @@ &error)) { /* If we can retry, do it */ if (ctx->retries > 0) { - mm_dbg ("couldn't load current allowed/preferred modes: '%s'", error->message); + mm_obj_dbg (self, "couldn't load current allowed/preferred modes: %s", error->message); g_error_free (error); set_current_modes_reload_schedule (task); return; } /* Errors when getting allowed/preferred won't be critical */ - mm_warn ("couldn't load current allowed/preferred modes: '%s'", error->message); + mm_obj_warn (self, "couldn't load current allowed/preferred modes: %s", error->message); g_clear_error (&error); /* If errors getting allowed modes, default to the ones we asked for */ @@ -2782,7 +2969,7 @@ /* If we can retry, do it */ if (ctx->retries > 0) { - mm_dbg ("reloaded current modes different to the requested ones (will retry)"); + mm_obj_dbg (self, "reloaded current modes different to the requested ones (will retry)"); set_current_modes_reload_schedule (task); return; } @@ -3103,7 +3290,7 @@ mm_base_modem_initialize_finish (self, res, &error); if (error) { - mm_warn ("Modem reinitialization failed: '%s'", error->message); + mm_obj_warn (self, "reinitialization failed: %s", error->message); g_error_free (error); } } @@ -3135,6 +3322,8 @@ old_lock = mm_gdbus_modem_get_unlock_required (skeleton); mm_gdbus_modem_set_unlock_required (skeleton, lock); + if (lock == MM_MODEM_LOCK_UNKNOWN) + mm_gdbus_modem_set_unlock_retries (skeleton, 0); /* We don't care about SIM-PIN2/SIM-PUK2 since the device is * operational without it. */ @@ -3294,7 +3483,7 @@ unlock_retries = MM_IFACE_MODEM_GET_INTERFACE (self)->load_unlock_retries_finish (self, res, &error); if (!unlock_retries) { - mm_warn ("Couldn't load unlock retries: '%s'", error->message); + mm_obj_warn (self, "couldn't load unlock retries: %s", error->message); g_error_free (error); } else { /* Update the dictionary in the DBus interface */ @@ -3317,7 +3506,7 @@ GError *error = NULL; if (!MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_sim_unlock_finish (self, res, &error)) { - mm_warn ("After SIM unlock failed setup: '%s'", error->message); + mm_obj_warn (self, "after SIM unlock failed: %s", error->message); g_error_free (error); } @@ -3370,11 +3559,11 @@ } /* For mixed 3GPP+3GPP2 devices, skip SIM errors */ - mm_dbg ("Skipping SIM error in 3GPP2-capable device, assuming no lock is needed"); + mm_obj_dbg (self, "skipping SIM error in 3GPP2-capable device, assuming no lock is needed"); g_error_free (error); ctx->lock = MM_MODEM_LOCK_NONE; } else { - mm_dbg ("Couldn't check if unlock required: '%s'", error->message); + mm_obj_dbg (self, "couldn't check if unlock required: %s", error->message); g_error_free (error); ctx->lock = MM_MODEM_LOCK_UNKNOWN; } @@ -3405,9 +3594,8 @@ update_lock_info_context_step (task); return; } - - /* Fall down to next step */ ctx->step++; + /* fall-through */ case UPDATE_LOCK_INFO_CONTEXT_STEP_LOCK: /* Don't re-ask if already known */ @@ -3419,9 +3607,8 @@ task); return; } - - /* Fall down to next step */ ctx->step++; + /* fall-through */ case UPDATE_LOCK_INFO_CONTEXT_STEP_AFTER_UNLOCK: /* If we get that no lock is required, run the after SIM unlock step @@ -3433,7 +3620,7 @@ ctx->lock == MM_MODEM_LOCK_SIM_PUK2)) { if (MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_sim_unlock != NULL && MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_sim_unlock_finish != NULL) { - mm_dbg ("SIM is ready, running after SIM unlock step..."); + mm_obj_dbg (self, "SIM is ready, running after SIM unlock step..."); MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_sim_unlock ( self, (GAsyncReadyCallback)modem_after_sim_unlock_ready, @@ -3442,11 +3629,10 @@ } /* If no way to run after SIM unlock step, we're done */ - mm_dbg ("SIM is ready, and no need for the after SIM unlock step..."); + mm_obj_dbg (self, "SIM is ready, and no need for the after SIM unlock step..."); } - - /* Fall down to next step */ ctx->step++; + /* fall-through */ case UPDATE_LOCK_INFO_CONTEXT_STEP_RETRIES: /* Load unlock retries if possible */ @@ -3458,12 +3644,12 @@ task); return; } - - /* Fall down to next step */ ctx->step++; + /* fall-through */ case UPDATE_LOCK_INFO_CONTEXT_STEP_LAST: if (ctx->saved_error) { + set_lock_status (self, ctx->skeleton, MM_MODEM_LOCK_UNKNOWN); /* Return saved error */ g_task_return_error (task, ctx->saved_error); ctx->saved_error = NULL; @@ -3491,9 +3677,6 @@ GTask *task; ctx = g_slice_new0 (UpdateLockInfoContext); - g_object_get (self, - MM_IFACE_MODEM_DBUS_SKELETON, &ctx->skeleton, - NULL); /* If the given lock is known, we will avoid re-asking for it */ ctx->lock = known_lock; @@ -3501,255 +3684,250 @@ task = g_task_new (self, NULL, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify)update_lock_info_context_free); + g_object_get (self, + MM_IFACE_MODEM_DBUS_SKELETON, &ctx->skeleton, + NULL); + + if (!ctx->skeleton) { + g_task_return_new_error (task, + MM_CORE_ERROR, + MM_CORE_ERROR_FAILED, + "Couldn't get interface skeleton"); + g_object_unref (task); + return; + } + update_lock_info_context_step (task); } /*****************************************************************************/ /* Set power state sequence */ +typedef enum { + SET_POWER_STATE_STEP_FIRST, + SET_POWER_STATE_STEP_LOAD, + SET_POWER_STATE_STEP_CHECK, + SET_POWER_STATE_STEP_UPDATE, + SET_POWER_STATE_STEP_FCC_UNLOCK, + SET_POWER_STATE_STEP_AFTER_UPDATE, + SET_POWER_STATE_STEP_LAST, +} SetPowerStateStep; + typedef struct { - MmGdbusModem *skeleton; - MMModemPowerState power_state; - MMModemPowerState previous_cached_power_state; - MMModemPowerState previous_real_power_state; + SetPowerStateStep step; + MmGdbusModem *skeleton; + GError *saved_error; + gboolean fcc_unlock_attempted; + MMModemPowerState requested_power_state; + MMModemPowerState previous_cached_power_state; + MMModemPowerState previous_real_power_state; + + void (*requested_power_setup) (MMIfaceModem *self, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (*requested_power_setup_finish) (MMIfaceModem *self, + GAsyncResult *res, + GError **error); } SetPowerStateContext; static void set_power_state_context_free (SetPowerStateContext *ctx) { + g_assert (!ctx->saved_error); if (ctx->skeleton) g_object_unref (ctx->skeleton); g_slice_free (SetPowerStateContext, ctx); } gboolean -mm_iface_modem_set_power_state_finish (MMIfaceModem *self, - GAsyncResult *res, - GError **error) +mm_iface_modem_set_power_state_finish (MMIfaceModem *self, + GAsyncResult *res, + GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } +static void set_power_state_step (GTask *task); + static void modem_after_power_up_ready (MMIfaceModem *self, GAsyncResult *res, - GTask *task) + GTask *task) { - GError *error = NULL; + SetPowerStateContext *ctx; - MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_power_up_finish (self, res, &error); - if (error) - g_task_return_error (task, error); - else - g_task_return_boolean (task, TRUE); - g_object_unref (task); + ctx = g_task_get_task_data (task); + g_assert (!ctx->saved_error); + MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_power_up_finish (self, res, &ctx->saved_error); + if (ctx->saved_error) + mm_obj_dbg (self, "failure running after power up step: %s", ctx->saved_error->message); + + ctx->step++; + set_power_state_step (task); } static void -modem_power_up_ready (MMIfaceModem *self, - GAsyncResult *res, - GTask *task) +fcc_unlock_ready (MMIfaceModem *self, + GAsyncResult *res, + GTask *task) { SetPowerStateContext *ctx; - GError *error = NULL; + g_autoptr(GError) error = NULL; ctx = g_task_get_task_data (task); + if (!MM_IFACE_MODEM_GET_INTERFACE (self)->fcc_unlock_finish (self, res, &error)) + mm_obj_dbg (self, "couldn't run FCC unlock: %s", error->message); - MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_up_finish (self, res, &error); - if (error) { - /* If the real and cached ones are different, set the real one */ - if (ctx->previous_cached_power_state != ctx->previous_real_power_state) - mm_gdbus_modem_set_power_state (ctx->skeleton, ctx->previous_real_power_state); - g_task_return_error (task, error); - g_object_unref (task); - return; - } - - mm_dbg ("Modem set in full-power mode..."); - mm_gdbus_modem_set_power_state (ctx->skeleton, ctx->power_state); - - /* If we have something to do just after power-up, do it */ - if (MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_power_up && - MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_power_up_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_power_up ( - self, - (GAsyncReadyCallback)modem_after_power_up_ready, - task); - return; - } - - /* Otherwise, we're done */ - g_task_return_boolean (task, TRUE); - g_object_unref (task); + /* always retry, even on reported error */ + ctx->step = SET_POWER_STATE_STEP_UPDATE; + set_power_state_step (task); } static void -modem_power_down_ready (MMIfaceModem *self, - GAsyncResult *res, - GTask *task) +requested_power_setup_ready (MMIfaceModem *self, + GAsyncResult *res, + GTask *task) { SetPowerStateContext *ctx; - GError *error = NULL; ctx = g_task_get_task_data (task); + g_assert (!ctx->saved_error); + if (!ctx->requested_power_setup_finish (self, res, &ctx->saved_error)) + mm_obj_dbg (self, "couldn't update power state: %s", ctx->saved_error->message); - MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_down_finish (self, res, &error); - if (error) { - /* If the real and cached ones are different, set the real one */ - if (ctx->previous_cached_power_state != ctx->previous_real_power_state) - mm_gdbus_modem_set_power_state (ctx->skeleton, ctx->previous_real_power_state); - g_task_return_error (task, error); - } else { - mm_dbg ("Modem set in low-power mode..."); - mm_gdbus_modem_set_power_state (ctx->skeleton, ctx->power_state); - g_task_return_boolean (task, TRUE); - } - - g_object_unref (task); + ctx->step++; + set_power_state_step (task); } static void -modem_power_off_ready (MMIfaceModem *self, - GAsyncResult *res, - GTask *task) +set_power_state_load_ready (MMIfaceModem *self, + GAsyncResult *res, + GTask *task) { SetPowerStateContext *ctx; - GError *error = NULL; + g_autoptr(GError) error = NULL; ctx = g_task_get_task_data (task); - MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_off_finish (self, res, &error); + ctx->previous_real_power_state = MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state_finish (self, res, &error); if (error) { - /* If the real and cached ones are different, set the real one */ - if (ctx->previous_cached_power_state != ctx->previous_real_power_state) - mm_gdbus_modem_set_power_state (ctx->skeleton, ctx->previous_real_power_state); - g_task_return_error (task, error); - } else { - mm_info ("Modem powered off... may no longer be accessible"); - mm_gdbus_modem_set_power_state (ctx->skeleton, ctx->power_state); - g_task_return_boolean (task, TRUE); + mm_obj_dbg (self, "couldn't reload current power state: %s", error->message); + /* Default to the cached one */ + ctx->previous_real_power_state = ctx->previous_cached_power_state; } - g_object_unref (task); + ctx->step++; + set_power_state_step (task); } static void -set_power_state (GTask *task) +set_power_state_step (GTask *task) { - MMIfaceModem *self; + MMIfaceModem *self; SetPowerStateContext *ctx; self = g_task_get_source_object (task); - ctx = g_task_get_task_data (task); + ctx = g_task_get_task_data (task); - /* Already done if we're in the desired power state */ - if (ctx->previous_real_power_state == ctx->power_state) { - mm_dbg ("No need to change power state: already in '%s' power state", - mm_modem_power_state_get_string (ctx->power_state)); - /* If the real and cached ones are different, set the real one */ - if (ctx->previous_cached_power_state != ctx->previous_real_power_state) - mm_gdbus_modem_set_power_state (ctx->skeleton, ctx->previous_real_power_state); - g_task_return_boolean (task, TRUE); - g_object_unref (task); - return; - } + switch (ctx->step) { + case SET_POWER_STATE_STEP_FIRST: + ctx->step++; + /* fall-through */ - /* Fully powering off the modem? */ - if (ctx->power_state == MM_MODEM_POWER_STATE_OFF) { - /* Error if unsupported */ - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_off || - !MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_off_finish) { - g_task_return_new_error (task, - MM_CORE_ERROR, - MM_CORE_ERROR_UNSUPPORTED, - "Powering off is not supported by this modem"); - g_object_unref (task); + case SET_POWER_STATE_STEP_LOAD: + /* We cannot really rely on the power state value that we had cached before, + * as the real power status of the modem may also be changed by rfkill. So, + * before updating the current power state, re-check which is the real power + * state. */ + if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state && + MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state_finish) { + MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state (self, (GAsyncReadyCallback)set_power_state_load_ready, task); return; } + /* If there is no way to load power state, just keep on assuming the cached + * one is also the real one */ + ctx->previous_real_power_state = ctx->previous_cached_power_state; + ctx->step++; + /* fall-through */ - MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_off ( - MM_IFACE_MODEM (self), - (GAsyncReadyCallback)modem_power_off_ready, - task); - return; - } - - /* Going into low power mode? */ - if (ctx->power_state == MM_MODEM_POWER_STATE_LOW) { - /* Error if unsupported */ - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_down || - !MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_down_finish) { - g_task_return_new_error (task, - MM_CORE_ERROR, - MM_CORE_ERROR_UNSUPPORTED, - "Going into low-power mode is not supported by this modem"); - g_object_unref (task); + case SET_POWER_STATE_STEP_CHECK: + /* Already done if we're in the desired power state */ + if (ctx->previous_real_power_state == ctx->requested_power_state) { + mm_obj_dbg (self, "no need to change power state: already '%s'", + mm_modem_power_state_get_string (ctx->requested_power_state)); + ctx->step = SET_POWER_STATE_STEP_LAST; + set_power_state_step (task); return; } + ctx->step++; + /* fall-through */ - MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_down ( - MM_IFACE_MODEM (self), - (GAsyncReadyCallback)modem_power_down_ready, - task); - return; - } + case SET_POWER_STATE_STEP_UPDATE: + mm_obj_dbg (self, "updating power state: '%s'...", mm_modem_power_state_get_string (ctx->requested_power_state)); + ctx->requested_power_setup (self, (GAsyncReadyCallback)requested_power_setup_ready, task); + return; + + case SET_POWER_STATE_STEP_FCC_UNLOCK: + /* The FCC unlock operation and update retry should only be done + * if requested by the implementation with MM_CORE_ERROR_RETRY. */ + if ((ctx->requested_power_state == MM_MODEM_POWER_STATE_ON) && + ctx->saved_error && + g_error_matches (ctx->saved_error, MM_CORE_ERROR, MM_CORE_ERROR_RETRY) && + !ctx->fcc_unlock_attempted && + MM_IFACE_MODEM_GET_INTERFACE (self)->fcc_unlock && + MM_IFACE_MODEM_GET_INTERFACE (self)->fcc_unlock_finish) { + mm_obj_dbg (self, "attempting fcc unlock..."); + ctx->fcc_unlock_attempted = TRUE; + g_clear_error (&ctx->saved_error); + MM_IFACE_MODEM_GET_INTERFACE (self)->fcc_unlock (self, (GAsyncReadyCallback)fcc_unlock_ready, task); + return; + } + ctx->step++; + /* fall-through */ - /* Going out of low power mode? */ - if (ctx->power_state == MM_MODEM_POWER_STATE_ON) { - /* Error if unsupported */ - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_up || - !MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_up_finish) { - g_task_return_new_error (task, - MM_CORE_ERROR, - MM_CORE_ERROR_UNSUPPORTED, - "Going into full-power mode is not supported by this modem"); - g_object_unref (task); + case SET_POWER_STATE_STEP_AFTER_UPDATE: + if ((ctx->requested_power_state == MM_MODEM_POWER_STATE_ON) && + !ctx->saved_error && + MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_power_up && + MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_power_up_finish) { + mm_obj_dbg (self, "running after power up operation..."); + MM_IFACE_MODEM_GET_INTERFACE (self)->modem_after_power_up (self, (GAsyncReadyCallback)modem_after_power_up_ready, task); return; } + ctx->step++; + /* fall-through */ - MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_up ( - MM_IFACE_MODEM (self), - (GAsyncReadyCallback)modem_power_up_ready, - task); + case SET_POWER_STATE_STEP_LAST: + if (ctx->saved_error) { + /* If the real and cached ones are different, set the real one */ + if (ctx->previous_cached_power_state != ctx->previous_real_power_state) + mm_gdbus_modem_set_power_state (ctx->skeleton, ctx->previous_real_power_state); + g_task_return_error (task, g_steal_pointer (&ctx->saved_error)); + } else { + mm_obj_info (self, "power state updated: %s", mm_modem_power_state_get_string (ctx->requested_power_state)); + mm_gdbus_modem_set_power_state (ctx->skeleton, ctx->requested_power_state); + g_task_return_boolean (task, TRUE); + } + g_object_unref (task); return; - } - - g_assert_not_reached (); -} -static void -set_power_state_load_ready (MMIfaceModem *self, - GAsyncResult *res, - GTask *task) -{ - SetPowerStateContext *ctx; - GError *error = NULL; - - ctx = g_task_get_task_data (task); - - ctx->previous_real_power_state = MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state_finish (self, res, &error); - if (error) { - mm_dbg ("Couldn't reload current power state: %s", error->message); - g_error_free (error); - /* Default to the cached one */ - ctx->previous_real_power_state = ctx->previous_cached_power_state; + default: + g_assert_not_reached (); } - - /* And keep on */ - set_power_state (task); } void -mm_iface_modem_set_power_state (MMIfaceModem *self, - MMModemPowerState power_state, - GAsyncReadyCallback callback, - gpointer user_data) +mm_iface_modem_set_power_state (MMIfaceModem *self, + MMModemPowerState power_state, + GAsyncReadyCallback callback, + gpointer user_data) { SetPowerStateContext *ctx; - GTask *task; + GTask *task; ctx = g_slice_new0 (SetPowerStateContext); - ctx->power_state = power_state; + ctx->step = SET_POWER_STATE_STEP_FIRST; + ctx->requested_power_state = power_state; task = g_task_new (self, NULL, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify)set_power_state_context_free); @@ -3765,26 +3943,36 @@ g_object_unref (task); return; } - ctx->previous_cached_power_state = mm_gdbus_modem_get_power_state (ctx->skeleton); - /* We cannot really rely on the power state value that we had cached before, - * as the real power status of the modem may also be changed by rfkill. So, - * before updating the current power state, re-check which is the real power - * state. */ - if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_power_state ( - self, - (GAsyncReadyCallback)set_power_state_load_ready, - task); + /* Setup requested operation */ + switch (ctx->requested_power_state) { + case MM_MODEM_POWER_STATE_OFF: + ctx->requested_power_setup = MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_off; + ctx->requested_power_setup_finish = MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_off_finish; + break; + case MM_MODEM_POWER_STATE_LOW: + ctx->requested_power_setup = MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_down; + ctx->requested_power_setup_finish = MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_down_finish; + break; + case MM_MODEM_POWER_STATE_ON: + ctx->requested_power_setup = MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_up; + ctx->requested_power_setup_finish = MM_IFACE_MODEM_GET_INTERFACE (self)->modem_power_up_finish; + break; + case MM_MODEM_POWER_STATE_UNKNOWN: + default: + g_assert_not_reached (); + } + + /* Error if unsupported */ + if (!ctx->requested_power_setup || !ctx->requested_power_setup_finish) { + g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, + "Requested power transition is not supported by this modem"); + g_object_unref (task); return; } - /* If there is no way to load power state, just keep on assuming the cached - * one is also the real one */ - ctx->previous_real_power_state = ctx->previous_cached_power_state; - set_power_state (task); + set_power_state_step (task); } /*****************************************************************************/ @@ -3822,15 +4010,11 @@ ENABLING_STEP_SET_POWER_STATE, ENABLING_STEP_CHECK_FOR_SIM_SWAP, ENABLING_STEP_FLOW_CONTROL, - ENABLING_STEP_SUPPORTED_CHARSETS, - ENABLING_STEP_CHARSET, ENABLING_STEP_LAST } EnablingStep; struct _EnablingContext { EnablingStep step; - MMModemCharset supported_charsets; - const MMModemCharset *current_charset; MmGdbusModem *skeleton; }; @@ -3879,7 +4063,7 @@ GError *error = NULL; if (!MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap_finish (self, res, &error)) { - mm_warn ("Error checking if SIM was swapped: '%s'", error->message); + mm_obj_warn (self, "failed to check if SIM was swapped: %s", error->message); g_error_free (error); } @@ -3910,52 +4094,6 @@ interface_enabling_step (task); } -static void -load_supported_charsets_ready (MMIfaceModem *self, - GAsyncResult *res, - GTask *task) -{ - EnablingContext *ctx; - GError *error = NULL; - - ctx = g_task_get_task_data (task); - - ctx->supported_charsets = - MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_charsets_finish (self, res, &error); - if (error) { - mm_warn ("couldn't load Supported Charsets: '%s'", error->message); - g_error_free (error); - } - - /* Go on to next step */ - ctx->step++; - interface_enabling_step (task); -} - -static void -setup_charset_ready (MMIfaceModem *self, - GAsyncResult *res, - GTask *task) -{ - EnablingContext *ctx; - GError *error = NULL; - - ctx = g_task_get_task_data (task); - - if (!MM_IFACE_MODEM_GET_INTERFACE (self)->setup_charset_finish (self, res, &error)) { - mm_dbg ("couldn't set charset '%s': '%s'", - mm_modem_charset_to_string (*ctx->current_charset), - error->message); - g_error_free (error); - - /* Will retry step with some other charset type */ - } else - /* Done, Go on to next step */ - ctx->step++; - - interface_enabling_step (task); -} - static const MMModemCharset best_charsets[] = { MM_MODEM_CHARSET_UTF8, MM_MODEM_CHARSET_UCS2, @@ -3982,8 +4120,8 @@ switch (ctx->step) { case ENABLING_STEP_FIRST: - /* Fall down to next step */ ctx->step++; + /* fall-through */ case ENABLING_STEP_SET_POWER_STATE: mm_iface_modem_set_power_state (self, @@ -3997,12 +4135,13 @@ MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap_finish) { MM_IFACE_MODEM_GET_INTERFACE (self)->check_for_sim_swap ( self, + NULL, (GAsyncReadyCallback)check_for_sim_swap_ready, task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case ENABLING_STEP_FLOW_CONTROL: if (MM_IFACE_MODEM_GET_INTERFACE (self)->setup_flow_control && @@ -4013,67 +4152,17 @@ task); return; } - /* Fall down to next step */ - ctx->step++; - - case ENABLING_STEP_SUPPORTED_CHARSETS: - if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_charsets && - MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_charsets_finish) { - MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_charsets ( - self, - (GAsyncReadyCallback)load_supported_charsets_ready, - task); - return; - } - /* Fall down to next step */ - ctx->step++; - - case ENABLING_STEP_CHARSET: - /* Only try to set charsets if we were able to load supported ones */ - if (ctx->supported_charsets > 0 && - MM_IFACE_MODEM_GET_INTERFACE (self)->setup_charset && - MM_IFACE_MODEM_GET_INTERFACE (self)->setup_charset_finish) { - gboolean next_to_try = FALSE; - - while (!next_to_try) { - if (!ctx->current_charset) - /* Switch the device's charset; we prefer UTF-8, but UCS2 will do too */ - ctx->current_charset = &best_charsets[0]; - else - /* Try with the next one */ - ctx->current_charset++; - - if (*ctx->current_charset == MM_MODEM_CHARSET_UNKNOWN) - break; - - if (ctx->supported_charsets & (*ctx->current_charset)) - next_to_try = TRUE; - } - - if (next_to_try) { - MM_IFACE_MODEM_GET_INTERFACE (self)->setup_charset ( - self, - *ctx->current_charset, - (GAsyncReadyCallback)setup_charset_ready, - task); - return; - } - - g_task_return_new_error (task, - MM_CORE_ERROR, - MM_CORE_ERROR_FAILED, - "Failed to find a usable modem character set"); - g_object_unref (task); - return; - } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case ENABLING_STEP_LAST: /* We are done without errors! */ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -4119,6 +4208,8 @@ INITIALIZATION_STEP_FIRST, INITIALIZATION_STEP_CURRENT_CAPABILITIES, INITIALIZATION_STEP_SUPPORTED_CAPABILITIES, + INITIALIZATION_STEP_SUPPORTED_CHARSETS, + INITIALIZATION_STEP_CHARSET, INITIALIZATION_STEP_BEARERS, INITIALIZATION_STEP_MANUFACTURER, INITIALIZATION_STEP_MODEL, @@ -4132,6 +4223,7 @@ INITIALIZATION_STEP_SUPPORTED_IP_FAMILIES, INITIALIZATION_STEP_POWER_STATE, INITIALIZATION_STEP_SIM_HOT_SWAP, + INITIALIZATION_STEP_SIM_SLOTS, INITIALIZATION_STEP_UNLOCK_REQUIRED, INITIALIZATION_STEP_SIM, INITIALIZATION_STEP_SETUP_CARRIER_CONFIG, @@ -4144,6 +4236,8 @@ struct _InitializationContext { InitializationStep step; MmGdbusModem *skeleton; + MMModemCharset supported_charsets; + const MMModemCharset *current_charset; GError *fatal_error; }; @@ -4173,7 +4267,7 @@ g_free (val); \ \ if (error) { \ - mm_warn ("couldn't load %s: '%s'", DISPLAY, error->message); \ + mm_obj_warn (self, "couldn't load %s: %s", DISPLAY, error->message); \ g_error_free (error); \ } \ \ @@ -4199,7 +4293,7 @@ MM_IFACE_MODEM_GET_INTERFACE (self)->load_##NAME##_finish (self, res, &error)); \ \ if (error) { \ - mm_warn ("couldn't load %s: '%s'", DISPLAY, error->message); \ + mm_obj_warn (self, "couldn't load %s: %s", DISPLAY, error->message); \ g_error_free (error); \ } \ \ @@ -4233,10 +4327,9 @@ MM_MOBILE_EQUIPMENT_ERROR_SIM_WRONG)) { MMModemCapability caps; - mm_dbg ("Multimode device without SIM, no 3GPP capabilities"); + mm_obj_dbg (self, "multimode device without SIM, no 3GPP capabilities"); caps = mm_gdbus_modem_get_current_capabilities (ctx->skeleton); - caps &= ~MM_MODEM_CAPABILITY_GSM_UMTS; - caps &= ~MM_MODEM_CAPABILITY_LTE; + caps &= ~MM_MODEM_CAPABILITY_3GPP; /* CDMA-EVDO must still be around */ g_assert (caps & MM_MODEM_CAPABILITY_CDMA_EVDO); @@ -4272,24 +4365,35 @@ return; } - /* If LTE capability is reported, enable EPS network registration checks */ + /* By default CS/PS/CDMA1X/EVDO network registration checks are the only + * ones enabled, so fix them up based on capabilities, enabling EPS or 5GS + * checks if required, and disabling CS/PS/CDMA1X/EVDO if required. */ if (caps & MM_MODEM_CAPABILITY_LTE) { - mm_dbg ("Setting EPS network as supported"); + mm_obj_dbg (self, "setting EPS network as supported"); g_object_set (G_OBJECT (self), MM_IFACE_MODEM_3GPP_EPS_NETWORK_SUPPORTED, TRUE, NULL); } - - /* If LTE capability is the only one reported, disable all other network registration checks */ - if (caps == MM_MODEM_CAPABILITY_LTE) { - mm_dbg ("Setting CS/PS/CDMA1x/EVDO networks as unsupported"); + if (caps & MM_MODEM_CAPABILITY_5GNR) { + mm_obj_dbg (self, "setting 5GS network as supported"); + g_object_set (G_OBJECT (self), + MM_IFACE_MODEM_3GPP_5GS_NETWORK_SUPPORTED, TRUE, + NULL); + } + if (!(caps & MM_MODEM_CAPABILITY_CDMA_EVDO)) { + mm_obj_dbg (self, "setting CDMA1x/EVDO networks as unsupported"); g_object_set (G_OBJECT (self), - MM_IFACE_MODEM_3GPP_CS_NETWORK_SUPPORTED, FALSE, - MM_IFACE_MODEM_3GPP_PS_NETWORK_SUPPORTED, FALSE, MM_IFACE_MODEM_CDMA_CDMA1X_NETWORK_SUPPORTED, FALSE, MM_IFACE_MODEM_CDMA_EVDO_NETWORK_SUPPORTED, FALSE, NULL); } + if (!(caps & MM_MODEM_CAPABILITY_GSM_UMTS)) { + mm_obj_dbg (self, "setting CS/PS networks as unsupported"); + g_object_set (G_OBJECT (self), + MM_IFACE_MODEM_3GPP_CS_NETWORK_SUPPORTED, FALSE, + MM_IFACE_MODEM_3GPP_PS_NETWORK_SUPPORTED, FALSE, + NULL); + } /* Update current caps right away, even if we may fix them during the * multimode device check. No big deal in updating them twice, as we're not @@ -4298,9 +4402,8 @@ /* If the device is a multimode device (3GPP+3GPP2) check whether we have a * SIM or not. */ - if (caps & MM_MODEM_CAPABILITY_CDMA_EVDO && - (caps & MM_MODEM_CAPABILITY_GSM_UMTS || caps & MM_MODEM_CAPABILITY_LTE)) { - mm_dbg ("Checking if multimode device has a SIM..."); + if ((caps & MM_MODEM_CAPABILITY_CDMA_EVDO) && (caps & MM_MODEM_CAPABILITY_3GPP)) { + mm_obj_dbg (self, "checking if multimode device has a SIM..."); internal_load_unlock_required ( self, (GAsyncReadyCallback)current_capabilities_internal_load_unlock_required_ready, @@ -4342,12 +4445,58 @@ interface_initialization_step (task); } -STR_REPLY_READY_FN (manufacturer, "Manufacturer") -STR_REPLY_READY_FN (model, "Model") -STR_REPLY_READY_FN (revision, "Revision") -STR_REPLY_READY_FN (hardware_revision, "HardwareRevision") -STR_REPLY_READY_FN (equipment_identifier, "Equipment Identifier") -STR_REPLY_READY_FN (device_identifier, "Device Identifier") +STR_REPLY_READY_FN (manufacturer, "manufacturer") +STR_REPLY_READY_FN (model, "model") +STR_REPLY_READY_FN (revision, "revision") +STR_REPLY_READY_FN (hardware_revision, "hardware revision") +STR_REPLY_READY_FN (equipment_identifier, "equipment identifier") +STR_REPLY_READY_FN (device_identifier, "device identifier") + +static void +load_supported_charsets_ready (MMIfaceModem *self, + GAsyncResult *res, + GTask *task) +{ + InitializationContext *ctx; + GError *error = NULL; + + ctx = g_task_get_task_data (task); + + ctx->supported_charsets = + MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_charsets_finish (self, res, &error); + if (error) { + mm_obj_warn (self, "couldn't load supported charsets: %s", error->message); + g_error_free (error); + } + + /* Go on to next step */ + ctx->step++; + interface_initialization_step (task); +} + +static void +setup_charset_ready (MMIfaceModem *self, + GAsyncResult *res, + GTask *task) +{ + InitializationContext *ctx; + GError *error = NULL; + + ctx = g_task_get_task_data (task); + + if (!MM_IFACE_MODEM_GET_INTERFACE (self)->setup_charset_finish (self, res, &error)) { + mm_obj_dbg (self, "couldn't set charset '%s': %s", + mm_modem_charset_to_string (*ctx->current_charset), + error->message); + g_error_free (error); + + /* Will retry step with some other charset type */ + } else + /* Done, Go on to next step */ + ctx->step++; + + interface_initialization_step (task); +} static void load_supported_modes_ready (MMIfaceModem *self, @@ -4368,7 +4517,7 @@ } if (error) { - mm_warn ("couldn't load Supported Modes: '%s'", error->message); + mm_obj_warn (self, "couldn't load supported modes: %s", error->message); g_error_free (error); } @@ -4397,7 +4546,7 @@ } if (error) { - mm_warn ("couldn't load Supported Bands: '%s'", error->message); + mm_obj_warn (self, "couldn't load supported bands: %s", error->message); g_error_free (error); } @@ -4423,7 +4572,7 @@ mm_gdbus_modem_set_supported_ip_families (ctx->skeleton, ip_families); if (error) { - mm_warn ("couldn't load Supported IP families: '%s'", error->message); + mm_obj_warn (self, "couldn't load supported IP families: %s", error->message); g_error_free (error); } @@ -4432,7 +4581,99 @@ interface_initialization_step (task); } -UINT_REPLY_READY_FN (power_state, "Power State") +UINT_REPLY_READY_FN (power_state, "power state") + +static void +setup_sim_hot_swap_ready (MMIfaceModem *self, + GAsyncResult *res, + GTask *task) +{ + InitializationContext *ctx; + g_autoptr(GError) error = NULL; + + ctx = g_task_get_task_data (task); + + MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap_finish (self, res, &error); + if (error) + mm_obj_warn (self, "SIM hot swap setup failed: %s", error->message); + else { + mm_obj_dbg (self, "SIM hot swap setup succeeded"); + g_object_set (self, + MM_IFACE_MODEM_SIM_HOT_SWAP_CONFIGURED, TRUE, + NULL); + } + + /* Go on to next step */ + ctx->step++; + interface_initialization_step (task); +} + +static void +load_sim_slots_ready (MMIfaceModem *self, + GAsyncResult *res, + GTask *task) +{ + InitializationContext *ctx; + g_autoptr(GPtrArray) sim_slots = NULL; + g_autoptr(GError) error = NULL; + guint primary_sim_slot = 0; + + ctx = g_task_get_task_data (task); + + if (!MM_IFACE_MODEM_GET_INTERFACE (self)->load_sim_slots_finish (self, + res, + &sim_slots, + &primary_sim_slot, + &error)) + mm_obj_warn (self, "couldn't query SIM slots: %s", error->message); + + if (sim_slots) { + MMBaseSim *primary_sim = NULL; + GPtrArray *sim_slot_paths_array; + g_auto(GStrv) sim_slot_paths = NULL; + guint i; + + g_assert (primary_sim_slot); + g_assert_cmpuint (primary_sim_slot, <=, sim_slots->len); + + sim_slot_paths_array = g_ptr_array_new (); + for (i = 0; i < sim_slots->len; i++) { + MMBaseSim *sim; + const gchar *sim_path; + + sim = MM_BASE_SIM (g_ptr_array_index (sim_slots, i)); + if (!sim) { + g_ptr_array_add (sim_slot_paths_array, g_strdup ("/")); + continue; + } + + sim_path = mm_base_sim_get_path (sim); + g_ptr_array_add (sim_slot_paths_array, g_strdup (sim_path)); + } + g_ptr_array_add (sim_slot_paths_array, NULL); + sim_slot_paths = (GStrv) g_ptr_array_free (sim_slot_paths_array, FALSE); + + mm_gdbus_modem_set_sim_slots (ctx->skeleton, (const gchar *const *)sim_slot_paths); + mm_gdbus_modem_set_primary_sim_slot (ctx->skeleton, primary_sim_slot); + + /* If loading SIM slots is supported, we also expose already the primary active SIM object */ + if (primary_sim_slot) { + primary_sim = g_ptr_array_index (sim_slots, primary_sim_slot - 1); + if (primary_sim) + g_object_bind_property (primary_sim, MM_BASE_SIM_PATH, + ctx->skeleton, "sim", + G_BINDING_DEFAULT | G_BINDING_SYNC_CREATE); + } + g_object_set (self, + MM_IFACE_MODEM_SIM, primary_sim, + MM_IFACE_MODEM_SIM_SLOTS, sim_slots, + NULL); + } + + /* Go on to next step */ + ctx->step++; + interface_initialization_step (task); +} static void modem_update_lock_info_ready (MMIfaceModem *self, @@ -4472,7 +4713,7 @@ sim = MM_IFACE_MODEM_GET_INTERFACE (self)->create_sim_finish (self, res, &error); if (error) { - mm_warn ("couldn't create SIM: '%s'", error->message); + mm_obj_warn (self, "couldn't create SIM: %s", error->message); g_task_return_error (task, error); g_object_unref (task); return; @@ -4501,14 +4742,16 @@ GAsyncResult *res, GTask *task) { + MMIfaceModem *self; InitializationContext *ctx; - GError *error = NULL; + GError *error = NULL; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); if (!mm_base_sim_initialize_finish (sim, res, &error)) { - mm_warn ("SIM re-initialization failed: '%s'", - error ? error->message : "Unknown error"); + mm_obj_warn (self, "SIM re-initialization failed: %s", + error ? error->message : "Unknown error"); g_clear_error (&error); } @@ -4528,7 +4771,7 @@ ctx = g_task_get_task_data (task); if (!MM_IFACE_MODEM_GET_INTERFACE (self)->setup_carrier_config_finish (self, res, &error)) { - mm_warn ("couldn't setup carrier config: '%s'", error->message); + mm_obj_warn (self, "couldn't setup carrier config: %s", error->message); g_error_free (error); } @@ -4550,7 +4793,7 @@ ctx = g_task_get_task_data (task); if (!MM_IFACE_MODEM_GET_INTERFACE (self)->load_carrier_config_finish (self, res, &name, &revision, &error)) { - mm_warn ("couldn't load carrier config: '%s'", error->message); + mm_obj_warn (self, "couldn't load carrier config: %s", error->message); g_error_free (error); } else { mm_gdbus_modem_set_carrier_configuration (ctx->skeleton, name); @@ -4592,7 +4835,7 @@ str_list = MM_IFACE_MODEM_GET_INTERFACE (self)->load_own_numbers_finish (self, res, &error); if (error) { - mm_warn ("couldn't load list of Own Numbers: '%s'", error->message); + mm_obj_warn (self, "couldn't load list of own numbers: %s", error->message); g_error_free (error); } @@ -4624,7 +4867,7 @@ &preferred, &error)) { /* Errors when getting allowed/preferred won't be critical */ - mm_warn ("couldn't load current allowed/preferred modes: '%s'", error->message); + mm_obj_warn (self, "couldn't load current allowed/preferred modes: %s", error->message); g_error_free (error); } else mm_gdbus_modem_set_current_modes (ctx->skeleton, g_variant_new ("(uu)", allowed, preferred)); @@ -4648,7 +4891,7 @@ current_bands = MM_IFACE_MODEM_GET_INTERFACE (self)->load_current_bands_finish (self, res, &error); if (!current_bands) { /* Errors when getting current bands won't be critical */ - mm_warn ("couldn't load current Bands: '%s'", error->message); + mm_obj_warn (self, "couldn't load current bands: %s", error->message); g_error_free (error); } else { GArray *filtered_bands; @@ -4675,34 +4918,6 @@ interface_initialization_step (task); } -/*****************************************************************************/ -/* Setup SIM hot swap (Modem interface) */ -static void -setup_sim_hot_swap_ready (MMIfaceModem *self, - GAsyncResult *res, - GTask *task) -{ - InitializationContext *ctx; - GError *error = NULL; - - ctx = g_task_get_task_data (task); - - MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap_finish (self, res, &error); - if (error) { - mm_warn ("Iface modem: SIM hot swap setup failed: '%s'", error->message); - g_error_free (error); - } else { - mm_dbg ("Iface modem: SIM hot swap setup succeeded"); - g_object_set (self, - MM_IFACE_MODEM_SIM_HOT_SWAP_CONFIGURED, TRUE, - NULL); - } - - /* Go on to next step */ - ctx->step++; - interface_initialization_step (task); -} - static void interface_initialization_step (GTask *task) { @@ -4760,11 +4975,12 @@ MMPort *primary = NULL; #if defined WITH_QMI - primary = MM_PORT (mm_base_modem_peek_port_qmi (MM_BASE_MODEM (self))); + if (MM_IS_BROADBAND_MODEM_QMI (self)) + primary = MM_PORT (mm_broadband_modem_qmi_peek_port_qmi (MM_BROADBAND_MODEM_QMI (self))); #endif #if defined WITH_MBIM - if (!primary) - primary = MM_PORT (mm_base_modem_peek_port_mbim (MM_BASE_MODEM (self))); + if (!primary && MM_IS_BROADBAND_MODEM_MBIM (self)) + primary = MM_PORT (mm_broadband_modem_mbim_peek_port_mbim (MM_BROADBAND_MODEM_MBIM (self))); #endif if (!primary) primary = MM_PORT (mm_base_modem_peek_port_primary (MM_BASE_MODEM (self))); @@ -4781,8 +4997,8 @@ mm_gdbus_modem_set_ports (ctx->skeleton, mm_common_ports_array_to_variant (port_infos, n_port_infos)); mm_modem_port_info_array_free (port_infos, n_port_infos); } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_CURRENT_CAPABILITIES: /* Current capabilities may change during runtime, i.e. if new firmware reloaded; but we'll @@ -4798,8 +5014,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_SUPPORTED_CAPABILITIES: { GArray *supported_capabilities; @@ -4835,9 +5051,56 @@ } g_array_unref (supported_capabilities); - /* Fall down to next step */ ctx->step++; - } + } /* fall-through */ + + case INITIALIZATION_STEP_SUPPORTED_CHARSETS: + if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_charsets && + MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_charsets_finish) { + MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_charsets ( + self, + (GAsyncReadyCallback)load_supported_charsets_ready, + task); + return; + } + ctx->step++; + /* fall-through */ + + case INITIALIZATION_STEP_CHARSET: + /* Only try to set charsets if we were able to load supported ones */ + if (ctx->supported_charsets > 0 && + MM_IFACE_MODEM_GET_INTERFACE (self)->setup_charset && + MM_IFACE_MODEM_GET_INTERFACE (self)->setup_charset_finish) { + gboolean next_to_try = FALSE; + + while (!next_to_try) { + if (!ctx->current_charset) + /* Switch the device's charset; we prefer UTF-8, but UCS2 will do too */ + ctx->current_charset = &best_charsets[0]; + else + /* Try with the next one */ + ctx->current_charset++; + + if (*ctx->current_charset == MM_MODEM_CHARSET_UNKNOWN) + break; + + if (ctx->supported_charsets & (*ctx->current_charset)) + next_to_try = TRUE; + } + + if (next_to_try) { + MM_IFACE_MODEM_GET_INTERFACE (self)->setup_charset ( + self, + *ctx->current_charset, + (GAsyncReadyCallback)setup_charset_ready, + task); + return; + } + + mm_obj_warn (self, "Failed to find usable modem character set, let it to UNKNOWN"); + } + ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_BEARERS: { MMBearerList *list = NULL; @@ -4855,7 +5118,7 @@ /* The maximum number of available/connected modems is guessed from * the size of the data ports list. */ n = g_list_length (mm_base_modem_peek_data_ports (MM_BASE_MODEM (self))); - mm_dbg ("Modem allows up to %u bearers", n); + mm_obj_dbg (self, "allowed up to %u bearers", n); /* Create new default list */ list = mm_bearer_list_new (n, n); @@ -4878,9 +5141,8 @@ mm_bearer_list_get_max_active (list)); g_object_unref (list); - /* Fall down to next step */ ctx->step++; - } + } /* fall-through */ case INITIALIZATION_STEP_MANUFACTURER: /* Manufacturer is meant to be loaded only once during the whole @@ -4895,8 +5157,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_MODEL: /* Model is meant to be loaded only once during the whole @@ -4911,8 +5173,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_REVISION: /* Revision is meant to be loaded only once during the whole @@ -4927,8 +5189,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_CARRIER_CONFIG: /* Current carrier config is meant to be loaded only once during the whole @@ -4942,8 +5204,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_HARDWARE_REVISION: /* HardwareRevision is meant to be loaded only once during the whole @@ -4958,8 +5220,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_EQUIPMENT_ID: /* Equipment ID is meant to be loaded only once during the whole @@ -4974,8 +5236,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_DEVICE_ID: /* Device ID is meant to be loaded only once during the whole @@ -4990,8 +5252,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_SUPPORTED_MODES: if (MM_IFACE_MODEM_GET_INTERFACE (self)->load_supported_modes != NULL && @@ -5019,8 +5281,8 @@ g_array_unref (supported_modes); } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_SUPPORTED_BANDS: { GArray *supported_bands; @@ -5049,9 +5311,8 @@ } g_array_unref (supported_bands); - /* Fall down to next step */ ctx->step++; - } + } /* fall-through */ case INITIALIZATION_STEP_SUPPORTED_IP_FAMILIES: /* Supported ip_families are meant to be loaded only once during the whole @@ -5066,8 +5327,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_POWER_STATE: /* Initial power state is meant to be loaded only once. Therefore, if we @@ -5085,11 +5346,17 @@ /* We don't know how to load current power state; assume ON */ mm_gdbus_modem_set_power_state (ctx->skeleton, MM_MODEM_POWER_STATE_ON); } - /* Fall down to next step */ ctx->step++; + /* fall-through */ + + case INITIALIZATION_STEP_SIM_HOT_SWAP: { + gboolean sim_hot_swap_configured = FALSE; - case INITIALIZATION_STEP_SIM_HOT_SWAP: - if (MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap && + g_object_get (self, + MM_IFACE_MODEM_SIM_HOT_SWAP_CONFIGURED, &sim_hot_swap_configured, + NULL); + if (!sim_hot_swap_configured && + MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap && MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap_finish) { MM_IFACE_MODEM_GET_INTERFACE (self)->setup_sim_hot_swap ( MM_IFACE_MODEM (self), @@ -5097,8 +5364,24 @@ task); return; } - /* Fall down to next step */ ctx->step++; + } /* fall-through */ + + case INITIALIZATION_STEP_SIM_SLOTS: + /* If the modem doesn't need any SIM (not implemented by plugin, or not + * needed in CDMA-only modems), or if we don't know how to query + * for SIM slots */ + if (!mm_gdbus_modem_get_sim_slots (ctx->skeleton) && + !mm_iface_modem_is_cdma_only (self) && + MM_IFACE_MODEM_GET_INTERFACE (self)->load_sim_slots && + MM_IFACE_MODEM_GET_INTERFACE (self)->load_sim_slots_finish) { + MM_IFACE_MODEM_GET_INTERFACE (self)->load_sim_slots (MM_IFACE_MODEM (self), + (GAsyncReadyCallback)load_sim_slots_ready, + task); + return; + } + ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_UNLOCK_REQUIRED: /* Only check unlock required if we were previously not unlocked */ @@ -5109,8 +5392,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_SIM: /* If the modem doesn't need any SIM (not implemented by plugin, or not @@ -5141,8 +5424,8 @@ g_object_unref (sim); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_SETUP_CARRIER_CONFIG: /* Setup and perform automatic carrier config switching as soon as the @@ -5162,9 +5445,9 @@ /* If we have a SIM object, and carrier config switching is supported, * validate whether we're already using the best config or not. */ if (!sim) - mm_dbg ("not setting up carrier config: SIM not found"); + mm_obj_dbg (self, "not setting up carrier config: SIM not found"); else if (!carrier_config_mapping) - mm_dbg ("not setting up carrier config: mapping file not configured"); + mm_obj_dbg (self, "not setting up carrier config: mapping file not configured"); else { const gchar *imsi; @@ -5179,13 +5462,13 @@ g_free (carrier_config_mapping); return; } - mm_warn ("couldn't setup carrier config: unknown IMSI"); + mm_obj_warn (self, "couldn't setup carrier config: unknown IMSI"); } g_clear_object (&sim); g_free (carrier_config_mapping); } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_OWN_NUMBERS: /* Own numbers is meant to be loaded only once during the whole @@ -5200,8 +5483,8 @@ task); return; } - /* Fall down to next step */ ctx->step++; + /* fall-through */ case INITIALIZATION_STEP_CURRENT_MODES: { MMModemMode allowed = MM_MODEM_MODE_ANY; @@ -5241,9 +5524,8 @@ g_array_unref (supported); } - /* Fall down to next step */ ctx->step++; - } + } /* fall-through */ case INITIALIZATION_STEP_CURRENT_BANDS: { GArray *current; @@ -5272,9 +5554,8 @@ if (current) g_array_unref (current); - /* Fall down to next step */ ctx->step++; - } + } /* fall-through */ case INITIALIZATION_STEP_LAST: /* Setup all method handlers */ @@ -5290,6 +5571,7 @@ "signal::handle-enable", G_CALLBACK (handle_enable), self, "signal::handle-set-current-bands", G_CALLBACK (handle_set_current_bands), self, "signal::handle-set-current-modes", G_CALLBACK (handle_set_current_modes), self, + "signal::handle-set-primary-sim-slot", G_CALLBACK (handle_set_primary_sim_slot), self, NULL); /* Finally, export the new interface, even if we got errors, but only if not @@ -5306,6 +5588,9 @@ g_object_unref (task); return; + + default: + break; } g_assert_not_reached (); @@ -5532,6 +5817,22 @@ FALSE); } +gboolean +mm_iface_modem_is_5g (MMIfaceModem *self) +{ + return find_supported_mode (self, MM_MODEM_MODE_5G, NULL); +} + +gboolean +mm_iface_modem_is_5g_only (MMIfaceModem *self) +{ + gboolean only; + + return (find_supported_mode (self, MM_MODEM_MODE_5G, &only) ? + only : + FALSE); +} + /*****************************************************************************/ MMModemCapability @@ -5561,40 +5862,34 @@ gboolean mm_iface_modem_is_3gpp_lte (MMIfaceModem *self) { - return (mm_iface_modem_get_current_capabilities (self) & MM_MODEM_CAPABILITY_3GPP_LTE); + return (mm_iface_modem_get_current_capabilities (self) & MM_MODEM_CAPABILITY_LTE); } gboolean -mm_iface_modem_is_cdma (MMIfaceModem *self) +mm_iface_modem_is_3gpp_5gnr (MMIfaceModem *self) { - return (mm_iface_modem_get_current_capabilities (self) & MM_MODEM_CAPABILITY_CDMA_EVDO); + return (mm_iface_modem_get_current_capabilities (self) & MM_MODEM_CAPABILITY_5GNR); } gboolean -mm_iface_modem_is_3gpp_only (MMIfaceModem *self) +mm_iface_modem_is_cdma (MMIfaceModem *self) { - MMModemCapability capabilities; - - capabilities = mm_iface_modem_get_current_capabilities (self); - return (capabilities & MM_MODEM_CAPABILITY_3GPP) && !((MM_MODEM_CAPABILITY_3GPP ^ capabilities) & capabilities); + return (mm_iface_modem_get_current_capabilities (self) & MM_MODEM_CAPABILITY_CDMA_EVDO); } gboolean -mm_iface_modem_is_3gpp_lte_only (MMIfaceModem *self) +mm_iface_modem_is_3gpp_only (MMIfaceModem *self) { MMModemCapability capabilities; capabilities = mm_iface_modem_get_current_capabilities (self); - return (capabilities & MM_MODEM_CAPABILITY_3GPP_LTE) && !((MM_MODEM_CAPABILITY_3GPP_LTE ^ capabilities) & capabilities); + return (capabilities & MM_MODEM_CAPABILITY_3GPP) && !((MM_MODEM_CAPABILITY_3GPP ^ capabilities) & capabilities); } gboolean mm_iface_modem_is_cdma_only (MMIfaceModem *self) { - MMModemCapability capabilities; - - capabilities = mm_iface_modem_get_current_capabilities (self); - return (capabilities & MM_MODEM_CAPABILITY_CDMA_EVDO) && !((MM_MODEM_CAPABILITY_CDMA_EVDO ^ capabilities) & capabilities); + return (mm_iface_modem_get_current_capabilities (self) == MM_MODEM_CAPABILITY_CDMA_EVDO); } /*****************************************************************************/ @@ -5685,6 +5980,14 @@ g_object_interface_install_property (g_iface, + g_param_spec_boxed (MM_IFACE_MODEM_SIM_SLOTS, + "SIM slots", + "SIM objects in SIM slots", + MM_TYPE_OBJECT_ARRAY, + G_PARAM_READWRITE)); + + g_object_interface_install_property + (g_iface, g_param_spec_enum (MM_IFACE_MODEM_STATE, "State", "State of the modem", diff -Nru modemmanager-1.12.8/src/mm-iface-modem.h modemmanager-1.16.6/src/mm-iface-modem.h --- modemmanager-1.12.8/src/mm-iface-modem.h 2020-02-26 20:11:44.000000000 +0800 +++ modemmanager-1.16.6/src/mm-iface-modem.h 2021-06-06 21:40:59.000000000 +0800 @@ -35,6 +35,7 @@ #define MM_IFACE_MODEM_DBUS_SKELETON "iface-modem-dbus-skeleton" #define MM_IFACE_MODEM_STATE "iface-modem-state" #define MM_IFACE_MODEM_SIM "iface-modem-sim" +#define MM_IFACE_MODEM_SIM_SLOTS "iface-modem-sim-slots" #define MM_IFACE_MODEM_BEARER_LIST "iface-modem-bearer-list" #define MM_IFACE_MODEM_SIM_HOT_SWAP_SUPPORTED "iface-modem-sim-hot-swap-supported" #define MM_IFACE_MODEM_SIM_HOT_SWAP_CONFIGURED "iface-modem-sim-hot-swap-configured" @@ -268,6 +269,14 @@ GAsyncResult *res, GError **error); + /* Asynchronous FCC unlock operation */ + void (* fcc_unlock) (MMIfaceModem *self, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* fcc_unlock_finish) (MMIfaceModem *self, + GAsyncResult *res, + GError **error); + /* Asynchronous modem power-up operation */ void (*modem_power_up) (MMIfaceModem *self, GAsyncReadyCallback callback, @@ -289,6 +298,7 @@ * Useful for when the modem changes power states since we might * not get the relevant notifications from the modem. */ void (*check_for_sim_swap) (MMIfaceModem *self, + const gchar *iccid, GAsyncReadyCallback callback, gpointer user_data); gboolean (*check_for_sim_swap_finish) (MMIfaceModem *self, @@ -343,6 +353,25 @@ GAsyncResult *res, GError **error); + /* Create SIMs in all SIM slots */ + void (* load_sim_slots) (MMIfaceModem *self, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* load_sim_slots_finish) (MMIfaceModem *self, + GAsyncResult *res, + GPtrArray **sim_slots, + guint *primary_sim_slot, + GError **error); + + /* Set primary SIM slot */ + void (* set_primary_sim_slot) (MMIfaceModem *self, + guint sim_slot, + GAsyncReadyCallback callback, + gpointer user_data); + gboolean (* set_primary_sim_slot_finish) (MMIfaceModem *self, + GAsyncResult *res, + GError **error); + /* Create bearer */ void (*create_bearer) (MMIfaceModem *self, MMBearerProperties *properties, @@ -382,6 +411,7 @@ }; GType mm_iface_modem_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMIfaceModem, g_object_unref) /* Helpers to query access technologies */ MMModemAccessTechnology mm_iface_modem_get_access_technologies (MMIfaceModem *self); @@ -391,7 +421,7 @@ gboolean mm_iface_modem_is_3gpp (MMIfaceModem *self); gboolean mm_iface_modem_is_3gpp_only (MMIfaceModem *self); gboolean mm_iface_modem_is_3gpp_lte (MMIfaceModem *self); -gboolean mm_iface_modem_is_3gpp_lte_only (MMIfaceModem *self); +gboolean mm_iface_modem_is_3gpp_5gnr (MMIfaceModem *self); gboolean mm_iface_modem_is_cdma (MMIfaceModem *self); gboolean mm_iface_modem_is_cdma_only (MMIfaceModem *self); @@ -402,6 +432,8 @@ gboolean mm_iface_modem_is_3g_only (MMIfaceModem *self); gboolean mm_iface_modem_is_4g (MMIfaceModem *self); gboolean mm_iface_modem_is_4g_only (MMIfaceModem *self); +gboolean mm_iface_modem_is_5g (MMIfaceModem *self); +gboolean mm_iface_modem_is_5g_only (MMIfaceModem *self); /* Helpers to query properties */ const gchar *mm_iface_modem_get_model (MMIfaceModem *self); @@ -544,4 +576,14 @@ void mm_iface_modem_bind_simple_status (MMIfaceModem *self, MMSimpleStatus *status); +/* Check if the SIM or eSIM profile has changed */ +void mm_iface_modem_check_for_sim_swap (MMIfaceModem *self, + guint slot_index, + const gchar *iccid, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean mm_iface_modem_check_for_sim_swap_finish (MMIfaceModem *self, + GAsyncResult *res, + GError **error); + #endif /* MM_IFACE_MODEM_H */ diff -Nru modemmanager-1.12.8/src/mm-log-object.c modemmanager-1.16.6/src/mm-log-object.c --- modemmanager-1.12.8/src/mm-log-object.c 1970-01-01 08:00:00.000000000 +0800 +++ modemmanager-1.16.6/src/mm-log-object.c 2021-06-06 21:40:59.000000000 +0800 @@ -0,0 +1,89 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details: + * + * Copyright (C) 2020 Aleksander Morgado + */ + +#include "mm-log-object.h" + +G_DEFINE_INTERFACE (MMLogObject, mm_log_object, G_TYPE_OBJECT) + +/*****************************************************************************/ +/* Private data context */ + +#define PRIVATE_TAG "log-object" +static GQuark private_quark; + +typedef struct { + gchar *owner_id; + gchar *id; +} Private; + +static void +private_free (Private *priv) +{ + g_free (priv->owner_id); + g_free (priv->id); + g_slice_free (Private, priv); +} + +static Private * +get_private (MMLogObject *self) +{ + Private *priv; + + if (G_UNLIKELY (!private_quark)) + private_quark = g_quark_from_static_string (PRIVATE_TAG); + + priv = g_object_get_qdata (G_OBJECT (self), private_quark); + if (!priv) { + priv = g_slice_new0 (Private); + g_object_set_qdata_full (G_OBJECT (self), private_quark, priv, (GDestroyNotify)private_free); + } + + return priv; +} + +const gchar * +mm_log_object_get_id (MMLogObject *self) +{ + Private *priv; + + priv = get_private (self); + if (!priv->id) { + gchar *self_id; + + self_id = MM_LOG_OBJECT_GET_IFACE (self)->build_id (self); + if (priv->owner_id) { + priv->id = g_strdup_printf ("%s/%s", priv->owner_id, self_id); + g_free (self_id); + } else + priv->id = self_id; + } + return priv->id; +} + +void +mm_log_object_set_owner_id (MMLogObject *self, + const gchar *owner_id) +{ + Private *priv; + + priv = get_private (self); + g_free (priv->owner_id); + priv->owner_id = g_strdup (owner_id); +} + +static void +mm_log_object_default_init (MMLogObjectInterface *iface) +{ +} diff -Nru modemmanager-1.12.8/src/mm-log-object.h modemmanager-1.16.6/src/mm-log-object.h --- modemmanager-1.12.8/src/mm-log-object.h 1970-01-01 08:00:00.000000000 +0800 +++ modemmanager-1.16.6/src/mm-log-object.h 2021-06-06 21:40:59.000000000 +0800 @@ -0,0 +1,38 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details: + * + * Copyright (C) 2020 Aleksander Morgado + */ + +#ifndef MM_LOG_OBJECT_H +#define MM_LOG_OBJECT_H + +#include +#include + +#include "mm-log.h" + +#define MM_TYPE_LOG_OBJECT mm_log_object_get_type () +G_DECLARE_INTERFACE (MMLogObject, mm_log_object, MM, LOG_OBJECT, GObject) + +struct _MMLogObjectInterface +{ + GTypeInterface g_iface; + + gchar * (* build_id) (MMLogObject *self); +}; + +const gchar *mm_log_object_get_id (MMLogObject *self); +void mm_log_object_set_owner_id (MMLogObject *self, + const gchar *owner_id); + +#endif /* MM_LOG_OBJECT_H */ diff -Nru modemmanager-1.12.8/src/mm-log-test.h modemmanager-1.16.6/src/mm-log-test.h --- modemmanager-1.12.8/src/mm-log-test.h 1970-01-01 08:00:00.000000000 +0800 +++ modemmanager-1.16.6/src/mm-log-test.h 2021-06-06 21:40:59.000000000 +0800 @@ -0,0 +1,46 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details: + * + * Copyright (C) 2020 Aleksander Morgado + */ + +#ifndef MM_LOG_TEST_H +#define MM_LOG_TEST_H + +#include +#include "mm-log.h" + +/* This is a common logging method to be used by all test applications */ + +void +_mm_log (gpointer obj, + const gchar *module, + const gchar *loc, + const gchar *func, + guint32 level, + const gchar *fmt, + ...) +{ + va_list args; + gchar *msg; + + if (!g_test_verbose ()) + return; + + va_start (args, fmt); + msg = g_strdup_vprintf (fmt, args); + va_end (args); + g_print ("%s\n", msg); + g_free (msg); +} + +#endif /* MM_LOG_TEST_H */ diff -Nru modemmanager-1.12.8/src/mm-log.c modemmanager-1.16.6/src/mm-log.c --- modemmanager-1.12.8/src/mm-log.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-log.c 2021-06-06 21:40:59.000000000 +0800 @@ -10,7 +10,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details: * - * Copyright (C) 2011 Red Hat, Inc. + * Copyright (C) 2011-2020 Red Hat, Inc. + * Copyright (C) 2020 Aleksander Morgado */ #define _GNU_SOURCE @@ -41,6 +42,7 @@ #endif #include "mm-log.h" +#include "mm-log-object.h" enum { TS_FLAG_NONE = 0, @@ -74,7 +76,7 @@ }; static GString *msgbuf = NULL; -static volatile gsize msgbuf_once = 0; +static gsize msgbuf_once = 0; static int mm_to_syslog_priority (MMLogLevel level) @@ -88,6 +90,8 @@ return LOG_INFO; case MM_LOG_LEVEL_ERR: return LOG_ERR; + default: + break; } g_assert_not_reached (); return 0; @@ -96,6 +100,11 @@ static int glib_to_syslog_priority (GLogLevelFlags level) { + /* if the log was flagged as fatal (e.g. G_DEBUG=fatal-warnings), ignore + * the fatal flag for logging purposes */ + if (level & G_LOG_FLAG_FATAL) + level &= ~G_LOG_FLAG_FATAL; + switch (level) { case G_LOG_LEVEL_ERROR: return LOG_CRIT; @@ -105,10 +114,15 @@ return LOG_WARNING; case G_LOG_LEVEL_MESSAGE: return LOG_NOTICE; + case G_LOG_LEVEL_INFO: + return LOG_INFO; case G_LOG_LEVEL_DEBUG: return LOG_DEBUG; + case G_LOG_LEVEL_MASK: + case G_LOG_FLAG_FATAL: + case G_LOG_FLAG_RECURSION: default: - return LOG_INFO; + g_assert_not_reached (); } } @@ -124,6 +138,8 @@ return " "; case MM_LOG_LEVEL_ERR: return ""; + default: + break; } g_assert_not_reached (); return NULL; @@ -191,10 +207,12 @@ #endif void -_mm_log (const char *loc, - const char *func, - MMLogLevel level, - const char *fmt, +_mm_log (gpointer obj, + const gchar *module, + const gchar *loc, + const gchar *func, + MMLogLevel level, + const gchar *fmt, ...) { va_list args; @@ -234,6 +252,11 @@ g_string_append_printf (msgbuf, "[%s] %s(): ", loc, func); #endif + if (obj) + g_string_append_printf (msgbuf, "[%s] ", mm_log_object_get_id (MM_LOG_OBJECT (obj))); + if (module) + g_string_append_printf (msgbuf, "(%s) ", module); + va_start (args, fmt); g_string_append_vprintf (msgbuf, fmt, args); va_end (args); diff -Nru modemmanager-1.12.8/src/mm-log.h modemmanager-1.16.6/src/mm-log.h --- modemmanager-1.12.8/src/mm-log.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-log.h 2021-06-06 21:40:59.000000000 +0800 @@ -10,7 +10,8 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details: * - * Copyright (C) 2011 Red Hat, Inc. + * Copyright (C) 2011-2020 Red Hat, Inc. + * Copyright (C) 2020 Aleksander Morgado */ #ifndef MM_LOG_H @@ -26,26 +27,31 @@ MM_LOG_LEVEL_DEBUG = 0x00000008 } MMLogLevel; -#define mm_err(...) \ - _mm_log (G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_ERR, ## __VA_ARGS__ ) - -#define mm_warn(...) \ - _mm_log (G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_WARN, ## __VA_ARGS__ ) - -#define mm_info(...) \ - _mm_log (G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_INFO, ## __VA_ARGS__ ) - -#define mm_dbg(...) \ - _mm_log (G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_DEBUG, ## __VA_ARGS__ ) - -#define mm_log(level, ...) \ - _mm_log (G_STRLOC, G_STRFUNC, level, ## __VA_ARGS__ ) - -void _mm_log (const char *loc, - const char *func, - MMLogLevel level, - const char *fmt, - ...) __attribute__((__format__ (__printf__, 4, 5))); +#if !defined MM_MODULE_NAME +# define MM_MODULE_NAME (const gchar *)NULL +#endif + +#define mm_obj_err(obj, ...) _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_ERR, ## __VA_ARGS__ ) +#define mm_obj_warn(obj, ...) _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_WARN, ## __VA_ARGS__ ) +#define mm_obj_info(obj, ...) _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_INFO, ## __VA_ARGS__ ) +#define mm_obj_dbg(obj, ...) _mm_log (obj, MM_MODULE_NAME, G_STRLOC, G_STRFUNC, MM_LOG_LEVEL_DEBUG, ## __VA_ARGS__ ) + +/* only allow using non-object logging API if explicitly requested + * (e.g. in the main daemon source) */ +#if defined MM_LOG_NO_OBJECT +# define mm_err(...) mm_obj_err (NULL, ## __VA_ARGS__ ) +# define mm_warn(...) mm_obj_warn (NULL, ## __VA_ARGS__ ) +# define mm_info(...) mm_obj_info (NULL, ## __VA_ARGS__ ) +# define mm_dbg(...) mm_obj_dbg (NULL, ## __VA_ARGS__ ) +#endif + +void _mm_log (gpointer obj, + const gchar *module, + const gchar *loc, + const gchar *func, + MMLogLevel level, + const gchar *fmt, + ...) __attribute__((__format__ (__printf__, 6, 7))); gboolean mm_log_set_level (const char *level, GError **error); diff -Nru modemmanager-1.12.8/src/mm-modem-helpers-mbim.c modemmanager-1.16.6/src/mm-modem-helpers-mbim.c --- modemmanager-1.12.8/src/mm-modem-helpers-mbim.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-modem-helpers-mbim.c 2021-06-06 21:40:59.000000000 +0800 @@ -17,13 +17,16 @@ #include "mm-modem-helpers.h" #include "mm-enums-types.h" #include "mm-errors-types.h" -#include "mm-log.h" +#include "mm-log-object.h" + +#include /*****************************************************************************/ MMModemCapability -mm_modem_capability_from_mbim_device_caps (MbimCellularClass caps_cellular_class, - MbimDataClass caps_data_class) +mm_modem_capability_from_mbim_device_caps (MbimCellularClass caps_cellular_class, + MbimDataClass caps_data_class, + const gchar *caps_custom_data_class) { MMModemCapability mask = 0; @@ -38,6 +41,12 @@ if (caps_data_class & MBIM_DATA_CLASS_LTE) mask |= MM_MODEM_CAPABILITY_LTE; + if ((caps_data_class & MBIM_DATA_CLASS_CUSTOM) && caps_custom_data_class) { + /* e.g. Gosuncn GM800 reports MBIM custom data class "5G/TDS" */ + if (strstr (caps_custom_data_class, "5G")) + mask |= MM_MODEM_CAPABILITY_5GNR; + } + return mask; } @@ -47,9 +56,6 @@ mm_modem_lock_from_mbim_pin_type (MbimPinType pin_type) { switch (pin_type) { - case MBIM_PIN_TYPE_UNKNOWN: - case MBIM_PIN_TYPE_CUSTOM: - break; case MBIM_PIN_TYPE_PIN1: return MM_MODEM_LOCK_SIM_PIN; case MBIM_PIN_TYPE_PIN2: @@ -82,6 +88,10 @@ return MM_MODEM_LOCK_PH_SP_PIN; case MBIM_PIN_TYPE_CORPORATE_PUK: return MM_MODEM_LOCK_PH_CORP_PUK; + case MBIM_PIN_TYPE_UNKNOWN: + case MBIM_PIN_TYPE_CUSTOM: + default: + break; } return MM_MODEM_LOCK_UNKNOWN; @@ -200,6 +210,8 @@ GError * mm_mobile_equipment_error_from_mbim_nw_error (MbimNwError nw_error) { + const gchar *msg; + switch (nw_error) { case MBIM_NW_ERROR_IMSI_UNKNOWN_IN_HLR: return g_error_new (MM_MOBILE_EQUIPMENT_ERROR, @@ -305,11 +317,41 @@ return g_error_new (MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_GPRS_REQUESTED_APN_NOT_SUPPORTED, "Requested APN not supported"); + + case MBIM_NW_ERROR_SEMANTICALLY_INCORRECT_MESSAGE: + return g_error_new (MM_MOBILE_EQUIPMENT_ERROR, + MM_MOBILE_EQUIPMENT_ERROR_GPRS_SEMANTICALLY_INCORRECT_MESSAGE, + "Semantically incorrect message"); + + case MBIM_NW_ERROR_PROTOCOL_ERROR_UNSPECIFIED: + return g_error_new (MM_MOBILE_EQUIPMENT_ERROR, + MM_MOBILE_EQUIPMENT_ERROR_GPRS_UNSPECIFIED_PROTOCOL_ERROR, + "Unspecified protocol error"); + + case MBIM_NW_ERROR_IMEI_NOT_ACCEPTED: + case MBIM_NW_ERROR_MS_IDENTITY_NOT_DERIVED_BY_NETWORK: + case MBIM_NW_ERROR_IMPLICITLY_DETACHED: + case MBIM_NW_ERROR_MSC_TEMPORARILY_NOT_REACHABLE: + case MBIM_NW_ERROR_MAC_FAILURE: + case MBIM_NW_ERROR_SYNCH_FAILURE: + case MBIM_NW_ERROR_NO_PDP_CONTEXT_ACTIVATED: + case MBIM_NW_ERROR_PDP_TYPE_IPV4_ONLY_ALLOWED: + case MBIM_NW_ERROR_PDP_TYPE_IPV6_ONLY_ALLOWED: + case MBIM_NW_ERROR_INVALID_MANDATORY_INFORMATION: + case MBIM_NW_ERROR_MESSAGE_TYPE_NON_EXISTENT_OR_NOT_IMPLEMENTED: + case MBIM_NW_ERROR_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE: + case MBIM_NW_ERROR_INFORMATION_ELEMENT_NON_EXISTENT_OR_NOT_IMPLEMENTED: + case MBIM_NW_ERROR_CONDITIONAL_IE_ERROR: + case MBIM_NW_ERROR_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE: + case MBIM_NW_ERROR_APN_RESTRICTION_VALUE_INCOMPATIBLE_WITH_ACTIVE_PDP_CONTEXT: + case MBIM_NW_ERROR_MULTIPLE_ACCESSES_TO_A_PDN_CONNECTION_NOT_ALLOWED: + case MBIM_NW_ERROR_UNKNOWN: default: + msg = mbim_nw_error_get_string (nw_error); return g_error_new (MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_GPRS_UNKNOWN, - "Unknown error (%u)", - nw_error); + "Unsupported error (%u): %s", + nw_error, msg ? msg : "unknown"); } } @@ -334,6 +376,7 @@ MbimAuthProtocol mm_bearer_allowed_auth_to_mbim_auth_protocol (MMBearerAllowedAuth bearer_auth, + gpointer log_object, GError **error) { gchar *str; @@ -341,13 +384,13 @@ /* NOTE: the input is a BITMASK, so we try to find a "best match" */ if (bearer_auth == MM_BEARER_ALLOWED_AUTH_UNKNOWN) { - mm_dbg ("Using default (PAP) authentication method"); - return MBIM_AUTH_PROTOCOL_PAP; + mm_obj_dbg (log_object, "using default (CHAP) authentication method"); + return MBIM_AUTH_PROTOCOL_CHAP; } - if (bearer_auth & MM_BEARER_ALLOWED_AUTH_PAP) - return MBIM_AUTH_PROTOCOL_PAP; if (bearer_auth & MM_BEARER_ALLOWED_AUTH_CHAP) return MBIM_AUTH_PROTOCOL_CHAP; + if (bearer_auth & MM_BEARER_ALLOWED_AUTH_PAP) + return MBIM_AUTH_PROTOCOL_PAP; if (bearer_auth & MM_BEARER_ALLOWED_AUTH_MSCHAPV2) return MBIM_AUTH_PROTOCOL_MSCHAPV2; if (bearer_auth & MM_BEARER_ALLOWED_AUTH_NONE) @@ -377,6 +420,7 @@ return MM_BEARER_IP_FAMILY_IPV4V6; case MBIM_CONTEXT_IP_TYPE_IPV4_AND_IPV6: return MM_BEARER_IP_FAMILY_IPV4 | MM_BEARER_IP_FAMILY_IPV6; + case MBIM_CONTEXT_IP_TYPE_DEFAULT: default: return MM_BEARER_IP_FAMILY_NONE; } @@ -431,6 +475,8 @@ return MM_SMS_STATE_STORED; case MBIM_SMS_STATUS_SENT: return MM_SMS_STATE_SENT; + default: + break; } return MM_SMS_STATE_UNKNOWN; diff -Nru modemmanager-1.12.8/src/mm-modem-helpers-mbim.h modemmanager-1.16.6/src/mm-modem-helpers-mbim.h --- modemmanager-1.12.8/src/mm-modem-helpers-mbim.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-modem-helpers-mbim.h 2021-06-06 21:40:59.000000000 +0800 @@ -24,8 +24,9 @@ /*****************************************************************************/ /* MBIM/BasicConnect to MM translations */ -MMModemCapability mm_modem_capability_from_mbim_device_caps (MbimCellularClass caps_cellular_class, - MbimDataClass caps_data_class); +MMModemCapability mm_modem_capability_from_mbim_device_caps (MbimCellularClass caps_cellular_class, + MbimDataClass caps_data_class, + const gchar *caps_custom_data_class); MMModemLock mm_modem_lock_from_mbim_pin_type (MbimPinType pin_type); @@ -41,6 +42,7 @@ MMBearerAllowedAuth mm_bearer_allowed_auth_from_mbim_auth_protocol (MbimAuthProtocol auth_protocol); MbimAuthProtocol mm_bearer_allowed_auth_to_mbim_auth_protocol (MMBearerAllowedAuth bearer_auth, + gpointer log_object, GError **error); MMBearerIpFamily mm_bearer_ip_family_from_mbim_context_ip_type (MbimContextIpType ip_type); MbimContextIpType mm_bearer_ip_family_to_mbim_context_ip_type (MMBearerIpFamily ip_family, diff -Nru modemmanager-1.12.8/src/mm-modem-helpers-qmi.c modemmanager-1.16.6/src/mm-modem-helpers-qmi.c --- modemmanager-1.12.8/src/mm-modem-helpers-qmi.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-modem-helpers-qmi.c 2021-06-06 21:40:59.000000000 +0800 @@ -22,12 +22,13 @@ #include "mm-modem-helpers-qmi.h" #include "mm-modem-helpers.h" #include "mm-enums-types.h" -#include "mm-log.h" +#include "mm-log-object.h" /*****************************************************************************/ MMModemCapability -mm_modem_capability_from_qmi_radio_interface (QmiDmsRadioInterface network) +mm_modem_capability_from_qmi_radio_interface (QmiDmsRadioInterface network, + gpointer log_object) { switch (network) { case QMI_DMS_RADIO_INTERFACE_CDMA20001X: @@ -40,9 +41,10 @@ return MM_MODEM_CAPABILITY_GSM_UMTS; case QMI_DMS_RADIO_INTERFACE_LTE: return MM_MODEM_CAPABILITY_LTE; + case QMI_DMS_RADIO_INTERFACE_5GNR: + return MM_MODEM_CAPABILITY_5GNR; default: - mm_warn ("Unhandled QMI radio interface (%u)", - (guint)network); + mm_obj_warn (log_object, "unhandled QMI radio interface '%u'", (guint)network); return MM_MODEM_CAPABILITY_NONE; } } @@ -50,7 +52,8 @@ /*****************************************************************************/ MMModemMode -mm_modem_mode_from_qmi_radio_interface (QmiDmsRadioInterface network) +mm_modem_mode_from_qmi_radio_interface (QmiDmsRadioInterface network, + gpointer log_object) { switch (network) { case QMI_DMS_RADIO_INTERFACE_CDMA20001X: @@ -63,9 +66,10 @@ return MM_MODEM_MODE_3G; case QMI_DMS_RADIO_INTERFACE_LTE: return MM_MODEM_MODE_4G; + case QMI_DMS_RADIO_INTERFACE_5GNR: + return MM_MODEM_MODE_5G; default: - mm_warn ("Unhandled QMI radio interface (%u)", - (guint)network); + mm_obj_warn (log_object, "unhandled QMI radio interface '%u'", (guint)network); return MM_MODEM_MODE_NONE; } } @@ -138,19 +142,18 @@ case MM_MODEM_3GPP_FACILITY_PH_SIM: /* Not really sure about this one; it may be PH_FSIM? */ return QMI_DMS_UIM_FACILITY_PF; - case MM_MODEM_3GPP_FACILITY_NET_PERS: return QMI_DMS_UIM_FACILITY_PN; - case MM_MODEM_3GPP_FACILITY_NET_SUB_PERS: return QMI_DMS_UIM_FACILITY_PU; - case MM_MODEM_3GPP_FACILITY_PROVIDER_PERS: return QMI_DMS_UIM_FACILITY_PP; - case MM_MODEM_3GPP_FACILITY_CORP_PERS: return QMI_DMS_UIM_FACILITY_PC; - + case MM_MODEM_3GPP_FACILITY_NONE: + case MM_MODEM_3GPP_FACILITY_SIM: + case MM_MODEM_3GPP_FACILITY_FIXED_DIALING: + case MM_MODEM_3GPP_FACILITY_PH_FSIM: default: /* Never try to ask for a facility we cannot translate */ g_assert_not_reached (); @@ -216,8 +219,9 @@ }; static void -dms_add_qmi_bands (GArray *mm_bands, - QmiDmsBandCapability qmi_bands) +dms_add_qmi_bands (GArray *mm_bands, + QmiDmsBandCapability qmi_bands, + gpointer log_object) { static QmiDmsBandCapability qmi_bands_expected = 0; QmiDmsBandCapability not_expected; @@ -235,11 +239,10 @@ /* Log about the bands that cannot be represented in ModemManager */ not_expected = ((qmi_bands_expected ^ qmi_bands) & qmi_bands); if (not_expected) { - gchar *aux; + g_autofree gchar *aux = NULL; aux = qmi_dms_band_capability_build_string_from_mask (not_expected); - mm_dbg ("Cannot add the following bands: '%s'", aux); - g_free (aux); + mm_obj_dbg (log_object, "cannot add the following bands: '%s'", aux); } /* And add the expected ones */ @@ -313,8 +316,9 @@ } static void -dms_add_extended_qmi_lte_bands (GArray *mm_bands, - GArray *extended_qmi_bands) +dms_add_extended_qmi_lte_bands (GArray *mm_bands, + GArray *extended_qmi_bands, + gpointer log_object) { guint i; @@ -333,7 +337,7 @@ * MM_MODEM_BAND_EUTRAN_71 = 101 */ if (val < 1 || val > 71) - mm_dbg ("Unexpected LTE band supported by module: EUTRAN %u", val); + mm_obj_dbg (log_object, "unexpected LTE band supported by module: EUTRAN %u", val); else { MMModemBand band; @@ -344,17 +348,18 @@ } GArray * -mm_modem_bands_from_qmi_band_capabilities (QmiDmsBandCapability qmi_bands, - QmiDmsLteBandCapability qmi_lte_bands, - GArray *extended_qmi_lte_bands) +mm_modem_bands_from_qmi_band_capabilities (QmiDmsBandCapability qmi_bands, + QmiDmsLteBandCapability qmi_lte_bands, + GArray *extended_qmi_lte_bands, + gpointer log_object) { GArray *mm_bands; mm_bands = g_array_new (FALSE, FALSE, sizeof (MMModemBand)); - dms_add_qmi_bands (mm_bands, qmi_bands); + dms_add_qmi_bands (mm_bands, qmi_bands, log_object); if (extended_qmi_lte_bands) - dms_add_extended_qmi_lte_bands (mm_bands, extended_qmi_lte_bands); + dms_add_extended_qmi_lte_bands (mm_bands, extended_qmi_lte_bands, log_object); else dms_add_qmi_lte_bands (mm_bands, qmi_lte_bands); @@ -420,8 +425,9 @@ }; static void -nas_add_qmi_bands (GArray *mm_bands, - QmiNasBandPreference qmi_bands) +nas_add_qmi_bands (GArray *mm_bands, + QmiNasBandPreference qmi_bands, + gpointer log_object) { static QmiNasBandPreference qmi_bands_expected = 0; QmiNasBandPreference not_expected; @@ -439,11 +445,10 @@ /* Log about the bands that cannot be represented in ModemManager */ not_expected = ((qmi_bands_expected ^ qmi_bands) & qmi_bands); if (not_expected) { - gchar *aux; + g_autofree gchar *aux = NULL; aux = qmi_nas_band_preference_build_string_from_mask (not_expected); - mm_dbg ("Cannot add the following bands: '%s'", aux); - g_free (aux); + mm_obj_dbg (log_object, "cannot add the following bands: '%s'", aux); } /* And add the expected ones */ @@ -517,9 +522,10 @@ } static void -nas_add_extended_qmi_lte_bands (GArray *mm_bands, +nas_add_extended_qmi_lte_bands (GArray *mm_bands, const guint64 *extended_qmi_lte_bands, - guint extended_qmi_lte_bands_size) + guint extended_qmi_lte_bands_size, + gpointer log_object) { guint i; @@ -541,7 +547,7 @@ * MM_MODEM_BAND_EUTRAN_71 = 101 */ if (val < 1 || val > 71) - mm_dbg ("Unexpected LTE band supported by module: EUTRAN %u", val); + mm_obj_dbg (log_object, "unexpected LTE band supported by module: EUTRAN %u", val); else { MMModemBand band; @@ -553,18 +559,19 @@ } GArray * -mm_modem_bands_from_qmi_band_preference (QmiNasBandPreference qmi_bands, - QmiNasLteBandPreference qmi_lte_bands, - const guint64 *extended_qmi_lte_bands, - guint extended_qmi_lte_bands_size) +mm_modem_bands_from_qmi_band_preference (QmiNasBandPreference qmi_bands, + QmiNasLteBandPreference qmi_lte_bands, + const guint64 *extended_qmi_lte_bands, + guint extended_qmi_lte_bands_size, + gpointer log_object) { GArray *mm_bands; mm_bands = g_array_new (FALSE, FALSE, sizeof (MMModemBand)); - nas_add_qmi_bands (mm_bands, qmi_bands); + nas_add_qmi_bands (mm_bands, qmi_bands, log_object); if (extended_qmi_lte_bands && extended_qmi_lte_bands_size) - nas_add_extended_qmi_lte_bands (mm_bands, extended_qmi_lte_bands, extended_qmi_lte_bands_size); + nas_add_extended_qmi_lte_bands (mm_bands, extended_qmi_lte_bands, extended_qmi_lte_bands_size, log_object); else nas_add_qmi_lte_bands (mm_bands, qmi_lte_bands); @@ -572,11 +579,12 @@ } void -mm_modem_bands_to_qmi_band_preference (GArray *mm_bands, - QmiNasBandPreference *qmi_bands, +mm_modem_bands_to_qmi_band_preference (GArray *mm_bands, + QmiNasBandPreference *qmi_bands, QmiNasLteBandPreference *qmi_lte_bands, - guint64 *extended_qmi_lte_bands, - guint extended_qmi_lte_bands_size) + guint64 *extended_qmi_lte_bands, + guint extended_qmi_lte_bands_size, + gpointer log_object) { guint i; @@ -617,8 +625,8 @@ } if (j == G_N_ELEMENTS (nas_lte_bands_map)) - mm_dbg ("Cannot add the following LTE band: '%s'", - mm_modem_band_get_string (band)); + mm_obj_dbg (log_object, "cannot add the following LTE band: '%s'", + mm_modem_band_get_string (band)); } } else { /* Add non-LTE band preference */ @@ -632,8 +640,8 @@ } if (j == G_N_ELEMENTS (nas_bands_map)) - mm_dbg ("Cannot add the following band: '%s'", - mm_modem_band_get_string (band)); + mm_obj_dbg (log_object, "cannot add the following band: '%s'", + mm_modem_band_get_string (band)); } } } @@ -786,6 +794,9 @@ return MM_MODEM_ACCESS_TECHNOLOGY_UMTS; case QMI_NAS_RADIO_INTERFACE_LTE: return MM_MODEM_ACCESS_TECHNOLOGY_LTE; + case QMI_NAS_RADIO_INTERFACE_5GNR: + return MM_MODEM_ACCESS_TECHNOLOGY_5GNR; + case QMI_NAS_RADIO_INTERFACE_UNKNOWN: case QMI_NAS_RADIO_INTERFACE_TD_SCDMA: case QMI_NAS_RADIO_INTERFACE_AMPS: case QMI_NAS_RADIO_INTERFACE_NONE: @@ -843,6 +854,7 @@ case QMI_NAS_DATA_CAPABILITY_HSDPA_PLUS: case QMI_NAS_DATA_CAPABILITY_DC_HSDPA_PLUS: return MM_MODEM_ACCESS_TECHNOLOGY_HSPA_PLUS; + case QMI_NAS_DATA_CAPABILITY_NONE: default: return MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN; } @@ -880,6 +892,12 @@ return MM_MODEM_MODE_3G; case QMI_NAS_RADIO_INTERFACE_LTE: return MM_MODEM_MODE_4G; + case QMI_NAS_RADIO_INTERFACE_5GNR: + return MM_MODEM_MODE_5G; + case QMI_NAS_RADIO_INTERFACE_NONE: + case QMI_NAS_RADIO_INTERFACE_AMPS: + case QMI_NAS_RADIO_INTERFACE_TD_SCDMA: + case QMI_NAS_RADIO_INTERFACE_UNKNOWN: default: return MM_MODEM_MODE_NONE; } @@ -961,6 +979,9 @@ if (qmi & QMI_NAS_RAT_MODE_PREFERENCE_LTE) mode |= MM_MODEM_MODE_4G; + if (qmi & QMI_NAS_RAT_MODE_PREFERENCE_5GNR) + mode |= MM_MODEM_MODE_5G; + return mode; } @@ -988,6 +1009,9 @@ if (mode & MM_MODEM_MODE_4G) pref |= QMI_NAS_RAT_MODE_PREFERENCE_LTE; + + if (mode & MM_MODEM_MODE_5G) + pref |= QMI_NAS_RAT_MODE_PREFERENCE_5GNR; } return pref; @@ -1015,7 +1039,8 @@ if (qmi & QMI_NAS_RAT_MODE_PREFERENCE_LTE) caps |= MM_MODEM_CAPABILITY_LTE; - /* FIXME: LTE Advanced? */ + if (qmi & QMI_NAS_RAT_MODE_PREFERENCE_5GNR) + caps |= MM_MODEM_CAPABILITY_5GNR; return caps; } @@ -1038,6 +1063,9 @@ if (caps & MM_MODEM_CAPABILITY_LTE) qmi |= QMI_NAS_RAT_MODE_PREFERENCE_LTE; + if (caps & MM_MODEM_CAPABILITY_5GNR) + qmi |= QMI_NAS_RAT_MODE_PREFERENCE_5GNR; + return qmi; } @@ -1051,6 +1079,11 @@ array = g_array_new (FALSE, FALSE, sizeof (QmiNasRadioInterface)); + if (caps & MM_MODEM_CAPABILITY_5GNR) { + value = QMI_NAS_RADIO_INTERFACE_5GNR; + g_array_append_val (array, value); + } + if (caps & MM_MODEM_CAPABILITY_LTE) { value = QMI_NAS_RADIO_INTERFACE_LTE; g_array_append_val (array, value); @@ -1073,58 +1106,74 @@ return array; } -GArray * -mm_modem_mode_to_qmi_acquisition_order_preference (MMModemMode allowed, - MMModemMode preferred, - gboolean is_cdma, - gboolean is_3gpp) +static gboolean +radio_interface_array_contains (GArray *array, + QmiNasRadioInterface act) { - GArray *array; - QmiNasRadioInterface value; + guint i; - array = g_array_new (FALSE, FALSE, sizeof (QmiNasRadioInterface)); + for (i = 0; i < array->len; i++) { + QmiNasRadioInterface value; - if (allowed & MM_MODEM_MODE_4G) { - value = QMI_NAS_RADIO_INTERFACE_LTE; - if (preferred == MM_MODEM_MODE_4G) - g_array_prepend_val (array, value); - else - g_array_append_val (array, value); + value = g_array_index (array, QmiNasRadioInterface, i); + if (value == act) + return TRUE; } + return FALSE; +} - if (allowed & MM_MODEM_MODE_3G) { - if (is_cdma) { - value = QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO; - if (preferred == MM_MODEM_MODE_3G) - g_array_prepend_val (array, value); - else - g_array_append_val (array, value); - } - if (is_3gpp) { - value = QMI_NAS_RADIO_INTERFACE_UMTS; - if (preferred == MM_MODEM_MODE_3G) - g_array_prepend_val (array, value); - else - g_array_append_val (array, value); - } - } +static void +radio_interface_array_add_missing (GArray *array, + GArray *all) +{ + guint i; - if (allowed & MM_MODEM_MODE_2G) { - if (is_cdma) { - value = QMI_NAS_RADIO_INTERFACE_CDMA_1X; - if (preferred == MM_MODEM_MODE_2G) - g_array_prepend_val (array, value); - else - g_array_append_val (array, value); - } - if (is_3gpp) { - value = QMI_NAS_RADIO_INTERFACE_GSM; - if (preferred == MM_MODEM_MODE_2G) - g_array_prepend_val (array, value); - else - g_array_append_val (array, value); - } + for (i = 0; i < all->len; i++) { + QmiNasRadioInterface value; + + value = g_array_index (all, QmiNasRadioInterface, i); + if (!radio_interface_array_contains (array, value)) + g_array_append_val (array, value); } +} + +GArray * +mm_modem_mode_to_qmi_acquisition_order_preference (MMModemMode allowed, + MMModemMode preferred, + GArray *all) +{ + GArray *array; + QmiNasRadioInterface preferred_radio = QMI_NAS_RADIO_INTERFACE_UNKNOWN; + QmiNasRadioInterface value; + + array = g_array_sized_new (FALSE, FALSE, sizeof (QmiNasRadioInterface), all->len); + +#define PROCESS_ALLOWED_PREFERRED_MODE(MODE,RADIO) \ + if ((allowed & MODE) && (radio_interface_array_contains (all, RADIO))) { \ + if ((preferred == MODE) && (preferred_radio == QMI_NAS_RADIO_INTERFACE_UNKNOWN)) \ + preferred_radio = RADIO; \ + else { \ + value = RADIO; \ + g_array_append_val (array, value); \ + } \ + } + + PROCESS_ALLOWED_PREFERRED_MODE (MM_MODEM_MODE_5G, QMI_NAS_RADIO_INTERFACE_5GNR); + PROCESS_ALLOWED_PREFERRED_MODE (MM_MODEM_MODE_4G, QMI_NAS_RADIO_INTERFACE_LTE); + PROCESS_ALLOWED_PREFERRED_MODE (MM_MODEM_MODE_3G, QMI_NAS_RADIO_INTERFACE_UMTS); + PROCESS_ALLOWED_PREFERRED_MODE (MM_MODEM_MODE_3G, QMI_NAS_RADIO_INTERFACE_CDMA_1XEVDO); + PROCESS_ALLOWED_PREFERRED_MODE (MM_MODEM_MODE_2G, QMI_NAS_RADIO_INTERFACE_GSM); + PROCESS_ALLOWED_PREFERRED_MODE (MM_MODEM_MODE_2G, QMI_NAS_RADIO_INTERFACE_CDMA_1X); + +#undef PROCESS_ALLOWED_PREFERRED_MODE + + if (preferred_radio != QMI_NAS_RADIO_INTERFACE_UNKNOWN) + g_array_prepend_val (array, preferred_radio); + + /* the acquisition order preference is a TLV that must ALWAYS contain the + * same list of QmiNasRadioInterface values, just with a different order. */ + radio_interface_array_add_missing (array, all); + g_assert_cmpuint (array->len, ==, all->len); return array; } @@ -1154,7 +1203,7 @@ if (qmi & QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_LTE) caps |= MM_MODEM_CAPABILITY_LTE; - /* FIXME: LTE Advanced? */ + /* NOTE: no 5GNR defined in Technology Preference */ return caps; } @@ -1243,7 +1292,8 @@ /*****************************************************************************/ MMModemMode -mm_modem_mode_from_qmi_gsm_wcdma_acquisition_order_preference (QmiNasGsmWcdmaAcquisitionOrderPreference qmi) +mm_modem_mode_from_qmi_gsm_wcdma_acquisition_order_preference (QmiNasGsmWcdmaAcquisitionOrderPreference qmi, + gpointer log_object) { switch (qmi) { case QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_AUTOMATIC: @@ -1253,16 +1303,17 @@ case QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_WCDMA: return MM_MODEM_MODE_3G; default: - mm_dbg ("Unknown acquisition order preference: '%s'", - qmi_nas_gsm_wcdma_acquisition_order_preference_get_string (qmi)); + mm_obj_dbg (log_object, "unknown acquisition order preference: '%s'", + qmi_nas_gsm_wcdma_acquisition_order_preference_get_string (qmi)); return MM_MODEM_MODE_NONE; } } QmiNasGsmWcdmaAcquisitionOrderPreference -mm_modem_mode_to_qmi_gsm_wcdma_acquisition_order_preference (MMModemMode mode) +mm_modem_mode_to_qmi_gsm_wcdma_acquisition_order_preference (MMModemMode mode, + gpointer log_object) { - gchar *str; + g_autofree gchar *str = NULL; /* mode is not a mask in this case, only a value */ @@ -1273,13 +1324,16 @@ return QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_GSM; case MM_MODEM_MODE_NONE: return QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_AUTOMATIC; + case MM_MODEM_MODE_CS: + case MM_MODEM_MODE_4G: + case MM_MODEM_MODE_5G: + case MM_MODEM_MODE_ANY: default: break; } str = mm_modem_mode_build_string_from_mask (mode); - mm_dbg ("Unhandled modem mode: '%s'", str); - g_free (str); + mm_obj_dbg (log_object, "unhandled modem mode: '%s'", str); return QMI_NAS_GSM_WCDMA_ACQUISITION_ORDER_PREFERENCE_AUTOMATIC; } @@ -1368,6 +1422,11 @@ return QMI_WMS_STORAGE_TYPE_UIM; case MM_SMS_STORAGE_ME: return QMI_WMS_STORAGE_TYPE_NV; + case MM_SMS_STORAGE_UNKNOWN: + case MM_SMS_STORAGE_MT: + case MM_SMS_STORAGE_SR: + case MM_SMS_STORAGE_BM: + case MM_SMS_STORAGE_TA: default: return QMI_WMS_STORAGE_TYPE_NONE; } @@ -1381,6 +1440,7 @@ return MM_SMS_STORAGE_SM; case QMI_WMS_STORAGE_TYPE_NV: return MM_SMS_STORAGE_ME; + case QMI_WMS_STORAGE_TYPE_NONE: default: return MM_SMS_STORAGE_UNKNOWN; } @@ -1420,6 +1480,72 @@ return out; } +MMBearerAllowedAuth +mm_bearer_allowed_auth_from_qmi_authentication (QmiWdsAuthentication auth) +{ + MMBearerAllowedAuth out = 0; + + if (auth & QMI_WDS_AUTHENTICATION_PAP) + out |= MM_BEARER_ALLOWED_AUTH_PAP; + if (auth & QMI_WDS_AUTHENTICATION_CHAP) + out |= MM_BEARER_ALLOWED_AUTH_CHAP; + + return out; +} + +MMBearerIpFamily +mm_bearer_ip_family_from_qmi_ip_support_type (QmiWdsIpSupportType ip_support_type) +{ + switch (ip_support_type) { + case QMI_WDS_IP_SUPPORT_TYPE_IPV4: + return MM_BEARER_IP_FAMILY_IPV4; + case QMI_WDS_IP_SUPPORT_TYPE_IPV6: + return MM_BEARER_IP_FAMILY_IPV6; + case QMI_WDS_IP_SUPPORT_TYPE_IPV4V6: + return MM_BEARER_IP_FAMILY_IPV4V6; + default: + return MM_BEARER_IP_FAMILY_NONE; + } +} + +MMBearerIpFamily +mm_bearer_ip_family_from_qmi_pdp_type (QmiWdsPdpType pdp_type) +{ + switch (pdp_type) { + case QMI_WDS_PDP_TYPE_IPV4: + return MM_BEARER_IP_FAMILY_IPV4; + case QMI_WDS_PDP_TYPE_IPV6: + return MM_BEARER_IP_FAMILY_IPV6; + case QMI_WDS_PDP_TYPE_IPV4_OR_IPV6: + return MM_BEARER_IP_FAMILY_IPV4V6; + case QMI_WDS_PDP_TYPE_PPP: + default: + return MM_BEARER_IP_FAMILY_NONE; + } +} + +gboolean +mm_bearer_ip_family_to_qmi_pdp_type (MMBearerIpFamily ip_family, + QmiWdsPdpType *out_pdp_type) +{ + switch (ip_family) { + case MM_BEARER_IP_FAMILY_IPV4: + *out_pdp_type = QMI_WDS_PDP_TYPE_IPV4; + return TRUE; + case MM_BEARER_IP_FAMILY_IPV6: + *out_pdp_type = QMI_WDS_PDP_TYPE_IPV6; + return TRUE; + case MM_BEARER_IP_FAMILY_IPV4V6: + *out_pdp_type = QMI_WDS_PDP_TYPE_IPV4_OR_IPV6; + return TRUE; + case MM_BEARER_IP_FAMILY_NONE: + case MM_BEARER_IP_FAMILY_ANY: + default: + /* there is no valid conversion, so just return FALSE to indicate it */ + return FALSE; + } +} + /*****************************************************************************/ /** @@ -1432,56 +1558,55 @@ * as there would be no capability switching support. */ MMModemCapability -mm_modem_capability_from_qmi_capabilities_context (MMQmiCapabilitiesContext *ctx) +mm_modem_capability_from_qmi_capabilities_context (MMQmiCapabilitiesContext *ctx, + gpointer log_object) { MMModemCapability tmp = MM_MODEM_CAPABILITY_NONE; - gchar *nas_ssp_mode_preference_str; - gchar *nas_tp_str; - gchar *dms_capabilities_str; - gchar *tmp_str; + g_autofree gchar *nas_ssp_mode_preference_str = NULL; + g_autofree gchar *nas_tp_str = NULL; + g_autofree gchar *dms_capabilities_str = NULL; + g_autofree gchar *tmp_str = NULL; /* If not a multimode device, we're done */ #define MULTIMODE (MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_CDMA_EVDO) if ((ctx->dms_capabilities & MULTIMODE) != MULTIMODE) - return ctx->dms_capabilities; - - /* We have a multimode CDMA/EVDO+GSM/UMTS device, check SSP and TP */ - - /* SSP logic to gather capabilities uses the Mode Preference TLV if available */ - if (ctx->nas_ssp_mode_preference_mask) - tmp = mm_modem_capability_from_qmi_rat_mode_preference (ctx->nas_ssp_mode_preference_mask); - /* If no value retrieved from SSP, check TP. We only process TP - * values if not 'auto'. */ - else if (ctx->nas_tp_mask && (ctx->nas_tp_mask != QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO)) - tmp = mm_modem_capability_from_qmi_radio_technology_preference (ctx->nas_tp_mask); - - /* Final capabilities are the intersection between the Technology - * Preference or SSP and the device's capabilities. - * If the Technology Preference was "auto" or unknown we just fall back - * to the Get Capabilities response. - */ - if (tmp == MM_MODEM_CAPABILITY_NONE) tmp = ctx->dms_capabilities; - else - tmp &= ctx->dms_capabilities; + else { + /* We have a multimode CDMA/EVDO+GSM/UMTS device, check SSP and TP */ + + /* SSP logic to gather capabilities uses the Mode Preference TLV if available */ + if (ctx->nas_ssp_mode_preference_mask) + tmp = mm_modem_capability_from_qmi_rat_mode_preference (ctx->nas_ssp_mode_preference_mask); + /* If no value retrieved from SSP, check TP. We only process TP + * values if not 'auto' (0). */ + else if (ctx->nas_tp_mask != QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO) + tmp = mm_modem_capability_from_qmi_radio_technology_preference (ctx->nas_tp_mask); + + /* Final capabilities are the intersection between the Technology + * Preference or SSP and the device's capabilities. + * If the Technology Preference was "auto" or unknown we just fall back + * to the Get Capabilities response. + */ + if (tmp == MM_MODEM_CAPABILITY_NONE) + tmp = ctx->dms_capabilities; + else + tmp &= ctx->dms_capabilities; + } /* Log about the logic applied */ nas_ssp_mode_preference_str = qmi_nas_rat_mode_preference_build_string_from_mask (ctx->nas_ssp_mode_preference_mask); nas_tp_str = qmi_nas_radio_technology_preference_build_string_from_mask (ctx->nas_tp_mask); dms_capabilities_str = mm_modem_capability_build_string_from_mask (ctx->dms_capabilities); tmp_str = mm_modem_capability_build_string_from_mask (tmp); - mm_dbg ("Current capabilities built: '%s'\n" - " SSP mode preference: '%s'\n" - " TP: '%s'\n" - " DMS Capabilities: '%s'", - tmp_str, - nas_ssp_mode_preference_str ? nas_ssp_mode_preference_str : "unknown", - nas_tp_str ? nas_tp_str : "unknown", - dms_capabilities_str); - g_free (nas_ssp_mode_preference_str); - g_free (nas_tp_str); - g_free (dms_capabilities_str); - g_free (tmp_str); + mm_obj_dbg (log_object, + "Current capabilities built: '%s'\n" + " SSP mode preference: '%s'\n" + " TP: '%s'\n" + " DMS Capabilities: '%s'", + tmp_str, + nas_ssp_mode_preference_str ? nas_ssp_mode_preference_str : "unknown", + nas_tp_str ? nas_tp_str : "unknown", + dms_capabilities_str); return tmp; } @@ -1529,6 +1654,7 @@ return QMI_OMA_SESSION_TYPE_NETWORK_INITIATED_DEVICE_CONFIGURE; case MM_OMA_SESSION_TYPE_DEVICE_INITIATED_PRL_UPDATE: return QMI_OMA_SESSION_TYPE_DEVICE_INITIATED_PRL_UPDATE; + case MM_OMA_SESSION_TYPE_UNKNOWN: default: g_assert_not_reached (); } @@ -1640,7 +1766,7 @@ mm_qmi_unique_id_to_firmware_unique_id (GArray *qmi_unique_id, GError **error) { - gint i; + guint i; gboolean expect_nul_byte = FALSE; if (qmi_unique_id->len != EXPECTED_QMI_UNIQUE_ID_LENGTH) { @@ -1693,25 +1819,19 @@ /* The length will be exactly EXPECTED_QMI_UNIQUE_ID_LENGTH*2 if given in HEX */ if (len == (2 * EXPECTED_QMI_UNIQUE_ID_LENGTH)) { - guint8 *tmp; - gsize tmp_len; - guint i; - - for (i = 0; i < len; i++) { - if (!g_ascii_isxdigit (unique_id[i])) { - g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, - "Unexpected character found in unique id (not HEX): %c", unique_id[i]); - return NULL; - } - } + g_autofree guint8 *tmp = NULL; + gsize tmp_len; tmp_len = 0; - tmp = (guint8 *) mm_utils_hexstr2bin (unique_id, &tmp_len); + tmp = mm_utils_hexstr2bin (unique_id, -1, &tmp_len, error); + if (!tmp) { + g_prefix_error (error, "Unexpected character found in unique id: "); + return NULL; + } g_assert (tmp_len == EXPECTED_QMI_UNIQUE_ID_LENGTH); qmi_unique_id = g_array_sized_new (FALSE, FALSE, sizeof (guint8), tmp_len); g_array_insert_vals (qmi_unique_id, 0, tmp, tmp_len); - g_free (tmp); return qmi_unique_id; } @@ -1739,3 +1859,257 @@ "Unexpected unique id length: %u", len); return NULL; } + +/*****************************************************************************/ + +gboolean +mm_qmi_uim_get_card_status_output_parse (gpointer log_object, + QmiMessageUimGetCardStatusOutput *output, + MMModemLock *o_lock, + QmiUimPinState *o_pin1_state, + guint *o_pin1_retries, + guint *o_puk1_retries, + QmiUimPinState *o_pin2_state, + guint *o_pin2_retries, + guint *o_puk2_retries, + GError **error) +{ + QmiMessageUimGetCardStatusOutputCardStatusCardsElement *card; + QmiMessageUimGetCardStatusOutputCardStatusCardsElementApplicationsElement *app; + GArray *cards; + guint16 index_gw_primary = 0xFFFF; + guint8 gw_primary_slot_i = 0; + guint8 gw_primary_application_i = 0; + MMModemLock lock = MM_MODEM_LOCK_UNKNOWN; + + /* This command supports MULTIPLE cards with MULTIPLE applications each. For our + * purposes, we're going to consider as the SIM to use the one identified as + * 'primary GW' exclusively. We don't really support Dual Sim Dual Standby yet. */ + + qmi_message_uim_get_card_status_output_get_card_status ( + output, + &index_gw_primary, + NULL, /* index_1x_primary */ + NULL, /* index_gw_secondary */ + NULL, /* index_1x_secondary */ + &cards, + NULL); + + if (cards->len == 0) { + g_set_error (error, QMI_CORE_ERROR, QMI_CORE_ERROR_FAILED, + "No cards reported"); + return FALSE; + } + + /* Look for the primary GW slot and application. + * If we don't have valid GW primary slot index and application index, assume + * we're missing the SIM altogether */ + gw_primary_slot_i = ((index_gw_primary & 0xFF00) >> 8); + gw_primary_application_i = ((index_gw_primary & 0x00FF)); + + if (gw_primary_slot_i == 0xFF) { + g_set_error (error, + MM_MOBILE_EQUIPMENT_ERROR, + MM_MOBILE_EQUIPMENT_ERROR_SIM_NOT_INSERTED, + "GW primary session index unknown"); + return FALSE; + } + mm_obj_dbg (log_object, "GW primary session index: %u", gw_primary_slot_i); + + if (gw_primary_application_i == 0xFF) { + g_set_error (error, + MM_MOBILE_EQUIPMENT_ERROR, + MM_MOBILE_EQUIPMENT_ERROR_SIM_NOT_INSERTED, + "GW primary application index unknown"); + return FALSE; + } + mm_obj_dbg (log_object, "GW primary application index: %u", gw_primary_application_i); + + /* Validate slot index */ + if (gw_primary_slot_i >= cards->len) { + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, + "Invalid GW primary session index: %u", + gw_primary_slot_i); + return FALSE; + } + + /* Get card at slot */ + card = &g_array_index (cards, QmiMessageUimGetCardStatusOutputCardStatusCardsElement, gw_primary_slot_i); + + if (card->card_state == QMI_UIM_CARD_STATE_ABSENT) { + g_set_error (error, + MM_MOBILE_EQUIPMENT_ERROR, + MM_MOBILE_EQUIPMENT_ERROR_SIM_NOT_INSERTED, + "No card found"); + return FALSE; + } + + if (card->card_state == QMI_UIM_CARD_STATE_ERROR) { + const gchar *card_error; + + card_error = qmi_uim_card_error_get_string (card->error_code); + g_set_error (error, + MM_MOBILE_EQUIPMENT_ERROR, + MM_MOBILE_EQUIPMENT_ERROR_SIM_WRONG, + "Card error: %s", card_error ? card_error : "unknown error"); + return FALSE; + } + + if (card->card_state != QMI_UIM_CARD_STATE_PRESENT) { + g_set_error (error, + MM_MOBILE_EQUIPMENT_ERROR, + MM_MOBILE_EQUIPMENT_ERROR_SIM_WRONG, + "Card error: unexpected card state: 0x%x", card->card_state); + return FALSE; + } + + /* Card is present */ + + if (card->applications->len == 0) { + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, + "No applications reported in card"); + return FALSE; + } + + /* Validate application index */ + if (gw_primary_application_i >= card->applications->len) { + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, + "Invalid GW primary application index: %u", + gw_primary_application_i); + return FALSE; + } + + app = &g_array_index (card->applications, QmiMessageUimGetCardStatusOutputCardStatusCardsElementApplicationsElement, gw_primary_application_i); + if ((app->type != QMI_UIM_CARD_APPLICATION_TYPE_SIM) && (app->type != QMI_UIM_CARD_APPLICATION_TYPE_USIM)) { + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, + "Unsupported application type found in GW primary application index: %s", + qmi_uim_card_application_type_get_string (app->type)); + return FALSE; + } + + /* Illegal application state is fatal, consider it as a failed SIM right + * away and don't even attempt to retry */ + if (app->state == QMI_UIM_CARD_APPLICATION_STATE_ILLEGAL) { + g_set_error (error, + MM_MOBILE_EQUIPMENT_ERROR, + MM_MOBILE_EQUIPMENT_ERROR_SIM_WRONG, + "Illegal SIM/USIM application state"); + return FALSE; + } + + /* If card not ready yet, return RETRY error. + * If the application state reports needing PIN/PUk, consider that ready as + * well, and let the logic fall down to check PIN1/PIN2. */ + if (app->state != QMI_UIM_CARD_APPLICATION_STATE_READY && + app->state != QMI_UIM_CARD_APPLICATION_STATE_PIN1_OR_UPIN_PIN_REQUIRED && + app->state != QMI_UIM_CARD_APPLICATION_STATE_PUK1_OR_UPIN_PUK_REQUIRED && + app->state != QMI_UIM_CARD_APPLICATION_STATE_PIN1_BLOCKED) { + mm_obj_dbg (log_object, "neither SIM nor USIM are ready"); + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_RETRY, + "SIM not ready yet (retry)"); + return FALSE; + } + + /* Report state and retries if requested to do so */ + if (o_pin1_state) + *o_pin1_state = app->pin1_state; + if (o_pin1_retries) + *o_pin1_retries = app->pin1_retries; + if (o_puk1_retries) + *o_puk1_retries = app->puk1_retries; + if (o_pin2_state) + *o_pin2_state = app->pin2_state; + if (o_pin2_retries) + *o_pin2_retries = app->pin2_retries; + if (o_puk2_retries) + *o_puk2_retries = app->puk2_retries; + + /* Early bail out if lock status isn't wanted at this point, so that we + * don't fail with an error the unlock retries check */ + if (!o_lock) + return TRUE; + + /* Card is ready, what's the lock status? */ + + /* PIN1 */ + switch (app->pin1_state) { + case QMI_UIM_PIN_STATE_NOT_INITIALIZED: + g_set_error (error, + MM_MOBILE_EQUIPMENT_ERROR, + MM_MOBILE_EQUIPMENT_ERROR_SIM_WRONG, + "SIM PIN/PUK status not known yet"); + return FALSE; + + case QMI_UIM_PIN_STATE_PERMANENTLY_BLOCKED: + g_set_error (error, + MM_MOBILE_EQUIPMENT_ERROR, + MM_MOBILE_EQUIPMENT_ERROR_SIM_WRONG, + "SIM PIN/PUK permanently blocked"); + return FALSE; + + case QMI_UIM_PIN_STATE_ENABLED_NOT_VERIFIED: + lock = MM_MODEM_LOCK_SIM_PIN; + break; + + case QMI_UIM_PIN_STATE_BLOCKED: + lock = MM_MODEM_LOCK_SIM_PUK; + break; + + case QMI_UIM_PIN_STATE_DISABLED: + case QMI_UIM_PIN_STATE_ENABLED_VERIFIED: + lock = MM_MODEM_LOCK_NONE; + break; + + default: + g_set_error (error, + MM_MOBILE_EQUIPMENT_ERROR, + MM_MOBILE_EQUIPMENT_ERROR_SIM_WRONG, + "Unknown SIM PIN/PUK status"); + return FALSE; + } + + /* PIN2 */ + if (lock == MM_MODEM_LOCK_NONE) { + switch (app->pin2_state) { + case QMI_UIM_PIN_STATE_NOT_INITIALIZED: + mm_obj_warn (log_object, "SIM PIN2/PUK2 status not known yet"); + break; + + case QMI_UIM_PIN_STATE_ENABLED_NOT_VERIFIED: + lock = MM_MODEM_LOCK_SIM_PIN2; + break; + + case QMI_UIM_PIN_STATE_PERMANENTLY_BLOCKED: + mm_obj_warn (log_object, "PUK2 permanently blocked"); + /* Fall through */ + case QMI_UIM_PIN_STATE_BLOCKED: + lock = MM_MODEM_LOCK_SIM_PUK2; + break; + + case QMI_UIM_PIN_STATE_DISABLED: + case QMI_UIM_PIN_STATE_ENABLED_VERIFIED: + break; + + default: + mm_obj_warn (log_object, "unknown SIM PIN2/PUK2 status"); + break; + } + } + + *o_lock = lock; + return TRUE; +} + +/*************************************************************************/ +/* EID parsing */ + +#define EID_BYTE_LENGTH 16 + +gchar * +mm_qmi_uim_decode_eid (const gchar *eid, gsize eid_len) +{ + if (eid_len != EID_BYTE_LENGTH) + return NULL; + + return mm_bcd_to_string ((const guint8 *) eid, eid_len, FALSE /* low_nybble_first */); +} diff -Nru modemmanager-1.12.8/src/mm-modem-helpers-qmi.h modemmanager-1.16.6/src/mm-modem-helpers-qmi.h --- modemmanager-1.12.8/src/mm-modem-helpers-qmi.h 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/src/mm-modem-helpers-qmi.h 2021-06-06 21:40:59.000000000 +0800 @@ -24,9 +24,11 @@ /*****************************************************************************/ /* QMI/DMS to MM translations */ -MMModemCapability mm_modem_capability_from_qmi_radio_interface (QmiDmsRadioInterface network); +MMModemCapability mm_modem_capability_from_qmi_radio_interface (QmiDmsRadioInterface network, + gpointer log_object); -MMModemMode mm_modem_mode_from_qmi_radio_interface (QmiDmsRadioInterface network); +MMModemMode mm_modem_mode_from_qmi_radio_interface (QmiDmsRadioInterface network, + gpointer log_object); MMModemLock mm_modem_lock_from_qmi_uim_pin_status (QmiDmsUimPinStatus status, gboolean pin1); @@ -34,9 +36,10 @@ gboolean mm_pin_enabled_from_qmi_uim_pin_status (QmiDmsUimPinStatus status); QmiDmsUimFacility mm_3gpp_facility_to_qmi_uim_facility (MMModem3gppFacility mm); -GArray *mm_modem_bands_from_qmi_band_capabilities (QmiDmsBandCapability qmi_bands, - QmiDmsLteBandCapability qmi_lte_bands, - GArray *extended_qmi_lte_bands); +GArray *mm_modem_bands_from_qmi_band_capabilities (QmiDmsBandCapability qmi_bands, + QmiDmsLteBandCapability qmi_lte_bands, + GArray *extended_qmi_lte_bands, + gpointer log_object); /*****************************************************************************/ /* QMI/NAS to MM translations */ @@ -61,31 +64,34 @@ MMModemCapability mm_modem_capability_from_qmi_rat_mode_preference (QmiNasRatModePreference qmi); QmiNasRatModePreference mm_modem_capability_to_qmi_rat_mode_preference (MMModemCapability caps); -GArray *mm_modem_capability_to_qmi_acquisition_order_preference (MMModemCapability caps); -GArray *mm_modem_mode_to_qmi_acquisition_order_preference (MMModemMode allowed, - MMModemMode preferred, - gboolean is_cdma, - gboolean is_3gpp); +GArray *mm_modem_capability_to_qmi_acquisition_order_preference (MMModemCapability caps); +GArray *mm_modem_mode_to_qmi_acquisition_order_preference (MMModemMode allowed, + MMModemMode preferred, + GArray *all); MMModemCapability mm_modem_capability_from_qmi_radio_technology_preference (QmiNasRadioTechnologyPreference qmi); QmiNasRadioTechnologyPreference mm_modem_capability_to_qmi_radio_technology_preference (MMModemCapability caps); MMModemCapability mm_modem_capability_from_qmi_band_preference (QmiNasBandPreference qmi); -MMModemMode mm_modem_mode_from_qmi_gsm_wcdma_acquisition_order_preference (QmiNasGsmWcdmaAcquisitionOrderPreference qmi); -QmiNasGsmWcdmaAcquisitionOrderPreference mm_modem_mode_to_qmi_gsm_wcdma_acquisition_order_preference (MMModemMode mode); +MMModemMode mm_modem_mode_from_qmi_gsm_wcdma_acquisition_order_preference (QmiNasGsmWcdmaAcquisitionOrderPreference qmi, + gpointer log_object); +QmiNasGsmWcdmaAcquisitionOrderPreference mm_modem_mode_to_qmi_gsm_wcdma_acquisition_order_preference (MMModemMode mode, + gpointer log_object); GArray *mm_modem_bands_from_qmi_rf_band_information_array (GArray *info_array); -GArray *mm_modem_bands_from_qmi_band_preference (QmiNasBandPreference qmi_bands, - QmiNasLteBandPreference qmi_lte_bands, - const guint64 *extended_qmi_lte_bands, - guint extended_qmi_lte_bands_size); -void mm_modem_bands_to_qmi_band_preference (GArray *mm_bands, - QmiNasBandPreference *qmi_bands, +GArray *mm_modem_bands_from_qmi_band_preference (QmiNasBandPreference qmi_bands, + QmiNasLteBandPreference qmi_lte_bands, + const guint64 *extended_qmi_lte_bands, + guint extended_qmi_lte_bands_size, + gpointer log_object); +void mm_modem_bands_to_qmi_band_preference (GArray *mm_bands, + QmiNasBandPreference *qmi_bands, QmiNasLteBandPreference *qmi_lte_bands, - guint64 *extended_qmi_lte_bands, - guint extended_qmi_lte_bands_size); + guint64 *extended_qmi_lte_bands, + guint extended_qmi_lte_bands_size, + gpointer log_object); MMModem3gppRegistrationState mm_modem_3gpp_registration_state_from_qmi_registration_state (QmiNasAttachState attach_state, QmiNasRegistrationState registration_state, @@ -106,7 +112,12 @@ /*****************************************************************************/ /* QMI/WDS to MM translations */ -QmiWdsAuthentication mm_bearer_allowed_auth_to_qmi_authentication (MMBearerAllowedAuth auth); +QmiWdsAuthentication mm_bearer_allowed_auth_to_qmi_authentication (MMBearerAllowedAuth auth); +MMBearerAllowedAuth mm_bearer_allowed_auth_from_qmi_authentication (QmiWdsAuthentication auth); +MMBearerIpFamily mm_bearer_ip_family_from_qmi_ip_support_type (QmiWdsIpSupportType ip_support_type); +MMBearerIpFamily mm_bearer_ip_family_from_qmi_pdp_type (QmiWdsPdpType pdp_type); +gboolean mm_bearer_ip_family_to_qmi_pdp_type (MMBearerIpFamily ip_family, + QmiWdsPdpType *out_pdp_type); /*****************************************************************************/ /* QMI/OMA to MM translations */ @@ -136,7 +147,8 @@ MMModemCapability dms_capabilities; } MMQmiCapabilitiesContext; -MMModemCapability mm_modem_capability_from_qmi_capabilities_context (MMQmiCapabilitiesContext *ctx); +MMModemCapability mm_modem_capability_from_qmi_capabilities_context (MMQmiCapabilitiesContext *ctx, + gpointer log_object); /*****************************************************************************/ /* QMI unique id manipulation */ @@ -146,4 +158,22 @@ GArray *mm_firmware_unique_id_to_qmi_unique_id (const gchar *unique_id, GError **error); +/*****************************************************************************/ +/* Common UIM Get Card Status parsing */ + +gboolean mm_qmi_uim_get_card_status_output_parse (gpointer log_object, + QmiMessageUimGetCardStatusOutput *output, + MMModemLock *o_lock, + QmiUimPinState *o_pin1_state, + guint *o_pin1_retries, + guint *o_puk1_retries, + QmiUimPinState *o_pin2_state, + guint *o_pin2_retries, + guint *o_puk2_retries, + GError **error); + +/*****************************************************************************/ +/* UIM Get Slot Status parsing */ +gchar *mm_qmi_uim_decode_eid (const gchar *eid, gsize eid_len); + #endif /* MM_MODEM_HELPERS_QMI_H */ diff -Nru modemmanager-1.12.8/src/mm-modem-helpers.c modemmanager-1.16.6/src/mm-modem-helpers.c --- modemmanager-1.12.8/src/mm-modem-helpers.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-modem-helpers.c 2021-06-06 21:40:59.000000000 +0800 @@ -31,7 +31,7 @@ #include "mm-sms-part.h" #include "mm-modem-helpers.h" #include "mm-helper-enums-types.h" -#include "mm-log.h" +#include "mm-log-object.h" /*****************************************************************************/ @@ -254,8 +254,9 @@ /*****************************************************************************/ gchar * -mm_create_device_identifier (guint vid, - guint pid, +mm_create_device_identifier (guint vid, + guint pid, + gpointer log_object, const gchar *ati, const gchar *ati1, const gchar *gsn, @@ -263,9 +264,11 @@ const gchar *model, const gchar *manf) { - GString *devid, *msg = NULL; - GChecksum *sum; - gchar *p, *ret = NULL; + g_autoptr(GString) devid = NULL; + g_autoptr(GString) msg = NULL; + g_autoptr(GChecksum) sum = NULL; + const gchar *ret; + gchar *p = NULL; gchar str_vid[10], str_pid[10]; /* Build up the device identifier */ @@ -286,14 +289,11 @@ if (manf) g_string_append (devid, manf); - if (!strlen (devid->str)) { - g_string_free (devid, TRUE); + if (!strlen (devid->str)) return NULL; - } p = devid->str; msg = g_string_sized_new (strlen (devid->str) + 17); - sum = g_checksum_new (G_CHECKSUM_SHA1); if (vid) { @@ -315,15 +315,10 @@ } p++; } - ret = g_strdup (g_checksum_get_string (sum)); - g_checksum_free (sum); - - mm_dbg ("Device ID source '%s'", msg->str); - mm_dbg ("Device ID '%s'", ret); - g_string_free (msg, TRUE); - g_string_free (devid, TRUE); - return ret; + ret = g_checksum_get_string (sum); + mm_obj_dbg (log_object, "device identifier built: %s -> %s", msg->str, ret); + return g_strdup (ret); } /*****************************************************************************/ @@ -423,7 +418,8 @@ GArray * mm_filter_supported_modes (const GArray *all, - const GArray *supported_combinations) + const GArray *supported_combinations, + gpointer log_object) { MMModemModeCombination all_item; guint i; @@ -434,6 +430,9 @@ g_return_val_if_fail (all->len == 1, NULL); g_return_val_if_fail (supported_combinations != NULL, NULL); + mm_obj_dbg (log_object, "filtering %u supported mode combinations with %u modes", + supported_combinations->len, all->len); + all_item = g_array_index (all, MMModemModeCombination, 0); g_return_val_if_fail (all_item.allowed != MM_MODEM_MODE_NONE, NULL); @@ -455,41 +454,16 @@ } if (filtered_combinations->len == 0) - mm_warn ("All supported mode combinations were filtered out."); + mm_obj_warn (log_object, "all supported mode combinations were filtered out"); /* Add default entry with the generic mask including all items */ if (!all_item_added) { - mm_dbg ("Adding an explicit item with all supported modes allowed"); + mm_obj_dbg (log_object, "adding an explicit item with all supported modes allowed"); g_array_append_val (filtered_combinations, all_item); } - return filtered_combinations; -} - -/*****************************************************************************/ - -GArray * -mm_filter_supported_capabilities (MMModemCapability all, - const GArray *supported_combinations) -{ - guint i; - GArray *filtered_combinations; - - g_return_val_if_fail (all != MM_MODEM_CAPABILITY_NONE, NULL); - g_return_val_if_fail (supported_combinations != NULL, NULL); - - /* We will filter out all combinations which have modes not listed in 'all' */ - filtered_combinations = g_array_sized_new (FALSE, FALSE, sizeof (MMModemCapability), supported_combinations->len); - for (i = 0; i < supported_combinations->len; i++) { - MMModemCapability capability; - - capability = g_array_index (supported_combinations, MMModemCapability, i); - if (!(capability & ~all)) - g_array_append_val (filtered_combinations, capability); - } - - if (filtered_combinations->len == 0) - mm_warn ("All supported capability combinations were filtered out."); + mm_obj_dbg (log_object, "device supports %u different mode combinations", + filtered_combinations->len); return filtered_combinations; } @@ -499,7 +473,7 @@ static const gchar bcd_chars[] = "0123456789\0\0\0\0\0\0"; gchar * -mm_bcd_to_string (const guint8 *bcd, gsize bcd_len) +mm_bcd_to_string (const guint8 *bcd, gsize bcd_len, gboolean low_nybble_first) { GString *str; gsize i; @@ -508,8 +482,11 @@ str = g_string_sized_new (bcd_len * 2 + 1); for (i = 0 ; i < bcd_len; i++) { - str = g_string_append_c (str, bcd_chars[bcd[i] & 0xF]); + if (low_nybble_first) + str = g_string_append_c (str, bcd_chars[bcd[i] & 0xF]); str = g_string_append_c (str, bcd_chars[(bcd[i] >> 4) & 0xF]); + if (!low_nybble_first) + str = g_string_append_c (str, bcd_chars[bcd[i] & 0xF]); } return g_string_free (str, FALSE); } @@ -586,6 +563,7 @@ gboolean mm_3gpp_parse_clcc_response (const gchar *str, + gpointer log_object, GList **out_list, GError **error) { @@ -649,20 +627,20 @@ call_info = g_slice_new0 (MMCallInfo); if (!mm_get_uint_from_match_info (match_info, 1, &call_info->index)) { - mm_warn ("couldn't parse call index from +CLCC line"); + mm_obj_warn (log_object, "couldn't parse call index from +CLCC line"); goto next; } if (!mm_get_uint_from_match_info (match_info, 2, &aux) || (aux >= G_N_ELEMENTS (call_direction))) { - mm_warn ("couldn't parse call direction from +CLCC line"); + mm_obj_warn (log_object, "couldn't parse call direction from +CLCC line"); goto next; } call_info->direction = call_direction[aux]; if (!mm_get_uint_from_match_info (match_info, 3, &aux) || (aux >= G_N_ELEMENTS (call_state))) { - mm_warn ("couldn't parse call state from +CLCC line"); + mm_obj_warn (log_object, "couldn't parse call state from +CLCC line"); goto next; } call_info->state = call_state[aux]; @@ -703,7 +681,8 @@ static MMFlowControl flow_control_array_to_mask (GArray *array, - const gchar *item) + const gchar *item, + gpointer log_object) { MMFlowControl mask = MM_FLOW_CONTROL_UNKNOWN; guint i; @@ -714,15 +693,15 @@ mode = g_array_index (array, guint, i); switch (mode) { case 0: - mm_dbg ("%s supports no flow control", item); + mm_obj_dbg (log_object, "%s supports no flow control", item); mask |= MM_FLOW_CONTROL_NONE; break; case 1: - mm_dbg ("%s supports XON/XOFF flow control", item); + mm_obj_dbg (log_object, "%s supports XON/XOFF flow control", item); mask |= MM_FLOW_CONTROL_XON_XOFF; break; case 2: - mm_dbg ("%s supports RTS/CTS flow control", item); + mm_obj_dbg (log_object, "%s supports RTS/CTS flow control", item); mask |= MM_FLOW_CONTROL_RTS_CTS; break; default: @@ -737,6 +716,7 @@ flow_control_match_info_to_mask (GMatchInfo *match_info, guint index, const gchar *item, + gpointer log_object, GError **error) { MMFlowControl mask = MM_FLOW_CONTROL_UNKNOWN; @@ -754,7 +734,7 @@ goto out; } - if ((mask = flow_control_array_to_mask (array, item)) == MM_FLOW_CONTROL_UNKNOWN) { + if ((mask = flow_control_array_to_mask (array, item, log_object)) == MM_FLOW_CONTROL_UNKNOWN) { g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "No known %s flow control method given", item); goto out; @@ -769,6 +749,7 @@ MMFlowControl mm_parse_ifc_test_response (const gchar *response, + gpointer log_object, GError **error) { GRegex *r; @@ -791,11 +772,11 @@ } /* Parse TE flow control methods */ - if ((te_mask = flow_control_match_info_to_mask (match_info, 1, "TE", &inner_error)) == MM_FLOW_CONTROL_UNKNOWN) + if ((te_mask = flow_control_match_info_to_mask (match_info, 1, "TE", log_object, &inner_error)) == MM_FLOW_CONTROL_UNKNOWN) goto out; /* Parse TA flow control methods */ - if ((ta_mask = flow_control_match_info_to_mask (match_info, 2, "TA", &inner_error)) == MM_FLOW_CONTROL_UNKNOWN) + if ((ta_mask = flow_control_match_info_to_mask (match_info, 2, "TA", log_object, &inner_error)) == MM_FLOW_CONTROL_UNKNOWN) goto out; /* Only those methods in both TA and TE will be the ones we report */ @@ -842,150 +823,57 @@ /*************************************************************************/ -/* +CREG: (GSM 07.07 CREG=1 unsolicited) */ -#define CREG1 "\\+(CREG|CGREG|CEREG):\\s*0*([0-9])" - -/* +CREG: , (GSM 07.07 CREG=1 solicited) */ -#define CREG2 "\\+(CREG|CGREG|CEREG):\\s*0*([0-9]),\\s*0*([0-9])" - -/* +CREG: ,, (GSM 07.07 CREG=2 unsolicited) */ -#define CREG3 "\\+(CREG|CGREG|CEREG):\\s*0*([0-9]),\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)" -#define CREG11 "\\+(CREG|CGREG|CEREG):\\s*0*([0-9]),\\s*(\"[^\"\\s]*\")\\s*,\\s*(\"[^\"\\s]*\")" - -/* +CREG: ,,, (GSM 07.07 solicited and some CREG=2 unsolicited) */ -#define CREG4 "\\+(CREG|CGREG|CEREG):\\s*([0-9]),\\s*([0-9])\\s*,\\s*([^,]*)\\s*,\\s*([^,\\s]*)" -#define CREG5 "\\+(CREG|CGREG|CEREG):\\s*0*([0-9]),\\s*0*([0-9])\\s*,\\s*(\"[^,]*\")\\s*,\\s*(\"[^,\\s]*\")" - -/* +CREG: ,,, (ETSI 27.007 CREG=2 unsolicited) */ -#define CREG6 "\\+(CREG|CGREG|CEREG):\\s*([0-9])\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*([0-9])" -#define CREG7 "\\+(CREG|CGREG|CEREG):\\s*0*([0-9])\\s*,\\s*(\"[^,\\s]*\")\\s*,\\s*(\"[^,\\s]*\")\\s*,\\s*0*([0-9])" - -/* +CREG: ,,,, (ETSI 27.007 solicited and some CREG=2 unsolicited) */ -#define CREG8 "\\+(CREG|CGREG|CEREG):\\s*0*([0-9]),\\s*0*([0-9])\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*0*([0-9])" - -/* +CREG: ,,,,, (Samsung Wave S8500) */ -/* '+CREG: 2,1,000B,2816, B, C2816OK' */ -#define CREG9 "\\+(CREG|CGREG):\\s*0*([0-9]),\\s*0*([0-9])\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*[^,\\s]*" - -/* +CREG: ,,,, (ETSI 27.007 v9.20 CREG=2 unsolicited with RAC) */ -#define CREG10 "\\+(CREG|CGREG):\\s*0*([0-9])\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*0*([0-9])\\s*,\\s*([^,\\s]*)" - -/* +CEREG: ,,,, (ETSI 27.007 v8.6 CREG=2 unsolicited with RAC) */ -#define CEREG1 "\\+(CEREG):\\s*0*([0-9])\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*0*([0-9])" - -/* +CEREG: ,,,,, (ETSI 27.007 v8.6 CREG=2 solicited with RAC) */ -#define CEREG2 "\\+(CEREG):\\s*0*([0-9]),\\s*0*([0-9])\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*0*([0-9])" +static const gchar *creg_regex[] = { + /* +CREG: (GSM 07.07 CREG=1 unsolicited) */ + [0] = "\\+(CREG|CGREG|CEREG|C5GREG):\\s*0*([0-9])", + /* +CREG: , (GSM 07.07 CREG=1 solicited) */ + [1] = "\\+(CREG|CGREG|CEREG|C5GREG):\\s*0*([0-9]),\\s*0*([0-9])", + /* +CREG: ,, (GSM 07.07 CREG=2 unsolicited) */ + [2] = "\\+(CREG|CGREG|CEREG):\\s*0*([0-9]),\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)", + /* +CREG: ,,, (GSM 07.07 solicited and some CREG=2 unsolicited) */ + [3] = "\\+(CREG|CGREG|CEREG):\\s*([0-9]),\\s*([0-9])\\s*,\\s*([^,]*)\\s*,\\s*([^,\\s]*)", + [4] = "\\+(CREG|CGREG|CEREG):\\s*0*([0-9]),\\s*0*([0-9])\\s*,\\s*(\"[^,]*\")\\s*,\\s*(\"[^,\\s]*\")", + /* +CREG: ,,, (ETSI 27.007 CREG=2 unsolicited) */ + [5] = "\\+(CREG|CGREG|CEREG):\\s*([0-9])\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*([0-9])", + [6] = "\\+(CREG|CGREG|CEREG):\\s*0*([0-9])\\s*,\\s*(\"[^,\\s]*\")\\s*,\\s*(\"[^,\\s]*\")\\s*,\\s*0*([0-9])", + /* +CREG: ,,,, (ETSI 27.007 solicited and some CREG=2 unsolicited) */ + [7] = "\\+(CREG|CGREG|CEREG):\\s*0*([0-9]),\\s*0*([0-9])\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*0*([0-9])", + /* +CREG: ,,,,, (Samsung Wave S8500) */ + /* '+CREG: 2,1,000B,2816, B, C2816OK' */ + [8] = "\\+(CREG|CGREG):\\s*0*([0-9]),\\s*0*([0-9])\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*[^,\\s]*", + /* +CREG: ,,,, (ETSI 27.007 v9.20 CREG=2 unsolicited with RAC) */ + [9] = "\\+(CREG|CGREG):\\s*0*([0-9])\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*0*([0-9])\\s*,\\s*([^,\\s]*)", + /* +CEREG: ,,,, (ETSI 27.007 v8.6 CREG=2 unsolicited with RAC) */ + [10] = "\\+(CEREG):\\s*0*([0-9])\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*0*([0-9])", + /* +CEREG: ,,,,, (ETSI 27.007 v8.6 CREG=2 solicited with RAC) */ + [11] = "\\+(CEREG):\\s*0*([0-9]),\\s*0*([0-9])\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*0*([0-9])", + /* +C5GREG: ,,,,, (ETSI 27.007 CREG=2 unsolicited) */ + [12] = "\\+(C5GREG):\\s*([0-9]+)\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*([0-9]+)\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)", + /* +C5GREG: ,,,,,, (ETSI 27.007 solicited) */ + [13] = "\\+(C5GREG):\\s*([0-9]+)\\s*,\\s*([0-9+])\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)\\s*,\\s*([0-9]+)\\s*,\\s*([^,\\s]*)\\s*,\\s*([^,\\s]*)", +}; GPtrArray * mm_3gpp_creg_regex_get (gboolean solicited) { - GPtrArray *array = g_ptr_array_sized_new (13); - GRegex *regex; - - /* #1 */ - if (solicited) - regex = g_regex_new (CREG1 "$", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - else - regex = g_regex_new ("\\r\\n" CREG1 "\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - g_assert (regex); - g_ptr_array_add (array, regex); - - /* #2 */ - if (solicited) - regex = g_regex_new (CREG2 "$", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - else - regex = g_regex_new ("\\r\\n" CREG2 "\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - g_assert (regex); - g_ptr_array_add (array, regex); - - /* #3 */ - if (solicited) - regex = g_regex_new (CREG3 "$", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - else - regex = g_regex_new ("\\r\\n" CREG3 "\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - g_assert (regex); - g_ptr_array_add (array, regex); - - /* #4 */ - if (solicited) - regex = g_regex_new (CREG4 "$", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - else - regex = g_regex_new ("\\r\\n" CREG4 "\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - g_assert (regex); - g_ptr_array_add (array, regex); - - /* #5 */ - if (solicited) - regex = g_regex_new (CREG5 "$", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - else - regex = g_regex_new ("\\r\\n" CREG5 "\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - g_assert (regex); - g_ptr_array_add (array, regex); - - /* #6 */ - if (solicited) - regex = g_regex_new (CREG6 "$", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - else - regex = g_regex_new ("\\r\\n" CREG6 "\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - g_assert (regex); - g_ptr_array_add (array, regex); - - /* #7 */ - if (solicited) - regex = g_regex_new (CREG7 "$", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - else - regex = g_regex_new ("\\r\\n" CREG7 "\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - g_assert (regex); - g_ptr_array_add (array, regex); - - /* #8 */ - if (solicited) - regex = g_regex_new (CREG8 "$", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - else - regex = g_regex_new ("\\r\\n" CREG8 "\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - g_assert (regex); - g_ptr_array_add (array, regex); - - /* #9 */ - if (solicited) - regex = g_regex_new (CREG9 "$", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - else - regex = g_regex_new ("\\r\\n" CREG9 "\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - g_assert (regex); - g_ptr_array_add (array, regex); - - /* #10 */ - if (solicited) - regex = g_regex_new (CREG10 "$", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - else - regex = g_regex_new ("\\r\\n" CREG10 "\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - g_assert (regex); - g_ptr_array_add (array, regex); - - /* #11 */ - if (solicited) - regex = g_regex_new (CREG11 "$", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - else - regex = g_regex_new ("\\r\\n" CREG11 "\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - g_assert (regex); - g_ptr_array_add (array, regex); - - /* CEREG #1 */ - if (solicited) - regex = g_regex_new (CEREG1 "$", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - else - regex = g_regex_new ("\\r\\n" CEREG1 "\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - g_assert (regex); - g_ptr_array_add (array, regex); - - /* CEREG #2 */ - if (solicited) - regex = g_regex_new (CEREG2 "$", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - else - regex = g_regex_new ("\\r\\n" CEREG2 "\\r\\n", G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); - g_assert (regex); - g_ptr_array_add (array, regex); + GPtrArray *array; + guint i; + array = g_ptr_array_sized_new (G_N_ELEMENTS (creg_regex)); + for (i = 0; i < G_N_ELEMENTS (creg_regex); i++) { + GRegex *regex; + g_autofree gchar *pattern = NULL; + + if (solicited) { + pattern = g_strdup_printf ("%s$", creg_regex[i]); + regex = g_regex_new (pattern, G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); + } else { + pattern = g_strdup_printf ("\\r\\n%s\\r\\n", creg_regex[i]); + regex = g_regex_new (pattern, G_REGEX_RAW | G_REGEX_OPTIMIZE, 0, NULL); + } + g_assert (regex); + g_ptr_array_add (array, regex); + } return array; } @@ -1061,7 +949,9 @@ * NOTE: ignore WS46 prefix or it will break Cinterion handling. * * For the specific case of '25', we will check if any other mode supports - * 4G, and if there is none, we'll remove 4G caps from it. + * 4G, and if there is none, we'll remove 4G caps from it. This is needed + * because pre-LTE modems used '25' to report GERAN+URAN instead of the + * new '29' value since LTE modems are around. */ typedef struct { @@ -1069,7 +959,7 @@ MMModemMode mode; } Ws46Mode; -/* 3GPP TS 27.007 r14, section 5.9: select wireless network +WS46 */ +/* 3GPP TS 27.007 v16.3.0, section 5.9: select wireless network +WS46 */ static const Ws46Mode ws46_modes[] = { /* GSM Digital Cellular Systems (GERAN only) */ { 12, MM_MODEM_MODE_2G }, @@ -1083,8 +973,24 @@ { 29, MM_MODEM_MODE_2G | MM_MODEM_MODE_3G }, /* GERAN and E-UTRAN */ { 30, MM_MODEM_MODE_2G | MM_MODEM_MODE_4G }, - /* UERAN and E-UTRAN */ + /* UTRAN and E-UTRAN */ { 31, MM_MODEM_MODE_3G | MM_MODEM_MODE_4G }, + /* GERAN, UTRAN, E-UTRAN and NG-RAN */ + { 35, MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G }, + /* NG-RAN only */ + { 36, MM_MODEM_MODE_5G }, + /* E-UTRAN and NG-RAN */ + { 37, MM_MODEM_MODE_4G | MM_MODEM_MODE_5G }, + /* UTRAN, E-UTRAN and NG-RAN */ + { 38, MM_MODEM_MODE_3G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G }, + /* GERAN, E-UTRAN and NG-RAN */ + { 39, MM_MODEM_MODE_2G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G }, + /* UTRAN and NG-RAN */ + { 40, MM_MODEM_MODE_3G | MM_MODEM_MODE_5G }, + /* GERAN, UTRAN and NG-RAN */ + { 41, MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_5G }, + /* GERAN and NG-RAN */ + { 42, MM_MODEM_MODE_2G | MM_MODEM_MODE_5G }, }; GArray * @@ -1100,9 +1006,12 @@ guint val; guint i; guint j; + gboolean supported_5g = FALSE; gboolean supported_4g = FALSE; gboolean supported_3g = FALSE; gboolean supported_2g = FALSE; + gboolean supported_mode_25 = FALSE; + gboolean supported_mode_29 = FALSE; r = g_regex_new ("(?:\\+WS46:)?\\s*\\((.*)\\)(?:\\r\\n)?", 0, 0, NULL); g_assert (r != NULL); @@ -1131,15 +1040,21 @@ for (j = 0; j < G_N_ELEMENTS (ws46_modes); j++) { if (ws46_modes[j].ws46 == val) { - if (val != 25) { + if (val == 25) + supported_mode_25 = TRUE; + else { + if (val == 29) + supported_mode_29 = TRUE; + if (ws46_modes[j].mode & MM_MODEM_MODE_5G) + supported_5g = TRUE; if (ws46_modes[j].mode & MM_MODEM_MODE_4G) supported_4g = TRUE; if (ws46_modes[j].mode & MM_MODEM_MODE_3G) supported_3g = TRUE; if (ws46_modes[j].mode & MM_MODEM_MODE_2G) supported_2g = TRUE; + g_array_append_val (modes, ws46_modes[j].mode); } - g_array_append_val (modes, ws46_modes[j].mode); break; } } @@ -1148,6 +1063,17 @@ g_warning ("Unknown +WS46 mode reported: %u", val); } + if (supported_mode_25) { + MMModemMode mode_25; + + mode_25 = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G; + if (supported_4g) { + mode_25 |= MM_MODEM_MODE_4G; + g_array_append_val (modes, mode_25); + } else if (!supported_mode_29) + g_array_append_val (modes, mode_25); + } + if (modes->len == 0) { inner_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "No valid modes reported"); g_clear_pointer (&modes, g_array_unref); @@ -1167,6 +1093,8 @@ *mode |= MM_MODEM_MODE_3G; if (supported_4g) *mode |= MM_MODEM_MODE_4G; + if (supported_5g) + *mode |= MM_MODEM_MODE_5G; if (*mode == 0) { inner_error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "No way to fixup the ANY value"); @@ -1216,7 +1144,8 @@ { /* See ETSI TS 27.007 */ switch (act) { - case 0: + case 0: /* GSM */ + case 8: /* EC-GSM-IoT (A/Gb mode) */ return MM_MODEM_ACCESS_TECHNOLOGY_GSM; case 1: return MM_MODEM_ACCESS_TECHNOLOGY_GSM_COMPACT; @@ -1230,22 +1159,30 @@ return MM_MODEM_ACCESS_TECHNOLOGY_HSUPA; case 6: return MM_MODEM_ACCESS_TECHNOLOGY_HSPA; - case 7: + case 7: /* E-UTRAN */ + case 9: /* E-UTRAN (NB-S1) */ + case 10: /* E-UTRA connected to a 5GCN */ return MM_MODEM_ACCESS_TECHNOLOGY_LTE; + case 11: /* NR connected to a 5G CN */ + case 12: /* NG-RAN */ + return MM_MODEM_ACCESS_TECHNOLOGY_5GNR; + case 13: /* E-UTRA-NR dual connectivity */ + return (MM_MODEM_ACCESS_TECHNOLOGY_5GNR | MM_MODEM_ACCESS_TECHNOLOGY_LTE); default: return MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN; } } static MMModem3gppNetworkAvailability -parse_network_status (const gchar *str) +parse_network_status (const gchar *str, + gpointer log_object) { /* Expecting a value between '0' and '3' inclusive */ if (!str || strlen (str) != 1 || str[0] < '0' || str[0] > '3') { - mm_warn ("Cannot parse network status: '%s'", str); + mm_obj_warn (log_object, "cannot parse network status value '%s'", str); return MM_MODEM_3GPP_NETWORK_AVAILABILITY_UNKNOWN; } @@ -1253,14 +1190,15 @@ } static MMModemAccessTechnology -parse_access_tech (const gchar *str) +parse_access_tech (const gchar *str, + gpointer log_object) { /* Recognized access technologies are between '0' and '7' inclusive... */ if (!str || strlen (str) != 1 || str[0] < '0' || str[0] > '7') { - mm_warn ("Cannot parse access tech: '%s'", str); + mm_obj_warn (log_object, "cannot parse access technology value '%s'", str); return MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN; } @@ -1268,14 +1206,15 @@ } GList * -mm_3gpp_parse_cops_test_response (const gchar *reply, - GError **error) +mm_3gpp_parse_cops_test_response (const gchar *reply, + MMModemCharset cur_charset, + gpointer log_object, + GError **error) { GRegex *r; GList *info_list = NULL; GMatchInfo *match_info; gboolean umts_format = TRUE; - GError *inner_error = NULL; g_return_val_if_fail (reply != NULL, NULL); if (error) @@ -1304,15 +1243,8 @@ * +COPS: (2,"","T-Mobile","31026",0),(1,"AT&T","AT&T","310410"),0) */ - r = g_regex_new ("\\((\\d),\"([^\"\\)]*)\",([^,\\)]*),([^,\\)]*)[\\)]?,(\\d)\\)", G_REGEX_UNGREEDY, 0, &inner_error); - if (inner_error) { - mm_err ("Invalid regular expression: %s", inner_error->message); - g_error_free (inner_error); - g_set_error_literal (error, - MM_CORE_ERROR, MM_CORE_ERROR_FAILED, - "Could not parse scan results"); - return NULL; - } + r = g_regex_new ("\\((\\d),\"([^\"\\)]*)\",([^,\\)]*),([^,\\)]*)[\\)]?,(\\d)\\)", G_REGEX_UNGREEDY, 0, NULL); + g_assert (r); /* If we didn't get any hits, try the pre-UMTS format match */ if (!g_regex_match (r, reply, 0, &match_info)) { @@ -1333,15 +1265,8 @@ * +COPS: (2,"T - Mobile",,"31026"),(1,"Einstein PCS",,"31064"),(1,"Cingular",,"31041"),,(0,1,3),(0,2) */ - r = g_regex_new ("\\((\\d),([^,\\)]*),([^,\\)]*),([^\\)]*)\\)", G_REGEX_UNGREEDY, 0, &inner_error); - if (inner_error) { - mm_err ("Invalid regular expression: %s", inner_error->message); - g_error_free (inner_error); - g_set_error_literal (error, - MM_CORE_ERROR, MM_CORE_ERROR_FAILED, - "Could not parse scan results"); - return NULL; - } + r = g_regex_new ("\\((\\d),([^,\\)]*),([^,\\)]*),([^\\)]*)\\)", G_REGEX_UNGREEDY, 0, NULL); + g_assert (r); g_regex_match (r, reply, 0, &match_info); umts_format = FALSE; @@ -1356,20 +1281,25 @@ info = g_new0 (MM3gppNetworkInfo, 1); tmp = mm_get_string_unquoted_from_match_info (match_info, 1); - info->status = parse_network_status (tmp); + info->status = parse_network_status (tmp, log_object); g_free (tmp); info->operator_long = mm_get_string_unquoted_from_match_info (match_info, 2); info->operator_short = mm_get_string_unquoted_from_match_info (match_info, 3); info->operator_code = mm_get_string_unquoted_from_match_info (match_info, 4); + /* The returned strings may be given in e.g. UCS2 */ + mm_3gpp_normalize_operator (&info->operator_long, cur_charset, log_object); + mm_3gpp_normalize_operator (&info->operator_short, cur_charset, log_object); + mm_3gpp_normalize_operator (&info->operator_code, cur_charset, log_object); + /* Only try for access technology with UMTS-format matches. * If none give, assume GSM */ tmp = (umts_format ? mm_get_string_unquoted_from_match_info (match_info, 5) : NULL); info->access_tech = (tmp ? - parse_access_tech (tmp) : + parse_access_tech (tmp, log_object) : MM_MODEM_ACCESS_TECHNOLOGY_GSM); g_free (tmp); @@ -1391,17 +1321,15 @@ } if (valid) { - gchar *access_tech_str; + g_autofree gchar *access_tech_str = NULL; access_tech_str = mm_modem_access_technology_build_string_from_mask (info->access_tech); - mm_dbg ("Found network '%s' ('%s','%s'); availability: %s, access tech: %s", - info->operator_code, - info->operator_short ? info->operator_short : "no short name", - info->operator_long ? info->operator_long : "no long name", - mm_modem_3gpp_network_availability_get_string (info->status), - access_tech_str); - g_free (access_tech_str); - + mm_obj_dbg (log_object, "found network '%s' ('%s','%s'); availability: %s, access tech: %s", + info->operator_code, + info->operator_short ? info->operator_short : "no short name", + info->operator_long ? info->operator_long : "no long name", + mm_modem_3gpp_network_availability_get_string (info->status), + access_tech_str); info_list = g_list_prepend (info_list, info); } else @@ -1570,8 +1498,9 @@ MMBearerIpFamily ip_family, GList *context_list, GList *context_format_list, - gboolean *cid_reused, - gboolean *cid_overwritten) + gpointer log_object, + gboolean *out_cid_reused, + gboolean *out_cid_overwritten) { GList *l; guint prev_cid = 0; @@ -1582,9 +1511,12 @@ guint blank_cid = 0; gchar *ip_family_str; + g_assert (out_cid_reused); + g_assert (out_cid_overwritten); + ip_family_str = mm_bearer_ip_family_build_string_from_mask (ip_family); - mm_dbg ("Looking for best CID matching APN '%s' and PDP type '%s'...", - apn, ip_family_str); + mm_obj_dbg (log_object, "looking for best CID matching APN '%s' and PDP type '%s'...", + apn, ip_family_str); g_free (ip_family_str); /* Look for the exact PDP context we want */ @@ -1625,17 +1557,17 @@ /* Always prefer an exact match */ if (exact_cid) { - mm_dbg ("Found exact context at CID %u", exact_cid); - *cid_reused = TRUE; - *cid_overwritten = FALSE; + mm_obj_dbg (log_object, "found exact context at CID %u", exact_cid); + *out_cid_reused = TRUE; + *out_cid_overwritten = FALSE; return exact_cid; } /* Try to use an unused CID detected in between the already defined contexts */ if (unused_cid) { - mm_dbg ("Found unused context at CID %u", unused_cid); - *cid_reused = FALSE; - *cid_overwritten = FALSE; + mm_obj_dbg (log_object, "found unused context at CID %u", unused_cid); + *out_cid_reused = FALSE; + *out_cid_overwritten = FALSE; return unused_cid; } @@ -1643,32 +1575,32 @@ * CID, then we can use the next available CID because it's an unused one. */ max_allowed_cid = find_max_allowed_cid (context_format_list, ip_family); if (max_cid && (max_cid < max_allowed_cid)) { - mm_dbg ("Found unused context at CID %u (<%u)", max_cid + 1, max_allowed_cid); - *cid_reused = FALSE; - *cid_overwritten = FALSE; + mm_obj_dbg (log_object, "found unused context at CID %u (<%u)", max_cid + 1, max_allowed_cid); + *out_cid_reused = FALSE; + *out_cid_overwritten = FALSE; return (max_cid + 1); } /* Rewrite a context defined with no APN, if any */ if (blank_cid) { - mm_dbg ("Rewriting context with empty APN at CID %u", blank_cid); - *cid_reused = FALSE; - *cid_overwritten = TRUE; + mm_obj_dbg (log_object, "rewriting context with empty APN at CID %u", blank_cid); + *out_cid_reused = FALSE; + *out_cid_overwritten = TRUE; return blank_cid; } /* Rewrite the last existing one found */ if (max_cid) { - mm_dbg ("Rewriting last context detected at CID %u", max_cid); - *cid_reused = FALSE; - *cid_overwritten = TRUE; + mm_obj_dbg (log_object, "rewriting last context detected at CID %u", max_cid); + *out_cid_reused = FALSE; + *out_cid_overwritten = TRUE; return max_cid; } /* Otherwise, just fallback to CID=1 */ - mm_dbg ("Falling back to CID 1"); - *cid_reused = FALSE; - *cid_overwritten = TRUE; + mm_obj_dbg (log_object, "falling back to CID 1"); + *out_cid_reused = FALSE; + *out_cid_overwritten = TRUE; return 1; } @@ -1687,8 +1619,9 @@ } GList * -mm_3gpp_parse_cgdcont_test_response (const gchar *response, - GError **error) +mm_3gpp_parse_cgdcont_test_response (const gchar *response, + gpointer log_object, + GError **error) { GRegex *r; GMatchInfo *match_info; @@ -1716,11 +1649,11 @@ pdp_type_str = mm_get_string_unquoted_from_match_info (match_info, 3); pdp_type = mm_3gpp_get_ip_family_from_pdp_type (pdp_type_str); if (pdp_type == MM_BEARER_IP_FAMILY_NONE) - mm_dbg ("Unhandled PDP type in CGDCONT=? reply: '%s'", pdp_type_str); + mm_obj_dbg (log_object, "unhandled PDP type in CGDCONT=? reply: '%s'", pdp_type_str); else { /* Read min CID */ if (!mm_get_uint_from_match_info (match_info, 1, &min_cid)) - mm_warn ("Invalid min CID in CGDCONT=? reply for PDP type '%s'", pdp_type_str); + mm_obj_warn (log_object, "invalid min CID in CGDCONT=? reply for PDP type '%s'", pdp_type_str); else { MM3gppPdpContextFormat *format; @@ -1745,7 +1678,7 @@ g_regex_unref (r); if (inner_error) { - mm_warn ("Unexpected error matching +CGDCONT response: '%s'", inner_error->message); + mm_obj_warn (log_object, "unexpected error matching +CGDCONT response: '%s'", inner_error->message); g_error_free (inner_error); } @@ -1801,9 +1734,7 @@ str = mm_get_string_unquoted_from_match_info (match_info, 2); ip_family = mm_3gpp_get_ip_family_from_pdp_type (str); - if (ip_family == MM_BEARER_IP_FAMILY_NONE) - mm_dbg ("Ignoring PDP context type: '%s'", str); - else { + if (ip_family != MM_BEARER_IP_FAMILY_NONE) { MM3gppPdpContext *pdp; pdp = g_slice_new0 (MM3gppPdpContext); @@ -1925,31 +1856,6 @@ /*************************************************************************/ -static gulong -parse_uint (char *str, int base, glong nmin, glong nmax, gboolean *valid) -{ - gulong ret = 0; - gchar *endquote; - - *valid = FALSE; - if (!str) - return 0; - - /* Strip quotes */ - if (str[0] == '"') - str++; - endquote = strchr (str, '"'); - if (endquote) - *endquote = '\0'; - - if (strlen (str)) { - ret = strtol (str, NULL, base); - if ((nmin == nmax) || (ret >= nmin && ret <= nmax)) - *valid = TRUE; - } - return *valid ? (guint) ret : 0; -} - static gboolean item_is_lac_not_stat (GMatchInfo *info, guint32 item) { @@ -1965,32 +1871,36 @@ } gboolean -mm_3gpp_parse_creg_response (GMatchInfo *info, - MMModem3gppRegistrationState *out_reg_state, - gulong *out_lac, - gulong *out_ci, - MMModemAccessTechnology *out_act, - gboolean *out_cgreg, - gboolean *out_cereg, - GError **error) +mm_3gpp_parse_creg_response (GMatchInfo *info, + gpointer log_object, + MMModem3gppRegistrationState *out_reg_state, + gulong *out_lac, + gulong *out_ci, + MMModemAccessTechnology *out_act, + gboolean *out_cgreg, + gboolean *out_cereg, + gboolean *out_c5greg, + GError **error) { - gboolean success = FALSE, foo; gint n_matches, act = -1; - gulong stat = 0, lac = 0, ci = 0; + guint stat = 0; + guint64 lac = 0, ci = 0; guint istat = 0, ilac = 0, ici = 0, iact = 0; gchar *str; - g_return_val_if_fail (info != NULL, FALSE); - g_return_val_if_fail (out_reg_state != NULL, FALSE); - g_return_val_if_fail (out_lac != NULL, FALSE); - g_return_val_if_fail (out_ci != NULL, FALSE); - g_return_val_if_fail (out_act != NULL, FALSE); - g_return_val_if_fail (out_cgreg != NULL, FALSE); - g_return_val_if_fail (out_cereg != NULL, FALSE); + g_assert (info != NULL); + g_assert (out_reg_state != NULL); + g_assert (out_lac != NULL); + g_assert (out_ci != NULL); + g_assert (out_act != NULL); + g_assert (out_cgreg != NULL); + g_assert (out_cereg != NULL); + g_assert (out_c5greg != NULL); str = g_match_info_fetch (info, 1); *out_cgreg = (str && strstr (str, "CGREG")) ? TRUE : FALSE; *out_cereg = (str && strstr (str, "CEREG")) ? TRUE : FALSE; + *out_c5greg = (str && strstr (str, "C5GREG")) ? TRUE : FALSE; g_free (str); /* Normally the number of matches could be used to determine what each @@ -2035,88 +1945,85 @@ /* Check if the third item is the LAC to distinguish the two cases */ if (item_is_lac_not_stat (info, 3)) { istat = 2; - ilac = 3; + ilac = 3; } else { istat = 3; - ilac = 4; + ilac = 4; } - ici = 5; + ici = 5; iact = 6; } else { /* Check if the third item is the LAC to distinguish the two cases */ if (item_is_lac_not_stat (info, 3)) { istat = 2; - ilac = 3; - ici = 4; - iact = 5; + ilac = 3; + ici = 4; + iact = 5; } else { istat = 3; - ilac = 4; - ici = 5; - iact = 6; + ilac = 4; + ici = 5; + iact = 6; } } } else if (n_matches == 8) { /* CEREG=2 (solicited with RAC): +CEREG: ,,,,, + * C5GREG=2 (unsolicited): +C5GREG: ,,,,, */ if (*out_cereg) { istat = 3; - ilac = 4; - ici = 6; - iact = 7; + ilac = 4; + ici = 6; + iact = 7; + } else if (*out_c5greg) { + istat = 2; + ilac = 3; + ici = 4; + iact = 5; } - } + } else if (n_matches == 9) { + /* C5GREG=2 (solicited): +C5GREG: ,,,,,, */ + istat = 3; + ilac = 4; + ici = 5; + iact = 6; + } /* Status */ - str = g_match_info_fetch (info, istat); - stat = parse_uint (str, 10, 0, G_MAXUINT, &success); - g_free (str); - if (!success) { + if (!mm_get_uint_from_match_info (info, istat, &stat)) { g_set_error_literal (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "Could not parse the registration status response"); return FALSE; } - /* 'roaming (csfb not preferred)' is the last valid state */ - if (stat > MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING_CSFB_NOT_PREFERRED) { - mm_warn ("Registration State '%lu' is unknown", stat); + /* 'attached RLOS' is the last valid state */ + if (stat > MM_MODEM_3GPP_REGISTRATION_STATE_ATTACHED_RLOS) { + mm_obj_warn (log_object, "unknown registration state value '%u'", stat); stat = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; } - /* Location Area Code */ - if (ilac) { - /* FIXME: some phones apparently swap the LAC bytes (LG, SonyEricsson, - * Sagem). Need to handle that. - */ - str = g_match_info_fetch (info, ilac); - lac = parse_uint (str, 16, 1, 0xFFFF, &foo); - g_free (str); - } + /* Location Area Code/Tracking Area Code + * FIXME: some phones apparently swap the LAC bytes (LG, SonyEricsson, + * Sagem). Need to handle that. + */ + if (ilac) + mm_get_u64_from_hex_match_info (info, ilac, &lac); /* Cell ID */ - if (ici) { - str = g_match_info_fetch (info, ici); - ci = parse_uint (str, 16, 1, 0x0FFFFFFE, &foo); - g_free (str); - } + if (ici) + mm_get_u64_from_hex_match_info (info, ici, &ci); /* Access Technology */ - if (iact) { - str = g_match_info_fetch (info, iact); - act = (gint) parse_uint (str, 10, 0, 7, &foo); - g_free (str); - if (!foo) - act = -1; - } + if (iact) + mm_get_int_from_match_info (info, iact, &act); *out_reg_state = (MMModem3gppRegistrationState) stat; if (stat != MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN) { /* Don't fill in lac/ci/act if the device's state is unknown */ - *out_lac = lac; - *out_ci = ci; - - *out_act = get_mm_access_tech_from_etsi_access_tech (act); + *out_lac = (gulong)lac; + *out_ci = (gulong)ci; + *out_act = (act >= 0 ? get_mm_access_tech_from_etsi_access_tech (act) : MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN); } return TRUE; } @@ -2637,8 +2544,9 @@ } gboolean -mm_3gpp_rxlev_to_rssi (guint rxlev, - gdouble *out_rssi) +mm_3gpp_rxlev_to_rssi (guint rxlev, + gpointer log_object, + gdouble *out_rssi) { if (rxlev <= 63) { *out_rssi = -111.0 + rxlev; @@ -2646,13 +2554,14 @@ } if (rxlev != 99) - mm_warn ("unexpected rxlev: %u", rxlev); + mm_obj_warn (log_object, "unexpected rxlev: %u", rxlev); return FALSE; } gboolean -mm_3gpp_rscp_level_to_rscp (guint rscp_level, - gdouble *out_rscp) +mm_3gpp_rscp_level_to_rscp (guint rscp_level, + gpointer log_object, + gdouble *out_rscp) { if (rscp_level <= 96) { *out_rscp = -121.0 + rscp_level; @@ -2660,13 +2569,14 @@ } if (rscp_level != 255) - mm_warn ("unexpected rscp level: %u", rscp_level); + mm_obj_warn (log_object, "unexpected rscp level: %u", rscp_level); return FALSE; } gboolean -mm_3gpp_ecn0_level_to_ecio (guint ecn0_level, - gdouble *out_ecio) +mm_3gpp_ecn0_level_to_ecio (guint ecn0_level, + gpointer log_object, + gdouble *out_ecio) { if (ecn0_level <= 49) { *out_ecio = -24.5 + (((gdouble) ecn0_level) * 0.5); @@ -2674,13 +2584,14 @@ } if (ecn0_level != 255) - mm_warn ("unexpected Ec/N0 level: %u", ecn0_level); + mm_obj_warn (log_object, "unexpected Ec/N0 level: %u", ecn0_level); return FALSE; } gboolean -mm_3gpp_rsrq_level_to_rsrq (guint rsrq_level, - gdouble *out_rsrq) +mm_3gpp_rsrq_level_to_rsrq (guint rsrq_level, + gpointer log_object, + gdouble *out_rsrq) { if (rsrq_level <= 34) { *out_rsrq = -20.0 + (((gdouble) rsrq_level) * 0.5); @@ -2688,13 +2599,14 @@ } if (rsrq_level != 255) - mm_warn ("unexpected RSRQ level: %u", rsrq_level); + mm_obj_warn (log_object, "unexpected RSRQ level: %u", rsrq_level); return FALSE; } gboolean -mm_3gpp_rsrp_level_to_rsrp (guint rsrp_level, - gdouble *out_rsrp) +mm_3gpp_rsrp_level_to_rsrp (guint rsrp_level, + gpointer log_object, + gdouble *out_rsrp) { if (rsrp_level <= 97) { *out_rsrp = -141.0 + rsrp_level; @@ -2702,12 +2614,13 @@ } if (rsrp_level != 255) - mm_warn ("unexpected RSRP level: %u", rsrp_level); + mm_obj_warn (log_object, "unexpected RSRP level: %u", rsrp_level); return FALSE; } gboolean mm_3gpp_cesq_response_to_signal_info (const gchar *response, + gpointer log_object, MMSignal **out_gsm, MMSignal **out_umts, MMSignal **out_lte, @@ -2736,7 +2649,7 @@ return FALSE; /* GERAN RSSI */ - if (mm_3gpp_rxlev_to_rssi (rxlev, &rssi)) { + if (mm_3gpp_rxlev_to_rssi (rxlev, log_object, &rssi)) { gsm = mm_signal_new (); mm_signal_set_rssi (gsm, rssi); } @@ -2744,26 +2657,26 @@ /* ignore BER */ /* UMTS RSCP */ - if (mm_3gpp_rscp_level_to_rscp (rscp_level, &rscp)) { + if (mm_3gpp_rscp_level_to_rscp (rscp_level, log_object, &rscp)) { umts = mm_signal_new (); mm_signal_set_rscp (umts, rscp); } /* UMTS EcIo (assumed EcN0) */ - if (mm_3gpp_ecn0_level_to_ecio (ecn0_level, &ecio)) { + if (mm_3gpp_ecn0_level_to_ecio (ecn0_level, log_object, &ecio)) { if (!umts) umts = mm_signal_new (); mm_signal_set_ecio (umts, ecio); } /* LTE RSRQ */ - if (mm_3gpp_rsrq_level_to_rsrq (rsrq_level, &rsrq)) { + if (mm_3gpp_rsrq_level_to_rsrq (rsrq_level, log_object, &rsrq)) { lte = mm_signal_new (); mm_signal_set_rsrq (lte, rsrq); } /* LTE RSRP */ - if (mm_3gpp_rsrp_level_to_rsrp (rsrp_level, &rsrp)) { + if (mm_3gpp_rsrp_level_to_rsrp (rsrp_level, log_object, &rsrp)) { if (!lte) lte = mm_signal_new (); mm_signal_set_rsrp (lte, rsrp); @@ -2862,6 +2775,7 @@ gboolean mm_3gpp_parse_ccwa_service_query_response (const gchar *response, + gpointer log_object, gboolean *status, GError **error) { @@ -2897,10 +2811,10 @@ guint class; if (!mm_get_uint_from_match_info (match_info, 2, &class)) - mm_warn ("couldn't parse class from +CCWA line"); + mm_obj_warn (log_object, "couldn't parse class from +CCWA line"); else if (class == 1 || class == 255) { if (!mm_get_uint_from_match_info (match_info, 1, &st)) - mm_warn ("couldn't parse status from +CCWA line"); + mm_obj_warn (log_object, "couldn't parse status from +CCWA line"); else { class_1_status = st; break; @@ -2957,17 +2871,18 @@ } gboolean -mm_3gpp_parse_cpms_test_response (const gchar *reply, - GArray **mem1, - GArray **mem2, - GArray **mem3) +mm_3gpp_parse_cpms_test_response (const gchar *reply, + GArray **mem1, + GArray **mem2, + GArray **mem3, + GError **error) { - GRegex *r; - gchar **split; guint i; - GArray *tmp1 = NULL; - GArray *tmp2 = NULL; - GArray *tmp3 = NULL; + g_autoptr(GRegex) r = NULL; + g_autoptr(GArray) tmp1 = NULL; + g_autoptr(GArray) tmp2 = NULL; + g_autoptr(GArray) tmp3 = NULL; + g_auto(GStrv) split = NULL; g_assert (mem1 != NULL); g_assert (mem2 != NULL); @@ -2976,13 +2891,16 @@ #define N_EXPECTED_GROUPS 3 split = mm_split_string_groups (mm_strip_tag (reply, "+CPMS:")); - if (!split) + if (!split) { + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, + "Couldn't split +CPMS test response in groups"); return FALSE; + } if (g_strv_length (split) != N_EXPECTED_GROUPS) { - mm_warn ("Cannot parse +CPMS test response: invalid number of groups (%u != %u)", - g_strv_length (split), N_EXPECTED_GROUPS); - g_strfreev (split); + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, + "Cannot parse +CPMS test response: invalid number of groups (%u != %u)", + g_strv_length (split), N_EXPECTED_GROUPS); return FALSE; } @@ -3025,29 +2943,20 @@ g_assert_not_reached (); } - g_strfreev (split); - g_regex_unref (r); - - g_warn_if_fail (tmp1 != NULL); - g_warn_if_fail (tmp2 != NULL); - g_warn_if_fail (tmp3 != NULL); - /* Only return TRUE if all sets have been parsed correctly * (even if the arrays may be empty) */ if (tmp1 && tmp2 && tmp3) { - *mem1 = tmp1; - *mem2 = tmp2; - *mem3 = tmp3; + *mem1 = g_steal_pointer (&tmp1); + *mem2 = g_steal_pointer (&tmp2); + *mem3 = g_steal_pointer (&tmp3); return TRUE; } - /* Otherwise, cleanup and return FALSE */ - if (tmp1) - g_array_unref (tmp1); - if (tmp2) - g_array_unref (tmp2); - if (tmp3) - g_array_unref (tmp3); + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, + "Cannot parse +CPMS test response: mem1 %s, mem2 %s, mem3 %s", + tmp1 ? "yes" : "no", + tmp2 ? "yes" : "no", + tmp3 ? "yes" : "no"); return FALSE; } @@ -3269,9 +3178,9 @@ GStrv mm_3gpp_parse_cnum_exec_response (const gchar *reply) { - GArray *array = NULL; - GRegex *r; - GMatchInfo *match_info; + g_autoptr(GPtrArray) array = NULL; + g_autoptr(GRegex) r = NULL; + g_autoptr(GMatchInfo) match_info = NULL; /* Empty strings also return NULL list */ if (!reply || !reply[0]) @@ -3281,26 +3190,22 @@ G_REGEX_UNGREEDY, 0, NULL); g_assert (r != NULL); + array = g_ptr_array_new (); g_regex_match (r, reply, 0, &match_info); while (g_match_info_matches (match_info)) { - gchar *number; + g_autofree gchar *number = NULL; number = g_match_info_fetch_named (match_info, "num"); - - if (number && number[0]) { - if (!array) - array = g_array_new (TRUE, TRUE, sizeof (gchar *)); - g_array_append_val (array, number); - } else - g_free (number); - + if (number && number[0]) + g_ptr_array_add (array, g_steal_pointer (&number)); g_match_info_next (match_info, NULL); } - g_match_info_free (match_info); - g_regex_unref (r); + if (!array->len) + return NULL; - return (array ? (GStrv) g_array_free (array, FALSE) : NULL); + g_ptr_array_add (array, NULL); + return (GStrv) g_ptr_array_free (g_steal_pointer (&array), FALSE); } /*************************************************************************/ @@ -3327,6 +3232,7 @@ gboolean mm_3gpp_parse_cmer_test_response (const gchar *response, + gpointer log_object, MM3gppCmerMode *out_supported_modes, MM3gppCmerInd *out_supported_inds, GError **error) @@ -3381,7 +3287,7 @@ if (mode_val <= 3) supported_modes |= (MM3gppCmerMode) (1 << mode_val); else - mm_dbg ("Unknown +CMER mode reported: %u", mode_val); + mm_obj_dbg (log_object, "unknown +CMER mode reported: %u", mode_val); } for (i = 0; i < array_supported_inds->len; i++) { @@ -3391,7 +3297,7 @@ if (ind_val <= 2) supported_inds |= (MM3gppCmerInd) (1 << ind_val); else - mm_dbg ("Unknown +CMER ind reported: %u", ind_val); + mm_obj_dbg (log_object, "unknown +CMER ind reported: %u", ind_val); } if (out_supported_modes) @@ -4001,8 +3907,8 @@ * many more facilities defined (for various flavors of call * barring); we only map the ones we care about. */ typedef struct { - MMModem3gppFacility facility; - gchar *acronym; + MMModem3gppFacility facility; + const gchar *acronym; } FacilityAcronym; static const FacilityAcronym facility_acronyms[] = { @@ -4029,7 +3935,7 @@ return MM_MODEM_3GPP_FACILITY_NONE; } -gchar * +const gchar * mm_3gpp_facility_to_acronym (MMModem3gppFacility facility) { guint i; @@ -4112,8 +4018,11 @@ void mm_3gpp_normalize_operator (gchar **operator, - MMModemCharset cur_charset) + MMModemCharset cur_charset, + gpointer log_object) { + g_autofree gchar *normalized = NULL; + g_assert (operator); if (*operator == NULL) @@ -4121,31 +4030,38 @@ /* Despite +CSCS? may claim supporting UCS2, Some modems (e.g. Huawei) * always report the operator name in ASCII in a +COPS response. */ - if (cur_charset == MM_MODEM_CHARSET_UCS2) { - gchar *tmp; + if (cur_charset != MM_MODEM_CHARSET_UNKNOWN) { + g_autoptr(GError) error = NULL; - tmp = g_strdup (*operator); - /* In this case we're already checking UTF-8 validity */ - tmp = mm_charset_take_and_convert_to_utf8 (tmp, cur_charset); - if (tmp) { - g_clear_pointer (operator, g_free); - *operator = tmp; + normalized = mm_modem_charset_str_to_utf8 (*operator, -1, cur_charset, TRUE, &error); + if (normalized) goto out; - } + + mm_obj_dbg (log_object, "couldn't convert operator string '%s' from charset '%s': %s", + *operator, + mm_modem_charset_to_string (cur_charset), + error->message); } /* Charset is unknown or there was an error in conversion; try to see * if the contents we got are valid UTF-8 already. */ - if (!g_utf8_validate (*operator, -1, NULL)) - g_clear_pointer (operator, g_free); + if (g_utf8_validate (*operator, -1, NULL)) + normalized = g_strdup (*operator); out: /* Some modems (Novatel LTE) return the operator name as "Unknown" when * it fails to obtain the operator name. Return NULL in such case. */ - if (*operator && g_ascii_strcasecmp (*operator, "unknown") == 0) + if (!normalized || g_ascii_strcasecmp (normalized, "unknown") == 0) { + /* If normalization failed, just cleanup the string */ g_clear_pointer (operator, g_free); + return; + } + + mm_obj_dbg (log_object, "operator normalized '%s'->'%s'", *operator, normalized); + g_clear_pointer (operator, g_free); + *operator = g_steal_pointer (&normalized); } /*************************************************************************/ @@ -4160,6 +4076,8 @@ return "IPV6"; case MM_BEARER_IP_FAMILY_IPV4V6: return "IPV4V6"; + case MM_BEARER_IP_FAMILY_NONE: + case MM_BEARER_IP_FAMILY_ANY: default: return NULL; } @@ -4383,10 +4301,9 @@ return NULL; } - bin = (guint8 *) mm_utils_hexstr2bin (raw, &binlen); + bin = mm_utils_hexstr2bin (raw, -1, &binlen, error); if (!bin) { - g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS, - "invalid raw emergency numbers list contents: %s", raw); + g_prefix_error (error, "invalid raw emergency numbers list contents: "); return NULL; } @@ -4396,7 +4313,7 @@ for (i = 0; i < max_items; i++) { gchar *number; - number = mm_bcd_to_string (&bin[i*3], 3); + number = mm_bcd_to_string (&bin[i*3], 3, TRUE /* low_nybble_first */); if (number && number[0]) g_ptr_array_add (out, number); else @@ -4671,7 +4588,7 @@ *out_ind = ind; while (iter->num != -1) { - if (iter->num == ind) { + if ((guint)iter->num == ind) { *out_roaming = iter->roam_ind; if (out_desc) *out_desc = iter->banner; diff -Nru modemmanager-1.12.8/src/mm-modem-helpers.h modemmanager-1.16.6/src/mm-modem-helpers.h --- modemmanager-1.12.8/src/mm-modem-helpers.h 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-modem-helpers.h 2021-06-06 21:40:59.000000000 +0800 @@ -39,13 +39,10 @@ /* Common utilities */ /*****************************************************************************/ -#define MM_MODEM_CAPABILITY_3GPP_LTE \ - (MM_MODEM_CAPABILITY_LTE | \ - MM_MODEM_CAPABILITY_LTE_ADVANCED) - #define MM_MODEM_CAPABILITY_3GPP \ (MM_MODEM_CAPABILITY_GSM_UMTS | \ - MM_MODEM_CAPABILITY_3GPP_LTE) + MM_MODEM_CAPABILITY_LTE | \ + MM_MODEM_CAPABILITY_5GNR) gchar *mm_strip_quotes (gchar *str); const gchar *mm_strip_tag (const gchar *str, @@ -59,8 +56,9 @@ guint mm_count_bits_set (gulong number); guint mm_find_bit_set (gulong number); -gchar *mm_create_device_identifier (guint vid, - guint pid, +gchar *mm_create_device_identifier (guint vid, + guint pid, + gpointer log_object, const gchar *ati, const gchar *ati1, const gchar *gsn, @@ -83,12 +81,12 @@ gint offset_minutes); GArray *mm_filter_supported_modes (const GArray *all, - const GArray *supported_combinations); - -GArray *mm_filter_supported_capabilities (MMModemCapability all, - const GArray *supported_combinations); + const GArray *supported_combinations, + gpointer log_object); -gchar *mm_bcd_to_string (const guint8 *bcd, gsize bcd_len); +gchar *mm_bcd_to_string (const guint8 *bcd, + gsize bcd_len, + gboolean low_nybble_first); /*****************************************************************************/ /* VOICE specific helpers and utilities */ @@ -107,6 +105,7 @@ gchar *number; /* optional */ } MMCallInfo; gboolean mm_3gpp_parse_clcc_response (const gchar *str, + gpointer log_object, GList **out_list, GError **error); void mm_3gpp_call_info_list_free (GList *call_info_list); @@ -126,6 +125,7 @@ } MMFlowControl; MMFlowControl mm_parse_ifc_test_response (const gchar *response, + gpointer log_object, GError **error); MMFlowControl mm_flow_control_from_string (const gchar *str, @@ -157,8 +157,10 @@ MMModemAccessTechnology access_tech; } MM3gppNetworkInfo; void mm_3gpp_network_info_list_free (GList *info_list); -GList *mm_3gpp_parse_cops_test_response (const gchar *reply, - GError **error); +GList *mm_3gpp_parse_cops_test_response (const gchar *reply, + MMModemCharset cur_charset, + gpointer log_object, + GError **error); /* AT+COPS? (current operator) response parser */ gboolean mm_3gpp_parse_cops_read_response (const gchar *response, @@ -179,8 +181,9 @@ MMBearerIpFamily pdp_type; } MM3gppPdpContextFormat; void mm_3gpp_pdp_context_format_list_free (GList *pdp_format_list); -GList *mm_3gpp_parse_cgdcont_test_response (const gchar *reply, - GError **error); +GList *mm_3gpp_parse_cgdcont_test_response (const gchar *reply, + gpointer log_object, + GError **error); /* AT+CGDCONT? (PDP context query) response parser */ typedef struct { @@ -197,8 +200,9 @@ MMBearerIpFamily ip_family, GList *context_list, GList *context_format_list, - gboolean *cid_reused, - gboolean *cid_overwritten); + gpointer log_object, + gboolean *out_cid_reused, + gboolean *out_cid_overwritten); /* AT+CGACT? (active PDP context query) response parser */ typedef struct { @@ -212,14 +216,16 @@ GError **error); /* CREG/CGREG response/unsolicited message parser */ -gboolean mm_3gpp_parse_creg_response (GMatchInfo *info, - MMModem3gppRegistrationState *out_reg_state, - gulong *out_lac, - gulong *out_ci, - MMModemAccessTechnology *out_act, - gboolean *out_cgreg, - gboolean *out_cereg, - GError **error); +gboolean mm_3gpp_parse_creg_response (GMatchInfo *info, + gpointer log_object, + MMModem3gppRegistrationState *out_reg_state, + gulong *out_lac, + gulong *out_ci, + MMModemAccessTechnology *out_act, + gboolean *out_cgreg, + gboolean *out_cereg, + gboolean *out_c5greg, + GError **error); /* AT+CMGF=? (SMS message format) response parser */ gboolean mm_3gpp_parse_cmgf_test_response (const gchar *reply, @@ -228,10 +234,11 @@ GError **error); /* AT+CPMS=? (Preferred SMS storage) response parser */ -gboolean mm_3gpp_parse_cpms_test_response (const gchar *reply, - GArray **mem1, - GArray **mem2, - GArray **mem3); +gboolean mm_3gpp_parse_cpms_test_response (const gchar *reply, + GArray **mem1, + GArray **mem2, + GArray **mem3, + GError **error); /* AT+CPMS? (Current SMS storage) response parser */ gboolean mm_3gpp_parse_cpms_query_response (const gchar *reply, @@ -278,6 +285,7 @@ gchar *mm_3gpp_build_cmer_set_request (MM3gppCmerMode mode, MM3gppCmerInd ind); gboolean mm_3gpp_parse_cmer_test_response (const gchar *reply, + gpointer log_object, MM3gppCmerMode *supported_modes, MM3gppCmerInd *supported_inds, GError **error); @@ -394,6 +402,7 @@ GError **error); gboolean mm_3gpp_cesq_response_to_signal_info (const gchar *response, + gpointer log_object, MMSignal **out_gsm, MMSignal **out_umts, MMSignal **out_lte, @@ -407,19 +416,21 @@ /* CCWA service query response parser */ gboolean mm_3gpp_parse_ccwa_service_query_response (const gchar *response, + gpointer log_object, gboolean *status, GError **error); /* Additional 3GPP-specific helpers */ -MMModem3gppFacility mm_3gpp_acronym_to_facility (const gchar *str); -gchar *mm_3gpp_facility_to_acronym (MMModem3gppFacility facility); +MMModem3gppFacility mm_3gpp_acronym_to_facility (const gchar *str); +const gchar *mm_3gpp_facility_to_acronym (MMModem3gppFacility facility); MMModemAccessTechnology mm_string_to_access_tech (const gchar *string); void mm_3gpp_normalize_operator (gchar **operator, - MMModemCharset cur_charset); + MMModemCharset cur_charset, + gpointer log_object); gboolean mm_3gpp_parse_operator_id (const gchar *operator_id, guint16 *mcc, @@ -432,18 +443,24 @@ char *mm_3gpp_parse_iccid (const char *raw_iccid, GError **error); -gboolean mm_3gpp_rscp_level_to_rscp (guint rscp_level, - gdouble *out_rscp); -gboolean mm_3gpp_rxlev_to_rssi (guint rxlev, - gdouble *out_rssi); -gboolean mm_3gpp_ecn0_level_to_ecio (guint ecn0_level, - gdouble *out_ecio); -gboolean mm_3gpp_rsrq_level_to_rsrq (guint rsrq_level, - gdouble *out_rsrq); -gboolean mm_3gpp_rsrp_level_to_rsrp (guint rsrp_level, - gdouble *out_rsrp); -gboolean mm_3gpp_rssnr_level_to_rssnr (gint rssnr_level, - gdouble *out_rssnr); +gboolean mm_3gpp_rscp_level_to_rscp (guint rscp_level, + gpointer log_object, + gdouble *out_rscp); +gboolean mm_3gpp_rxlev_to_rssi (guint rxlev, + gpointer log_object, + gdouble *out_rssi); +gboolean mm_3gpp_ecn0_level_to_ecio (guint ecn0_level, + gpointer log_object, + gdouble *out_ecio); +gboolean mm_3gpp_rsrq_level_to_rsrq (guint rsrq_level, + gpointer log_object, + gdouble *out_rsrq); +gboolean mm_3gpp_rsrp_level_to_rsrp (guint rsrp_level, + gpointer log_object, + gdouble *out_rsrp); +gboolean mm_3gpp_rssnr_level_to_rssnr (gint rssnr_level, + gpointer log_object, + gdouble *out_rssnr); GStrv mm_3gpp_parse_emergency_numbers (const char *raw, GError **error); @@ -503,4 +520,10 @@ guint16 *out_port, GError **error); +/*****************************************************************************/ + +/* Useful when clamp-ing an unsigned integer with implicit low limit set to 0, + * and in order to avoid -Wtype-limits warnings. */ +#define MM_CLAMP_HIGH(x, high) (((x) > (high)) ? (high) : (x)) + #endif /* MM_MODEM_HELPERS_H */ diff -Nru modemmanager-1.12.8/src/mm-plugin-manager.c modemmanager-1.16.6/src/mm-plugin-manager.c --- modemmanager-1.12.8/src/mm-plugin-manager.c 2020-03-14 16:35:10.000000000 +0800 +++ modemmanager-1.16.6/src/mm-plugin-manager.c 2021-06-06 21:40:59.000000000 +0800 @@ -28,16 +28,18 @@ #include "mm-plugin-manager.h" #include "mm-plugin.h" #include "mm-shared.h" -#include "mm-log.h" +#include "mm-utils.h" +#include "mm-log-object.h" #define SHARED_PREFIX "libmm-shared" #define PLUGIN_PREFIX "libmm-plugin" -static void initable_iface_init (GInitableIface *iface); +static void initable_iface_init (GInitableIface *iface); +static void log_object_iface_init (MMLogObjectInterface *iface); G_DEFINE_TYPE_EXTENDED (MMPluginManager, mm_plugin_manager, G_TYPE_OBJECT, 0, - G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, - initable_iface_init)) + G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, initable_iface_init) + G_IMPLEMENT_INTERFACE (MM_TYPE_LOG_OBJECT, log_object_iface_init)) enum { PROP_0, @@ -61,6 +63,9 @@ /* List of ongoing device support checks */ GList *device_contexts; + + /* Full list of subsystems requested by the registered plugins */ + gchar **subsystems; }; /*****************************************************************************/ @@ -177,7 +182,7 @@ /* * Port context * - * This structure hold all the probing information related to a single port. + * This structure holds all the probing information related to a single port. */ struct _PortContext { /* Reference counting */ @@ -260,7 +265,8 @@ static void port_context_complete (PortContext *port_context) { - GTask *task; + MMPluginManager *self; + GTask *task; /* If already completed, do nothing */ if (!port_context->task) @@ -271,8 +277,9 @@ port_context->task = NULL; /* Log about the time required to complete the checks */ - mm_dbg ("[plugin manager] task %s: finished in '%lf' seconds", - port_context->name, g_timer_elapsed (port_context->timer, NULL)); + self = g_task_get_source_object (task); + mm_obj_dbg (self, "task %s: finished in '%lf' seconds", + port_context->name, g_timer_elapsed (port_context->timer, NULL)); if (!port_context->best_plugin) g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, "Unsupported"); @@ -287,10 +294,13 @@ port_context_supported (PortContext *port_context, MMPlugin *plugin) { + MMPluginManager *self; + g_assert (plugin); + self = g_task_get_source_object (port_context->task); - mm_dbg ("[plugin manager] task %s: found best plugin for port (%s)", - port_context->name, mm_plugin_get_name (plugin)); + mm_obj_dbg (self, "task %s: found best plugin for port (%s)", + port_context->name, mm_plugin_get_name (plugin)); /* Found a best plugin, store it to return it */ port_context->best_plugin = g_object_ref (plugin); @@ -309,7 +319,8 @@ port_context_set_suggestion (PortContext *port_context, MMPlugin *suggested_plugin) { - gboolean forbidden_icera; + MMPluginManager *self; + gboolean forbidden_icera; /* Plugin suggestions serve two different purposes here: * 1) Finish all the probes which were deferred until suggested. @@ -325,6 +336,9 @@ if (port_context->best_plugin || port_context->suggested_plugin) return; + /* There may not be a task at this point, so be gentle */ + self = port_context->task ? g_task_get_source_object (port_context->task) : NULL; + /* Complete tasks which were deferred until suggested */ if (port_context->defer_until_suggested) { /* Reset the defer until suggested flag; we consider this @@ -332,8 +346,8 @@ port_context->defer_until_suggested = FALSE; if (suggested_plugin) { - mm_dbg ("[plugin manager] task %s: deferred task completed, got suggested plugin (%s)", - port_context->name, mm_plugin_get_name (suggested_plugin)); + mm_obj_dbg (self, "task %s: deferred task completed, got suggested plugin (%s)", + port_context->name, mm_plugin_get_name (suggested_plugin)); /* Advance to the suggested plugin and re-check support there */ port_context->suggested_plugin = g_object_ref (suggested_plugin); port_context->current = g_list_find (port_context->current, port_context->suggested_plugin); @@ -343,8 +357,7 @@ return; } - mm_dbg ("[plugin manager] task %s: deferred task completed, no suggested plugin", - port_context->name); + mm_obj_dbg (self, "task %s: deferred task completed, no suggested plugin", port_context->name); port_context_complete (port_context); return; } @@ -354,7 +367,7 @@ return; /* The GENERIC plugin is NEVER suggested to others */ - if (g_str_equal (mm_plugin_get_name (suggested_plugin), MM_PLUGIN_GENERIC_NAME)) + if (mm_plugin_is_generic (suggested_plugin)) return; /* If the plugin has MM_PLUGIN_FORBIDDEN_ICERA set, we do *not* suggest @@ -372,8 +385,8 @@ * should run its probing independently, and we'll later decide * which result applies to the whole device. */ - mm_dbg ("[plugin manager] task %s: got suggested plugin (%s)", - port_context->name, mm_plugin_get_name (suggested_plugin)); + mm_obj_dbg (self, "task %s: got suggested plugin (%s)", + port_context->name, mm_plugin_get_name (suggested_plugin)); port_context->suggested_plugin = g_object_ref (suggested_plugin); } @@ -381,7 +394,10 @@ port_context_unsupported (PortContext *port_context, MMPlugin *plugin) { + MMPluginManager *self; + g_assert (plugin); + self = g_task_get_source_object (port_context->task); /* If there is no suggested plugin, go on to the next one */ if (!port_context->suggested_plugin) { @@ -396,8 +412,8 @@ * just cancel the port probing and avoid more tests. */ if (port_context->suggested_plugin == plugin) { - mm_dbg ("[plugin manager] task %s: ignoring port unsupported by physical modem's plugin", - port_context->name); + mm_obj_dbg (self, "task %s: ignoring port unsupported by physical modem's plugin", + port_context->name); port_context_complete (port_context); return; } @@ -412,14 +428,17 @@ static void port_context_defer (PortContext *port_context) { + MMPluginManager *self; + + self = g_task_get_source_object (port_context->task); + /* Try with the suggested one after being deferred */ if (port_context->suggested_plugin) { - mm_dbg ("[plugin manager] task %s: deferring support check (%s suggested)", - port_context->name, mm_plugin_get_name (MM_PLUGIN (port_context->suggested_plugin))); + mm_obj_dbg (self, "task %s: deferring support check (%s suggested)", + port_context->name, mm_plugin_get_name (MM_PLUGIN (port_context->suggested_plugin))); port_context->current = g_list_find (port_context->current, port_context->suggested_plugin); } else - mm_dbg ("[plugin manager] task %s: deferring support check", - port_context->name); + mm_obj_dbg (self, "task %s: deferring support check", port_context->name); /* Schedule checking support. * @@ -434,14 +453,17 @@ port_context_defer_until_suggested (PortContext *port_context, MMPlugin *plugin) { + MMPluginManager *self; + g_assert (plugin); + self = g_task_get_source_object (port_context->task); /* If we arrived here and we already have a plugin suggested, use it */ if (port_context->suggested_plugin) { /* We can finish this context */ if (port_context->suggested_plugin == plugin) { - mm_dbg ("[plugin manager] task %s: completed, got suggested plugin (%s)", - port_context->name, mm_plugin_get_name (port_context->suggested_plugin)); + mm_obj_dbg (self, "task %s: completed, got suggested plugin (%s)", + port_context->name, mm_plugin_get_name (port_context->suggested_plugin)); /* Store best plugin and end operation */ port_context->best_plugin = g_object_ref (port_context->suggested_plugin); port_context_complete (port_context); @@ -449,8 +471,8 @@ } /* Recheck support in deferred task */ - mm_dbg ("[plugin manager] task %s: re-checking support on deferred task, got suggested plugin (%s)", - port_context->name, mm_plugin_get_name (port_context->suggested_plugin)); + mm_obj_dbg (self, "task %s: re-checking support on deferred task, got suggested plugin (%s)", + port_context->name, mm_plugin_get_name (port_context->suggested_plugin)); port_context->current = g_list_find (port_context->current, port_context->suggested_plugin); port_context_next (port_context); return; @@ -459,8 +481,7 @@ /* We are deferred until a suggested plugin is given. If last supports task * of a given device is finished without finding a best plugin, this task * will get finished reporting unsupported. */ - mm_dbg ("[plugin manager] task %s: deferring support check until result suggested", - port_context->name); + mm_obj_dbg (self, "task %s: deferring support check until result suggested", port_context->name); port_context->defer_until_suggested = TRUE; } @@ -469,15 +490,18 @@ GAsyncResult *res, PortContext *port_context) { + MMPluginManager *self; MMPluginSupportsResult support_result; GError *error = NULL; + self = g_task_get_source_object (port_context->task); + /* Get supports check results */ support_result = mm_plugin_supports_port_finish (plugin, res, &error); if (error) { g_assert_cmpuint (support_result, ==, MM_PLUGIN_SUPPORTS_PORT_UNKNOWN); - mm_warn ("[plugin manager] task %s: error when checking support with plugin '%s': '%s'", - port_context->name, mm_plugin_get_name (plugin), error->message); + mm_obj_warn (self, "task %s: error when checking support with plugin '%s': %s", + port_context->name, mm_plugin_get_name (plugin), error->message); g_error_free (error); } @@ -495,6 +519,8 @@ case MM_PLUGIN_SUPPORTS_PORT_DEFER_UNTIL_SUGGESTED: port_context_defer_until_suggested (port_context, plugin); break; + default: + g_assert_not_reached (); } /* We received a full reference, to make sure the context was always @@ -505,7 +531,10 @@ static void port_context_next (PortContext *port_context) { - MMPlugin *plugin; + MMPluginManager *self; + MMPlugin *plugin; + + self = g_task_get_source_object (port_context->task); /* If we're cancelled, done */ if (g_cancellable_is_cancelled (port_context->cancellable)) { @@ -525,8 +554,8 @@ * async method because we want to make sure the context is still valid * once the method finishes. */ plugin = MM_PLUGIN (port_context->current->data); - mm_dbg ("[plugin manager] task %s: checking with plugin '%s'", - port_context->name, mm_plugin_get_name (plugin)); + mm_obj_dbg (self, "task %s: checking with plugin '%s'", + port_context->name, mm_plugin_get_name (plugin)); mm_plugin_supports_port (plugin, port_context->device, port_context->port, @@ -538,6 +567,8 @@ static gboolean port_context_cancel (PortContext *port_context) { + MMPluginManager *self; + /* Port context cancellation, which only makes sense if the context is * actually being run, so just exit if it isn't. */ if (!port_context->task) @@ -547,8 +578,8 @@ if (g_cancellable_is_cancelled (port_context->cancellable)) return FALSE; - mm_dbg ("[plugin manager) task %s: cancellation requested", - port_context->name); + self = g_task_get_source_object (port_context->task); + mm_obj_dbg (self, "task %s: cancellation requested", port_context->name); /* Make sure we hold a port context reference while cancelling, as the * cancellable signal handlers may end up unref-ing our last reference @@ -598,8 +629,8 @@ port_context->suggested_plugin = g_object_ref (suggested); port_context->current = g_list_find (port_context->current, port_context->suggested_plugin); if (!port_context->current) - mm_warn ("[plugin manager] task %s: suggested plugin (%s) not among the ones to test", - port_context->name, mm_plugin_get_name (suggested)); + mm_obj_warn (self, "task %s: suggested plugin (%s) not among the ones to test", + port_context->name, mm_plugin_get_name (suggested)); } /* Log the list of plugins found and specify which are the ones that are going @@ -608,31 +639,31 @@ gboolean suggested_found = FALSE; GList *l; - mm_dbg ("[plugin manager] task %s: found '%u' plugins to try", - port_context->name, g_list_length (port_context->plugins)); + mm_obj_dbg (self, "task %s: found '%u' plugins to try", + port_context->name, g_list_length (port_context->plugins)); for (l = port_context->plugins; l; l = g_list_next (l)) { MMPlugin *plugin; plugin = MM_PLUGIN (l->data); if (suggested_found) { - mm_dbg ("[plugin manager] task %s: may try with plugin '%s'", - port_context->name, mm_plugin_get_name (plugin)); + mm_obj_dbg (self, "task %s: may try with plugin '%s'", + port_context->name, mm_plugin_get_name (plugin)); continue; } if (suggested && l == port_context->current) { suggested_found = TRUE; - mm_dbg ("[plugin manager] task %s: will try with plugin '%s' (suggested)", - port_context->name, mm_plugin_get_name (plugin)); + mm_obj_dbg (self, "task %s: will try with plugin '%s' (suggested)", + port_context->name, mm_plugin_get_name (plugin)); continue; } if (suggested && !suggested_found) { - mm_dbg ("[plugin manager] task %s: won't try with plugin '%s' (skipped)", - port_context->name, mm_plugin_get_name (plugin)); + mm_obj_dbg (self, "task %s: won't try with plugin '%s' (skipped)", + port_context->name, mm_plugin_get_name (plugin)); continue; } - mm_dbg ("[plugin manager] task %s: will try with plugin '%s'", - port_context->name, mm_plugin_get_name (plugin)); + mm_obj_dbg (self, "task %s: will try with plugin '%s'", + port_context->name, mm_plugin_get_name (plugin)); } } @@ -645,7 +676,7 @@ * best plugin found for the port. */ port_context->task = g_task_new (self, port_context->cancellable, callback, user_data); - mm_dbg ("[plugin manager) task %s: started", port_context->name); + mm_obj_dbg (self, "task %s: started", port_context->name); /* Go probe with the first plugin */ port_context_next (port_context); @@ -708,7 +739,7 @@ /* The operation task */ GTask *task; - /* Internal ancellable */ + /* Internal cancellable */ GCancellable *cancellable; /* Timer tracking how much time is required for the device support check */ @@ -826,22 +857,25 @@ static void device_context_complete (DeviceContext *device_context) { - GTask *task; + MMPluginManager *self; + GTask *task; + + self = g_task_get_source_object (device_context->task); /* If the context is completed before the 2500ms minimum probing time, we need to wait * until that happens, so that we give enough time to udev/hotplug to report the * new port additions. */ if (device_context->min_probing_time_id) { - mm_dbg ("[plugin manager] task %s: all port probings completed, but not reached min probing time yet", - device_context->name); + mm_obj_dbg (self, "task %s: all port probings completed, but not reached min probing time yet", + device_context->name); return; } /* If the context is completed less than 1500ms before the last port was exposed, * wait some more. */ if (device_context->extra_probing_time_id) { - mm_dbg ("[plugin manager] task %s: all port probings completed, but not reached extra probing time yet", - device_context->name); + mm_obj_dbg (self, "task %s: all port probings completed, but not reached extra probing time yet", + device_context->name); return; } @@ -851,8 +885,8 @@ device_context->task = NULL; /* Log about the time required to complete the checks */ - mm_dbg ("[plugin manager] task %s: finished in '%lf' seconds", - device_context->name, g_timer_elapsed (device_context->timer, NULL)); + mm_obj_dbg (self, "task %s: finished in '%lf' seconds", + device_context->name, g_timer_elapsed (device_context->timer, NULL)); /* Remove signal handlers */ if (device_context->grabbed_id) { @@ -911,20 +945,24 @@ PortContext *port_context, MMPlugin *best_plugin) { + MMPluginManager *self; + + self = g_task_get_source_object (device_context->task); + if (!best_plugin) { /* If the port appeared after an already probed port, which decided that * the Generic plugin was the best one (which is by default not initially * suggested), we'll end up arriving here. Don't ignore it, it may well * be a wwan port that we do need to grab. */ if (device_context->best_plugin) { - mm_dbg ("[plugin manager] task %s: assuming port can be handled by the '%s' plugin", - port_context->name, mm_plugin_get_name (device_context->best_plugin)); + mm_obj_dbg (self, "task %s: assuming port can be handled by the '%s' plugin", + port_context->name, mm_plugin_get_name (device_context->best_plugin)); return; } /* Unsupported error, this is generic when we cannot find a plugin */ - mm_dbg ("[plugin manager] task %s: not supported by any plugin" , - port_context->name); + mm_obj_dbg (self, "task %s: not supported by any plugin" , + port_context->name); /* Tell the device to ignore this port */ mm_device_ignore_port (device_context->device, port_context->port); @@ -940,12 +978,12 @@ * one and now we're reporting a more specific one, use the new one. */ if (!device_context->best_plugin || - (g_str_equal (mm_plugin_get_name (device_context->best_plugin), MM_PLUGIN_GENERIC_NAME) && + (mm_plugin_is_generic (device_context->best_plugin) && device_context->best_plugin != best_plugin)) { /* Only log best plugin if it's not the generic one */ - if (!g_str_equal (mm_plugin_get_name (best_plugin), MM_PLUGIN_GENERIC_NAME)) - mm_dbg ("[plugin manager] task %s: found best plugin: %s", - port_context->name, mm_plugin_get_name (best_plugin)); + if (!mm_plugin_is_generic (best_plugin)) + mm_obj_dbg (self, "task %s: found best plugin: %s", + port_context->name, mm_plugin_get_name (best_plugin)); /* Store and suggest this plugin also to other port probes */ device_context->best_plugin = g_object_ref (best_plugin); device_context_suggest_plugin (device_context, port_context, best_plugin); @@ -977,19 +1015,19 @@ g_assert (new_allowed_icera == FALSE || new_forbidden_icera == FALSE); if (previous_allowed_icera && new_forbidden_icera) - mm_warn ("[plugin manager] task %s: will use plugin '%s' instead of '%s', modem is icera-capable", + mm_obj_warn (self, "task %s: will use plugin '%s' instead of '%s', modem is icera-capable", port_context->name, mm_plugin_get_name (device_context->best_plugin), mm_plugin_get_name (best_plugin)); else if (new_allowed_icera && previous_forbidden_icera) { - mm_warn ("[plugin manager] task %s: overriding previously selected device plugin '%s' with '%s', modem is icera-capable", + mm_obj_warn (self, "task %s: overriding previously selected device plugin '%s' with '%s', modem is icera-capable", port_context->name, mm_plugin_get_name (device_context->best_plugin), mm_plugin_get_name (best_plugin)); g_object_unref (device_context->best_plugin); device_context->best_plugin = g_object_ref (best_plugin); } else - mm_warn ("[plugin manager] task %s: plugin mismatch error (device reports '%s', port reports '%s')", + mm_obj_warn (self, "task %s: plugin mismatch error (device reports '%s', port reports '%s')", port_context->name, mm_plugin_get_name (device_context->best_plugin), mm_plugin_get_name (best_plugin)); @@ -997,21 +1035,24 @@ } /* Device plugin equal to best plugin */ - mm_dbg ("[plugin manager] task %s: best plugin matches device reported one: %s", - port_context->name, mm_plugin_get_name (best_plugin)); + mm_obj_dbg (self, "task %s: best plugin matches device reported one: %s", + port_context->name, mm_plugin_get_name (best_plugin)); } static void device_context_continue (DeviceContext *device_context) { - GList *l; - GString *s = NULL; - guint n = 0; - guint n_active = 0; + MMPluginManager *self; + GList *l; + GString *s = NULL; + guint n = 0; + guint n_active = 0; + + self = g_task_get_source_object (device_context->task); /* If there are no running port contexts around, we're free to finish */ if (!device_context->port_contexts) { - mm_dbg ("[plugin manager] task %s: no more ports to probe", device_context->name); + mm_obj_dbg (self, "task %s: no more ports to probe", device_context->name); device_context_complete (device_context); return; } @@ -1036,12 +1077,12 @@ } g_assert (n > 0 && s); - mm_dbg ("[plugin Manager] task %s: still %u running probes (%u active): %s", - device_context->name, n, n_active, s->str); + mm_obj_dbg (self, "task %s: still %u running probes (%u active): %s", + device_context->name, n, n_active, s->str); g_string_free (s, TRUE); if (n_active == 0) { - mm_dbg ("[plugin manager] task %s: no active tasks to probe", device_context->name); + mm_obj_dbg (self, "task %s: no active tasks to probe", device_context->name); device_context_suggest_plugin (device_context, NULL, NULL); } } @@ -1062,7 +1103,7 @@ /* This error is not critical */ device_context_set_best_plugin (common->device_context, common->port_context, NULL); } else - mm_warn ("[plugin manager] task %s: failed: %s", common->port_context->name, error->message); + mm_obj_warn (self, "task %s: failed: %s", common->port_context->name, error->message); g_error_free (error); } else { /* Set the plugin as the best one in the device context */ @@ -1088,9 +1129,12 @@ static gboolean device_context_min_probing_time_elapsed (DeviceContext *device_context) { + MMPluginManager *self; + device_context->min_probing_time_id = 0; - mm_dbg ("[plugin manager] task %s: min probing time elapsed", device_context->name); + self = g_task_get_source_object (device_context->task); + mm_obj_dbg (self, "task %s: min probing time elapsed", device_context->name); /* Wakeup the device context logic */ device_context_continue (device_context); @@ -1100,9 +1144,12 @@ static gboolean device_context_extra_probing_time_elapsed (DeviceContext *device_context) { + MMPluginManager *self; + device_context->extra_probing_time_id = 0; - mm_dbg ("[plugin manager] task %s: extra probing time elapsed", device_context->name); + self = g_task_get_source_object (device_context->task); + mm_obj_dbg (self, "task %s: extra probing time elapsed", device_context->name); /* Wakeup the device context logic */ device_context_continue (device_context); @@ -1127,10 +1174,8 @@ /* If we got one already set in the device context, it will be the first one, * unless it is the generic plugin */ - if (device_context->best_plugin && - !g_str_equal (mm_plugin_get_name (device_context->best_plugin), MM_PLUGIN_GENERIC_NAME)) { + if (device_context->best_plugin && !mm_plugin_is_generic (device_context->best_plugin)) suggested = device_context->best_plugin; - } port_context_run (self, port_context, @@ -1154,7 +1199,7 @@ self = device_context->self; device_context->min_wait_time_id = 0; - mm_dbg ("[plugin manager] task %s: min wait time elapsed", device_context->name); + mm_obj_dbg (self, "task %s: min wait time elapsed", device_context->name); /* Move list of port contexts out of the wait list */ g_assert (!device_context->port_contexts); @@ -1183,10 +1228,12 @@ device_context_port_released (DeviceContext *device_context, MMKernelDevice *port) { - PortContext *port_context; + MMPluginManager *self; + PortContext *port_context; - mm_dbg ("[plugin manager] task %s: port released: %s", - device_context->name, mm_kernel_device_get_name (port)); + self = g_task_get_source_object (device_context->task); + mm_obj_dbg (self, "task %s: port released: %s", + device_context->name, mm_kernel_device_get_name (port)); /* Check if there's a waiting port context */ port_context = device_context_peek_waiting_port_context (device_context, port); @@ -1207,8 +1254,8 @@ /* This is not something worth warning. If the probing task has already * been finished, it will already be removed from the list */ - mm_dbg ("[plugin manager] task %s: port wasn't found: %s", - device_context->name, mm_kernel_device_get_name (port)); + mm_obj_dbg (self, "task %s: port wasn't found: %s", + device_context->name, mm_kernel_device_get_name (port)); } static void @@ -1221,13 +1268,13 @@ /* Recover plugin manager */ self = MM_PLUGIN_MANAGER (device_context->self); - mm_dbg ("[plugin manager] task %s: port grabbed: %s", - device_context->name, mm_kernel_device_get_name (port)); + mm_obj_dbg (self, "task %s: port grabbed: %s", + device_context->name, mm_kernel_device_get_name (port)); /* Ignore if for any reason we still have it in the running list */ port_context = device_context_peek_running_port_context (device_context, port); if (port_context) { - mm_warn ("[plugin manager] task %s: port context already being processed", + mm_obj_warn (self, "task %s: port context already being processed", device_context->name); return; } @@ -1235,7 +1282,7 @@ /* Ignore if for any reason we still have it in the waiting list */ port_context = device_context_peek_waiting_port_context (device_context, port); if (port_context) { - mm_warn ("[plugin manager] task %s: port context already scheduled", + mm_obj_warn (self, "task %s: port context already scheduled", device_context->name); return; } @@ -1253,13 +1300,13 @@ device_context->device, port); - mm_dbg ("[plugin manager] task %s: new support task for port", - port_context->name); + mm_obj_dbg (self, "task %s: new support task for port", + port_context->name); /* Îf still waiting the min wait time, store it in the waiting list */ if (device_context->min_wait_time_id) { - mm_dbg ("[plugin manager) task %s: deferred until min wait time elapsed", - port_context->name); + mm_obj_dbg (self, "task %s: deferred until min wait time elapsed", + port_context->name); /* Store the port reference in the list within the device */ device_context->wait_port_contexts = g_list_prepend (device_context->wait_port_contexts, port_context); return; @@ -1276,12 +1323,14 @@ static gboolean device_context_cancel (DeviceContext *device_context) { + MMPluginManager *self; + /* If cancelled already, do nothing */ if (g_cancellable_is_cancelled (device_context->cancellable)) return FALSE; - mm_dbg ("[plugin manager) task %s: cancellation requested", - device_context->name); + self = g_task_get_source_object (device_context->task); + mm_obj_dbg (self, "task %s: cancellation requested", device_context->name); /* The device context is cancelled now */ g_cancellable_cancel (device_context->cancellable); @@ -1500,7 +1549,7 @@ * Note that we handle cancellations ourselves, as we don't want the caller * to be required to keep track of a GCancellable for each of these tasks. */ - task = g_task_new (G_OBJECT (self), NULL, callback, user_data); + task = g_task_new (self, NULL, callback, user_data); /* Fail if there is already a task for the same device */ device_context = plugin_manager_peek_device_context (self, device); @@ -1518,8 +1567,8 @@ /* Track the device context in the list within the plugin manager. */ self->priv->device_contexts = g_list_prepend (self->priv->device_contexts, device_context); - mm_dbg ("[plugin manager] task %s: new support task for device: %s", - device_context->name, mm_device_get_uid (device_context->device)); + mm_obj_dbg (self, "task %s: new support task for device: %s", + device_context->name, mm_device_get_uid (device_context->device)); /* Run device context */ device_context_run (self, @@ -1556,6 +1605,14 @@ /*****************************************************************************/ +const gchar ** +mm_plugin_manager_get_subsystems (MMPluginManager *self) +{ + return (const gchar **) self->priv->subsystems; +} + +/*****************************************************************************/ + static void register_plugin_whitelist_tags (MMPluginManager *self, MMPlugin *plugin) @@ -1572,6 +1629,21 @@ } static void +register_plugin_whitelist_vendor_ids (MMPluginManager *self, + MMPlugin *plugin) +{ + const guint16 *vendor_ids; + guint i; + + if (!mm_filter_check_rule_enabled (self->priv->filter, MM_FILTER_RULE_PLUGIN_WHITELIST)) + return; + + vendor_ids = mm_plugin_get_allowed_vendor_ids (plugin); + for (i = 0; vendor_ids && vendor_ids[i]; i++) + mm_filter_register_plugin_whitelist_vendor_id (self->priv->filter, vendor_ids[i]); +} + +static void register_plugin_whitelist_product_ids (MMPluginManager *self, MMPlugin *plugin) { @@ -1587,57 +1659,58 @@ } static MMPlugin * -load_plugin (const gchar *path) +load_plugin (MMPluginManager *self, + const gchar *path) { - MMPlugin *plugin = NULL; - GModule *module; - MMPluginCreateFunc plugin_create_func; - gint *major_plugin_version; - gint *minor_plugin_version; - gchar *path_display; + MMPlugin *plugin = NULL; + GModule *module; + MMPluginCreateFunc plugin_create_func; + gint *major_plugin_version; + gint *minor_plugin_version; + gchar *path_display; /* Get printable UTF-8 string of the path */ path_display = g_filename_display_name (path); module = g_module_open (path, 0); if (!module) { - mm_warn ("[plugin manager] could not load plugin '%s': %s", path_display, g_module_error ()); + mm_obj_warn (self, "could not load plugin '%s': %s", path_display, g_module_error ()); goto out; } if (!g_module_symbol (module, "mm_plugin_major_version", (gpointer *) &major_plugin_version)) { - mm_warn ("[plugin manager] could not load plugin '%s': Missing major version info", path_display); + mm_obj_warn (self, "could not load plugin '%s': Missing major version info", path_display); goto out; } if (*major_plugin_version != MM_PLUGIN_MAJOR_VERSION) { - mm_warn ("[plugin manager] could not load plugin '%s': Plugin major version %d, %d is required", + mm_obj_warn (self, "could not load plugin '%s': Plugin major version %d, %d is required", path_display, *major_plugin_version, MM_PLUGIN_MAJOR_VERSION); goto out; } if (!g_module_symbol (module, "mm_plugin_minor_version", (gpointer *) &minor_plugin_version)) { - mm_warn ("[plugin manager] could not load plugin '%s': Missing minor version info", path_display); + mm_obj_warn (self, "could not load plugin '%s': Missing minor version info", path_display); goto out; } if (*minor_plugin_version != MM_PLUGIN_MINOR_VERSION) { - mm_warn ("[plugin manager] could not load plugin '%s': Plugin minor version %d, %d is required", + mm_obj_warn (self, "could not load plugin '%s': Plugin minor version %d, %d is required", path_display, *minor_plugin_version, MM_PLUGIN_MINOR_VERSION); goto out; } if (!g_module_symbol (module, "mm_plugin_create", (gpointer *) &plugin_create_func)) { - mm_warn ("[plugin manager] could not load plugin '%s': %s", path_display, g_module_error ()); + mm_obj_warn (self, "could not load plugin '%s': %s", path_display, g_module_error ()); goto out; } plugin = (*plugin_create_func) (); if (plugin) { - mm_dbg ("[plugin manager] loaded plugin '%s' from '%s'", mm_plugin_get_name (plugin), path_display); + mm_obj_dbg (self, "loaded plugin '%s' from '%s'", mm_plugin_get_name (plugin), path_display); g_object_weak_ref (G_OBJECT (plugin), (GWeakNotify) g_module_close, module); } else - mm_warn ("[plugin manager] could not load plugin '%s': initialization failed", path_display); + mm_obj_warn (self, "could not load plugin '%s': initialization failed", path_display); out: if (module && !plugin) @@ -1649,7 +1722,8 @@ } static void -load_shared (const gchar *path) +load_shared (MMPluginManager *self, + const gchar *path) { GModule *module; gchar *path_display; @@ -1662,38 +1736,38 @@ module = g_module_open (path, 0); if (!module) { - mm_warn ("[plugin manager] could not load shared '%s': %s", path_display, g_module_error ()); + mm_obj_warn (self, "could not load shared '%s': %s", path_display, g_module_error ()); goto out; } if (!g_module_symbol (module, "mm_shared_major_version", (gpointer *) &major_shared_version)) { - mm_warn ("[plugin manager] could not load shared '%s': Missing major version info", path_display); + mm_obj_warn (self, "could not load shared '%s': Missing major version info", path_display); goto out; } if (*major_shared_version != MM_SHARED_MAJOR_VERSION) { - mm_warn ("[plugin manager] could not load shared '%s': Shared major version %d, %d is required", - path_display, *major_shared_version, MM_SHARED_MAJOR_VERSION); + mm_obj_warn (self, "could not load shared '%s': Shared major version %d, %d is required", + path_display, *major_shared_version, MM_SHARED_MAJOR_VERSION); goto out; } if (!g_module_symbol (module, "mm_shared_minor_version", (gpointer *) &minor_shared_version)) { - mm_warn ("[plugin manager] could not load shared '%s': Missing minor version info", path_display); + mm_obj_warn (self, "could not load shared '%s': Missing minor version info", path_display); goto out; } if (*minor_shared_version != MM_SHARED_MINOR_VERSION) { - mm_warn ("[plugin manager] could not load shared '%s': Shared minor version %d, %d is required", - path_display, *minor_shared_version, MM_SHARED_MINOR_VERSION); + mm_obj_warn (self, "could not load shared '%s': Shared minor version %d, %d is required", + path_display, *minor_shared_version, MM_SHARED_MINOR_VERSION); goto out; } if (!g_module_symbol (module, "mm_shared_name", (gpointer *) &shared_name)) { - mm_warn ("[plugin manager] could not load shared '%s': Missing name", path_display); + mm_obj_warn (self, "could not load shared '%s': Missing name", path_display); goto out; } - mm_dbg ("[plugin manager] loaded shared '%s' utils from '%s'", *shared_name, path_display); + mm_obj_dbg (self, "loaded shared '%s' utils from '%s'", *shared_name, path_display); out: if (module && !(*shared_name)) @@ -1703,15 +1777,17 @@ } static gboolean -load_plugins (MMPluginManager *self, - GError **error) +load_plugins (MMPluginManager *self, + GError **error) { - GDir *dir = NULL; - const gchar *fname; - gchar *plugindir_display = NULL; - GList *shared_paths = NULL; - GList *plugin_paths = NULL; - GList *l; + GDir *dir = NULL; + const gchar *fname; + GList *shared_paths = NULL; + GList *plugin_paths = NULL; + GList *l; + GPtrArray *subsystems = NULL; + g_autofree gchar *subsystems_str = NULL; + g_autofree gchar *plugindir_display = NULL; if (!g_module_supported ()) { g_set_error (error, @@ -1724,7 +1800,7 @@ /* Get printable UTF-8 string of the path */ plugindir_display = g_filename_display_name (self->priv->plugin_dir); - mm_dbg ("[plugin manager] looking for plugins in '%s'", plugindir_display); + mm_obj_dbg (self, "looking for plugins in '%s'", plugindir_display); dir = g_dir_open (self->priv->plugin_dir, 0, NULL); if (!dir) { g_set_error (error, @@ -1746,31 +1822,53 @@ /* Load all shared utils */ for (l = shared_paths; l; l = g_list_next (l)) - load_shared ((const gchar *)(l->data)); + load_shared (self, (const gchar *)(l->data)); /* Load all plugins */ + subsystems = g_ptr_array_new (); for (l = plugin_paths; l; l = g_list_next (l)) { - MMPlugin *plugin; + MMPlugin *plugin; + const gchar **plugin_subsystems; + guint i; - plugin = load_plugin ((const gchar *)(l->data)); + plugin = load_plugin (self, (const gchar *)(l->data)); if (!plugin) continue; - if (g_str_equal (mm_plugin_get_name (plugin), MM_PLUGIN_GENERIC_NAME)) - /* Generic plugin */ + /* Ignore plugins that don't specify subsystems */ + plugin_subsystems = mm_plugin_get_allowed_subsystems (plugin); + if (!plugin_subsystems) { + mm_obj_warn (self, "plugin '%s' doesn't specify allowed subsystems: ignored", + mm_plugin_get_name (plugin)); + continue; + } + + /* Process generic plugin */ + if (mm_plugin_is_generic (plugin)) { + if (self->priv->generic) { + mm_obj_warn (self, "plugin '%s' is generic and another one is already registered: ignored", + mm_plugin_get_name (plugin)); + continue; + } self->priv->generic = plugin; - else - /* Vendor specific plugin */ + } else self->priv->plugins = g_list_append (self->priv->plugins, plugin); + /* Track required subsystems, avoiding duplicates in the list */ + for (i = 0; plugin_subsystems[i]; i++) { + if (!g_ptr_array_find_with_equal_func (subsystems, plugin_subsystems[i], g_str_equal, NULL)) + g_ptr_array_add (subsystems, g_strdup (plugin_subsystems[i])); + } + /* Register plugin whitelist rules in filter, if any */ - register_plugin_whitelist_tags (self, plugin); + register_plugin_whitelist_tags (self, plugin); + register_plugin_whitelist_vendor_ids (self, plugin); register_plugin_whitelist_product_ids (self, plugin); } /* Check the generic plugin once all looped */ if (!self->priv->generic) - mm_warn ("[plugin manager] generic plugin not loaded"); + mm_obj_dbg (self, "generic plugin not loaded"); /* Treat as error if we don't find any plugin */ if (!self->priv->plugins && !self->priv->generic) { @@ -1782,20 +1880,43 @@ goto out; } - mm_dbg ("[plugin manager] successfully loaded %u plugins", - g_list_length (self->priv->plugins) + !!self->priv->generic); + /* Validate required subsystems */ + if (!subsystems->len) { + g_set_error (error, + MM_CORE_ERROR, + MM_CORE_ERROR_NO_PLUGINS, + "empty list of subsystems required by plugins"); + goto out; + } + /* Add trailing NULL and store as GStrv */ + g_ptr_array_add (subsystems, NULL); + self->priv->subsystems = (gchar **) g_ptr_array_free (subsystems, FALSE); + subsystems_str = g_strjoinv (", ", self->priv->subsystems); + + mm_obj_dbg (self, "successfully loaded %u plugins registering %u subsystems: %s", + g_list_length (self->priv->plugins) + !!self->priv->generic, + g_strv_length (self->priv->subsystems), subsystems_str); out: g_list_free_full (shared_paths, g_free); g_list_free_full (plugin_paths, g_free); if (dir) g_dir_close (dir); - g_free (plugindir_display); /* Return TRUE if at least one plugin found */ return (self->priv->plugins || self->priv->generic); } +/*****************************************************************************/ + +static gchar * +log_object_build_id (MMLogObject *_self) +{ + return g_strdup ("plugin-manager"); +} + +/*****************************************************************************/ + MMPluginManager * mm_plugin_manager_new (const gchar *plugin_dir, MMFilter *filter, @@ -1810,12 +1931,12 @@ } static void -mm_plugin_manager_init (MMPluginManager *manager) +mm_plugin_manager_init (MMPluginManager *self) { /* Initialize opaque pointer to private data */ - manager->priv = G_TYPE_INSTANCE_GET_PRIVATE (manager, - MM_TYPE_PLUGIN_MANAGER, - MMPluginManagerPrivate); + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, + MM_TYPE_PLUGIN_MANAGER, + MMPluginManagerPrivate); } static void @@ -1875,17 +1996,11 @@ { MMPluginManager *self = MM_PLUGIN_MANAGER (object); - /* Cleanup list of plugins */ - if (self->priv->plugins) { - g_list_free_full (self->priv->plugins, g_object_unref); - self->priv->plugins = NULL; - } + g_list_free_full (g_steal_pointer (&self->priv->plugins), g_object_unref); g_clear_object (&self->priv->generic); - - g_free (self->priv->plugin_dir); - self->priv->plugin_dir = NULL; - + g_clear_pointer (&self->priv->plugin_dir, g_free); g_clear_object (&self->priv->filter); + g_clear_pointer (&self->priv->subsystems, g_strfreev); G_OBJECT_CLASS (mm_plugin_manager_parent_class)->dispose (object); } @@ -1897,6 +2012,12 @@ } static void +log_object_iface_init (MMLogObjectInterface *iface) +{ + iface->build_id = log_object_build_id; +} + +static void mm_plugin_manager_class_init (MMPluginManagerClass *manager_class) { GObjectClass *object_class = G_OBJECT_CLASS (manager_class); diff -Nru modemmanager-1.12.8/src/mm-plugin-manager.h modemmanager-1.16.6/src/mm-plugin-manager.h --- modemmanager-1.12.8/src/mm-plugin-manager.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-plugin-manager.h 2021-06-06 21:40:59.000000000 +0800 @@ -48,7 +48,9 @@ GObjectClass parent; }; -GType mm_plugin_manager_get_type (void); +GType mm_plugin_manager_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMPluginManager, g_object_unref) + MMPluginManager *mm_plugin_manager_new (const gchar *plugindir, MMFilter *filter, GError **error); @@ -63,5 +65,6 @@ GError **error); MMPlugin *mm_plugin_manager_peek_plugin (MMPluginManager *self, const gchar *plugin_name); +const gchar **mm_plugin_manager_get_subsystems (MMPluginManager *self); #endif /* MM_PLUGIN_MANAGER_H */ diff -Nru modemmanager-1.12.8/src/mm-plugin.c modemmanager-1.16.6/src/mm-plugin.c --- modemmanager-1.12.8/src/mm-plugin.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-plugin.c 2021-06-06 21:40:59.000000000 +0800 @@ -34,7 +34,7 @@ #include "mm-port-serial-qcdm.h" #include "mm-serial-parsers.h" #include "mm-private-boxed-types.h" -#include "mm-log.h" +#include "mm-log-object.h" #include "mm-daemon-enums-types.h" #if defined WITH_QMI @@ -44,10 +44,13 @@ # include "mm-broadband-modem-mbim.h" #endif -G_DEFINE_TYPE (MMPlugin, mm_plugin, G_TYPE_OBJECT) +static void log_object_iface_init (MMLogObjectInterface *iface); + +G_DEFINE_TYPE_EXTENDED (MMPlugin, mm_plugin, G_TYPE_OBJECT, 0, + G_IMPLEMENT_INTERFACE (MM_TYPE_LOG_OBJECT, log_object_iface_init)) /* Virtual port corresponding to the embedded modem */ -static gchar *virtual_port[] = {"smd0", NULL}; +static const gchar *virtual_port[] = {"smd0", NULL}; #define HAS_POST_PROBING_FILTERS(self) \ (self->priv->vendor_strings || \ @@ -61,8 +64,9 @@ struct _MMPluginPrivate { - gchar *name; + gchar *name; GHashTable *tasks; + gboolean is_generic; /* Pre-probing filters */ gchar **subsystems; @@ -104,6 +108,7 @@ enum { PROP_0, PROP_NAME, + PROP_IS_GENERIC, PROP_ALLOWED_SUBSYSTEMS, PROP_ALLOWED_DRIVERS, PROP_FORBIDDEN_DRIVERS, @@ -142,17 +147,35 @@ } const gchar ** +mm_plugin_get_allowed_subsystems (MMPlugin *self) +{ + return (const gchar **) self->priv->subsystems; +} + +const gchar ** mm_plugin_get_allowed_udev_tags (MMPlugin *self) { return (const gchar **) self->priv->udev_tags; } +const guint16 * +mm_plugin_get_allowed_vendor_ids (MMPlugin *self) +{ + return self->priv->vendor_ids; +} + const mm_uint16_pair * mm_plugin_get_allowed_product_ids (MMPlugin *self) { return self->priv->product_ids; } +gboolean +mm_plugin_is_generic (MMPlugin *self) +{ + return self->priv->is_generic; +} + /*****************************************************************************/ static gboolean @@ -200,10 +223,6 @@ for (i = 0; self->priv->subsystems[i]; i++) { if (g_str_equal (subsys, self->priv->subsystems[i])) break; - /* New kernels may report as 'usbmisc' the subsystem */ - else if (g_str_equal (self->priv->subsystems[i], "usb") && - g_str_equal (subsys, "usbmisc")) - break; } /* If we didn't match any subsystem: unsupported */ @@ -234,9 +253,7 @@ /* The plugin may specify that only some subsystems are supported. If that * is the case, filter by subsystem */ if (apply_subsystem_filter (self, port)) { - mm_dbg ("(%s) [%s] filtered by subsystem", - self->priv->name, - mm_kernel_device_get_name (port)); + mm_obj_dbg (self, "port %s filtered by subsystem", mm_kernel_device_get_name (port)); return TRUE; } @@ -265,9 +282,7 @@ /* If error retrieving driver: unsupported */ if (!drivers) { - mm_dbg ("(%s) [%s] filtered as couldn't retrieve drivers", - self->priv->name, - mm_kernel_device_get_name (port)); + mm_obj_dbg (self, "port %s filtered as couldn't retrieve drivers", mm_kernel_device_get_name (port)); return TRUE; } @@ -286,9 +301,7 @@ /* If we didn't match any driver: unsupported */ if (!found) { - mm_dbg ("(%s) [%s] filtered by drivers", - self->priv->name, - mm_kernel_device_get_name (port)); + mm_obj_dbg (self, "port %s filtered by drivers", mm_kernel_device_get_name (port)); return TRUE; } } @@ -301,9 +314,7 @@ for (j = 0; drivers[j]; j++) { /* If we match a forbidden driver: unsupported */ if (g_str_equal (drivers[j], self->priv->forbidden_drivers[i])) { - mm_dbg ("(%s) [%s] filtered by forbidden drivers", - self->priv->name, - mm_kernel_device_get_name (port)); + mm_obj_dbg (self, "port %s filtered by forbidden drivers", mm_kernel_device_get_name (port)); return TRUE; } } @@ -317,9 +328,7 @@ for (j = 0; drivers[j]; j++) { /* If we match the QMI driver: unsupported */ if (g_str_equal (drivers[j], "qmi_wwan")) { - mm_dbg ("(%s) [%s] filtered by implicit QMI driver", - self->priv->name, - mm_kernel_device_get_name (port)); + mm_obj_dbg (self, "port %s filtered by implicit QMI driver", mm_kernel_device_get_name (port)); return TRUE; } } @@ -332,9 +341,7 @@ for (j = 0; drivers[j]; j++) { /* If we match the MBIM driver: unsupported */ if (g_str_equal (drivers[j], "cdc_mbim")) { - mm_dbg ("(%s) [%s] filtered by implicit MBIM driver", - self->priv->name, - mm_kernel_device_get_name (port)); + mm_obj_dbg (self, "port %s filtered by implicit MBIM driver", mm_kernel_device_get_name (port)); return TRUE; } } @@ -398,9 +405,7 @@ !self->priv->forbidden_product_strings) || g_str_equal (mm_kernel_device_get_subsystem (port), "net") || g_str_has_prefix (mm_kernel_device_get_name (port), "cdc-wdm"))) { - mm_dbg ("(%s) [%s] filtered by vendor/product IDs", - self->priv->name, - mm_kernel_device_get_name (port)); + mm_obj_dbg (self, "port %s filtered by vendor/product IDs", mm_kernel_device_get_name (port)); return TRUE; } @@ -410,9 +415,7 @@ for (i = 0; self->priv->forbidden_product_ids[i].l; i++) { if (vendor == self->priv->forbidden_product_ids[i].l && product == self->priv->forbidden_product_ids[i].r) { - mm_dbg ("(%s) [%s] filtered by forbidden vendor/product IDs", - self->priv->name, - mm_kernel_device_get_name (port)); + mm_obj_dbg (self, "port %s filtered by forbidden vendor/product IDs", mm_kernel_device_get_name (port)); return TRUE; } } @@ -451,9 +454,7 @@ /* If we didn't match any udev tag: unsupported */ if (!self->priv->udev_tags[i]) { - mm_dbg ("(%s) [%s] filtered by udev tags", - self->priv->name, - mm_kernel_device_get_name (port)); + mm_obj_dbg (self, "port %s filtered by udev tags", mm_kernel_device_get_name (port)); return TRUE; } } @@ -500,9 +501,7 @@ if (vendor_filtered) { if (!self->priv->product_strings) { - mm_dbg ("(%s) [%s] filtered by vendor strings", - self->priv->name, - mm_port_probe_get_port_name (probe)); + mm_obj_dbg (self, "port %s filtered by vendor strings", mm_port_probe_get_port_name (probe)); return TRUE; } } else @@ -525,9 +524,7 @@ if (self->priv->product_strings) { /* If we didn't get any vendor or product: filtered */ if (!vendor || !product) { - mm_dbg ("(%s) [%s] filtered as no vendor/product strings given", - self->priv->name, - mm_port_probe_get_port_name (probe)); + mm_obj_dbg (self, "port %s filtered as no vendor/product strings given", mm_port_probe_get_port_name (probe)); return TRUE; } else { @@ -548,9 +545,7 @@ /* If we didn't match any product: unsupported */ if (!self->priv->product_strings[i].l) { - mm_dbg ("(%s) [%s] filtered by vendor/product strings", - self->priv->name, - mm_port_probe_get_port_name (probe)); + mm_obj_dbg (self, "port %s filtered by vendor/product strings", mm_port_probe_get_port_name (probe)); return TRUE; } } @@ -570,9 +565,7 @@ g_free (casefolded_product); if (found) { /* If we match a forbidden product: unsupported */ - mm_dbg ("(%s) [%s] filtered by forbidden vendor/product strings", - self->priv->name, - mm_port_probe_get_port_name (probe)); + mm_obj_dbg (self, "port %s filtered by forbidden vendor/product strings", mm_port_probe_get_port_name (probe)); return TRUE; } } @@ -586,9 +579,7 @@ if (self->priv->allowed_icera && !mm_port_probe_is_icera (probe)) { /* Unsupported! */ - mm_dbg ("(%s) [%s] filtered as modem is not icera", - self->priv->name, - mm_port_probe_get_port_name (probe)); + mm_obj_dbg (self, "port %s filtered as modem is not icera", mm_port_probe_get_port_name (probe)); return TRUE; } @@ -597,9 +588,7 @@ if (self->priv->forbidden_icera && mm_port_probe_is_icera (probe)) { /* Unsupported! */ - mm_dbg ("(%s) [%s] filtered as modem is icera", - self->priv->name, - mm_port_probe_get_port_name (probe)); + mm_obj_dbg (self, "port %s filtered as modem is icera", mm_port_probe_get_port_name (probe)); return TRUE; } @@ -608,9 +597,7 @@ if (self->priv->allowed_xmm && !mm_port_probe_is_xmm (probe)) { /* Unsupported! */ - mm_dbg ("(%s) [%s] filtered as modem is not XMM", - self->priv->name, - mm_port_probe_get_port_name (probe)); + mm_obj_dbg (self, "port %s filtered as modem is not XMM", mm_port_probe_get_port_name (probe)); return TRUE; } @@ -619,9 +606,7 @@ if (self->priv->forbidden_xmm && mm_port_probe_is_xmm (probe)) { /* Unsupported! */ - mm_dbg ("(%s) [%s] filtered as modem is XMM", - self->priv->name, - mm_port_probe_get_port_name (probe)); + mm_obj_dbg (self, "port %s filtered as modem is XMM", mm_port_probe_get_port_name (probe)); return TRUE; } @@ -780,33 +765,36 @@ return; } - /* Before launching any probing, check if the port is a net device. */ - if (g_str_equal (mm_kernel_device_get_subsystem (port), "net")) { - mm_dbg ("(%s) [%s] probing deferred until result suggested", - self->priv->name, mm_kernel_device_get_name (port)); - g_task_return_int (task, MM_PLUGIN_SUPPORTS_PORT_DEFER_UNTIL_SUGGESTED); - g_object_unref (task); - return; - } - /* Build flags depending on what probing needed */ probe_run_flags = MM_PORT_PROBE_NONE; - if (!g_str_has_prefix (mm_kernel_device_get_name (port), "cdc-wdm")) { - /* Serial ports... */ + if (g_str_equal (mm_kernel_device_get_subsystem (port), "tty")) { if (self->priv->at) probe_run_flags |= MM_PORT_PROBE_AT; else if (self->priv->single_at) probe_run_flags |= MM_PORT_PROBE_AT; if (self->priv->qcdm) probe_run_flags |= MM_PORT_PROBE_QCDM; - } else { - /* cdc-wdm ports... */ + } else if (g_str_equal (mm_kernel_device_get_subsystem (port), "usbmisc")) { if (self->priv->qmi && !g_strcmp0 (mm_kernel_device_get_driver (port), "qmi_wwan")) probe_run_flags |= MM_PORT_PROBE_QMI; else if (self->priv->mbim && !g_strcmp0 (mm_kernel_device_get_driver (port), "cdc_mbim")) probe_run_flags |= MM_PORT_PROBE_MBIM; else probe_run_flags |= MM_PORT_PROBE_AT; + } else if (g_str_equal (mm_kernel_device_get_subsystem (port), "rpmsg")) { + if (self->priv->at) + probe_run_flags |= MM_PORT_PROBE_AT; + if (self->priv->qmi) + probe_run_flags |= MM_PORT_PROBE_QMI; + } else if (g_str_equal (mm_kernel_device_get_subsystem (port), "wwan")) { + if (self->priv->mbim) + probe_run_flags |= MM_PORT_PROBE_MBIM; + if (self->priv->qmi) + probe_run_flags |= MM_PORT_PROBE_QMI; + if (self->priv->qcdm) + probe_run_flags |= MM_PORT_PROBE_QCDM; + if (self->priv->at) + probe_run_flags |= MM_PORT_PROBE_AT; } /* For potential AT ports, check for more things */ @@ -821,9 +809,11 @@ probe_run_flags |= MM_PORT_PROBE_AT_XMM; } - /* If no explicit probing was required, just request to grab it without probing anything. - * This may happen, e.g. with cdc-wdm ports which do not need QMI/MBIM probing. */ + /* If no explicit probing was required, just request to grab it without + * probing anything. This happens for all net ports and e.g. for cdc-wdm + * ports which do not need QMI/MBIM probing. */ if (probe_run_flags == MM_PORT_PROBE_NONE) { + mm_obj_dbg (self, "probing of port %s deferred until result suggested", mm_kernel_device_get_name (port)); g_task_return_int (task, MM_PLUGIN_SUPPORTS_PORT_DEFER_UNTIL_SUGGESTED); g_object_unref (task); return; @@ -835,10 +825,9 @@ if (self->priv->single_at && mm_port_probe_list_has_at_port (mm_device_peek_port_probe_list (device)) && !mm_port_probe_is_at (probe)) { - mm_dbg ("(%s) [%s] not setting up AT probing tasks: " - "modem already has the expected single AT port", - self->priv->name, - mm_kernel_device_get_name (port)); + mm_obj_dbg (self, "not setting up AT probing tasks in port %s: " + "modem already has the expected single AT port", + mm_kernel_device_get_name (port)); /* Assuming it won't be an AT port. We still run the probe anyway, in * case we need to check for other port types (e.g. QCDM) */ @@ -856,10 +845,9 @@ /* Launch the probe */ probe_list_str = mm_port_probe_flag_build_string_from_mask (ctx->flags); - mm_dbg ("(%s) [%s] probe required: '%s'", - self->priv->name, - mm_kernel_device_get_name (port), - probe_list_str); + mm_obj_dbg (self, "probes required for port %s: '%s'", + mm_kernel_device_get_name (port), + probe_list_str); g_free (probe_list_str); mm_port_probe_run (probe, @@ -909,22 +897,25 @@ MMBaseModem * mm_plugin_create_modem (MMPlugin *self, - MMDevice *device, + MMDevice *device, GError **error) { - MMBaseModem *modem; - GList *port_probes = NULL; + MMBaseModem *modem; + GList *port_probes = NULL; const gchar **virtual_ports = NULL; + const gchar **drivers; if (!mm_device_is_virtual (device)) port_probes = mm_device_peek_port_probe_list (device); else virtual_ports = mm_device_virtual_peek_ports (device); + drivers = mm_device_get_drivers (device); + /* Let the plugin create the modem from the port probe results */ modem = MM_PLUGIN_GET_CLASS (self)->create_modem (MM_PLUGIN (self), mm_device_get_uid (device), - mm_device_get_drivers (device), + drivers, mm_device_get_vendor (device), mm_device_get_product (device), port_probes, @@ -972,65 +963,71 @@ /* Ports that are explicitly blacklisted will be grabbed as ignored */ if (mm_port_probe_is_ignored (probe)) { - mm_dbg ("(%s/%s): port is blacklisted", subsys, name); + mm_obj_dbg (self, "port %s is blacklisted", name); force_ignored = TRUE; goto grab_port; } + /* Force network ignore rules for devices that use qmi_wwan */ + if (drivers && g_strv_contains (drivers, "qmi_wwan")) { #if defined WITH_QMI - if (MM_IS_BROADBAND_MODEM_QMI (modem) && - port_type == MM_PORT_TYPE_NET && - g_strcmp0 (driver, "qmi_wwan") != 0) { - /* Non-QMI net ports are ignored in QMI modems */ - mm_dbg ("(%s/%s): ignoring non-QMI net port in QMI modem", subsys, name); - force_ignored = TRUE; - goto grab_port; - } + if (MM_IS_BROADBAND_MODEM_QMI (modem) && + port_type == MM_PORT_TYPE_NET && + g_strcmp0 (driver, "qmi_wwan") != 0) { + /* Non-QMI net ports are ignored in QMI modems */ + mm_obj_dbg (self, "ignoring non-QMI net port %s in QMI modem", name); + force_ignored = TRUE; + goto grab_port; + } - if (!MM_IS_BROADBAND_MODEM_QMI (modem) && - port_type == MM_PORT_TYPE_NET && - g_strcmp0 (driver, "qmi_wwan") == 0) { - /* QMI net ports are ignored in non-QMI modems */ - mm_dbg ("(%s/%s): ignoring QMI net port in non-QMI modem", subsys, name); - force_ignored = TRUE; - goto grab_port; - } + if (!MM_IS_BROADBAND_MODEM_QMI (modem) && + port_type == MM_PORT_TYPE_NET && + g_strcmp0 (driver, "qmi_wwan") == 0) { + /* QMI net ports are ignored in non-QMI modems */ + mm_obj_dbg (self, "ignoring QMI net port %s in non-QMI modem", name); + force_ignored = TRUE; + goto grab_port; + } #else - if (port_type == MM_PORT_TYPE_NET && - g_strcmp0 (driver, "qmi_wwan") == 0) { - /* QMI net ports are ignored if QMI support not built */ - mm_dbg ("(%s/%s): ignoring QMI net port as QMI support isn't available", subsys, name); - force_ignored = TRUE; - goto grab_port; - } + if (port_type == MM_PORT_TYPE_NET && + g_strcmp0 (driver, "qmi_wwan") == 0) { + /* QMI net ports are ignored if QMI support not built */ + mm_obj_dbg (self, "ignoring QMI net port %s as QMI support isn't available", name); + force_ignored = TRUE; + goto grab_port; + } #endif + } + /* Force network ignore rules for devices that use cdc_mbim */ + if (drivers && g_strv_contains (drivers, "cdc_mbim")) { #if defined WITH_MBIM - if (MM_IS_BROADBAND_MODEM_MBIM (modem) && - port_type == MM_PORT_TYPE_NET && - g_strcmp0 (driver, "cdc_mbim") != 0) { - /* Non-MBIM net ports are ignored in MBIM modems */ - mm_dbg ("(%s/%s): ignoring non-MBIM net port in MBIM modem", subsys, name); - force_ignored = TRUE; - goto grab_port; - } + if (MM_IS_BROADBAND_MODEM_MBIM (modem) && + port_type == MM_PORT_TYPE_NET && + g_strcmp0 (driver, "cdc_mbim") != 0) { + /* Non-MBIM net ports are ignored in MBIM modems */ + mm_obj_dbg (self, "ignoring non-MBIM net port %s in MBIM modem", name); + force_ignored = TRUE; + goto grab_port; + } - if (!MM_IS_BROADBAND_MODEM_MBIM (modem) && - port_type == MM_PORT_TYPE_NET && - g_strcmp0 (driver, "cdc_mbim") == 0) { - /* MBIM net ports are ignored in non-MBIM modems */ - mm_dbg ("(%s/%s): ignoring MBIM net port in non-MBIM modem", subsys, name); - force_ignored = TRUE; - goto grab_port; - } + if (!MM_IS_BROADBAND_MODEM_MBIM (modem) && + port_type == MM_PORT_TYPE_NET && + g_strcmp0 (driver, "cdc_mbim") == 0) { + /* MBIM net ports are ignored in non-MBIM modems */ + mm_obj_dbg (self, "ignoring MBIM net port %s in non-MBIM modem", name); + force_ignored = TRUE; + goto grab_port; + } #else - if (port_type == MM_PORT_TYPE_NET && - g_strcmp0 (driver, "cdc_mbim") == 0) { - mm_dbg ("(%s/%s): ignoring MBIM net port as MBIM support isn't available", subsys, name); - force_ignored = TRUE; - goto grab_port; - } + if (port_type == MM_PORT_TYPE_NET && + g_strcmp0 (driver, "cdc_mbim") == 0) { + mm_obj_dbg (self, "ignoring MBIM net port %s as MBIM support isn't available", name); + force_ignored = TRUE; + goto grab_port; + } #endif + } grab_port: if (force_ignored) @@ -1053,9 +1050,7 @@ next: if (!grabbed) { - mm_warn ("Could not grab port (%s/%s): '%s'", - subsys, name, - inner_error ? inner_error->message : "unknown error"); + mm_obj_warn (self, "could not grab port %s: %s", name, inner_error ? inner_error->message : "unknown error"); g_clear_error (&inner_error); } } @@ -1077,18 +1072,18 @@ * installed yet). */ kernel_device = mm_kernel_device_generic_new_with_rules (properties, NULL, &inner_error); if (!kernel_device) { - mm_warn ("Could not grab port (virtual/%s): '%s'", - virtual_ports[i], - inner_error ? inner_error->message : "unknown error"); + mm_obj_warn (self, "could not create generic device for virtual port %s: %s", + virtual_ports[i], + inner_error ? inner_error->message : "unknown error"); g_clear_error (&inner_error); } else if (!mm_base_modem_grab_port (modem, kernel_device, MM_PORT_TYPE_AT, MM_PORT_SERIAL_AT_FLAG_NONE, &inner_error)) { - mm_warn ("Could not grab port (virtual/%s): '%s'", - virtual_ports[i], - inner_error ? inner_error->message : "unknown error"); + mm_obj_warn (self, "could not grab virtual port %s: %s", + virtual_ports[i], + inner_error ? inner_error->message : "unknown error"); g_clear_error (&inner_error); } @@ -1107,6 +1102,19 @@ /*****************************************************************************/ +static gchar * +log_object_build_id (MMLogObject *_self) +{ + MMPlugin *self; + g_autofree gchar *plugin_name_lowercase = NULL; + + self = MM_PLUGIN (_self); + plugin_name_lowercase = g_ascii_strdown (self->priv->name, -1); + return g_strdup_printf ("plugin/%s", plugin_name_lowercase); +} + +/*****************************************************************************/ + static void mm_plugin_init (MMPlugin *self) { @@ -1133,6 +1141,10 @@ /* Construct only */ self->priv->name = g_value_dup_string (value); break; + case PROP_IS_GENERIC: + /* Construct only */ + self->priv->is_generic = g_value_get_boolean (value); + break; case PROP_ALLOWED_SUBSYSTEMS: /* Construct only */ self->priv->subsystems = g_value_dup_boxed (value); @@ -1255,6 +1267,9 @@ case PROP_NAME: g_value_set_string (value, self->priv->name); break; + case PROP_IS_GENERIC: + g_value_set_boolean (value, self->priv->is_generic); + break; case PROP_ALLOWED_SUBSYSTEMS: g_value_set_boxed (value, self->priv->subsystems); break; @@ -1367,6 +1382,12 @@ } static void +log_object_iface_init (MMLogObjectInterface *iface) +{ + iface->build_id = log_object_build_id; +} + +static void mm_plugin_class_init (MMPluginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); @@ -1387,6 +1408,14 @@ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property + (object_class, PROP_IS_GENERIC, + g_param_spec_boolean (MM_PLUGIN_IS_GENERIC, + "Generic", + "Whether the plugin is the generic one", + FALSE, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + g_object_class_install_property (object_class, PROP_ALLOWED_SUBSYSTEMS, g_param_spec_boxed (MM_PLUGIN_ALLOWED_SUBSYSTEMS, "Allowed subsystems", diff -Nru modemmanager-1.12.8/src/mm-plugin.h modemmanager-1.16.6/src/mm-plugin.h --- modemmanager-1.12.8/src/mm-plugin.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-plugin.h 2021-06-06 21:40:59.000000000 +0800 @@ -27,7 +27,6 @@ #include "mm-device.h" #include "mm-kernel-device.h" -#define MM_PLUGIN_GENERIC_NAME "Generic" #define MM_PLUGIN_MAJOR_VERSION 4 #define MM_PLUGIN_MINOR_VERSION 0 @@ -48,6 +47,7 @@ #define MM_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_PLUGIN, MMPluginClass)) #define MM_PLUGIN_NAME "name" +#define MM_PLUGIN_IS_GENERIC "is-generic" #define MM_PLUGIN_ALLOWED_SUBSYSTEMS "allowed-subsystems" #define MM_PLUGIN_ALLOWED_DRIVERS "allowed-drivers" #define MM_PLUGIN_FORBIDDEN_DRIVERS "forbidden-drivers" @@ -123,10 +123,14 @@ }; GType mm_plugin_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMPlugin, g_object_unref) const gchar *mm_plugin_get_name (MMPlugin *self); +const gchar **mm_plugin_get_allowed_subsystems (MMPlugin *self); const gchar **mm_plugin_get_allowed_udev_tags (MMPlugin *self); +const guint16 *mm_plugin_get_allowed_vendor_ids (MMPlugin *self); const mm_uint16_pair *mm_plugin_get_allowed_product_ids (MMPlugin *self); +gboolean mm_plugin_is_generic (MMPlugin *self); /* This method will run all pre-probing filters, to see if we can discard this * plugin from the probing logic as soon as possible. */ diff -Nru modemmanager-1.12.8/src/mm-port-mbim.c modemmanager-1.16.6/src/mm-port-mbim.c --- modemmanager-1.12.8/src/mm-port-mbim.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-port-mbim.c 2021-06-06 21:40:59.000000000 +0800 @@ -26,7 +26,7 @@ #include #include "mm-port-mbim.h" -#include "mm-log.h" +#include "mm-log-object.h" G_DEFINE_TYPE (MMPortMbim, mm_port_mbim, MM_TYPE_PORT) @@ -34,6 +34,7 @@ gboolean in_progress; MbimDevice *mbim_device; #if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED + gboolean qmi_supported; QmiDevice *qmi_device; GList *qmi_clients; #endif @@ -175,17 +176,14 @@ self = g_task_get_source_object (task); if (!qmi_device_open_finish (dev, res, &error)) { - mm_dbg ("[%s] error: couldn't open QmiDevice: %s", - mm_port_get_device (MM_PORT (self)), - error->message); + mm_obj_dbg (self, "error: couldn't open QmiDevice: %s", error->message); g_error_free (error); g_clear_object (&self->priv->qmi_device); /* Ignore error and complete */ - mm_info ("[%s] MBIM device is not QMI capable", - mm_port_get_device (MM_PORT (self))); + mm_obj_info (self, "MBIM device is not QMI capable"); + self->priv->qmi_supported = FALSE; } else { - mm_info ("[%s] MBIM device is QMI capable", - mm_port_get_device (MM_PORT (self))); + mm_obj_info (self, "MBIM device is QMI capable"); } self->priv->in_progress = FALSE; @@ -205,13 +203,11 @@ self->priv->qmi_device = qmi_device_new_finish (res, &error); if (!self->priv->qmi_device) { - mm_dbg ("[%s] error: couldn't create QmiDevice: %s", - mm_port_get_device (MM_PORT (self)), - error->message); + mm_obj_dbg (self, "error: couldn't create QmiDevice: %s", error->message); g_error_free (error); /* Ignore error and complete */ - mm_info ("[%s] MBIM device is not QMI capable", - mm_port_get_device (MM_PORT (self))); + mm_obj_info (self, "MBIM device is not QMI capable"); + self->priv->qmi_supported = FALSE; self->priv->in_progress = FALSE; g_task_return_boolean (task, TRUE); g_object_unref (task); @@ -219,8 +215,7 @@ } /* Try to open using QMI over MBIM */ - mm_dbg ("[%s] trying to open QMI over MBIM device...", - mm_port_get_device (MM_PORT (self))); + mm_obj_dbg (self, "trying to open QMI over MBIM device..."); qmi_device_open (self->priv->qmi_device, (QMI_DEVICE_OPEN_FLAGS_PROXY | QMI_DEVICE_OPEN_FLAGS_MBIM | @@ -232,6 +227,87 @@ task); } +static void +mbim_query_device_services_ready (MbimDevice *device, + GAsyncResult *res, + GTask *task) +{ + MMPortMbim *self; + MbimMessage *response; + GError *error = NULL; + MbimDeviceServiceElement **device_services; + guint32 device_services_count; + GFile *file; + + self = g_task_get_source_object (task); + + response = mbim_device_command_finish (device, res, &error); + if (response && + mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error) && + mbim_message_device_services_response_parse ( + response, + &device_services_count, + NULL, /* max_dss_sessions */ + &device_services, + &error)) { + guint32 i; + + /* Look for the QMI service */ + for (i = 0; i < device_services_count; i++) { + if (mbim_uuid_to_service (&device_services[i]->device_service_id) == MBIM_SERVICE_QMI) + break; + } + /* If we were able to successfully list device services and none of them + * is the QMI service, we'll skip trying to check QMI support. */ + if (i == device_services_count) + self->priv->qmi_supported = FALSE; + mbim_device_service_element_array_free (device_services); + } else { + /* Ignore error */ + mm_obj_dbg (self, "Couldn't query device services, will attempt QMI open anyway: %s", error->message); + g_error_free (error); + } + + if (response) + mbim_message_unref (response); + + /* File path of the device */ + file = G_FILE (g_task_get_task_data (task)); + + if (!file || !self->priv->qmi_supported) { + mm_obj_info (self, "MBIM device is not QMI capable"); + self->priv->in_progress = FALSE; + g_task_return_boolean (task, TRUE); + g_object_unref (task); + return; + } + + /* Attempt to create and open the QMI device */ + mm_obj_dbg (self, "checking if QMI over MBIM is supported..."); + qmi_device_new (file, + g_task_get_cancellable (task), + (GAsyncReadyCallback) qmi_device_new_ready, + task); +} + +static void +mbim_query_device_services (GTask *task) +{ + MbimMessage *message; + MMPortMbim *self; + + self = g_task_get_source_object (task); + + message = mbim_message_device_services_query_new (NULL); + mbim_device_command (self->priv->mbim_device, + message, + 10, + NULL, + (GAsyncReadyCallback)mbim_query_device_services_ready, + task); + mbim_message_unref (message); +} + #endif static void @@ -252,29 +328,18 @@ return; } - mm_dbg ("[%s] MBIM device is now open", - mm_port_get_device (MM_PORT (self))); + mm_obj_dbg (self, "MBIM device is now open"); #if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED - { - GFile *file; - - if ((file = G_FILE (g_task_get_task_data (task)))) { - mm_dbg ("[%s] checking if QMI over MBIM is supported", - mm_port_get_device (MM_PORT (self))); - qmi_device_new (file, - g_task_get_cancellable (task), - (GAsyncReadyCallback) qmi_device_new_ready, - task); - return; - } + if (self->priv->qmi_supported) { + mbim_query_device_services (task); + return; } #endif self->priv->in_progress = FALSE; g_task_return_boolean (task, TRUE); g_object_unref (task); - } static void @@ -365,40 +430,94 @@ /*****************************************************************************/ +typedef struct { + MbimDevice *mbim_device; +#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED + QmiDevice *qmi_device; +#endif +} PortMbimCloseContext; + +static void +port_mbim_close_context_free (PortMbimCloseContext *ctx) +{ + g_clear_object (&ctx->mbim_device); +#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED + g_clear_object (&ctx->qmi_device); +#endif + g_slice_free (PortMbimCloseContext, ctx); +} + gboolean -mm_port_mbim_close_finish (MMPortMbim *self, - GAsyncResult *res, - GError **error) +mm_port_mbim_close_finish (MMPortMbim *self, + GAsyncResult *res, + GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } static void -mbim_device_close_ready (MbimDevice *device, +mbim_device_close_ready (MbimDevice *mbim_device, GAsyncResult *res, - GTask *task) + GTask *task) { - GError *error = NULL; + GError *error = NULL; MMPortMbim *self; self = g_task_get_source_object (task); + + g_assert (!self->priv->mbim_device); self->priv->in_progress = FALSE; - g_clear_object (&self->priv->mbim_device); - if (!mbim_device_close_finish (device, res, &error)) + if (!mbim_device_close_finish (mbim_device, res, &error)) g_task_return_error (task, error); else g_task_return_boolean (task, TRUE); - g_object_unref (task); } +static void +port_mbim_device_close (GTask *task) +{ + PortMbimCloseContext *ctx; + + ctx = g_task_get_task_data (task); + g_assert (ctx->mbim_device); + mbim_device_close (ctx->mbim_device, + 5, + NULL, + (GAsyncReadyCallback)mbim_device_close_ready, + task); +} + +#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED + +static void +qmi_device_close_ready (QmiDevice *qmi_device, + GAsyncResult *res, + GTask *task) +{ + GError *error = NULL; + MMPortMbim *self; + + self = g_task_get_source_object (task); + + if (!qmi_device_close_finish (qmi_device, res, &error)) { + mm_obj_warn (self, "Couldn't properly close QMI device: %s", error->message); + g_error_free (error); + } + + port_mbim_device_close (task); +} + +#endif + void -mm_port_mbim_close (MMPortMbim *self, - GAsyncReadyCallback callback, - gpointer user_data) +mm_port_mbim_close (MMPortMbim *self, + GAsyncReadyCallback callback, + gpointer user_data) { - GTask *task; + PortMbimCloseContext *ctx; + GTask *task; g_return_if_fail (MM_IS_PORT_MBIM (self)); @@ -421,24 +540,40 @@ self->priv->in_progress = TRUE; + /* Store device(s) to close in the context */ + ctx = g_slice_new0 (PortMbimCloseContext); + ctx->mbim_device = g_steal_pointer (&self->priv->mbim_device); + g_task_set_task_data (task, ctx, (GDestroyNotify)port_mbim_close_context_free); + #if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED if (self->priv->qmi_device) { - GError *error = NULL; + GList *l; - if (!qmi_device_close (self->priv->qmi_device, &error)) { - mm_warn ("Couldn't properly close QMI device: %s", error->message); - g_error_free (error); + /* Release all allocated clients */ + for (l = self->priv->qmi_clients; l; l = g_list_next (l)) { + QmiClient *qmi_client = QMI_CLIENT (l->data); + + mm_obj_dbg (self, "Releasing client for service '%s'...", + qmi_service_get_string (qmi_client_get_service (qmi_client))); + qmi_device_release_client (self->priv->qmi_device, + qmi_client, + QMI_DEVICE_RELEASE_CLIENT_FLAGS_RELEASE_CID, + 3, NULL, NULL, NULL); } - g_clear_object (&self->priv->qmi_device); + g_list_free_full (self->priv->qmi_clients, g_object_unref); + self->priv->qmi_clients = NULL; + + ctx->qmi_device = g_steal_pointer (&self->priv->qmi_device); + qmi_device_close_async (ctx->qmi_device, + 5, + NULL, + (GAsyncReadyCallback)qmi_device_close_ready, + task); + return; } #endif - mbim_device_close (self->priv->mbim_device, - 5, - NULL, - (GAsyncReadyCallback)mbim_device_close_ready, - task); - g_clear_object (&self->priv->mbim_device); + port_mbim_device_close (task); } /*****************************************************************************/ @@ -454,11 +589,12 @@ /*****************************************************************************/ MMPortMbim * -mm_port_mbim_new (const gchar *name) +mm_port_mbim_new (const gchar *name, + MMPortSubsys subsys) { return MM_PORT_MBIM (g_object_new (MM_TYPE_PORT_MBIM, MM_PORT_DEVICE, name, - MM_PORT_SUBSYS, MM_PORT_SUBSYS_USB, + MM_PORT_SUBSYS, subsys, MM_PORT_TYPE, MM_PORT_TYPE_MBIM, NULL)); } @@ -467,6 +603,12 @@ mm_port_mbim_init (MMPortMbim *self) { self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, MM_TYPE_PORT_MBIM, MMPortMbimPrivate); + +#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED + /* By default, always assume that QMI is supported, we'll later check if + * that's true or not. */ + self->priv->qmi_supported = TRUE; +#endif } static void diff -Nru modemmanager-1.12.8/src/mm-port-mbim.h modemmanager-1.16.6/src/mm-port-mbim.h --- modemmanager-1.12.8/src/mm-port-mbim.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-port-mbim.h 2021-06-06 21:40:59.000000000 +0800 @@ -51,8 +51,10 @@ }; GType mm_port_mbim_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMPortMbim, g_object_unref) -MMPortMbim *mm_port_mbim_new (const gchar *name); +MMPortMbim *mm_port_mbim_new (const gchar *name, + MMPortSubsys subsys); void mm_port_mbim_open (MMPortMbim *self, #if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED diff -Nru modemmanager-1.12.8/src/mm-port-probe-at.c modemmanager-1.16.6/src/mm-port-probe-at.c --- modemmanager-1.12.8/src/mm-port-probe-at.c 2014-09-17 14:46:07.000000000 +0800 +++ modemmanager-1.16.6/src/mm-port-probe-at.c 2021-06-06 21:40:59.000000000 +0800 @@ -40,8 +40,6 @@ GError **result_error) { if (error) { - mm_dbg ("Parsing AT got: '%s'", error->message); - /* Timeout errors are the only ones not fatal; * they will just go on to the next command. */ if (g_error_matches (error, diff -Nru modemmanager-1.12.8/src/mm-port-probe-at.h modemmanager-1.16.6/src/mm-port-probe-at.h --- modemmanager-1.12.8/src/mm-port-probe-at.h 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-port-probe-at.h 2021-06-06 21:40:59.000000000 +0800 @@ -52,7 +52,7 @@ /* Struct to configure port probing commands */ typedef struct { /* The AT command */ - gchar *command; + const gchar *command; /* Timeout of the command, in seconds */ guint timeout; /* The response processor */ @@ -76,5 +76,4 @@ GVariant **result, GError **result_error); - #endif /* MM_PORT_PROBE_AT_H */ diff -Nru modemmanager-1.12.8/src/mm-port-probe.c modemmanager-1.16.6/src/mm-port-probe.c --- modemmanager-1.12.8/src/mm-port-probe.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-port-probe.c 2021-06-06 21:40:59.000000000 +0800 @@ -27,7 +27,7 @@ #include #include "mm-port-probe.h" -#include "mm-log.h" +#include "mm-log-object.h" #include "mm-port-serial-at.h" #include "mm-port-serial.h" #include "mm-serial-parsers.h" @@ -63,7 +63,10 @@ * |----> MBIM capabilities check */ -G_DEFINE_TYPE (MMPortProbe, mm_port_probe, G_TYPE_OBJECT) +static void log_object_iface_init (MMLogObjectInterface *iface); + +G_DEFINE_TYPE_EXTENDED (MMPortProbe, mm_port_probe, G_TYPE_OBJECT, 0, + G_IMPLEMENT_INTERFACE (MM_TYPE_LOG_OBJECT, log_object_iface_init)) enum { PROP_0, @@ -98,6 +101,8 @@ gboolean maybe_at_secondary; gboolean maybe_at_ppp; gboolean maybe_qcdm; + gboolean maybe_qmi; + gboolean maybe_mbim; /* Current probing task. Only one can be available at a time */ GTask *task; @@ -159,9 +164,7 @@ self->priv->flags |= MM_PORT_PROBE_AT; if (self->priv->is_at) { - mm_dbg ("(%s/%s) port is AT-capable", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "port is AT-capable"); /* Also set as not a QCDM/QMI/MBIM port */ self->priv->is_qcdm = FALSE; @@ -169,9 +172,7 @@ self->priv->is_mbim = FALSE; self->priv->flags |= (MM_PORT_PROBE_QCDM | MM_PORT_PROBE_QMI | MM_PORT_PROBE_MBIM); } else { - mm_dbg ("(%s/%s) port is not AT-capable", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "port is not AT-capable"); self->priv->vendor = NULL; self->priv->product = NULL; self->priv->is_icera = FALSE; @@ -188,15 +189,11 @@ const gchar *at_vendor) { if (at_vendor) { - mm_dbg ("(%s/%s) vendor probing finished", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "vendor probing finished"); self->priv->vendor = g_utf8_casefold (at_vendor, -1); self->priv->flags |= MM_PORT_PROBE_AT_VENDOR; } else { - mm_dbg ("(%s/%s) couldn't probe for vendor string", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "couldn't probe for vendor string"); self->priv->vendor = NULL; self->priv->product = NULL; self->priv->flags |= (MM_PORT_PROBE_AT_VENDOR | MM_PORT_PROBE_AT_PRODUCT); @@ -208,15 +205,11 @@ const gchar *at_product) { if (at_product) { - mm_dbg ("(%s/%s) product probing finished", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "product probing finished"); self->priv->product = g_utf8_casefold (at_product, -1); self->priv->flags |= MM_PORT_PROBE_AT_PRODUCT; } else { - mm_dbg ("(%s/%s) couldn't probe for product string", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "couldn't probe for product string"); self->priv->product = NULL; self->priv->flags |= MM_PORT_PROBE_AT_PRODUCT; } @@ -227,15 +220,11 @@ gboolean is_icera) { if (is_icera) { - mm_dbg ("(%s/%s) Modem is Icera-based", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "modem is Icera-based"); self->priv->is_icera = TRUE; self->priv->flags |= MM_PORT_PROBE_AT_ICERA; } else { - mm_dbg ("(%s/%s) Modem is probably not Icera-based", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "modem is probably not Icera-based"); self->priv->is_icera = FALSE; self->priv->flags |= MM_PORT_PROBE_AT_ICERA; } @@ -246,15 +235,11 @@ gboolean is_xmm) { if (is_xmm) { - mm_dbg ("(%s/%s) Modem is XMM-based", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "modem is XMM-based"); self->priv->is_xmm = TRUE; self->priv->flags |= MM_PORT_PROBE_AT_XMM; } else { - mm_dbg ("(%s/%s) Modem is probably not XMM-based", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "modem is probably not XMM-based"); self->priv->is_xmm = FALSE; self->priv->flags |= MM_PORT_PROBE_AT_XMM; } @@ -268,9 +253,7 @@ self->priv->flags |= MM_PORT_PROBE_QCDM; if (self->priv->is_qcdm) { - mm_dbg ("(%s/%s) port is QCDM-capable", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "port is QCDM-capable"); /* Also set as not an AT/QMI/MBIM port */ self->priv->is_at = FALSE; @@ -288,9 +271,7 @@ MM_PORT_PROBE_QMI | MM_PORT_PROBE_MBIM); } else - mm_dbg ("(%s/%s) port is not QCDM-capable", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "port is not QCDM-capable"); } void @@ -301,9 +282,7 @@ self->priv->flags |= MM_PORT_PROBE_QMI; if (self->priv->is_qmi) { - mm_dbg ("(%s/%s) port is QMI-capable", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "port is QMI-capable"); /* Also set as not an AT/QCDM/MBIM port */ self->priv->is_at = FALSE; @@ -319,9 +298,7 @@ MM_PORT_PROBE_QCDM | MM_PORT_PROBE_MBIM); } else - mm_dbg ("(%s/%s) port is not QMI-capable", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "port is not QMI-capable"); } void @@ -332,9 +309,7 @@ self->priv->flags |= MM_PORT_PROBE_MBIM; if (self->priv->is_mbim) { - mm_dbg ("(%s/%s) port is MBIM-capable", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "port is MBIM-capable"); /* Also set as not an AT/QCDM/QMI port */ self->priv->is_at = FALSE; @@ -350,9 +325,7 @@ MM_PORT_PROBE_QCDM | MM_PORT_PROBE_QMI); } else - mm_dbg ("(%s/%s) port is not MBIM-capable", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "port is not MBIM-capable"); } /*****************************************************************************/ @@ -435,8 +408,8 @@ #if defined WITH_QMI if (ctx->port_qmi) { - if (mm_port_qmi_is_open (ctx->port_qmi)) - mm_port_qmi_close (ctx->port_qmi); + /* We should have closed it cleanly before */ + g_assert (!mm_port_qmi_is_open (ctx->port_qmi)); g_object_unref (ctx->port_qmi); } #endif @@ -465,6 +438,22 @@ #if defined WITH_QMI static void +qmi_port_close_ready (MMPortQmi *qmi_port, + GAsyncResult *res, + MMPortProbe *self) +{ + PortProbeRunContext *ctx; + + g_assert (self->priv->task); + ctx = g_task_get_task_data (self->priv->task); + + mm_port_qmi_close_finish (qmi_port, res, NULL); + + /* Keep on */ + ctx->source_id = g_idle_add ((GSourceFunc) wdm_probe, self); +} + +static void port_qmi_open_ready (MMPortQmi *port_qmi, GAsyncResult *res, MMPortProbe *self) @@ -478,19 +467,17 @@ is_qmi = mm_port_qmi_open_finish (port_qmi, res, &error); if (!is_qmi) { - mm_dbg ("(%s/%s) error checking QMI support: '%s'", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port), - error ? error->message : "unknown error"); + mm_obj_dbg (self, "error checking QMI support: %s", + error ? error->message : "unknown error"); g_clear_error (&error); } /* Set probing result */ mm_port_probe_set_result_qmi (self, is_qmi); - mm_port_qmi_close (port_qmi); - /* Keep on */ - ctx->source_id = g_idle_add ((GSourceFunc) wdm_probe, self); + mm_port_qmi_close (ctx->port_qmi, + (GAsyncReadyCallback) qmi_port_close_ready, + self); } #endif /* WITH_QMI */ @@ -504,17 +491,22 @@ ctx = g_task_get_task_data (self->priv->task); #if defined WITH_QMI - mm_dbg ("(%s/%s) probing QMI...", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + { + MMPortSubsys subsys = MM_PORT_SUBSYS_USBMISC; - /* Create a port and try to open it */ - ctx->port_qmi = mm_port_qmi_new (mm_kernel_device_get_name (self->priv->port)); - mm_port_qmi_open (ctx->port_qmi, - FALSE, - NULL, - (GAsyncReadyCallback) port_qmi_open_ready, - self); + mm_obj_dbg (self, "probing QMI..."); + + if (g_str_equal (mm_kernel_device_get_subsystem (self->priv->port), "rpmsg")) + subsys = MM_PORT_SUBSYS_RPMSG; + + /* Create a port and try to open it */ + ctx->port_qmi = mm_port_qmi_new (mm_kernel_device_get_name (self->priv->port), subsys); + mm_port_qmi_open (ctx->port_qmi, + FALSE, + NULL, + (GAsyncReadyCallback) port_qmi_open_ready, + self); + } #else /* If not compiled with QMI support, just assume we won't have any QMI port */ mm_port_probe_set_result_qmi (self, FALSE); @@ -554,10 +546,8 @@ is_mbim = mm_port_mbim_open_finish (mbim_port, res, &error); if (!is_mbim) { - mm_dbg ("(%s/%s) error checking MBIM support: '%s'", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port), - error ? error->message : "unknown error"); + mm_obj_dbg (self, "error checking MBIM support: %s", + error ? error->message : "unknown error"); g_clear_error (&error); } @@ -580,12 +570,11 @@ ctx = g_task_get_task_data (self->priv->task); #if defined WITH_MBIM - mm_dbg ("(%s/%s) probing MBIM...", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "probing MBIM..."); /* Create a port and try to open it */ - ctx->mbim_port = mm_port_mbim_new (mm_kernel_device_get_name (self->priv->port)); + ctx->mbim_port = mm_port_mbim_new (mm_kernel_device_get_name (self->priv->port), + MM_PORT_SUBSYS_USBMISC); mm_port_mbim_open (ctx->mbim_port, #if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED FALSE, /* Don't check QMI over MBIM support at this stage */ @@ -652,10 +641,7 @@ flow_control = mm_flow_control_from_string (flow_control_tag, &error); if (flow_control == MM_FLOW_CONTROL_UNKNOWN) { - mm_warn ("(%s/%s) Unsupported flow control settings in port: %s", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port), - error->message); + mm_obj_warn (self, "unsupported flow control settings in port: %s", error->message); g_error_free (error); } else { g_object_set (serial, @@ -692,10 +678,7 @@ /* Parse the response */ result = qcdm_cmd_version_info_result ((const gchar *) response->data, response->len, &err); if (!result) { - mm_warn ("(%s/%s) failed to parse QCDM version info command result: %d", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port), - err); + mm_obj_warn (self, "failed to parse QCDM version info command result: %d", err); retry = TRUE; } else { /* yay, probably a QCDM port */ @@ -705,11 +688,11 @@ g_byte_array_unref (response); } else if (g_error_matches (error, MM_SERIAL_ERROR, MM_SERIAL_ERROR_PARSE_FAILED)) { /* Failed to unescape QCDM packet: don't retry */ - mm_dbg ("QCDM parsing error: %s", error->message); + mm_obj_dbg (self, "QCDM parsing error: %s", error->message); g_error_free (error); } else { if (!g_error_matches (error, MM_SERIAL_ERROR, MM_SERIAL_ERROR_RESPONSE_TIMEOUT)) - mm_dbg ("QCDM probe error: (%d) %s", error->code, error->message); + mm_obj_dbg (self, "QCDM probe error: (%d) %s", error->code, error->message); g_error_free (error); retry = TRUE; } @@ -747,6 +730,8 @@ gint len; guint8 marker = 0x7E; PortProbeRunContext *ctx; + MMPortSubsys subsys = MM_PORT_SUBSYS_TTY; + g_assert (self->priv->task); ctx = g_task_get_task_data (self->priv->task); @@ -756,9 +741,7 @@ if (port_probe_task_return_error_if_cancelled (self)) return G_SOURCE_REMOVE; - mm_dbg ("(%s/%s) probing QCDM...", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "probing QCDM..."); /* If open, close the AT port */ if (ctx->serial) { @@ -771,8 +754,11 @@ g_object_unref (ctx->serial); } + if (g_str_equal (mm_kernel_device_get_subsystem (self->priv->port), "wwan")) + subsys = MM_PORT_SUBSYS_WWAN; + /* Open the QCDM port */ - ctx->serial = MM_PORT_SERIAL (mm_port_serial_qcdm_new (mm_kernel_device_get_name (self->priv->port))); + ctx->serial = MM_PORT_SERIAL (mm_port_serial_qcdm_new (mm_kernel_device_get_name (self->priv->port), subsys)); if (!ctx->serial) { port_probe_task_return_error (self, g_error_new (MM_CORE_ERROR, @@ -987,9 +973,7 @@ /* If AT probing cancelled, end this partial probing */ if (g_cancellable_is_cancelled (ctx->at_probing_cancellable)) { - mm_dbg ("(%s/%s) no need to keep on probing the port for AT support", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "no need to keep on probing the port for AT support"); ctx->at_result_processor (self, NULL); serial_probe_schedule (self); return; @@ -1030,10 +1014,8 @@ if (ctx->at_commands_wait_secs == 0) ctx->source_id = g_idle_add ((GSourceFunc) serial_probe_at, self); else { - mm_dbg ("(%s/%s) re-scheduling next command in probing group in %u seconds...", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port), - ctx->at_commands_wait_secs); + mm_obj_dbg (self, "re-scheduling next command in probing group in %u seconds...", + ctx->at_commands_wait_secs); ctx->source_id = g_timeout_add_seconds (ctx->at_commands_wait_secs, (GSourceFunc) serial_probe_at, self); } goto out; @@ -1067,9 +1049,7 @@ /* If AT probing cancelled, end this partial probing */ if (g_cancellable_is_cancelled (ctx->at_probing_cancellable)) { - mm_dbg ("(%s/%s) no need to launch probing for AT support", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "no need to launch probing for AT support"); ctx->at_result_processor (self, NULL); serial_probe_schedule (self); return G_SOURCE_REMOVE; @@ -1259,9 +1239,7 @@ g_assert (self->priv->task); ctx = g_task_get_task_data (self->priv->task); - mm_dbg ("(%s/%s) serial buffer full", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "serial buffer full"); /* Don't explicitly close the AT port, just end the AT probing * (or custom init probing) */ mm_port_probe_set_result_at (self, FALSE); @@ -1304,8 +1282,12 @@ gpointer parser; MMPortSubsys subsys = MM_PORT_SUBSYS_TTY; - if (g_str_has_prefix (mm_kernel_device_get_subsystem (self->priv->port), "usb")) - subsys = MM_PORT_SUBSYS_USB; + if (g_str_equal (mm_kernel_device_get_subsystem (self->priv->port), "usbmisc")) + subsys = MM_PORT_SUBSYS_USBMISC; + else if (g_str_equal (mm_kernel_device_get_subsystem (self->priv->port), "rpmsg")) + subsys = MM_PORT_SUBSYS_RPMSG; + else if (g_str_equal (mm_kernel_device_get_subsystem (self->priv->port), "wwan")) + subsys = MM_PORT_SUBSYS_WWAN; ctx->serial = MM_PORT_SERIAL (mm_port_serial_at_new (mm_kernel_device_get_name (self->priv->port), subsys)); if (!ctx->serial) { @@ -1404,9 +1386,7 @@ if (g_cancellable_is_cancelled (ctx->at_probing_cancellable)) return FALSE; - mm_dbg ("(%s/%s) requested to cancel all AT probing", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "requested to cancel all AT probing"); g_cancellable_cancel (ctx->at_probing_cancellable); return TRUE; } @@ -1462,45 +1442,59 @@ /* If we're told to completely ignore the port, don't do any probing */ if (self->priv->is_ignored) { - mm_dbg ("(%s/%s) port probing finished: skipping for blacklisted port", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "port probing finished: skipping for blacklisted port"); port_probe_task_return_boolean (self, TRUE); return; } - /* If this is a port flagged as a GPS port, don't do any AT or QCDM probing */ + /* If this is a port flagged as a GPS port, don't do any other probing */ if (self->priv->is_gps) { - mm_dbg ("(%s/%s) GPS port detected", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); - mm_port_probe_set_result_at (self, FALSE); + mm_obj_dbg (self, "GPS port detected"); + mm_port_probe_set_result_at (self, FALSE); mm_port_probe_set_result_qcdm (self, FALSE); + mm_port_probe_set_result_qmi (self, FALSE); + mm_port_probe_set_result_mbim (self, FALSE); } - /* If this is a port flagged as an audio port, don't do any AT or QCDM probing */ + /* If this is a port flagged as an audio port, don't do any other probing */ if (self->priv->is_audio) { - mm_dbg ("(%s/%s) audio port detected", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); - mm_port_probe_set_result_at (self, FALSE); + mm_obj_dbg (self, "audio port detected"); + mm_port_probe_set_result_at (self, FALSE); mm_port_probe_set_result_qcdm (self, FALSE); + mm_port_probe_set_result_qmi (self, FALSE); + mm_port_probe_set_result_mbim (self, FALSE); } - /* If this is a port flagged as being an AT port, don't do any QCDM probing */ + /* If this is a port flagged as being an AT port, don't do any other probing */ if (self->priv->maybe_at_primary || self->priv->maybe_at_secondary || self->priv->maybe_at_ppp) { - mm_dbg ("(%s/%s) no QCDM probing in possible AT port", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "no QCDM/QMI/MBIM probing in possible AT port"); mm_port_probe_set_result_qcdm (self, FALSE); + mm_port_probe_set_result_qmi (self, FALSE); + mm_port_probe_set_result_mbim (self, FALSE); } - /* If this is a port flagged as being a QCDM port, don't do any AT probing */ + /* If this is a port flagged as being a QCDM port, don't do any other probing */ if (self->priv->maybe_qcdm) { - mm_dbg ("(%s/%s) no AT probing in possible QCDM port", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); - mm_port_probe_set_result_at (self, FALSE); + mm_obj_dbg (self, "no AT/QMI/MBIM probing in possible QCDM port"); + mm_port_probe_set_result_at (self, FALSE); + mm_port_probe_set_result_qmi (self, FALSE); + mm_port_probe_set_result_mbim (self, FALSE); + } + + /* If this is a port flagged as being a QMI port, don't do any other probing */ + if (self->priv->maybe_qmi) { + mm_obj_dbg (self, "no AT/QCDM/MBIM probing in possible QMI port"); + mm_port_probe_set_result_at (self, FALSE); + mm_port_probe_set_result_qcdm (self, FALSE); + mm_port_probe_set_result_mbim (self, FALSE); + } + + /* If this is a port flagged as being a MBIM port, don't do any other probing */ + if (self->priv->maybe_mbim) { + mm_obj_dbg (self, "no AT/QCDM/QMI probing in possible MBIM port"); + mm_port_probe_set_result_at (self, FALSE); + mm_port_probe_set_result_qcdm (self, FALSE); + mm_port_probe_set_result_qmi (self, FALSE); } /* Check if we already have the requested probing results. @@ -1513,19 +1507,14 @@ /* All requested probings already available? If so, we're done */ if (!ctx->flags) { - mm_dbg ("(%s/%s) port probing finished: no more probings needed", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port)); + mm_obj_dbg (self, "port probing finished: no more probings needed"); port_probe_task_return_boolean (self, TRUE); return; } /* Log the probes scheduled to be run */ probe_list_str = mm_port_probe_flag_build_string_from_mask (ctx->flags); - mm_dbg ("(%s/%s) launching port probing: '%s'", - mm_kernel_device_get_subsystem (self->priv->port), - mm_kernel_device_get_name (self->priv->port), - probe_list_str); + mm_obj_dbg (self, "launching port probing: '%s'", probe_list_str); g_free (probe_list_str); /* If any AT probing is needed, start by opening as AT port */ @@ -1597,18 +1586,8 @@ gboolean mm_port_probe_is_qcdm (MMPortProbe *self) { - const gchar *subsys; - const gchar *name; - g_return_val_if_fail (MM_IS_PORT_PROBE (self), FALSE); - subsys = mm_kernel_device_get_subsystem (self->priv->port); - name = mm_kernel_device_get_name (self->priv->port); - if (g_str_equal (subsys, "net") || - (g_str_has_prefix (subsys, "usb") && - g_str_has_prefix (name, "cdc-wdm"))) - return FALSE; - return (self->priv->flags & MM_PORT_PROBE_QCDM ? self->priv->is_qcdm : FALSE); @@ -1617,19 +1596,11 @@ gboolean mm_port_probe_is_qmi (MMPortProbe *self) { - const gchar *subsys; - const gchar *name; - g_return_val_if_fail (MM_IS_PORT_PROBE (self), FALSE); - subsys = mm_kernel_device_get_subsystem (self->priv->port); - name = mm_kernel_device_get_name (self->priv->port); - if (!g_str_has_prefix (subsys, "usb") || - !name || - !g_str_has_prefix (name, "cdc-wdm")) - return FALSE; - - return self->priv->is_qmi; + return (self->priv->flags & MM_PORT_PROBE_QMI ? + self->priv->is_qmi : + FALSE); } gboolean @@ -1651,19 +1622,11 @@ gboolean mm_port_probe_is_mbim (MMPortProbe *self) { - const gchar *subsys; - const gchar *name; - g_return_val_if_fail (MM_IS_PORT_PROBE (self), FALSE); - subsys = mm_kernel_device_get_subsystem (self->priv->port); - name = mm_kernel_device_get_name (self->priv->port); - if (!g_str_has_prefix (subsys, "usb") || - !name || - !g_str_has_prefix (name, "cdc-wdm")) - return FALSE; - - return self->priv->is_mbim; + return (self->priv->flags & MM_PORT_PROBE_MBIM ? + self->priv->is_mbim : + FALSE); } gboolean @@ -1694,21 +1657,17 @@ if (g_str_equal (subsys, "net")) return MM_PORT_TYPE_NET; - if (g_str_has_prefix (subsys, "usb")) { - const gchar *name; - - name = mm_kernel_device_get_name (self->priv->port); - if (g_str_has_prefix (name, "cdc-wdm")) { #if defined WITH_QMI - if (self->priv->is_qmi) - return MM_PORT_TYPE_QMI; + if (self->priv->flags & MM_PORT_PROBE_QMI && + self->priv->is_qmi) + return MM_PORT_TYPE_QMI; #endif + #if defined WITH_MBIM - if (self->priv->is_mbim) - return MM_PORT_TYPE_MBIM; + if (self->priv->flags & MM_PORT_PROBE_MBIM && + self->priv->is_mbim) + return MM_PORT_TYPE_MBIM; #endif - } - } if (self->priv->flags & MM_PORT_PROBE_QCDM && self->priv->is_qcdm) @@ -1762,18 +1721,8 @@ const gchar * mm_port_probe_get_vendor (MMPortProbe *self) { - const gchar *subsys; - const gchar *name; - g_return_val_if_fail (MM_IS_PORT_PROBE (self), FALSE); - subsys = mm_kernel_device_get_subsystem (self->priv->port); - name = mm_kernel_device_get_name (self->priv->port); - if (g_str_equal (subsys, "net") || - (g_str_has_prefix (subsys, "usb") && - g_str_has_prefix (name, "cdc-wdm"))) - return NULL; - return (self->priv->flags & MM_PORT_PROBE_AT_VENDOR ? self->priv->vendor : NULL); @@ -1782,18 +1731,8 @@ const gchar * mm_port_probe_get_product (MMPortProbe *self) { - const gchar *subsys; - const gchar *name; - g_return_val_if_fail (MM_IS_PORT_PROBE (self), FALSE); - subsys = mm_kernel_device_get_subsystem (self->priv->port); - name = mm_kernel_device_get_name (self->priv->port); - if (g_str_equal (subsys, "net") || - (g_str_has_prefix (subsys, "usb") && - g_str_has_prefix (name, "cdc-wdm"))) - return NULL; - return (self->priv->flags & MM_PORT_PROBE_AT_PRODUCT ? self->priv->product : NULL); @@ -1804,9 +1743,6 @@ { g_return_val_if_fail (MM_IS_PORT_PROBE (self), FALSE); - if (g_str_equal (mm_kernel_device_get_subsystem (self->priv->port), "net")) - return FALSE; - return (self->priv->flags & MM_PORT_PROBE_AT_ICERA ? self->priv->is_icera : FALSE); @@ -1830,9 +1766,6 @@ { g_return_val_if_fail (MM_IS_PORT_PROBE (self), FALSE); - if (g_str_equal (mm_kernel_device_get_subsystem (self->priv->port), "net")) - return FALSE; - return (self->priv->flags & MM_PORT_PROBE_AT_XMM ? self->priv->is_xmm : FALSE); @@ -1877,6 +1810,17 @@ /*****************************************************************************/ +static gchar * +log_object_build_id (MMLogObject *_self) +{ + MMPortProbe *self; + + self = MM_PORT_PROBE (_self); + return g_strdup_printf ("%s/probe", mm_kernel_device_get_name (self->priv->port)); +} + +/*****************************************************************************/ + MMPortProbe * mm_port_probe_new (MMDevice *device, MMKernelDevice *port) @@ -1918,6 +1862,8 @@ self->priv->maybe_at_secondary = mm_kernel_device_get_property_as_boolean (self->priv->port, ID_MM_PORT_TYPE_AT_SECONDARY); self->priv->maybe_at_ppp = mm_kernel_device_get_property_as_boolean (self->priv->port, ID_MM_PORT_TYPE_AT_PPP); self->priv->maybe_qcdm = mm_kernel_device_get_property_as_boolean (self->priv->port, ID_MM_PORT_TYPE_QCDM); + self->priv->maybe_qmi = mm_kernel_device_get_property_as_boolean (self->priv->port, ID_MM_PORT_TYPE_QMI); + self->priv->maybe_mbim = mm_kernel_device_get_property_as_boolean (self->priv->port, ID_MM_PORT_TYPE_MBIM); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -1974,6 +1920,12 @@ } static void +log_object_iface_init (MMLogObjectInterface *iface) +{ + iface->build_id = log_object_build_id; +} + +static void mm_port_probe_class_init (MMPortProbeClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); diff -Nru modemmanager-1.12.8/src/mm-port-probe.h modemmanager-1.16.6/src/mm-port-probe.h --- modemmanager-1.12.8/src/mm-port-probe.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-port-probe.h 2021-06-06 21:40:59.000000000 +0800 @@ -79,6 +79,7 @@ GError **error); GType mm_port_probe_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMPortProbe, g_object_unref) MMPortProbe *mm_port_probe_new (MMDevice *device, MMKernelDevice *port); diff -Nru modemmanager-1.12.8/src/mm-port-qmi.c modemmanager-1.16.6/src/mm-port-qmi.c --- modemmanager-1.12.8/src/mm-port-qmi.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-port-qmi.c 2021-06-06 21:40:59.000000000 +0800 @@ -22,7 +22,7 @@ #include #include "mm-port-qmi.h" -#include "mm-log.h" +#include "mm-log-object.h" G_DEFINE_TYPE (MMPortQmi, mm_port_qmi, MM_TYPE_PORT) @@ -33,7 +33,7 @@ } ServiceInfo; struct _MMPortQmiPrivate { - gboolean opening; + gboolean in_progress; QmiDevice *qmi_device; GList *services; gboolean llp_is_raw_ip; @@ -41,25 +41,41 @@ /*****************************************************************************/ -QmiClient * -mm_port_qmi_peek_client (MMPortQmi *self, - QmiService service, - MMPortQmiFlag flag) +static QmiClient * +lookup_client (MMPortQmi *self, + QmiService service, + MMPortQmiFlag flag, + gboolean steal) { GList *l; for (l = self->priv->services; l; l = g_list_next (l)) { ServiceInfo *info = l->data; - if (info->service == service && - info->flag == flag) - return info->client; + if (info->service == service && info->flag == flag) { + QmiClient *found; + + found = info->client; + if (steal) { + self->priv->services = g_list_delete_link (self->priv->services, l); + g_free (info); + } + return found; + } } return NULL; } QmiClient * +mm_port_qmi_peek_client (MMPortQmi *self, + QmiService service, + MMPortQmiFlag flag) +{ + return lookup_client (self, service, flag, FALSE); +} + +QmiClient * mm_port_qmi_get_client (MMPortQmi *self, QmiService service, MMPortQmiFlag flag) @@ -82,6 +98,30 @@ /*****************************************************************************/ +void +mm_port_qmi_release_client (MMPortQmi *self, + QmiService service, + MMPortQmiFlag flag) +{ + QmiClient *client; + + if (!self->priv->qmi_device) + return; + + client = lookup_client (self, service, flag, TRUE); + if (!client) + return; + + mm_obj_dbg (self, "explicitly releasing client for service '%s'...", qmi_service_get_string (service)); + qmi_device_release_client (self->priv->qmi_device, + client, + QMI_DEVICE_RELEASE_CLIENT_FLAGS_RELEASE_CID, + 3, NULL, NULL, NULL); + g_object_unref (client); +} + +/*****************************************************************************/ + typedef struct { ServiceInfo *info; } AllocateClientContext; @@ -194,41 +234,40 @@ PORT_OPEN_STEP_ALLOCATE_WDA_CLIENT, PORT_OPEN_STEP_GET_WDA_DATA_FORMAT, PORT_OPEN_STEP_CHECK_DATA_FORMAT, - PORT_OPEN_STEP_SET_KERNEL_DATA_FORMAT, + PORT_OPEN_STEP_SYNC_DATA_FORMAT, + PORT_OPEN_STEP_CLOSE_BEFORE_OPEN_WITH_DATA_FORMAT, PORT_OPEN_STEP_OPEN_WITH_DATA_FORMAT, PORT_OPEN_STEP_LAST } PortOpenStep; typedef struct { - QmiDevice *device; - QmiClient *wda; - GError *error; - PortOpenStep step; - gboolean set_data_format; - QmiDeviceExpectedDataFormat kernel_data_format; - QmiWdaLinkLayerProtocol llp; + QmiDevice *device; + QmiClient *wda; + GError *error; + PortOpenStep step; + gboolean set_data_format; + QmiDeviceExpectedDataFormat kernel_data_format; + QmiWdaLinkLayerProtocol llp; } PortOpenContext; static void port_open_context_free (PortOpenContext *ctx) { - if (ctx->wda) { - g_assert (ctx->device); + g_assert (!ctx->error); + if (ctx->wda && ctx->device) qmi_device_release_client (ctx->device, ctx->wda, QMI_DEVICE_RELEASE_CLIENT_FLAGS_RELEASE_CID, 3, NULL, NULL, NULL); - g_object_unref (ctx->wda); - } - if (ctx->device) - g_object_unref (ctx->device); + g_clear_object (&ctx->wda); + g_clear_object (&ctx->device); g_slice_free (PortOpenContext, ctx); } gboolean -mm_port_qmi_open_finish (MMPortQmi *self, - GAsyncResult *res, - GError **error) +mm_port_qmi_open_finish (MMPortQmi *self, + GAsyncResult *res, + GError **error) { return g_task_propagate_boolean (G_TASK (res), error); } @@ -236,15 +275,54 @@ static void port_open_step (GTask *task); static void -qmi_device_open_second_ready (QmiDevice *qmi_device, +port_open_complete_with_error (GTask *task) +{ + MMPortQmi *self; + PortOpenContext *ctx; + + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); + + g_assert (ctx->error); + self->priv->in_progress = FALSE; + g_task_return_error (task, g_steal_pointer (&ctx->error)); + g_object_unref (task); +} + +static void +qmi_device_close_on_error_ready (QmiDevice *qmi_device, + GAsyncResult *res, + GTask *task) +{ + MMPortQmi *self; + g_autoptr(GError) error = NULL; + + self = g_task_get_source_object (task); + + if (!qmi_device_close_finish (qmi_device, res, &error)) + mm_obj_warn (self, "Couldn't close QMI device after failed open sequence: %s", error->message); + + port_open_complete_with_error (task); +} + +static void +qmi_device_open_second_ready (QmiDevice *qmi_device, GAsyncResult *res, - GTask *task) + GTask *task) { + MMPortQmi *self; PortOpenContext *ctx; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); - qmi_device_open_finish (qmi_device, res, &ctx->error); + if (qmi_device_open_finish (qmi_device, res, &ctx->error)) { + /* If the open with CTL data format is sucessful, update */ + if (ctx->kernel_data_format == QMI_DEVICE_EXPECTED_DATA_FORMAT_RAW_IP) + self->priv->llp_is_raw_ip = TRUE; + else + self->priv->llp_is_raw_ip = FALSE; + } /* In both error and success, we go to last step */ ctx->step = PORT_OPEN_STEP_LAST; @@ -252,43 +330,100 @@ } static void +qmi_device_close_to_reopen_ready (QmiDevice *qmi_device, + GAsyncResult *res, + GTask *task) +{ + MMPortQmi *self; + PortOpenContext *ctx; + + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); + + if (!qmi_device_close_finish (qmi_device, res, &ctx->error)) { + mm_obj_warn (self, "Couldn't close QMI device to reopen it"); + ctx->step = PORT_OPEN_STEP_LAST; + } else + ctx->step++; + port_open_step (task); +} + +static void +set_data_format_ready (QmiClientWda *client, + GAsyncResult *res, + GTask *task) +{ + MMPortQmi *self; + PortOpenContext *ctx; + g_autoptr(QmiMessageWdaSetDataFormatOutput) output = NULL; + g_autoptr(GError) error = NULL; + + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); + + output = qmi_client_wda_set_data_format_finish (client, res, &error); + if (!output || !qmi_message_wda_set_data_format_output_get_result (output, &error)) { + mm_obj_warn (self, "Couldn't set data format: %s", error->message); + /* If setting WDA data format fails, fallback to LLP requested via CTL */ + ctx->step = PORT_OPEN_STEP_CLOSE_BEFORE_OPEN_WITH_DATA_FORMAT; + } else { + self->priv->llp_is_raw_ip = TRUE; + ctx->step = PORT_OPEN_STEP_LAST; + } + + port_open_step (task); +} + +static void get_data_format_ready (QmiClientWda *client, GAsyncResult *res, - GTask *task) + GTask *task) { - PortOpenContext *ctx; - QmiMessageWdaGetDataFormatOutput *output; + MMPortQmi *self; + PortOpenContext *ctx; + g_autoptr(QmiMessageWdaGetDataFormatOutput) output = NULL; + g_autoptr(GError) error = NULL; + + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); - ctx = g_task_get_task_data (task); output = qmi_client_wda_get_data_format_finish (client, res, NULL); if (!output || - !qmi_message_wda_get_data_format_output_get_result (output, NULL) || - !qmi_message_wda_get_data_format_output_get_link_layer_protocol (output, &ctx->llp, NULL)) - /* If loading WDA data format fails, fallback to 802.3 requested via CTL */ - ctx->step = PORT_OPEN_STEP_OPEN_WITH_DATA_FORMAT; - else + !qmi_message_wda_get_data_format_output_get_result (output, &error) || + !qmi_message_wda_get_data_format_output_get_link_layer_protocol (output, &ctx->llp, NULL)) { + /* A 'missing argument' error when querying data format is seen in new + * devices like the Quectel RM500Q, requiring the 'endpoint info' TLV. + * When this happens, assume the device supports only raw-ip and be done + * with it. */ + if (error && g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_MISSING_ARGUMENT)) { + mm_obj_dbg (self, "Querying data format failed: '%s', assuming raw-ip is only supported", error->message); + ctx->llp = QMI_WDA_LINK_LAYER_PROTOCOL_RAW_IP; + ctx->step++; + } else { + /* If loading WDA data format fails, fallback to 802.3 requested via CTL */ + ctx->step = PORT_OPEN_STEP_CLOSE_BEFORE_OPEN_WITH_DATA_FORMAT; + } + } else /* Go on to next step */ ctx->step++; - if (output) - qmi_message_wda_get_data_format_output_unref (output); - port_open_step (task); } static void -allocate_client_wda_ready (QmiDevice *device, +allocate_client_wda_ready (QmiDevice *device, GAsyncResult *res, - GTask *task) + GTask *task) { PortOpenContext *ctx; ctx = g_task_get_task_data (task); + ctx->wda = qmi_device_allocate_client_finish (device, res, NULL); if (!ctx->wda) { /* If no WDA supported, then we just fallback to reopening explicitly * requesting 802.3 in the CTL service. */ - ctx->step = PORT_OPEN_STEP_OPEN_WITH_DATA_FORMAT; + ctx->step = PORT_OPEN_STEP_CLOSE_BEFORE_OPEN_WITH_DATA_FORMAT; port_open_step (task); return; } @@ -299,13 +434,14 @@ } static void -qmi_device_open_first_ready (QmiDevice *qmi_device, +qmi_device_open_first_ready (QmiDevice *qmi_device, GAsyncResult *res, - GTask *task) + GTask *task) { PortOpenContext *ctx; ctx = g_task_get_task_data (task); + if (!qmi_device_open_finish (qmi_device, res, &ctx->error)) /* Error opening the device */ ctx->step = PORT_OPEN_STEP_LAST; @@ -342,39 +478,39 @@ static void port_open_step (GTask *task) { - MMPortQmi *self; + MMPortQmi *self; PortOpenContext *ctx; self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); switch (ctx->step) { case PORT_OPEN_STEP_FIRST: - mm_dbg ("Opening QMI device..."); + mm_obj_dbg (self, "Opening QMI device..."); ctx->step++; - /* Fall down to next step */ + /* Fall through */ case PORT_OPEN_STEP_CHECK_OPENING: - mm_dbg ("Checking if QMI device already opening..."); - if (self->priv->opening) { + mm_obj_dbg (self, "Checking if QMI device already opening..."); + if (self->priv->in_progress) { g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_IN_PROGRESS, - "QMI device already being opened"); + "QMI device open/close operation in progress"); g_object_unref (task); return; } ctx->step++; - /* Fall down to next step */ + /* Fall through */ case PORT_OPEN_STEP_CHECK_ALREADY_OPEN: - mm_dbg ("Checking if QMI device already open..."); + mm_obj_dbg (self, "Checking if QMI device already open..."); if (self->priv->qmi_device) { g_task_return_boolean (task, TRUE); g_object_unref (task); return; } ctx->step++; - /* Fall down to next step */ + /* Fall through */ case PORT_OPEN_STEP_DEVICE_NEW: { GFile *file; @@ -386,9 +522,9 @@ /* We flag in this point that we're opening. From now on, if we stop * for whatever reason, we should clear this flag. We do this by ensuring * that all callbacks go through the LAST step for completing. */ - self->priv->opening = TRUE; + self->priv->in_progress = TRUE; - mm_dbg ("Creating QMI device..."); + mm_obj_dbg (self, "Creating QMI device..."); qmi_device_new (file, g_task_get_cancellable (task), (GAsyncReadyCallback) qmi_device_new_ready, @@ -401,32 +537,42 @@ case PORT_OPEN_STEP_OPEN_WITHOUT_DATA_FORMAT: /* Now open the QMI device without any data format CTL flag */ - mm_dbg ("Opening device without data format update..."); + mm_obj_dbg (self, "Opening device without data format update..."); qmi_device_open (ctx->device, (QMI_DEVICE_OPEN_FLAGS_VERSION_INFO | QMI_DEVICE_OPEN_FLAGS_PROXY), - 20, + 45, g_task_get_cancellable (task), (GAsyncReadyCallback) qmi_device_open_first_ready, task); return; case PORT_OPEN_STEP_GET_KERNEL_DATA_FORMAT: - mm_dbg ("Querying kernel data format..."); - /* Try to gather expected data format from the sysfs file */ - ctx->kernel_data_format = qmi_device_get_expected_data_format (ctx->device, NULL); - /* If data format cannot be retrieved, we fallback to 802.3 via CTL */ - if (ctx->kernel_data_format == QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN) { - ctx->step = PORT_OPEN_STEP_OPEN_WITH_DATA_FORMAT; - port_open_step (task); - return; + /* Querying kernel data format is only expected when using qmi_wwan */ + if (mm_port_get_subsys (MM_PORT (self)) == MM_PORT_SUBSYS_USBMISC) { + mm_obj_dbg (self, "Querying kernel data format..."); + /* Try to gather expected data format from the sysfs file */ + ctx->kernel_data_format = qmi_device_get_expected_data_format (ctx->device, NULL); + /* If data format cannot be retrieved, we fallback to 802.3 via CTL */ + if (ctx->kernel_data_format == QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN) { + ctx->step = PORT_OPEN_STEP_CLOSE_BEFORE_OPEN_WITH_DATA_FORMAT; + port_open_step (task); + return; + } + } + /* For any driver other than qmi_wwan, assume raw-ip */ + else { + ctx->kernel_data_format = QMI_DEVICE_EXPECTED_DATA_FORMAT_RAW_IP; + mm_obj_dbg (self, "Assuming default kernel data format: %s", + qmi_device_expected_data_format_get_string (ctx->kernel_data_format)); } + ctx->step++; - /* Fall down to next step */ + /* Fall through */ case PORT_OPEN_STEP_ALLOCATE_WDA_CLIENT: /* Allocate WDA client */ - mm_dbg ("Allocating WDA client..."); + mm_obj_dbg (self, "Allocating WDA client..."); qmi_device_allocate_client (ctx->device, QMI_SERVICE_WDA, QMI_CID_NONE, @@ -438,8 +584,7 @@ case PORT_OPEN_STEP_GET_WDA_DATA_FORMAT: /* If we have WDA client, query current data format */ - g_assert (ctx->wda); - mm_dbg ("Querying device data format..."); + mm_obj_dbg (self, "Querying device data format..."); qmi_client_wda_get_data_format (QMI_CLIENT_WDA (ctx->wda), NULL, 10, @@ -451,9 +596,9 @@ case PORT_OPEN_STEP_CHECK_DATA_FORMAT: /* We now have the WDA data format and the kernel data format, if they're * equal, we're done */ - mm_dbg ("Checking data format: kernel %s, device %s", - qmi_device_expected_data_format_get_string (ctx->kernel_data_format), - qmi_wda_link_layer_protocol_get_string (ctx->llp)); + mm_obj_dbg (self, "Checking data format: kernel %s, device %s", + qmi_device_expected_data_format_get_string (ctx->kernel_data_format), + qmi_wda_link_layer_protocol_get_string (ctx->llp)); if (ctx->kernel_data_format == QMI_DEVICE_EXPECTED_DATA_FORMAT_802_3 && ctx->llp == QMI_WDA_LINK_LAYER_PROTOCOL_802_3) { @@ -472,11 +617,29 @@ } ctx->step++; - /* Fall down to next step */ + /* Fall through */ - case PORT_OPEN_STEP_SET_KERNEL_DATA_FORMAT: - /* Update the data format to be expected by the kernel */ - mm_dbg ("Updating kernel data format: %s", qmi_wda_link_layer_protocol_get_string (ctx->llp)); + case PORT_OPEN_STEP_SYNC_DATA_FORMAT: + /* For drivers other than qmi_wwan, the kernel data format was raw-ip + * by default, we need to ask the module to switch to it */ + if (mm_port_get_subsys (MM_PORT (self)) != MM_PORT_SUBSYS_USBMISC) { + g_autoptr(QmiMessageWdaSetDataFormatInput) input = NULL; + + g_assert (ctx->kernel_data_format == QMI_DEVICE_EXPECTED_DATA_FORMAT_RAW_IP); + input = qmi_message_wda_set_data_format_input_new (); + qmi_message_wda_set_data_format_input_set_link_layer_protocol (input, QMI_WDA_LINK_LAYER_PROTOCOL_RAW_IP, NULL); + qmi_client_wda_set_data_format (QMI_CLIENT_WDA (ctx->wda), + input, + 10, + g_task_get_cancellable (task), + (GAsyncReadyCallback) set_data_format_ready, + task); + return; + } + + /* If using the qmi_wwan driver, we ask the kernel to sync with the + * data format requested by the module */ + mm_obj_dbg (self, "Updating kernel data format: %s", qmi_wda_link_layer_protocol_get_string (ctx->llp)); if (ctx->llp == QMI_WDA_LINK_LAYER_PROTOCOL_802_3) { ctx->kernel_data_format = QMI_DEVICE_EXPECTED_DATA_FORMAT_802_3; self->priv->llp_is_raw_ip = FALSE; @@ -494,76 +657,97 @@ port_open_step (task); return; - case PORT_OPEN_STEP_OPEN_WITH_DATA_FORMAT: - /* Need to reopen setting 802.3 using CTL */ - mm_dbg ("Closing device to reopen it right away..."); - if (!qmi_device_close (ctx->device, &ctx->error)) { - mm_warn ("Couldn't close QMI device to reopen it"); - ctx->step = PORT_OPEN_STEP_LAST; - port_open_step (task); - return; - } + case PORT_OPEN_STEP_CLOSE_BEFORE_OPEN_WITH_DATA_FORMAT: + /* This fallback only applies when WDA unsupported */ + mm_obj_dbg (self, "Closing device to reopen it right away..."); + qmi_device_close_async (ctx->device, + 5, + g_task_get_cancellable (task), + (GAsyncReadyCallback) qmi_device_close_to_reopen_ready, + task); + return; - mm_dbg ("Reopening device with data format..."); + case PORT_OPEN_STEP_OPEN_WITH_DATA_FORMAT: { + QmiDeviceOpenFlags open_flags; + + /* Common open flags */ + open_flags = (QMI_DEVICE_OPEN_FLAGS_VERSION_INFO | + QMI_DEVICE_OPEN_FLAGS_PROXY | + QMI_DEVICE_OPEN_FLAGS_NET_NO_QOS_HEADER); + + /* Need to reopen setting 802.3/raw-ip using CTL */ + if (ctx->kernel_data_format == QMI_DEVICE_EXPECTED_DATA_FORMAT_RAW_IP) + open_flags |= QMI_DEVICE_OPEN_FLAGS_NET_RAW_IP; + else + open_flags |= QMI_DEVICE_OPEN_FLAGS_NET_802_3; + + mm_obj_dbg (self, "Reopening device with data format: %s...", + qmi_device_expected_data_format_get_string (ctx->kernel_data_format)); qmi_device_open (ctx->device, - (QMI_DEVICE_OPEN_FLAGS_VERSION_INFO | - QMI_DEVICE_OPEN_FLAGS_PROXY | - QMI_DEVICE_OPEN_FLAGS_NET_802_3 | - QMI_DEVICE_OPEN_FLAGS_NET_NO_QOS_HEADER), + open_flags, 10, g_task_get_cancellable (task), (GAsyncReadyCallback) qmi_device_open_second_ready, task); return; + } case PORT_OPEN_STEP_LAST: - mm_dbg ("QMI port open operation finished"); + if (ctx->error) { + mm_obj_dbg (self, "QMI port open operation failed: %s", ctx->error->message); - /* Reset opening flag */ - self->priv->opening = FALSE; + if (ctx->device) { + qmi_device_close_async (ctx->device, + 5, + NULL, + (GAsyncReadyCallback) qmi_device_close_on_error_ready, + task); + return; + } - if (ctx->error) { - /* Propagate error */ - if (ctx->device) - qmi_device_close (ctx->device, NULL); - g_task_return_error (task, ctx->error); - ctx->error = NULL; - } else { - /* Store device in private info */ - g_assert (ctx->device); - g_assert (!self->priv->qmi_device); - self->priv->qmi_device = g_object_ref (ctx->device); - g_task_return_boolean (task, TRUE); + port_open_complete_with_error (task); + return; } + + mm_obj_dbg (self, "QMI port open operation finished successfully"); + + /* Store device in private info */ + g_assert (ctx->device); + g_assert (!self->priv->qmi_device); + self->priv->qmi_device = g_object_ref (ctx->device); + self->priv->in_progress = FALSE; + g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + g_assert_not_reached (); } } void -mm_port_qmi_open (MMPortQmi *self, - gboolean set_data_format, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) +mm_port_qmi_open (MMPortQmi *self, + gboolean set_data_format, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) { PortOpenContext *ctx; - GTask *task; - - g_return_if_fail (MM_IS_PORT_QMI (self)); + GTask *task; ctx = g_slice_new0 (PortOpenContext); ctx->step = PORT_OPEN_STEP_FIRST; ctx->set_data_format = set_data_format; - ctx->kernel_data_format = QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN; ctx->llp = QMI_WDA_LINK_LAYER_PROTOCOL_UNKNOWN; + ctx->kernel_data_format = QMI_DEVICE_EXPECTED_DATA_FORMAT_UNKNOWN; task = g_task_new (self, cancellable, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify)port_open_context_free); - port_open_step (task); } +/*****************************************************************************/ + gboolean mm_port_qmi_is_open (MMPortQmi *self) { @@ -572,23 +756,88 @@ return !!self->priv->qmi_device; } -void -mm_port_qmi_close (MMPortQmi *self) +/*****************************************************************************/ + +typedef struct { + QmiDevice *qmi_device; +} PortQmiCloseContext; + +static void +port_qmi_close_context_free (PortQmiCloseContext *ctx) { - GList *l; - GError *error = NULL; + g_clear_object (&ctx->qmi_device); + g_slice_free (PortQmiCloseContext, ctx); +} + +gboolean +mm_port_qmi_close_finish (MMPortQmi *self, + GAsyncResult *res, + GError **error) +{ + return g_task_propagate_boolean (G_TASK (res), error); +} + +static void +qmi_device_close_ready (QmiDevice *qmi_device, + GAsyncResult *res, + GTask *task) +{ + GError *error = NULL; + MMPortQmi *self; + + self = g_task_get_source_object (task); + + g_assert (!self->priv->qmi_device); + self->priv->in_progress = FALSE; + + if (!qmi_device_close_finish (qmi_device, res, &error)) + g_task_return_error (task, error); + else + g_task_return_boolean (task, TRUE); + g_object_unref (task); +} + +void +mm_port_qmi_close (MMPortQmi *self, + GAsyncReadyCallback callback, + gpointer user_data) +{ + PortQmiCloseContext *ctx; + GTask *task; + GList *l; g_return_if_fail (MM_IS_PORT_QMI (self)); - if (!self->priv->qmi_device) + task = g_task_new (self, NULL, callback, user_data); + + if (self->priv->in_progress) { + g_task_return_new_error (task, + MM_CORE_ERROR, + MM_CORE_ERROR_IN_PROGRESS, + "QMI device open/close operation in progress"); + g_object_unref (task); return; + } + + if (!self->priv->qmi_device) { + g_task_return_boolean (task, TRUE); + g_object_unref (task); + return; + } + + self->priv->in_progress = TRUE; + + /* Store device to close in the context */ + ctx = g_slice_new0 (PortQmiCloseContext); + ctx->qmi_device = g_steal_pointer (&self->priv->qmi_device); + g_task_set_task_data (task, ctx, (GDestroyNotify)port_qmi_close_context_free); /* Release all allocated clients */ for (l = self->priv->services; l; l = g_list_next (l)) { ServiceInfo *info = l->data; - mm_dbg ("Releasing client for service '%s'...", qmi_service_get_string (info->service)); - qmi_device_release_client (self->priv->qmi_device, + mm_obj_dbg (self, "Releasing client for service '%s'...", qmi_service_get_string (info->service)); + qmi_device_release_client (ctx->qmi_device, info->client, QMI_DEVICE_RELEASE_CLIENT_FLAGS_RELEASE_CID, 3, NULL, NULL, NULL); @@ -597,24 +846,22 @@ g_list_free_full (self->priv->services, g_free); self->priv->services = NULL; - /* Close and release the device */ - if (!qmi_device_close (self->priv->qmi_device, &error)) { - mm_warn ("Couldn't properly close QMI device: %s", - error->message); - g_error_free (error); - } - - g_clear_object (&self->priv->qmi_device); + qmi_device_close_async (ctx->qmi_device, + 5, + NULL, + (GAsyncReadyCallback)qmi_device_close_ready, + task); } /*****************************************************************************/ MMPortQmi * -mm_port_qmi_new (const gchar *name) +mm_port_qmi_new (const gchar *name, + MMPortSubsys subsys) { return MM_PORT_QMI (g_object_new (MM_TYPE_PORT_QMI, MM_PORT_DEVICE, name, - MM_PORT_SUBSYS, MM_PORT_SUBSYS_USB, + MM_PORT_SUBSYS, subsys, MM_PORT_TYPE, MM_PORT_TYPE_QMI, NULL)); } diff -Nru modemmanager-1.12.8/src/mm-port-qmi.h modemmanager-1.16.6/src/mm-port-qmi.h --- modemmanager-1.12.8/src/mm-port-qmi.h 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-port-qmi.h 2021-06-06 21:40:59.000000000 +0800 @@ -45,19 +45,25 @@ }; GType mm_port_qmi_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMPortQmi, g_object_unref) -MMPortQmi *mm_port_qmi_new (const gchar *name); - -void mm_port_qmi_open (MMPortQmi *self, - gboolean set_data_format, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data); -gboolean mm_port_qmi_open_finish (MMPortQmi *self, - GAsyncResult *res, - GError **error); -gboolean mm_port_qmi_is_open (MMPortQmi *self); -void mm_port_qmi_close (MMPortQmi *self); +MMPortQmi *mm_port_qmi_new (const gchar *name, + MMPortSubsys subsys); +void mm_port_qmi_open (MMPortQmi *self, + gboolean set_data_format, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean mm_port_qmi_open_finish (MMPortQmi *self, + GAsyncResult *res, + GError **error); +gboolean mm_port_qmi_is_open (MMPortQmi *self); +void mm_port_qmi_close (MMPortQmi *self, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean mm_port_qmi_close_finish (MMPortQmi *self, + GAsyncResult *res, + GError **error); typedef enum { MM_PORT_QMI_FLAG_DEFAULT = 0, @@ -75,6 +81,10 @@ GAsyncResult *res, GError **error); +void mm_port_qmi_release_client (MMPortQmi *self, + QmiService service, + MMPortQmiFlag flag); + QmiClient *mm_port_qmi_peek_client (MMPortQmi *self, QmiService service, MMPortQmiFlag flag); diff -Nru modemmanager-1.12.8/src/mm-port-serial-at.c modemmanager-1.16.6/src/mm-port-serial-at.c --- modemmanager-1.12.8/src/mm-port-serial-at.c 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-port-serial-at.c 2021-06-06 21:40:59.000000000 +0800 @@ -22,7 +22,7 @@ #include #include "mm-port-serial-at.h" -#include "mm-log.h" +#include "mm-log-object.h" G_DEFINE_TYPE (MMPortSerialAt, mm_port_serial_at, MM_TYPE_PORT_SERIAL) @@ -148,7 +148,7 @@ /* Parse it; returns FALSE if there is nothing we can do with this * response yet. */ - if (!self->priv->response_parser_fn (self->priv->response_parser_user_data, string, &inner_error)) { + if (!self->priv->response_parser_fn (self->priv->response_parser_user_data, string, self, &inner_error)) { /* Copy what we got back in the response buffer. */ g_byte_array_append (response, (const guint8 *) string->str, string->len); g_string_free (string, TRUE); @@ -435,10 +435,13 @@ } static void -debug_log (MMPortSerial *port, const char *prefix, const char *buf, gsize len) +debug_log (MMPortSerial *self, + const gchar *prefix, + const gchar *buf, + gsize len) { static GString *debug = NULL; - const char *s; + const char *s; if (!debug) debug = g_string_sized_new (256); @@ -461,7 +464,7 @@ } g_string_append_c (debug, '\''); - mm_dbg ("(%s): %s", mm_port_get_device (MM_PORT (port)), debug->str); + mm_obj_dbg (self, "%s", debug->str); g_string_truncate (debug, 0); } @@ -470,6 +473,8 @@ { g_return_if_fail (self != NULL); g_return_if_fail (MM_IS_PORT_SERIAL_AT (self)); + + /* MM_PORT_SERIAL_AT_FLAG_NONE_NO_GENERIC is not expected */ g_return_if_fail (flags <= (MM_PORT_SERIAL_AT_FLAG_PRIMARY | MM_PORT_SERIAL_AT_FLAG_SECONDARY | MM_PORT_SERIAL_AT_FLAG_PPP | @@ -497,7 +502,7 @@ if (!self->priv->init_sequence) return; - mm_dbg ("(%s): running init sequence...", mm_port_get_device (MM_PORT (self))); + mm_obj_dbg (self, "running init sequence..."); /* Just queue the init commands, don't wait for reply */ for (i = 0; self->priv->init_sequence[i]; i++) { @@ -524,17 +529,13 @@ /*****************************************************************************/ MMPortSerialAt * -mm_port_serial_at_new (const char *name, - MMPortSubsys subsys) +mm_port_serial_at_new (const char *name, + MMPortSubsys subsys) { - g_return_val_if_fail (subsys == MM_PORT_SUBSYS_TTY || - subsys == MM_PORT_SUBSYS_USB || - subsys == MM_PORT_SUBSYS_UNIX, NULL); - return MM_PORT_SERIAL_AT (g_object_new (MM_TYPE_PORT_SERIAL_AT, MM_PORT_DEVICE, name, MM_PORT_SUBSYS, subsys, - MM_PORT_TYPE, MM_PORT_TYPE_AT, + MM_PORT_TYPE, MM_PORT_TYPE_AT, NULL)); } diff -Nru modemmanager-1.12.8/src/mm-port-serial-at.h modemmanager-1.16.6/src/mm-port-serial-at.h --- modemmanager-1.12.8/src/mm-port-serial-at.h 2017-09-14 22:00:54.000000000 +0800 +++ modemmanager-1.16.6/src/mm-port-serial-at.h 2021-06-06 21:40:59.000000000 +0800 @@ -42,20 +42,24 @@ * only when connecting is port 0 opened for dialing (ATD) and PPP */ typedef enum { /*< underscore_name=mm_port_serial_at_flag >*/ - MM_PORT_SERIAL_AT_FLAG_NONE = 0, + MM_PORT_SERIAL_AT_FLAG_NONE = 0, /* This port is preferred for command and status */ - MM_PORT_SERIAL_AT_FLAG_PRIMARY = 1 << 0, + MM_PORT_SERIAL_AT_FLAG_PRIMARY = 1 << 0, /* Use port for command and status if the primary port is connected */ - MM_PORT_SERIAL_AT_FLAG_SECONDARY = 1 << 1, + MM_PORT_SERIAL_AT_FLAG_SECONDARY = 1 << 1, /* This port should be used for PPP */ - MM_PORT_SERIAL_AT_FLAG_PPP = 1 << 2, + MM_PORT_SERIAL_AT_FLAG_PPP = 1 << 2, /* This port should be used for GPS control */ - MM_PORT_SERIAL_AT_FLAG_GPS_CONTROL = 1 << 3, + MM_PORT_SERIAL_AT_FLAG_GPS_CONTROL = 1 << 3, + /* Helper flag to allow plugins specify that generic tags shouldn't be + * applied */ + MM_PORT_SERIAL_AT_FLAG_NONE_NO_GENERIC = 1 << 4, } MMPortSerialAtFlag; -typedef gboolean (*MMPortSerialAtResponseParserFn) (gpointer user_data, - GString *response, - GError **error); +typedef gboolean (*MMPortSerialAtResponseParserFn) (gpointer user_data, + GString *response, + gpointer log_object, + GError **error); typedef void (*MMPortSerialAtUnsolicitedMsgFn) (MMPortSerialAt *port, GMatchInfo *match_info, @@ -76,6 +80,7 @@ }; GType mm_port_serial_at_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMPortSerialAt, g_object_unref) MMPortSerialAt *mm_port_serial_at_new (const char *name, MMPortSubsys subsys); diff -Nru modemmanager-1.12.8/src/mm-port-serial-gps.c modemmanager-1.16.6/src/mm-port-serial-gps.c --- modemmanager-1.12.8/src/mm-port-serial-gps.c 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-port-serial-gps.c 2021-06-06 21:40:59.000000000 +0800 @@ -19,7 +19,7 @@ #include #include "mm-port-serial-gps.h" -#include "mm-log.h" +#include "mm-log-object.h" G_DEFINE_TYPE (MMPortSerialGps, mm_port_serial_gps, MM_TYPE_PORT_SERIAL) @@ -135,10 +135,13 @@ /*****************************************************************************/ static void -debug_log (MMPortSerial *port, const char *prefix, const char *buf, gsize len) +debug_log (MMPortSerial *self, + const gchar *prefix, + const gchar *buf, + gsize len) { static GString *debug = NULL; - const char *s; + const gchar *s; if (!debug) debug = g_string_sized_new (256); @@ -161,7 +164,7 @@ } g_string_append_c (debug, '\''); - mm_dbg ("(%s): %s", mm_port_get_device (MM_PORT (port)), debug->str); + mm_obj_dbg (self, "%s", debug->str); g_string_truncate (debug, 0); } diff -Nru modemmanager-1.12.8/src/mm-port-serial-gps.h modemmanager-1.16.6/src/mm-port-serial-gps.h --- modemmanager-1.12.8/src/mm-port-serial-gps.h 2017-09-14 22:00:54.000000000 +0800 +++ modemmanager-1.16.6/src/mm-port-serial-gps.h 2021-06-06 21:40:59.000000000 +0800 @@ -46,6 +46,7 @@ }; GType mm_port_serial_gps_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMPortSerialGps, g_object_unref) MMPortSerialGps *mm_port_serial_gps_new (const char *name); diff -Nru modemmanager-1.12.8/src/mm-port-serial-qcdm.c modemmanager-1.16.6/src/mm-port-serial-qcdm.c --- modemmanager-1.12.8/src/mm-port-serial-qcdm.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-port-serial-qcdm.c 2021-06-06 21:40:59.000000000 +0800 @@ -27,7 +27,7 @@ #include "libqcdm/src/utils.h" #include "libqcdm/src/errors.h" #include "libqcdm/src/dm-commands.h" -#include "mm-log.h" +#include "mm-log-object.h" G_DEFINE_TYPE (MMPortSerialQcdm, mm_port_serial_qcdm, MM_TYPE_PORT_SERIAL) @@ -40,7 +40,8 @@ static gboolean find_qcdm_start (GByteArray *response, gsize *start) { - int i, last = -1; + guint i; + gint last = -1; /* Look for 3 bytes and a QCDM frame marker, ie enough data for a valid * frame. There will usually be three cases here; (1) a QCDM frame @@ -49,8 +50,13 @@ * uses HDLC framing (like Sierra CnS) that starts and ends with 0x7E. */ for (i = 0; i < response->len; i++) { + /* Marker found */ if (response->data[i] == 0x7E) { - if (i > last + 3) { + /* If we didn't get an initial marker, count at least 3 bytes since + * origin; if we did get an initial marker, count at least 3 bytes + * since the marker. + */ + if (((last == -1) && (i >= 3)) || ((last >= 0) && (i > (guint)(last + 3)))) { /* Got a full QCDM frame; 3 non-0x7E bytes and a terminator */ if (start) *start = last + 1; @@ -200,10 +206,13 @@ } static void -debug_log (MMPortSerial *port, const char *prefix, const char *buf, gsize len) +debug_log (MMPortSerial *self, + const gchar *prefix, + const gchar *buf, + gsize len) { static GString *debug = NULL; - const char *s = buf; + const gchar *s = buf; if (!debug) debug = g_string_sized_new (512); @@ -213,7 +222,7 @@ while (len--) g_string_append_printf (debug, " %02x", (guint8) (*s++ & 0xFF)); - mm_dbg ("(%s): %s", mm_port_get_device (MM_PORT (port)), debug->str); + mm_obj_dbg (self, "%s", debug->str); g_string_truncate (debug, 0); } @@ -341,11 +350,12 @@ /*****************************************************************************/ MMPortSerialQcdm * -mm_port_serial_qcdm_new (const char *name) +mm_port_serial_qcdm_new (const char *name, + MMPortSubsys subsys) { return MM_PORT_SERIAL_QCDM (g_object_new (MM_TYPE_PORT_SERIAL_QCDM, MM_PORT_DEVICE, name, - MM_PORT_SUBSYS, MM_PORT_SUBSYS_TTY, + MM_PORT_SUBSYS, subsys, MM_PORT_TYPE, MM_PORT_TYPE_QCDM, MM_PORT_SERIAL_SEND_DELAY, (guint64) 0, NULL)); diff -Nru modemmanager-1.12.8/src/mm-port-serial-qcdm.h modemmanager-1.16.6/src/mm-port-serial-qcdm.h --- modemmanager-1.12.8/src/mm-port-serial-qcdm.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-port-serial-qcdm.h 2021-06-06 21:40:59.000000000 +0800 @@ -43,8 +43,10 @@ }; GType mm_port_serial_qcdm_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMPortSerialQcdm, g_object_unref) -MMPortSerialQcdm *mm_port_serial_qcdm_new (const char *name); +MMPortSerialQcdm *mm_port_serial_qcdm_new (const char *name, + MMPortSubsys subsys); MMPortSerialQcdm *mm_port_serial_qcdm_new_fd (int fd); void mm_port_serial_qcdm_command (MMPortSerialQcdm *self, diff -Nru modemmanager-1.12.8/src/mm-port-serial.c modemmanager-1.16.6/src/mm-port-serial.c --- modemmanager-1.12.8/src/mm-port-serial.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-port-serial.c 2021-06-06 21:40:59.000000000 +0800 @@ -34,7 +34,7 @@ #include #include "mm-port-serial.h" -#include "mm-log.h" +#include "mm-log-object.h" #include "mm-helper-enums-types.h" static gboolean port_serial_queue_process (gpointer data); @@ -290,7 +290,7 @@ static int parse_bits (guint i) { - int bits; + int bits = -1; switch (i) { case 5: @@ -306,8 +306,7 @@ bits = CS8; break; default: - mm_warn ("Invalid bits (%d). Valid values are 5, 6, 7, 8.", i); - bits = CS8; + g_assert_not_reached (); } return bits; @@ -316,7 +315,7 @@ static int parse_parity (char c) { - int parity; + int parity = -1; switch (c) { case 'n': @@ -332,8 +331,7 @@ parity = PARENB | PARODD; break; default: - mm_warn ("Invalid parity (%c). Valid values are n, e, o", c); - parity = 0; + g_assert_not_reached (); } return parity; @@ -342,7 +340,7 @@ static int parse_stopbits (guint i) { - int stopbits; + int stopbits = -1; switch (i) { case 1: @@ -352,8 +350,7 @@ stopbits = CSTOPB; break; default: - mm_warn ("Invalid stop bits (%d). Valid values are 1 and 2)", i); - stopbits = 0; + g_assert_not_reached (); } return stopbits; @@ -401,11 +398,9 @@ memset (&other, 0, sizeof (struct termios)); errno = 0; if (tcgetattr (fd, &other) != 0) - mm_dbg ("(%s): couldn't get serial port attributes after setting them: %s", - mm_port_get_device (MM_PORT (self)), g_strerror (errno)); + mm_obj_dbg (self, "couldn't get serial port attributes after setting them: %s", g_strerror (errno)); else if (memcmp (options, &other, sizeof (struct termios)) != 0) - mm_dbg ("(%s): port attributes not fully set", - mm_port_get_device (MM_PORT (self))); + mm_obj_dbg (self, "port attributes not fully set"); #undef MAX_TCSETATTR_RETRIES @@ -433,19 +428,19 @@ /* setup the requested flags */ switch (flow_control) { case MM_FLOW_CONTROL_XON_XOFF: - mm_dbg ("(%s): enabling XON/XOFF flow control", mm_port_get_device (MM_PORT (self))); + mm_obj_dbg (self, "enabling XON/XOFF flow control"); options->c_iflag |= (IXON | IXOFF | IXANY); break; case MM_FLOW_CONTROL_RTS_CTS: - mm_dbg ("(%s): enabling RTS/CTS flow control", mm_port_get_device (MM_PORT (self))); + mm_obj_dbg (self, "enabling RTS/CTS flow control"); options->c_cflag |= (CRTSCTS); break; case MM_FLOW_CONTROL_NONE: case MM_FLOW_CONTROL_UNKNOWN: if (had_xon_xoff) - mm_dbg ("(%s): disabling XON/XOFF flow control", mm_port_get_device (MM_PORT (self))); + mm_obj_dbg (self, "disabling XON/XOFF flow control"); if (had_rts_cts) - mm_dbg ("(%s): disabling RTS/CTS flow control", mm_port_get_device (MM_PORT (self))); + mm_obj_dbg (self, "disabling RTS/CTS flow control"); break; default: g_assert_not_reached (); @@ -467,13 +462,9 @@ if (mm_port_get_subsys (MM_PORT (self)) != MM_PORT_SUBSYS_TTY) return TRUE; - mm_dbg ("(%s): setting up baudrate: %u", - mm_port_get_device (MM_PORT (self)), - self->priv->baud); + mm_obj_dbg (self, "setting up baudrate: %u", self->priv->baud); if (!parse_baudrate (self->priv->baud, &speed) || speed == B0) { - mm_warn ("(%s): baudrate invalid: %u; defaulting to 57600", - mm_port_get_device (MM_PORT (self)), - self->priv->baud); + mm_obj_warn (self, "baudrate invalid: %u; defaulting to 57600", self->priv->baud); speed = B57600; } @@ -482,11 +473,8 @@ stopbits = parse_stopbits (self->priv->stopbits); memset (&stbuf, 0, sizeof (struct termios)); - if (tcgetattr (fd, &stbuf) != 0) { - mm_warn ("(%s): tcgetattr() error: %d", - mm_port_get_device (MM_PORT (self)), - errno); - } + if (tcgetattr (fd, &stbuf) != 0) + mm_obj_warn (self, "error getting serial port attributes: %s", g_strerror (errno)); stbuf.c_cflag &= ~(CBAUD | CSIZE | CSTOPB | PARENB | PARODD | CRTSCTS); stbuf.c_iflag &= ~(IGNCR | ICRNL | IUCLC | INPCK | IXON | IXOFF | IXANY ); @@ -526,13 +514,10 @@ gchar *str; str = mm_flow_control_build_string_from_mask (self->priv->flow_control); - mm_dbg ("(%s): flow control explicitly requested for device is: %s", - mm_port_get_device (MM_PORT (self)), - str ? str : "unknown"); + mm_obj_dbg (self, "flow control explicitly requested for device is: %s", str ? str : "unknown"); g_free (str); } else - mm_dbg ("(%s): no flow control explicitly requested for device", - mm_port_get_device (MM_PORT (self))); + mm_obj_dbg (self, "no flow control explicitly requested for device"); set_flow_control_termios (self, self->priv->flow_control, &stbuf); @@ -540,7 +525,10 @@ } static void -serial_debug (MMPortSerial *self, const char *prefix, const char *buf, gsize len) +serial_debug (MMPortSerial *self, + const gchar *prefix, + const gchar *buf, + gsize len) { g_return_if_fail (len > 0); @@ -572,7 +560,7 @@ /* Only print command the first time */ if (ctx->started == FALSE) { ctx->started = TRUE; - serial_debug (self, "-->", (const char *) ctx->command->data, ctx->command->len); + serial_debug (self, "-->", (const gchar *) ctx->command->data, ctx->command->len); } if (self->priv->send_delay == 0 || mm_port_get_subsys (MM_PORT (self)) != MM_PORT_SUBSYS_TTY) { @@ -606,7 +594,8 @@ ctx->idx += written; break; } - /* If written == 0, treat as EAGAIN, so fall down */ + /* If written == 0 treat as EAGAIN */ + /* Fall through */ case G_IO_STATUS_AGAIN: /* We're in a non-blocking channel and therefore we're up to receive @@ -618,10 +607,13 @@ g_signal_emit (self, signals[TIMED_OUT], 0, self->priv->n_consecutive_timeouts); g_set_error (error, MM_SERIAL_ERROR, MM_SERIAL_ERROR_SEND_FAILED, - "Sending command failed: '%s'", strerror (errno)); + "Sending command failed: '%s'", g_strerror (errno)); return FALSE; } break; + + default: + g_assert_not_reached (); } } /* Socket based setup */ @@ -650,7 +642,7 @@ self->priv->n_consecutive_timeouts++; g_signal_emit (self, signals[TIMED_OUT], 0, self->priv->n_consecutive_timeouts); g_set_error (error, MM_SERIAL_ERROR, MM_SERIAL_ERROR_SEND_FAILED, - "Sending command failed: '%s'", strerror (errno)); + "Sending command failed: '%s'", g_strerror (errno)); return FALSE; } @@ -945,6 +937,8 @@ case MM_PORT_SERIAL_RESPONSE_NONE: /* Nothing to do this time */ break; + default: + g_assert_not_reached (); } } @@ -956,15 +950,12 @@ gsize bytes_read; GIOStatus status = G_IO_STATUS_NORMAL; CommandContext *ctx; - const char *device; GError *error = NULL; gboolean iterate = TRUE; gboolean keep_source = G_SOURCE_CONTINUE; if (condition & G_IO_HUP) { - device = mm_port_get_device (MM_PORT (self)); - mm_dbg ("(%s) unexpected port hangup!", device); - + mm_obj_dbg (self, "unexpected port hangup!"); if (self->priv->response->len) g_byte_array_remove_range (self->priv->response, 0, self->priv->response->len); port_serial_close_force (self); @@ -992,11 +983,8 @@ &bytes_read, &error); if (status == G_IO_STATUS_ERROR) { - if (error) { - mm_warn ("(%s): read error: %s", - mm_port_get_device (MM_PORT (self)), - error->message); - } + if (error) + mm_obj_warn (self, "read error: %s", error->message); g_clear_error (&error); } } else if (self->priv->socket) { @@ -1013,9 +1001,7 @@ status = G_IO_STATUS_AGAIN; else status = G_IO_STATUS_ERROR; - mm_warn ("(%s): receive error: %s", - mm_port_get_device (MM_PORT (self)), - error->message); + mm_obj_warn (self, "receive error: %s", error->message); g_clear_error (&error); } else { bytes_read = (gsize) sbytes_read; @@ -1134,11 +1120,9 @@ connected = mm_port_get_connected (MM_PORT (self)); if (self->priv->fd >= 0 && ioctl (self->priv->fd, (connected ? TIOCNXCL : TIOCEXCL)) < 0) { - mm_warn ("(%s): could not %s serial port lock: (%d) %s", - mm_port_get_device (MM_PORT (self)), - connected ? "drop" : "re-acquire", - errno, - strerror (errno)); + mm_obj_warn (self, "could not %s serial port lock: %s", + connected ? "drop" : "re-acquire", + g_strerror (errno)); if (!connected) { // FIXME: do something here, maybe try again in a few seconds or // close the port and error out? @@ -1194,7 +1178,7 @@ goto success; } - mm_dbg ("(%s) opening serial port...", device); + mm_obj_dbg (self, "opening serial port..."); g_get_current_time (&tv_start); @@ -1218,7 +1202,6 @@ MM_SERIAL_ERROR, (errno == ENODEV) ? MM_SERIAL_ERROR_OPEN_FAILED_NO_DEVICE : MM_SERIAL_ERROR_OPEN_FAILED, "Could not open serial device %s: %s", device, strerror (errno_save)); - mm_warn ("(%s) could not open serial device (%d)", device, errno_save); return FALSE; } } @@ -1230,7 +1213,6 @@ errno_save = errno; g_set_error (error, MM_SERIAL_ERROR, MM_SERIAL_ERROR_OPEN_FAILED, "Could not lock serial device %s: %s", device, strerror (errno_save)); - mm_warn ("(%s) could not lock serial device (%d)", device, errno_save); goto error; } @@ -1244,21 +1226,20 @@ if (ioctl (self->priv->fd, TIOCGSERIAL, &sinfo) == 0) { sinfo.closing_wait = ASYNC_CLOSING_WAIT_NONE; if (ioctl (self->priv->fd, TIOCSSERIAL, &sinfo) < 0) - mm_warn ("(%s): couldn't set serial port closing_wait to none: %s", - device, g_strerror (errno)); + mm_obj_warn (self, "couldn't set serial port closing_wait to none: %s", g_strerror (errno)); } } g_warn_if_fail (MM_PORT_SERIAL_GET_CLASS (self)->config_fd); if (self->priv->fd >= 0 && !MM_PORT_SERIAL_GET_CLASS (self)->config_fd (self, self->priv->fd, error)) { - mm_dbg ("(%s) failed to configure serial device", device); + mm_obj_dbg (self, "failed to configure serial device"); goto error; } g_get_current_time (&tv_end); if (tv_end.tv_sec - tv_start.tv_sec > 7) - mm_warn ("(%s): open blocked by driver for more than 7 seconds!", device); + mm_obj_warn (self, "open blocked by driver for more than 7 seconds!"); if (mm_port_get_subsys (MM_PORT (self)) != MM_PORT_SUBSYS_UNIX) { /* Create new GIOChannel */ @@ -1324,7 +1305,7 @@ success: self->priv->open_count++; - mm_dbg ("(%s) device open count is %d (open)", device, self->priv->open_count); + mm_obj_dbg (self, "device open count is %d (open)", self->priv->open_count); /* Run additional port config if just opened */ if (self->priv->open_count == 1 && MM_PORT_SERIAL_GET_CLASS (self)->config) @@ -1333,7 +1314,7 @@ return TRUE; error: - mm_warn ("(%s) failed to open serial device", device); + mm_obj_warn (self, "failed to open serial device"); if (self->priv->iochannel) { g_io_channel_unref (self->priv->iochannel); @@ -1366,8 +1347,7 @@ static void _close_internal (MMPortSerial *self, gboolean force) { - const char *device; - int i; + guint i; g_return_if_fail (MM_IS_PORT_SERIAL (self)); @@ -1378,9 +1358,7 @@ self->priv->open_count--; } - device = mm_port_get_device (MM_PORT (self)); - - mm_dbg ("(%s) device open count is %d (close)", device, self->priv->open_count); + mm_obj_dbg (self, "device open count is %d (close)", self->priv->open_count); if (self->priv->open_count > 0) return; @@ -1399,7 +1377,7 @@ GTimeVal tv_start, tv_end; struct serial_struct sinfo = { 0 }; - mm_dbg ("(%s) closing serial port...", device); + mm_obj_dbg (self, "closing serial port..."); mm_port_set_connected (MM_PORT (self), FALSE); @@ -1412,11 +1390,10 @@ */ if (ioctl (self->priv->fd, TIOCGSERIAL, &sinfo) == 0) { if (sinfo.closing_wait != ASYNC_CLOSING_WAIT_NONE) { - mm_warn ("(%s): serial port closing_wait was reset!", device); + mm_obj_warn (self, "serial port closing_wait was reset!"); sinfo.closing_wait = ASYNC_CLOSING_WAIT_NONE; if (ioctl (self->priv->fd, TIOCSSERIAL, &sinfo) < 0) - mm_warn ("(%s): couldn't set serial port closing_wait to none: %s", - device, g_strerror (errno)); + mm_obj_warn (self, "couldn't set serial port closing_wait to none: %s", g_strerror (errno)); } } @@ -1449,7 +1426,7 @@ g_get_current_time (&tv_end); - mm_dbg ("(%s) serial port closed", device); + mm_obj_dbg (self, "serial port closed"); /* Some ports don't respond to data and when close is called * the serial layer waits up to 30 second (closing_wait) for @@ -1457,7 +1434,7 @@ * Log that. See GNOME bug #630670 for more details. */ if (tv_end.tv_sec - tv_start.tv_sec > 7) - mm_warn ("(%s): close blocked by driver for more than 7 seconds!", device); + mm_obj_warn (self, "close blocked by driver for more than 7 seconds!"); } /* Clear the command queue */ @@ -1511,7 +1488,7 @@ if (self->priv->forced_close) return; - mm_dbg ("(%s) forced to close port", mm_port_get_device (MM_PORT (self))); + mm_obj_dbg (self, "forced to close port"); /* Mark as having forced the close, so that we don't warn about incorrect * open counts */ @@ -1648,9 +1625,7 @@ return; } - mm_dbg ("(%s) reopening port (%u)", - mm_port_get_device (MM_PORT (self)), - ctx->initial_open_count); + mm_obj_dbg (self, "reopening port (%u)", ctx->initial_open_count); for (i = 0; i < ctx->initial_open_count; i++) mm_port_serial_close (self); @@ -1893,16 +1868,14 @@ /* Return if current settings are already what we want */ if (!set_flow_control_termios (self, flow_control, &options)) { - mm_dbg ("(%s): no need to change flow control settings: already %s", - mm_port_get_device (MM_PORT (self)), flow_control_str); + mm_obj_dbg (self, "no need to change flow control settings: already %s", flow_control_str); goto out; } if (!internal_tcsetattr (self, self->priv->fd, &options, &inner_error)) goto out; - mm_dbg ("(%s): flow control settings updated to %s", - mm_port_get_device (MM_PORT (self)), flow_control_str); + mm_obj_dbg (self, "flow control settings updated to %s", flow_control_str); out: g_free (flow_control_str); diff -Nru modemmanager-1.12.8/src/mm-port-serial.h modemmanager-1.16.6/src/mm-port-serial.h --- modemmanager-1.12.8/src/mm-port-serial.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-port-serial.h 2021-06-06 21:40:59.000000000 +0800 @@ -93,12 +93,12 @@ /* Called to configure the serial port after it's opened. Errors, if any, * should get ignored. */ - void (*config) (MMPortSerial *self); + void (*config) (MMPortSerial *self); void (*debug_log) (MMPortSerial *self, - const char *prefix, - const char *buf, - gsize len); + const gchar *prefix, + const gchar *buf, + gsize len); /* Signals */ void (*buffer_full) (MMPortSerial *port, const GByteArray *buffer); @@ -107,6 +107,7 @@ }; GType mm_port_serial_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMPortSerial, g_object_unref) MMPortSerial *mm_port_serial_new (const char *name, MMPortType ptype); diff -Nru modemmanager-1.12.8/src/mm-port.c modemmanager-1.16.6/src/mm-port.c --- modemmanager-1.12.8/src/mm-port.c 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-port.c 2021-06-06 21:40:59.000000000 +0800 @@ -19,9 +19,13 @@ #include #include "mm-port.h" -#include "mm-log.h" +#include "mm-port-enums-types.h" +#include "mm-log-object.h" -G_DEFINE_TYPE (MMPort, mm_port, G_TYPE_OBJECT) +static void log_object_iface_init (MMLogObjectInterface *iface); + +G_DEFINE_TYPE_EXTENDED (MMPort, mm_port, G_TYPE_OBJECT, 0, + G_IMPLEMENT_INTERFACE (MM_TYPE_LOG_OBJECT, log_object_iface_init)) enum { PROP_0, @@ -88,10 +92,7 @@ if (self->priv->connected != connected) { self->priv->connected = connected; g_object_notify (G_OBJECT (self), MM_PORT_CONNECTED); - - mm_dbg ("(%s): port now %s", - self->priv->device, - connected ? "connected" : "disconnected"); + mm_obj_dbg (self, "port now %s", connected ? "connected" : "disconnected"); } } @@ -105,6 +106,19 @@ /*****************************************************************************/ +static gchar * +log_object_build_id (MMLogObject *_self) +{ + MMPort *self; + + self = MM_PORT (_self); + return g_strdup_printf ("%s/%s", + mm_port_get_device (self), + mm_port_type_get_string (mm_port_get_port_type (self))); +} + +/*****************************************************************************/ + static void mm_port_init (MMPort *self) { @@ -195,6 +209,12 @@ } static void +log_object_iface_init (MMLogObjectInterface *iface) +{ + iface->build_id = log_object_build_id; +} + +static void mm_port_class_init (MMPortClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); diff -Nru modemmanager-1.12.8/src/mm-port.h modemmanager-1.16.6/src/mm-port.h --- modemmanager-1.12.8/src/mm-port.h 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/src/mm-port.h 2021-06-06 21:40:59.000000000 +0800 @@ -26,10 +26,11 @@ MM_PORT_SUBSYS_UNKNOWN = 0x0, MM_PORT_SUBSYS_TTY, MM_PORT_SUBSYS_NET, - MM_PORT_SUBSYS_USB, + MM_PORT_SUBSYS_USBMISC, MM_PORT_SUBSYS_UNIX, - - MM_PORT_SUBSYS_LAST = MM_PORT_SUBSYS_UNIX /*< skip >*/ + MM_PORT_SUBSYS_RPMSG, + MM_PORT_SUBSYS_WWAN, + MM_PORT_SUBSYS_LAST = MM_PORT_SUBSYS_WWAN /*< skip >*/ } MMPortSubsys; typedef enum { /*< underscore_name=mm_port_type >*/ @@ -72,6 +73,7 @@ }; GType mm_port_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMPort, g_object_unref) const gchar *mm_port_get_device (MMPort *self); MMPortSubsys mm_port_get_subsys (MMPort *self); diff -Nru modemmanager-1.12.8/src/mm-private-boxed-types.c modemmanager-1.16.6/src/mm-private-boxed-types.c --- modemmanager-1.12.8/src/mm-private-boxed-types.c 2014-09-17 14:46:07.000000000 +0800 +++ modemmanager-1.16.6/src/mm-private-boxed-types.c 2021-06-06 21:40:59.000000000 +0800 @@ -37,18 +37,18 @@ GType mm_uint16_array_get_type (void) { - static volatile gsize g_define_type_id__volatile = 0; + static gsize g_define_type_id_initialized = 0; - if (g_once_init_enter (&g_define_type_id__volatile)) { + if (g_once_init_enter (&g_define_type_id_initialized)) { GType g_define_type_id = g_boxed_type_register_static (g_intern_static_string ("MMUint16Array"), (GBoxedCopyFunc) uint16_array_copy, (GBoxedFreeFunc) g_free); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + g_once_init_leave (&g_define_type_id_initialized, g_define_type_id); } - return g_define_type_id__volatile; + return g_define_type_id_initialized; } static mm_uint16_pair * @@ -72,18 +72,18 @@ GType mm_uint16_pair_array_get_type (void) { - static volatile gsize g_define_type_id__volatile = 0; + static gsize g_define_type_id_initialized = 0; - if (g_once_init_enter (&g_define_type_id__volatile)) { + if (g_once_init_enter (&g_define_type_id_initialized)) { GType g_define_type_id = g_boxed_type_register_static (g_intern_static_string ("MMUint16PairArray"), (GBoxedCopyFunc) uint16_pair_array_copy, (GBoxedFreeFunc) g_free); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + g_once_init_leave (&g_define_type_id_initialized, g_define_type_id); } - return g_define_type_id__volatile; + return g_define_type_id_initialized; } static void @@ -122,18 +122,18 @@ GType mm_str_pair_array_get_type (void) { - static volatile gsize g_define_type_id__volatile = 0; + static gsize g_define_type_id_initialized = 0; - if (g_once_init_enter (&g_define_type_id__volatile)) { + if (g_once_init_enter (&g_define_type_id_initialized)) { GType g_define_type_id = g_boxed_type_register_static (g_intern_static_string ("MMStrPairArray"), (GBoxedCopyFunc) str_pair_array_copy, (GBoxedFreeFunc) str_pair_array_free); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + g_once_init_leave (&g_define_type_id_initialized, g_define_type_id); } - return g_define_type_id__volatile; + return g_define_type_id_initialized; } static gpointer * @@ -157,18 +157,47 @@ GType mm_pointer_array_get_type (void) { - static volatile gsize g_define_type_id__volatile = 0; + static gsize g_define_type_id_initialized = 0; - if (g_once_init_enter (&g_define_type_id__volatile)) { + if (g_once_init_enter (&g_define_type_id_initialized)) { GType g_define_type_id = g_boxed_type_register_static (g_intern_static_string ("MMPointerArray"), (GBoxedCopyFunc) pointer_array_copy, (GBoxedFreeFunc) g_free); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + g_once_init_leave (&g_define_type_id_initialized, g_define_type_id); } - return g_define_type_id__volatile; + return g_define_type_id_initialized; +} + +static GPtrArray * +object_array_copy (GPtrArray *object_array) +{ + return g_ptr_array_ref (object_array); +} + +static void +object_array_free (GPtrArray *object_array) +{ + g_ptr_array_unref (object_array); +} + +GType +mm_object_array_get_type (void) +{ + static gsize g_define_type_id_initialized = 0; + + if (g_once_init_enter (&g_define_type_id_initialized)) { + GType g_define_type_id = + g_boxed_type_register_static (g_intern_static_string ("MMObjectArray"), + (GBoxedCopyFunc) object_array_copy, + (GBoxedFreeFunc) object_array_free); + + g_once_init_leave (&g_define_type_id_initialized, g_define_type_id); + } + + return g_define_type_id_initialized; } static void @@ -194,16 +223,16 @@ GType mm_async_method_get_type (void) { - static volatile gsize g_define_type_id__volatile = 0; + static gsize g_define_type_id_initialized = 0; - if (g_once_init_enter (&g_define_type_id__volatile)) { + if (g_once_init_enter (&g_define_type_id_initialized)) { GType g_define_type_id = g_boxed_type_register_static (g_intern_static_string ("MMAsyncMethod"), (GBoxedCopyFunc) async_method_copy, (GBoxedFreeFunc) async_method_free); - g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + g_once_init_leave (&g_define_type_id_initialized, g_define_type_id); } - return g_define_type_id__volatile; + return g_define_type_id_initialized; } diff -Nru modemmanager-1.12.8/src/mm-private-boxed-types.h modemmanager-1.16.6/src/mm-private-boxed-types.h --- modemmanager-1.12.8/src/mm-private-boxed-types.h 2016-02-05 07:00:29.000000000 +0800 +++ modemmanager-1.16.6/src/mm-private-boxed-types.h 2021-06-06 21:40:59.000000000 +0800 @@ -34,6 +34,9 @@ GType mm_pointer_array_get_type (void) G_GNUC_CONST; #define MM_TYPE_POINTER_ARRAY (mm_pointer_array_get_type ()) +GType mm_object_array_get_type (void) G_GNUC_CONST; +#define MM_TYPE_OBJECT_ARRAY (mm_object_array_get_type ()) + typedef struct { GCallback async; GCallback finish; diff -Nru modemmanager-1.12.8/src/mm-serial-parsers.c modemmanager-1.16.6/src/mm-serial-parsers.c --- modemmanager-1.12.8/src/mm-serial-parsers.c 2016-03-24 18:25:04.000000000 +0800 +++ modemmanager-1.16.6/src/mm-serial-parsers.c 2021-06-06 21:40:59.000000000 +0800 @@ -19,7 +19,7 @@ #include "mm-error-helpers.h" #include "mm-serial-parsers.h" -#include "mm-log.h" +#include "mm-log-object.h" /* Clean up the response by removing control characters like etc */ static void @@ -108,16 +108,16 @@ parser = g_slice_new (MMSerialParserV1); - parser->regex_ok = g_regex_new ("\\r\\nOK(\\r\\n)+$", flags, 0, NULL); + parser->regex_ok = g_regex_new ("\\r\\nOK(\\r\\n)+", flags, 0, NULL); parser->regex_connect = g_regex_new ("\\r\\nCONNECT.*\\r\\n", flags, 0, NULL); parser->regex_sms = g_regex_new ("\\r\\n>\\s*$", flags, 0, NULL); - parser->regex_cme_error = g_regex_new ("\\r\\n\\+CME ERROR:\\s*(\\d+)\\r\\n$", flags, 0, NULL); - parser->regex_cms_error = g_regex_new ("\\r\\n\\+CMS ERROR:\\s*(\\d+)\\r\\n$", flags, 0, NULL); - parser->regex_cme_error_str = g_regex_new ("\\r\\n\\+CME ERROR:\\s*([^\\n\\r]+)\\r\\n$", flags, 0, NULL); - parser->regex_cms_error_str = g_regex_new ("\\r\\n\\+CMS ERROR:\\s*([^\\n\\r]+)\\r\\n$", flags, 0, NULL); - parser->regex_ezx_error = g_regex_new ("\\r\\n\\MODEM ERROR:\\s*(\\d+)\\r\\n$", flags, 0, NULL); - parser->regex_unknown_error = g_regex_new ("\\r\\n(ERROR)|(COMMAND NOT SUPPORT)\\r\\n$", flags, 0, NULL); - parser->regex_connect_failed = g_regex_new ("\\r\\n(NO CARRIER)|(BUSY)|(NO ANSWER)|(NO DIALTONE)\\r\\n$", flags, 0, NULL); + parser->regex_cme_error = g_regex_new ("\\r\\n\\+CME ERROR:\\s*(\\d+)\\r\\n", flags, 0, NULL); + parser->regex_cms_error = g_regex_new ("\\r\\n\\+CMS ERROR:\\s*(\\d+)\\r\\n", flags, 0, NULL); + parser->regex_cme_error_str = g_regex_new ("\\r\\n\\+CME ERROR:\\s*([^\\n\\r]+)\\r\\n", flags, 0, NULL); + parser->regex_cms_error_str = g_regex_new ("\\r\\n\\+CMS ERROR:\\s*([^\\n\\r]+)\\r\\n", flags, 0, NULL); + parser->regex_ezx_error = g_regex_new ("\\r\\n\\MODEM ERROR:\\s*(\\d+)\\r\\n", flags, 0, NULL); + parser->regex_unknown_error = g_regex_new ("\\r\\n(ERROR)|(COMMAND NOT SUPPORT)\\r\\n", flags, 0, NULL); + parser->regex_connect_failed = g_regex_new ("\\r\\n(NO CARRIER)|(BUSY)|(NO ANSWER)|(NO DIALTONE)\\r\\n", flags, 0, NULL); /* Samsung Z810 may reply "NA" to report a not-available error */ parser->regex_na = g_regex_new ("\\r\\nNA\\r\\n", flags, 0, NULL); @@ -161,9 +161,10 @@ } gboolean -mm_serial_parser_v1_parse (gpointer data, - GString *response, - GError **error) +mm_serial_parser_v1_parse (gpointer data, + GString *response, + gpointer log_object, + GError **error) { MMSerialParserV1 *parser = (MMSerialParserV1 *) data; GMatchInfo *match_info; @@ -188,7 +189,7 @@ response, &local_error)) { g_assert (local_error != NULL); - mm_dbg ("Got response filtered in serial port: %s", local_error->message); + mm_obj_dbg (log_object, "response filtered in serial port: %s", local_error->message); g_propagate_error (error, local_error); response_clean (response); return TRUE; @@ -238,7 +239,7 @@ if (found) { str = g_match_info_fetch (match_info, 1); g_assert (str); - local_error = mm_mobile_equipment_error_for_code (atoi (str)); + local_error = mm_mobile_equipment_error_for_code (atoi (str), log_object); goto done; } g_match_info_free (match_info); @@ -251,7 +252,7 @@ if (found) { str = g_match_info_fetch (match_info, 1); g_assert (str); - local_error = mm_mobile_equipment_error_for_code (atoi (str)); + local_error = mm_mobile_equipment_error_for_code (atoi (str), log_object); goto done; } g_match_info_free (match_info); @@ -263,7 +264,7 @@ if (found) { str = g_match_info_fetch (match_info, 1); g_assert (str); - local_error = mm_message_error_for_code (atoi (str)); + local_error = mm_message_error_for_code (atoi (str), log_object); goto done; } g_match_info_free (match_info); @@ -275,7 +276,7 @@ if (found) { str = g_match_info_fetch (match_info, 1); g_assert (str); - local_error = mm_mobile_equipment_error_for_string (str); + local_error = mm_mobile_equipment_error_for_string (str, log_object); goto done; } g_match_info_free (match_info); @@ -287,7 +288,7 @@ if (found) { str = g_match_info_fetch (match_info, 1); g_assert (str); - local_error = mm_message_error_for_string (str); + local_error = mm_message_error_for_string (str, log_object); goto done; } g_match_info_free (match_info); @@ -299,7 +300,7 @@ if (found) { str = g_match_info_fetch (match_info, 1); g_assert (str); - local_error = mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_UNKNOWN); + local_error = mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_UNKNOWN, log_object); goto done; } g_match_info_free (match_info); @@ -309,7 +310,7 @@ response->str, response->len, 0, 0, &match_info, NULL); if (found) { - local_error = mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_UNKNOWN); + local_error = mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_UNKNOWN, log_object); goto done; } g_match_info_free (match_info); @@ -337,7 +338,7 @@ code = MM_CONNECTION_ERROR_NO_CARRIER; } - local_error = mm_connection_error_for_code (code); + local_error = mm_connection_error_for_code (code, log_object); goto done; } g_match_info_free (match_info); @@ -361,7 +362,7 @@ response_clean (response); if (local_error) { - mm_dbg ("Got failure code %d: %s", local_error->code, local_error->message); + mm_obj_dbg (log_object, "operation failure: %d (%s)", local_error->code, local_error->message); g_propagate_error (error, local_error); } diff -Nru modemmanager-1.12.8/src/mm-serial-parsers.h modemmanager-1.16.6/src/mm-serial-parsers.h --- modemmanager-1.12.8/src/mm-serial-parsers.h 2016-03-24 18:25:04.000000000 +0800 +++ modemmanager-1.16.6/src/mm-serial-parsers.h 2021-06-06 21:40:59.000000000 +0800 @@ -24,6 +24,7 @@ GRegex *error); gboolean mm_serial_parser_v1_parse (gpointer parser, GString *response, + gpointer log_object, GError **error); void mm_serial_parser_v1_destroy (gpointer parser); gboolean mm_serial_parser_v1_is_known_error (const GError *error); diff -Nru modemmanager-1.12.8/src/mm-shared-qmi.c modemmanager-1.16.6/src/mm-shared-qmi.c --- modemmanager-1.12.8/src/mm-shared-qmi.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-shared-qmi.c 2021-06-06 21:40:59.000000000 +0800 @@ -25,10 +25,11 @@ #include -#include "mm-log.h" +#include "mm-log-object.h" #include "mm-iface-modem.h" #include "mm-iface-modem-3gpp.h" #include "mm-iface-modem-location.h" +#include "mm-sim-qmi.h" #include "mm-shared-qmi.h" #include "mm-modem-helpers-qmi.h" @@ -70,9 +71,11 @@ /* Capabilities & modes helpers */ MMModemCapability current_capabilities; GArray *supported_radio_interfaces; - Feature feature_nas_technology_preference; - Feature feature_nas_system_selection_preference; - Feature feature_extended_lte_band_preference; + Feature feature_nas_tp; + Feature feature_nas_ssp; + Feature feature_nas_ssp_extended_lte_band_preference; + Feature feature_nas_ssp_acquisition_order_preference; + GArray *feature_nas_ssp_acquisition_order_preference_array; gboolean disable_4g_only_mode; GArray *supported_bands; @@ -91,6 +94,12 @@ gboolean config_active_default; GArray *config_list; gint config_active_i; + + /* Slot status monitoring */ + QmiClient *uim_client; + gulong uim_slot_status_indication_id; + gulong uim_refresh_indication_id; + guint uim_refresh_start_timeout_id; } Private; static void @@ -110,6 +119,16 @@ g_signal_handler_disconnect (priv->loc_client, priv->loc_location_nmea_indication_id); if (priv->loc_client) g_object_unref (priv->loc_client); + if (priv->uim_slot_status_indication_id) + g_signal_handler_disconnect (priv->uim_client, priv->uim_slot_status_indication_id); + if (priv->uim_refresh_indication_id) + g_signal_handler_disconnect (priv->uim_client, priv->uim_refresh_indication_id); + if (priv->uim_client) + g_object_unref (priv->uim_client); + if (priv->uim_refresh_start_timeout_id) + g_source_remove (priv->uim_refresh_start_timeout_id); + if (priv->feature_nas_ssp_acquisition_order_preference_array) + g_array_unref (priv->feature_nas_ssp_acquisition_order_preference_array); g_strfreev (priv->loc_assistance_data_servers); g_slice_free (Private, priv); } @@ -126,8 +145,10 @@ if (!priv) { priv = g_slice_new0 (Private); - priv->feature_nas_technology_preference = FEATURE_UNKNOWN; - priv->feature_nas_system_selection_preference = FEATURE_UNKNOWN; + priv->feature_nas_tp = FEATURE_UNKNOWN; + priv->feature_nas_ssp = FEATURE_UNKNOWN; + priv->feature_nas_ssp_extended_lte_band_preference = FEATURE_UNKNOWN; + priv->feature_nas_ssp_acquisition_order_preference = FEATURE_UNKNOWN; priv->config_active_i = -1; /* Setup parent class' MMIfaceModemLocation */ @@ -197,7 +218,7 @@ g_signal_handler_disconnect (ctx->client, ctx->serving_system_indication_id); ctx->serving_system_indication_id = 0; - g_assert (g_task_return_error_if_cancelled (task)); + g_task_return_error_if_cancelled (task); g_object_unref (task); } @@ -326,41 +347,14 @@ qmi_message_nas_initiate_network_register_output_unref (output); } -void -mm_shared_qmi_3gpp_register_in_network (MMIfaceModem3gpp *self, - const gchar *operator_id, - GCancellable *cancellable, - GAsyncReadyCallback callback, - gpointer user_data) +static void +register_in_network_inr (GTask *task, + QmiClient *client, + GCancellable *cancellable, + guint16 mcc, + guint16 mnc) { - GTask *task; - RegisterInNetworkContext *ctx; QmiMessageNasInitiateNetworkRegisterInput *input; - guint16 mcc = 0; - guint16 mnc; - QmiClient *client = NULL; - GError *error = NULL; - - /* Get NAS client */ - if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), - QMI_SERVICE_NAS, &client, - callback, user_data)) - return; - - task = g_task_new (self, cancellable, callback, user_data); - - ctx = g_slice_new0 (RegisterInNetworkContext); - ctx->client = g_object_ref (client); - ctx->cancellable = cancellable ? g_object_ref (cancellable) : NULL; - g_task_set_task_data (task, ctx, (GDestroyNotify)register_in_network_context_free); - - /* Parse input MCC/MNC */ - if (operator_id && !mm_3gpp_parse_operator_id (operator_id, &mcc, &mnc, &error)) { - g_assert (error != NULL); - g_task_return_error (task, error); - g_object_unref (task); - return; - } input = qmi_message_nas_initiate_network_register_input_new (); @@ -395,6 +389,105 @@ qmi_message_nas_initiate_network_register_input_unref (input); } +static void +set_system_selection_preference_ready (QmiClientNas *client, + GAsyncResult *res, + GTask *task) +{ + GError *error = NULL; + QmiMessageNasSetSystemSelectionPreferenceOutput *output; + + output = qmi_client_nas_set_system_selection_preference_finish (client, res, &error); + if (!output || !qmi_message_nas_set_system_selection_preference_output_get_result (output, &error)) { + if (!g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_NO_EFFECT)) { + g_prefix_error (&error, "Couldn't set network selection preference: "); + g_task_return_error (task, error); + goto out; + } + g_error_free (error); + } + + g_task_return_boolean (task, TRUE); + +out: + g_object_unref (task); + + if (output) + qmi_message_nas_set_system_selection_preference_output_unref (output); +} + +static void +register_in_network_sssp (GTask *task, + QmiClient *client, + GCancellable *cancellable, + guint16 mcc, + guint16 mnc) +{ + QmiMessageNasSetSystemSelectionPreferenceInput *input; + + input = qmi_message_nas_set_system_selection_preference_input_new (); + + qmi_message_nas_set_system_selection_preference_input_set_network_selection_preference ( + input, + mcc ? QMI_NAS_NETWORK_SELECTION_PREFERENCE_MANUAL : QMI_NAS_NETWORK_SELECTION_PREFERENCE_AUTOMATIC, + mcc, + mnc, + NULL); + + qmi_client_nas_set_system_selection_preference ( + QMI_CLIENT_NAS (client), + input, + 120, + cancellable, + (GAsyncReadyCallback)set_system_selection_preference_ready, + task); + + qmi_message_nas_set_system_selection_preference_input_unref (input); +} + +void +mm_shared_qmi_3gpp_register_in_network (MMIfaceModem3gpp *self, + const gchar *operator_id, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + GTask *task; + RegisterInNetworkContext *ctx; + guint16 mcc = 0; + guint16 mnc; + QmiClient *client = NULL; + GError *error = NULL; + Private *priv = NULL; + + /* Get NAS client */ + if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), + QMI_SERVICE_NAS, &client, + callback, user_data)) + return; + + task = g_task_new (self, cancellable, callback, user_data); + + ctx = g_slice_new0 (RegisterInNetworkContext); + ctx->client = g_object_ref (client); + ctx->cancellable = cancellable ? g_object_ref (cancellable) : NULL; + g_task_set_task_data (task, ctx, (GDestroyNotify)register_in_network_context_free); + + /* Parse input MCC/MNC */ + if (operator_id && !mm_3gpp_parse_operator_id (operator_id, &mcc, &mnc, &error)) { + g_assert (error != NULL); + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + priv = get_private (MM_SHARED_QMI (self)); + if (priv->feature_nas_ssp == FEATURE_SUPPORTED) + register_in_network_sssp (task, client, cancellable, mcc, mnc); + else + register_in_network_inr (task, client, cancellable, mcc, mnc); +} + /*****************************************************************************/ /* Current capabilities setting (Modem interface) */ @@ -601,8 +694,8 @@ switch (ctx->step) { case SET_CURRENT_CAPABILITIES_STEP_FIRST: /* Error out early if both unsupported */ - if ((priv->feature_nas_system_selection_preference != FEATURE_SUPPORTED) && - (priv->feature_nas_technology_preference != FEATURE_SUPPORTED)) { + if ((priv->feature_nas_ssp != FEATURE_SUPPORTED) && + (priv->feature_nas_tp != FEATURE_SUPPORTED)) { g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED, "Setting capabilities is not supported by this device"); g_object_unref (task); @@ -612,7 +705,7 @@ /* fall-through */ case SET_CURRENT_CAPABILITIES_STEP_NAS_SYSTEM_SELECTION_PREFERENCE: - if (priv->feature_nas_system_selection_preference == FEATURE_SUPPORTED) { + if (priv->feature_nas_ssp == FEATURE_SUPPORTED) { set_current_capabilities_system_selection_preference (task); return; } @@ -620,7 +713,7 @@ /* fall-through */ case SET_CURRENT_CAPABILITIES_STEP_NAS_TECHNOLOGY_PREFERENCE: - if (priv->feature_nas_technology_preference == FEATURE_SUPPORTED) { + if (priv->feature_nas_tp == FEATURE_SUPPORTED) { set_current_capabilities_technology_preference (task); return; } @@ -637,6 +730,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); return; + + default: + g_assert_not_reached (); } } @@ -657,8 +753,8 @@ return; priv = get_private (MM_SHARED_QMI (self)); - g_assert (priv->feature_nas_technology_preference != FEATURE_UNKNOWN); - g_assert (priv->feature_nas_system_selection_preference != FEATURE_UNKNOWN); + g_assert (priv->feature_nas_tp != FEATURE_UNKNOWN); + g_assert (priv->feature_nas_ssp != FEATURE_UNKNOWN); ctx = g_slice_new0 (SetCurrentCapabilitiesContext); ctx->client = g_object_ref (client); @@ -758,7 +854,7 @@ for (i = 0; i < radio_interface_list->len; i++) ctx->capabilities_context.dms_capabilities |= - mm_modem_capability_from_qmi_radio_interface (g_array_index (radio_interface_list, QmiDmsRadioInterface, i)); + mm_modem_capability_from_qmi_radio_interface (g_array_index (radio_interface_list, QmiDmsRadioInterface, i), self); out: if (output) @@ -792,20 +888,20 @@ output = qmi_client_nas_get_technology_preference_finish (client, res, &error); if (!output) { - mm_dbg ("QMI operation failed: %s", error->message); + mm_obj_dbg (self, "QMI operation failed: %s", error->message); g_error_free (error); - priv->feature_nas_technology_preference = FEATURE_UNSUPPORTED; + priv->feature_nas_tp = FEATURE_UNSUPPORTED; } else if (!qmi_message_nas_get_technology_preference_output_get_result (output, &error)) { - mm_dbg ("Couldn't get technology preference: %s", error->message); + mm_obj_dbg (self, "couldn't get technology preference: %s", error->message); g_error_free (error); - priv->feature_nas_technology_preference = FEATURE_SUPPORTED; + priv->feature_nas_tp = FEATURE_UNSUPPORTED; } else { qmi_message_nas_get_technology_preference_output_get_active ( output, &ctx->capabilities_context.nas_tp_mask, NULL, /* duration */ NULL); - priv->feature_nas_technology_preference = FEATURE_SUPPORTED; + priv->feature_nas_tp = FEATURE_SUPPORTED; } if (output) @@ -830,21 +926,35 @@ ctx = g_task_get_task_data (task); priv = get_private (MM_SHARED_QMI (self)); + priv->feature_nas_ssp = FEATURE_UNSUPPORTED; + priv->feature_nas_ssp_extended_lte_band_preference = FEATURE_UNSUPPORTED; + priv->feature_nas_ssp_acquisition_order_preference = FEATURE_UNSUPPORTED; + output = qmi_client_nas_get_system_selection_preference_finish (client, res, &error); if (!output) { - mm_dbg ("QMI operation failed: %s", error->message); + mm_obj_dbg (self, "QMI operation failed: %s", error->message); g_error_free (error); - priv->feature_nas_system_selection_preference = FEATURE_UNSUPPORTED; } else if (!qmi_message_nas_get_system_selection_preference_output_get_result (output, &error)) { - mm_dbg ("Couldn't get system selection preference: %s", error->message); + mm_obj_dbg (self, "couldn't get system selection preference: %s", error->message); g_error_free (error); - priv->feature_nas_system_selection_preference = FEATURE_SUPPORTED; } else { + GArray *acquisition_order_preference_array = NULL; + + /* SSP is supported, perform feature checks */ + priv->feature_nas_ssp = FEATURE_SUPPORTED; + if (qmi_message_nas_get_system_selection_preference_output_get_extended_lte_band_preference (output, NULL, NULL, NULL, NULL, NULL)) + priv->feature_nas_ssp_extended_lte_band_preference = FEATURE_SUPPORTED; + if (qmi_message_nas_get_system_selection_preference_output_get_acquisition_order_preference (output, &acquisition_order_preference_array, NULL) && + acquisition_order_preference_array && + acquisition_order_preference_array->len) { + priv->feature_nas_ssp_acquisition_order_preference = FEATURE_SUPPORTED; + priv->feature_nas_ssp_acquisition_order_preference_array = g_array_ref (acquisition_order_preference_array); + } + qmi_message_nas_get_system_selection_preference_output_get_mode_preference ( output, &ctx->capabilities_context.nas_ssp_mode_preference_mask, NULL); - priv->feature_nas_system_selection_preference = FEATURE_SUPPORTED; } if (output) @@ -892,12 +1002,15 @@ return; case LOAD_CURRENT_CAPABILITIES_STEP_LAST: - g_assert (priv->feature_nas_technology_preference != FEATURE_UNKNOWN); - g_assert (priv->feature_nas_system_selection_preference != FEATURE_UNKNOWN); - priv->current_capabilities = mm_modem_capability_from_qmi_capabilities_context (&ctx->capabilities_context); + g_assert (priv->feature_nas_tp != FEATURE_UNKNOWN); + g_assert (priv->feature_nas_ssp != FEATURE_UNKNOWN); + priv->current_capabilities = mm_modem_capability_from_qmi_capabilities_context (&ctx->capabilities_context, self); g_task_return_int (task, priv->current_capabilities); g_object_unref (task); return; + + default: + g_assert_not_reached (); } } @@ -940,8 +1053,8 @@ /* Current capabilities is the first thing run, and will only be run once per modem, * so we should here check support for the optional features. */ priv = get_private (MM_SHARED_QMI (self)); - g_assert (priv->feature_nas_technology_preference == FEATURE_UNKNOWN); - g_assert (priv->feature_nas_system_selection_preference == FEATURE_UNKNOWN); + g_assert (priv->feature_nas_tp == FEATURE_UNKNOWN); + g_assert (priv->feature_nas_ssp == FEATURE_UNKNOWN); ctx = g_slice_new0 (LoadCurrentCapabilitiesContext); ctx->nas_client = g_object_ref (nas_client); @@ -991,7 +1104,7 @@ /* Build mask with all supported capabilities */ mask = MM_MODEM_CAPABILITY_NONE; for (i = 0; i < priv->supported_radio_interfaces->len; i++) - mask |= mm_modem_capability_from_qmi_radio_interface (g_array_index (priv->supported_radio_interfaces, QmiDmsRadioInterface, i)); + mask |= mm_modem_capability_from_qmi_radio_interface (g_array_index (priv->supported_radio_interfaces, QmiDmsRadioInterface, i), self); supported_combinations = g_array_sized_new (FALSE, FALSE, sizeof (MMModemCapability), 3); @@ -1000,7 +1113,7 @@ * switching only when switching GSM/UMTS+CDMA/EVDO multimode devices, and only if * we have support for the commands doing it. */ - if (priv->feature_nas_technology_preference == FEATURE_SUPPORTED || priv->feature_nas_system_selection_preference == FEATURE_SUPPORTED) { + if (priv->feature_nas_tp == FEATURE_SUPPORTED || priv->feature_nas_ssp == FEATURE_SUPPORTED) { if (mask == (MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_CDMA_EVDO)) { /* Multimode GSM/UMTS+CDMA/EVDO device switched to GSM/UMTS only */ single = MM_MODEM_CAPABILITY_GSM_UMTS; @@ -1158,11 +1271,13 @@ set_current_modes_system_selection_preference (GTask *task) { MMIfaceModem *self; + Private *priv; SetCurrentModesContext *ctx; QmiMessageNasSetSystemSelectionPreferenceInput *input; QmiNasRatModePreference pref; self = g_task_get_source_object (task); + priv = get_private (MM_SHARED_QMI (self)); ctx = g_task_get_task_data (task); input = qmi_message_nas_set_system_selection_preference_input_new (); @@ -1171,22 +1286,23 @@ /* Preferred modes */ if (ctx->preferred != MM_MODEM_MODE_NONE) { - GArray *array; + if (priv->feature_nas_ssp_acquisition_order_preference == FEATURE_SUPPORTED) { + GArray *array; - /* Acquisition order array */ - array = mm_modem_mode_to_qmi_acquisition_order_preference (ctx->allowed, - ctx->preferred, - mm_iface_modem_is_cdma (self), - mm_iface_modem_is_3gpp (self)); - g_assert (array); - qmi_message_nas_set_system_selection_preference_input_set_acquisition_order_preference (input, array, NULL); - g_array_unref (array); + /* Acquisition order array */ + array = mm_modem_mode_to_qmi_acquisition_order_preference (ctx->allowed, + ctx->preferred, + priv->feature_nas_ssp_acquisition_order_preference_array); + g_assert (array); + qmi_message_nas_set_system_selection_preference_input_set_acquisition_order_preference (input, array, NULL); + g_array_unref (array); + } /* Only set GSM/WCDMA acquisition order preference if both 2G and 3G given as allowed */ if (mm_iface_modem_is_3gpp (self) && ((ctx->allowed & (MM_MODEM_MODE_2G | MM_MODEM_MODE_3G)) == (MM_MODEM_MODE_2G | MM_MODEM_MODE_3G))) { QmiNasGsmWcdmaAcquisitionOrderPreference order; - order = mm_modem_mode_to_qmi_gsm_wcdma_acquisition_order_preference (ctx->preferred); + order = mm_modem_mode_to_qmi_gsm_wcdma_acquisition_order_preference (ctx->preferred, self); qmi_message_nas_set_system_selection_preference_input_set_gsm_wcdma_acquisition_order_preference (input, order, NULL); } } @@ -1246,12 +1362,12 @@ priv = get_private (MM_SHARED_QMI (self)); - if (priv->feature_nas_system_selection_preference == FEATURE_SUPPORTED) { + if (priv->feature_nas_ssp == FEATURE_SUPPORTED) { set_current_modes_system_selection_preference (task); return; } - if (priv->feature_nas_technology_preference == FEATURE_SUPPORTED) { + if (priv->feature_nas_tp == FEATURE_SUPPORTED) { set_current_modes_technology_preference (task); return; } @@ -1365,12 +1481,17 @@ GAsyncResult *res, GTask *task) { + MMSharedQmi *self; + Private *priv; LoadCurrentModesResult *result = NULL; QmiMessageNasGetSystemSelectionPreferenceOutput *output = NULL; GError *error = NULL; QmiNasRatModePreference mode_preference_mask = 0; MMModemMode allowed; + self = g_task_get_source_object (task); + priv = get_private (self); + output = qmi_client_nas_get_system_selection_preference_finish (client, res, &error); if (!output || !qmi_message_nas_get_system_selection_preference_output_get_result (output, &error)) { g_task_return_error (task, error); @@ -1402,24 +1523,11 @@ result->allowed = allowed; result->preferred = MM_MODEM_MODE_NONE; - /* For 2G+3G only rely on the GSM/WCDMA acquisition order preference TLV */ - if (mode_preference_mask == (QMI_NAS_RAT_MODE_PREFERENCE_GSM | QMI_NAS_RAT_MODE_PREFERENCE_UMTS)) { - QmiNasGsmWcdmaAcquisitionOrderPreference gsm_or_wcdma; - - if (qmi_message_nas_get_system_selection_preference_output_get_gsm_wcdma_acquisition_order_preference ( - output, - &gsm_or_wcdma, - NULL)) - result->preferred = mm_modem_mode_from_qmi_gsm_wcdma_acquisition_order_preference (gsm_or_wcdma); - } - /* Otherwise, rely on the acquisition order array TLV */ - else { + /* If acquisition order preference is available, always use that first */ + if (priv->feature_nas_ssp_acquisition_order_preference == FEATURE_SUPPORTED) { GArray *array; - if (qmi_message_nas_get_system_selection_preference_output_get_acquisition_order_preference ( - output, - &array, - NULL) && + if (qmi_message_nas_get_system_selection_preference_output_get_acquisition_order_preference (output, &array, NULL) && array->len > 0) { guint i; @@ -1440,6 +1548,16 @@ } } } + /* For 2G+3G only rely on the GSM/WCDMA acquisition order preference TLV */ + else if (mode_preference_mask == (QMI_NAS_RAT_MODE_PREFERENCE_GSM | QMI_NAS_RAT_MODE_PREFERENCE_UMTS)) { + QmiNasGsmWcdmaAcquisitionOrderPreference gsm_or_wcdma; + + if (qmi_message_nas_get_system_selection_preference_output_get_gsm_wcdma_acquisition_order_preference ( + output, + &gsm_or_wcdma, + NULL)) + result->preferred = mm_modem_mode_from_qmi_gsm_wcdma_acquisition_order_preference (gsm_or_wcdma, self); + } g_task_return_pointer (task, result, g_free); @@ -1486,12 +1604,12 @@ priv = get_private (MM_SHARED_QMI (self)); - if (priv->feature_nas_system_selection_preference != FEATURE_UNSUPPORTED) { + if (priv->feature_nas_ssp != FEATURE_UNSUPPORTED) { load_current_modes_system_selection_preference (task); return; } - if (priv->feature_nas_technology_preference != FEATURE_UNSUPPORTED) { + if (priv->feature_nas_tp != FEATURE_UNSUPPORTED) { load_current_modes_technology_preference (task); return; } @@ -1535,90 +1653,85 @@ /* Build all, based on the supported radio interfaces */ mask_all = MM_MODEM_MODE_NONE; for (i = 0; i < priv->supported_radio_interfaces->len; i++) - mask_all |= mm_modem_mode_from_qmi_radio_interface (g_array_index (priv->supported_radio_interfaces, QmiDmsRadioInterface, i)); + mask_all |= mm_modem_mode_from_qmi_radio_interface (g_array_index (priv->supported_radio_interfaces, QmiDmsRadioInterface, i), self); mode.allowed = mask_all; mode.preferred = MM_MODEM_MODE_NONE; all = g_array_sized_new (FALSE, FALSE, sizeof (MMModemModeCombination), 1); g_array_append_val (all, mode); /* If SSP and TP are not supported, ignore supported mode management */ - if (priv->feature_nas_system_selection_preference == FEATURE_UNSUPPORTED && priv->feature_nas_technology_preference == FEATURE_UNSUPPORTED) { + if (priv->feature_nas_ssp == FEATURE_UNSUPPORTED && priv->feature_nas_tp == FEATURE_UNSUPPORTED) { g_task_return_pointer (task, all, (GDestroyNotify) g_array_unref); g_object_unref (task); return; } - combinations = g_array_sized_new (FALSE, FALSE, sizeof (MMModemModeCombination), 5); + combinations = g_array_new (FALSE, FALSE, sizeof (MMModemModeCombination)); + +#define ADD_MODE_PREFERENCE(MODE1, MODE2, MODE3, MODE4) do { \ + mode.allowed = MODE1; \ + if (MODE2 != MM_MODEM_MODE_NONE) { \ + mode.allowed |= MODE2; \ + if (MODE3 != MM_MODEM_MODE_NONE) { \ + mode.allowed |= MODE3; \ + if (MODE4 != MM_MODEM_MODE_NONE) \ + mode.allowed |= MODE4; \ + } \ + if (priv->feature_nas_ssp != FEATURE_UNSUPPORTED) { \ + if (MODE3 != MM_MODEM_MODE_NONE) { \ + if (MODE4 != MM_MODEM_MODE_NONE) { \ + mode.preferred = MODE4; \ + g_array_append_val (combinations, mode); \ + } \ + mode.preferred = MODE3; \ + g_array_append_val (combinations, mode); \ + } \ + mode.preferred = MODE2; \ + g_array_append_val (combinations, mode); \ + mode.preferred = MODE1; \ + g_array_append_val (combinations, mode); \ + } else { \ + mode.preferred = MM_MODEM_MODE_NONE; \ + g_array_append_val (combinations, mode); \ + } \ + } else { \ + mode.allowed = MODE1; \ + mode.preferred = MM_MODEM_MODE_NONE; \ + g_array_append_val (combinations, mode); \ + } \ + } while (0) /* 2G-only, 3G-only */ - mode.allowed = MM_MODEM_MODE_2G; - mode.preferred = MM_MODEM_MODE_NONE; - g_array_append_val (combinations, mode); - mode.allowed = MM_MODEM_MODE_3G; - mode.preferred = MM_MODEM_MODE_NONE; - g_array_append_val (combinations, mode); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_3G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); /* 4G-only mode is not possible in multimode GSM/UMTS+CDMA/EVDO+LTE * devices. This configuration may be selected as "LTE only" capability * instead. */ - if (!priv->disable_4g_only_mode) { - mode.allowed = MM_MODEM_MODE_4G; - mode.preferred = MM_MODEM_MODE_NONE; - g_array_append_val (combinations, mode); - } + if (!priv->disable_4g_only_mode) + ADD_MODE_PREFERENCE (MM_MODEM_MODE_4G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); - /* 2G+3G */ - mode.allowed = (MM_MODEM_MODE_2G | MM_MODEM_MODE_3G); - if (priv->feature_nas_system_selection_preference != FEATURE_UNSUPPORTED) { - mode.preferred = MM_MODEM_MODE_3G; - g_array_append_val (combinations, mode); - mode.preferred = MM_MODEM_MODE_2G; - g_array_append_val (combinations, mode); - } else { - mode.preferred = MM_MODEM_MODE_NONE; - g_array_append_val (combinations, mode); - } - - /* 2G+4G */ - mode.allowed = (MM_MODEM_MODE_2G | MM_MODEM_MODE_4G); - if (priv->feature_nas_system_selection_preference != FEATURE_UNSUPPORTED) { - mode.preferred = MM_MODEM_MODE_4G; - g_array_append_val (combinations, mode); - mode.preferred = MM_MODEM_MODE_2G; - g_array_append_val (combinations, mode); - } else { - mode.preferred = MM_MODEM_MODE_NONE; - g_array_append_val (combinations, mode); - } - - /* 3G+4G */ - mode.allowed = (MM_MODEM_MODE_3G | MM_MODEM_MODE_4G); - if (priv->feature_nas_system_selection_preference != FEATURE_UNSUPPORTED) { - mode.preferred = MM_MODEM_MODE_3G; - g_array_append_val (combinations, mode); - mode.preferred = MM_MODEM_MODE_4G; - g_array_append_val (combinations, mode); - } else { - mode.preferred = MM_MODEM_MODE_NONE; - g_array_append_val (combinations, mode); - } - - /* 2G+3G+4G */ - mode.allowed = (MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G); - if (priv->feature_nas_system_selection_preference != FEATURE_UNSUPPORTED) { - mode.preferred = MM_MODEM_MODE_4G; - g_array_append_val (combinations, mode); - mode.preferred = MM_MODEM_MODE_3G; - g_array_append_val (combinations, mode); - mode.preferred = MM_MODEM_MODE_2G; - g_array_append_val (combinations, mode); - } else { - mode.preferred = MM_MODEM_MODE_NONE; - g_array_append_val (combinations, mode); + /* 2G, 3G, 4G combinations */ + ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_3G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_4G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_3G, MM_MODEM_MODE_4G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_3G, MM_MODEM_MODE_4G, MM_MODEM_MODE_NONE); + + /* 5G related mode combinations are only supported when NAS SSP is supported, + * as there is no 5G support in NAS TP. */ + if (priv->feature_nas_ssp != FEATURE_UNSUPPORTED) { + ADD_MODE_PREFERENCE (MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_3G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_4G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_3G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_4G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_3G, MM_MODEM_MODE_4G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_3G, MM_MODEM_MODE_4G, MM_MODEM_MODE_5G); } /* Filter out unsupported modes */ - filtered = mm_filter_supported_modes (all, combinations); + filtered = mm_filter_supported_modes (all, combinations, self); g_array_unref (all); g_array_unref (combinations); @@ -1673,7 +1786,7 @@ &extended_qmi_lte_bands, NULL); - mm_bands = mm_modem_bands_from_qmi_band_capabilities (qmi_bands, qmi_lte_bands, extended_qmi_lte_bands); + mm_bands = mm_modem_bands_from_qmi_band_capabilities (qmi_bands, qmi_lte_bands, extended_qmi_lte_bands, self); if (mm_bands->len == 0) { g_clear_pointer (&mm_bands, g_array_unref); error = g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_FAILED, @@ -1766,7 +1879,8 @@ <e_band_preference_mask, NULL); - if (qmi_message_nas_get_system_selection_preference_output_get_extended_lte_band_preference ( + if ((priv->feature_nas_ssp_extended_lte_band_preference == FEATURE_SUPPORTED) && + qmi_message_nas_get_system_selection_preference_output_get_extended_lte_band_preference ( output, &extended_lte_band_preference[0], &extended_lte_band_preference[1], @@ -1775,13 +1889,11 @@ NULL)) extended_lte_band_preference_size = G_N_ELEMENTS (extended_lte_band_preference); - if (G_UNLIKELY (priv->feature_extended_lte_band_preference == FEATURE_UNKNOWN)) - priv->feature_extended_lte_band_preference = extended_lte_band_preference_size ? FEATURE_SUPPORTED : FEATURE_UNSUPPORTED; - mm_bands = mm_modem_bands_from_qmi_band_preference (band_preference_mask, lte_band_preference_mask, extended_lte_band_preference_size ? extended_lte_band_preference : NULL, - extended_lte_band_preference_size); + extended_lte_band_preference_size, + self); if (mm_bands->len == 0) { g_clear_pointer (&mm_bands, g_array_unref); @@ -1895,13 +2007,14 @@ mm_modem_bands_to_qmi_band_preference (bands_array, &qmi_bands, &qmi_lte_bands, - priv->feature_extended_lte_band_preference == FEATURE_SUPPORTED ? extended_qmi_lte_bands : NULL, - G_N_ELEMENTS (extended_qmi_lte_bands)); + priv->feature_nas_ssp_extended_lte_band_preference == FEATURE_SUPPORTED ? extended_qmi_lte_bands : NULL, + G_N_ELEMENTS (extended_qmi_lte_bands), + self); input = qmi_message_nas_set_system_selection_preference_input_new (); qmi_message_nas_set_system_selection_preference_input_set_band_preference (input, qmi_bands, NULL); if (mm_iface_modem_is_3gpp_lte (self)) { - if (priv->feature_extended_lte_band_preference == FEATURE_SUPPORTED) + if (priv->feature_nas_ssp_extended_lte_band_preference == FEATURE_SUPPORTED) qmi_message_nas_set_system_selection_preference_input_set_extended_lte_band_preference ( input, extended_qmi_lte_bands[0], @@ -1940,14 +2053,17 @@ GAsyncResult *res, GTask *task) { + MMSharedQmi *self; QmiMessageDmsSetOperatingModeOutput *output; - GError *error = NULL; + GError *error = NULL; + + self = g_task_get_source_object (task); output = qmi_client_dms_set_operating_mode_finish (client, res, &error); if (!output || !qmi_message_dms_set_operating_mode_output_get_result (output, &error)) { g_task_return_error (task, error); } else { - mm_info ("Modem is being rebooted now"); + mm_obj_info (self, "rebooting now"); g_task_return_boolean (task, TRUE); } @@ -2087,7 +2203,7 @@ return; } - mm_dbg ("performing a factory reset..."); + mm_obj_dbg (self, "performing a factory reset..."); qmi_client_dms_restore_factory_defaults (QMI_CLIENT_DMS (client), input, 10, @@ -2375,7 +2491,7 @@ /* Match generic configuration */ config_fallback = g_key_file_get_string (ctx->keyfile, group, GENERIC_CONFIG_FALLBACK, NULL); - mm_dbg ("Fallback carrier configuration %sfound in group '%s'", config_fallback ? "" : "not ", group); + mm_obj_dbg (self, "fallback carrier configuration %sfound in group '%s'", config_fallback ? "" : "not ", group); /* First, try to match 6 MCCMNC digits (3-digit MNCs) */ strncpy (mccmnc, ctx->imsi, 6); @@ -2386,8 +2502,8 @@ mccmnc[5] = '\0'; ctx->config_requested = g_key_file_get_string (ctx->keyfile, group, mccmnc, NULL); } - mm_dbg ("Requested carrier configuration %sfound for '%s' in group '%s': %s", - ctx->config_requested ? "" : "not ", mccmnc, group, ctx->config_requested ? ctx->config_requested : "n/a"); + mm_obj_dbg (self, "requested carrier configuration %sfound for '%s' in group '%s': %s", + ctx->config_requested ? "" : "not ", mccmnc, group, ctx->config_requested ? ctx->config_requested : "n/a"); if (!ctx->config_requested && !config_fallback) { setup_carrier_config_abort (task, g_error_new (MM_CORE_ERROR, MM_CORE_ERROR_NOT_FOUND, @@ -2404,16 +2520,16 @@ config = &g_array_index (priv->config_list, ConfigInfo, i); if (ctx->config_requested && !g_strcmp0 (ctx->config_requested, config->description)) { - mm_dbg ("Requested carrier configuration '%s' is available (version 0x%08x, size %u bytes)", - config->description, config->version, config->total_size); + mm_obj_dbg (self, "requested carrier configuration '%s' is available (version 0x%08x, size %u bytes)", + config->description, config->version, config->total_size); if (ctx->config_requested_i < 0) ctx->config_requested_i = i; else ctx->config_requested_i = select_newest_carrier_config (self, ctx->config_requested_i, i); } if (config_fallback && !g_strcmp0 (config_fallback, config->description)) { - mm_dbg ("Fallback carrier configuration '%s' is available (version 0x%08x, size %u bytes)", - config->description, config->version, config->total_size); + mm_obj_dbg (self, "fallback carrier configuration '%s' is available (version 0x%08x, size %u bytes)", + config->description, config->version, config->total_size); if (config_fallback_i < 0) config_fallback_i = i; else @@ -2438,8 +2554,8 @@ g_assert (config_fallback_i >= 0); config = &g_array_index (priv->config_list, ConfigInfo, config_fallback_i); - mm_info ("Using fallback carrier configuration '%s' (version 0x%08x, size %u bytes)", - config->description, config->version, config->total_size); + mm_obj_info (self, "using fallback carrier configuration '%s' (version 0x%08x, size %u bytes)", + config->description, config->version, config->total_size); g_free (ctx->config_requested); ctx->config_requested = config_fallback; @@ -2449,8 +2565,8 @@ ConfigInfo *config; config = &g_array_index (priv->config_list, ConfigInfo, ctx->config_requested_i); - mm_dbg ("Using requested carrier configuration '%s' (version 0x%08x, size %u bytes)", - config->description, config->version, config->total_size); + mm_obj_dbg (self, "using requested carrier configuration '%s' (version 0x%08x, size %u bytes)", + config->description, config->version, config->total_size); } ctx->step++; @@ -2464,11 +2580,13 @@ static void setup_carrier_config_step (GTask *task) { + MMSharedQmi *self; SetupCarrierConfigContext *ctx; Private *priv; - ctx = g_task_get_task_data (task); - priv = get_private (g_task_get_source_object (task)); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); + priv = get_private (self); switch (ctx->step) { case SETUP_CARRIER_CONFIG_STEP_FIRST: @@ -2483,7 +2601,7 @@ g_assert (ctx->config_requested_i >= 0); g_assert (priv->config_active_i >= 0 || priv->config_active_default); if (ctx->config_requested_i == priv->config_active_i) { - mm_info ("Carrier config switching not needed: already using '%s'", ctx->config_requested); + mm_obj_info (self, "carrier config switching not needed: already using '%s'", ctx->config_requested); ctx->step = SETUP_CARRIER_CONFIG_STEP_LAST; setup_carrier_config_step (task); return; @@ -2500,8 +2618,8 @@ requested_config = &g_array_index (priv->config_list, ConfigInfo, ctx->config_requested_i); active_config = (priv->config_active_default ? NULL : &g_array_index (priv->config_list, ConfigInfo, priv->config_active_i)); - mm_warn ("Carrier config switching needed: '%s' -> '%s'", - active_config ? active_config->description : DEFAULT_CONFIG_DESCRIPTION, requested_config->description); + mm_obj_warn (self, "carrier config switching needed: '%s' -> '%s'", + active_config ? active_config->description : DEFAULT_CONFIG_DESCRIPTION, requested_config->description); type_and_id.config_type = requested_config->config_type;; type_and_id.id = requested_config->id; @@ -2542,6 +2660,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); break; + + default: + g_assert_not_reached (); } } @@ -2721,13 +2842,15 @@ QmiIndicationPdcGetSelectedConfigOutput *output, GTask *task) { + MMSharedQmi *self; LoadCarrierConfigContext *ctx; GArray *active_id = NULL; GError *error = NULL; guint16 error_code = 0; guint i; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); if (!qmi_indication_pdc_get_selected_config_output_get_indication_result (output, &error_code, &error)) { load_carrier_config_abort (task, error); @@ -2744,7 +2867,7 @@ qmi_indication_pdc_get_selected_config_output_get_active_id (output, &active_id, NULL); if (!active_id) { - mm_dbg ("no carrier config currently selected (default in use)"); + mm_obj_dbg (self, "no carrier config currently selected (default in use)"); ctx->config_active_default = TRUE; goto next; } @@ -2817,7 +2940,7 @@ ConfigInfo *current_config = NULL; guint32 token; const gchar *description; - int i; + guint i; guint16 error_code = 0; ctx = g_task_get_task_data (task); @@ -2880,13 +3003,15 @@ QmiIndicationPdcListConfigsOutput *output, GTask *task) { + MMSharedQmi *self; LoadCarrierConfigContext *ctx; GError *error = NULL; GArray *configs = NULL; - int i; + guint i; guint16 error_code = 0; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); if (!qmi_indication_pdc_list_configs_output_get_indication_result (output, &error_code, &error)) { load_carrier_config_abort (task, error); @@ -2914,7 +3039,7 @@ } /* Preallocate config list and request details for each */ - mm_dbg ("found %u carrier configurations...", configs->len); + mm_obj_dbg (self, "found %u carrier configurations...", configs->len); ctx->config_list = g_array_sized_new (FALSE, TRUE, sizeof (ConfigInfo), configs->len); g_array_set_size (ctx->config_list, configs->len); g_array_set_clear_func (ctx->config_list, (GDestroyNotify) config_info_clear); @@ -3034,6 +3159,9 @@ g_task_return_boolean (task, TRUE); g_object_unref (task); break; + + default: + g_assert_not_reached (); } } @@ -3070,6 +3198,973 @@ } /*****************************************************************************/ +/* Load SIM slots (modem interface) */ + +typedef struct { + QmiClientUim *client_uim; + GPtrArray *sim_slots; + GList *sorted_sims; + MMBaseSim *current_sim; + guint current_slot_number; + guint active_slot_number; + guint active_logical_id; +} LoadSimSlotsContext; + +static void +load_sim_slots_context_free (LoadSimSlotsContext *ctx) +{ + g_clear_object (&ctx->current_sim); + g_list_free_full (ctx->sorted_sims, (GDestroyNotify)g_object_unref); + g_clear_pointer (&ctx->sim_slots, g_ptr_array_unref); + g_clear_object (&ctx->client_uim); + g_slice_free (LoadSimSlotsContext, ctx); +} + +static void +sim_slot_free (MMBaseSim *sim) +{ + if (sim) + g_object_unref (sim); +} + +gboolean +mm_shared_qmi_load_sim_slots_finish (MMIfaceModem *self, + GAsyncResult *res, + GPtrArray **sim_slots, + guint *primary_sim_slot, + GError **error) +{ + LoadSimSlotsContext *ctx; + + if (!g_task_propagate_boolean (G_TASK (res), error)) + return FALSE; + + ctx = g_task_get_task_data (G_TASK (res)); + if (sim_slots) + *sim_slots = g_steal_pointer (&ctx->sim_slots); + if (primary_sim_slot) + *primary_sim_slot = ctx->active_slot_number; + return TRUE; +} + +static void +active_slot_switch_ready (QmiClientUim *client, + GAsyncResult *res, + GTask *task) +{ + g_autoptr(QmiMessageUimSwitchSlotOutput) output = NULL; + g_autoptr(GError) error = NULL; + MMIfaceModem *self; + LoadSimSlotsContext *ctx; + + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); + + output = qmi_client_uim_switch_slot_finish (client, res, &error); + if ((!output || !qmi_message_uim_switch_slot_output_get_result (output, &error)) && + !g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_NO_EFFECT)) { + mm_obj_err (self, "couldn't switch to original slot %u", ctx->active_slot_number); + g_task_return_error (task, g_steal_pointer (&error)); + } else + g_task_return_boolean (task, TRUE); + g_object_unref (task); +} + +static void +reload_active_slot (GTask *task) +{ + g_autoptr(QmiMessageUimSwitchSlotInput) input = NULL; + LoadSimSlotsContext *ctx; + MMIfaceModem *self; + + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); + + /* If we're already in the original active SIM slot, nothing else to do */ + if (ctx->current_slot_number == ctx->active_slot_number) { + g_task_return_boolean (task, TRUE); + g_object_unref (task); + return; + } + + mm_obj_dbg (self, "switching to original active SIM at slot %u", ctx->active_slot_number); + + /* Switch to the original active slot */ + input = qmi_message_uim_switch_slot_input_new (); + qmi_message_uim_switch_slot_input_set_logical_slot (input, (guint8) ctx->active_logical_id, NULL); + qmi_message_uim_switch_slot_input_set_physical_slot (input, ctx->active_slot_number, NULL); + qmi_client_uim_switch_slot (ctx->client_uim, + input, + 10, + NULL, + (GAsyncReadyCallback) active_slot_switch_ready, + task); +} + +static void load_next_sim_info (GTask *task); + +static void +next_sim_initialize_ready (MMBaseSim *sim, + GAsyncResult *res, + GTask *task) +{ + g_autoptr(GError) error = NULL; + MMIfaceModem *self; + LoadSimSlotsContext *ctx; + + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); + + if (!mm_base_sim_initialize_finish (sim, res, &error)) + mm_obj_dbg (self, "couldn't initialize SIM at slot %u: won't load additional info", + ctx->current_slot_number); + else + mm_obj_dbg (self, "initialized SIM at slot %u", + ctx->current_slot_number); + + /* Iterate to next SIM */ + load_next_sim_info (task); +} + +static void +next_sim_switch_ready (QmiClientUim *client, + GAsyncResult *res, + GTask *task) +{ + g_autoptr(QmiMessageUimSwitchSlotOutput) output = NULL; + g_autoptr(GError) error = NULL; + MMIfaceModem *self; + LoadSimSlotsContext *ctx; + + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); + + output = qmi_client_uim_switch_slot_finish (client, res, &error); + if (!output || !qmi_message_uim_switch_slot_output_get_result (output, &error)) { + /* ignore NoEffect errors on slot switch, because that indicates we're + * already in the desired slot */ + if (!g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_NO_EFFECT)) { + mm_obj_dbg (self, "couldn't switch to SIM at slot %u: won't load additional info", + ctx->current_slot_number); + load_next_sim_info (task); + return; + } + } + + mm_obj_dbg (self, "switched to SIM at slot %u: initializing...", + ctx->current_slot_number); + + mm_base_sim_initialize (ctx->current_sim, + NULL, + (GAsyncReadyCallback) next_sim_initialize_ready, + task); +} + +static void +load_next_sim_info (GTask *task) +{ + g_autoptr(QmiMessageUimSwitchSlotInput) input = NULL; + LoadSimSlotsContext *ctx; + MMIfaceModem *self; + + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); + + /* All done? */ + if (!ctx->sorted_sims) { + mm_obj_dbg (self, "no more SIMs to load info from"); + reload_active_slot (task); + return; + } + + /* Steal SIM from list */ + g_clear_object (&ctx->current_sim); + ctx->current_sim = MM_BASE_SIM (ctx->sorted_sims->data); + ctx->sorted_sims = g_list_delete_link (ctx->sorted_sims, ctx->sorted_sims); + ctx->current_slot_number = mm_base_sim_get_slot_number (ctx->current_sim); + + mm_obj_dbg (self, "switching to SIM at slot %u: %s", + ctx->current_slot_number, mm_base_sim_get_path (ctx->current_sim)); + + /* Switch to the next slot */ + input = qmi_message_uim_switch_slot_input_new (); + qmi_message_uim_switch_slot_input_set_logical_slot (input, (guint8) ctx->active_logical_id, NULL); + qmi_message_uim_switch_slot_input_set_physical_slot (input, ctx->current_slot_number, NULL); + qmi_client_uim_switch_slot (ctx->client_uim, + input, + 10, + NULL, + (GAsyncReadyCallback) next_sim_switch_ready, + task); +} + +static void +uim_get_slot_status_ready (QmiClientUim *client, + GAsyncResult *res, + GTask *task) +{ + g_autoptr(QmiMessageUimGetSlotStatusOutput) output = NULL; + LoadSimSlotsContext *ctx; + MMIfaceModem *self; + GError *error = NULL; + GArray *physical_slots = NULL; + GArray *ext_information = NULL; + GArray *slot_eids = NULL; + guint i; + + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); + + output = qmi_client_uim_get_slot_status_finish (client, res, &error); + if (!output || + !qmi_message_uim_get_slot_status_output_get_result (output, &error) || + !qmi_message_uim_get_slot_status_output_get_physical_slot_status (output, &physical_slots, &error)) { + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + /* It's fine if we don't have EID information, but it should be well-formed if present. If it's malformed, + * there is probably a modem firmware bug. */ + if (qmi_message_uim_get_slot_status_output_get_physical_slot_information (output, &ext_information, NULL) && + qmi_message_uim_get_slot_status_output_get_slot_eid_information (output, &slot_eids, NULL) && + (ext_information->len != physical_slots->len || slot_eids->len != physical_slots->len)) { + g_task_return_new_error (task, + MM_CORE_ERROR, + MM_CORE_ERROR_FAILED, + "UIM Get Slot Status returned malformed response"); + g_object_unref (task); + return; + } + + ctx->sim_slots = g_ptr_array_new_full (physical_slots->len, (GDestroyNotify) sim_slot_free); + + for (i = 0; i < physical_slots->len; i++) { + QmiPhysicalSlotStatusSlot *slot_status; + QmiPhysicalSlotInformationSlot *slot_info; + MMBaseSim *sim; + g_autofree gchar *raw_iccid = NULL; + g_autofree gchar *iccid = NULL; + g_autofree gchar *eid = NULL; + g_autoptr(GError) inner_error = NULL; + gboolean sim_active = FALSE; + + /* Store active slot info */ + slot_status = &g_array_index (physical_slots, QmiPhysicalSlotStatusSlot, i); + if (slot_status->physical_slot_status == QMI_UIM_SLOT_STATE_ACTIVE) { + sim_active = TRUE; + ctx->active_logical_id = slot_status->logical_slot; + ctx->active_slot_number = i + 1; + ctx->current_slot_number = ctx->active_slot_number; + } + + if (!slot_status->iccid->len) { + mm_obj_dbg (self, "not creating SIM object: no SIM in slot %u", i + 1); + g_ptr_array_add (ctx->sim_slots, NULL); + continue; + } + + raw_iccid = mm_bcd_to_string ((const guint8 *)slot_status->iccid->data, slot_status->iccid->len, + TRUE /* low_nybble_first */); + if (!raw_iccid) { + mm_obj_warn (self, "not creating SIM object: failed to convert ICCID from BCD"); + g_ptr_array_add (ctx->sim_slots, NULL); + continue; + } + + iccid = mm_3gpp_parse_iccid (raw_iccid, &inner_error); + if (!iccid) { + mm_obj_warn (self, "not creating SIM object: couldn't parse SIM iccid: %s", inner_error->message); + g_ptr_array_add (ctx->sim_slots, NULL); + continue; + } + + if (ext_information && slot_eids) { + slot_info = &g_array_index (ext_information, QmiPhysicalSlotInformationSlot, i); + if (slot_info->is_euicc) { + GArray *slot_eid; + + slot_eid = g_array_index (slot_eids, GArray *, i); + if (slot_eid->len) + eid = mm_qmi_uim_decode_eid (slot_eid->data, slot_eid->len); + if (!eid) + mm_obj_dbg (self, "SIM in slot %d is marked as eUICC, but has malformed EID", i + 1); + } + } + + sim = mm_sim_qmi_new_initialized (MM_BASE_MODEM (self), + TRUE, /* consider DMS UIM deprecated if we're creating SIM slots */ + i + 1, /* slot number is the array index starting at 1 */ + sim_active, + iccid, + NULL, /* imsi unknown */ + eid, /* may be NULL, which is fine */ + NULL, /* operator id unknown */ + NULL, /* operator name unknown */ + NULL); /* emergency numbers unknown */ + g_ptr_array_add (ctx->sim_slots, sim); + + if (sim_active) + ctx->sorted_sims = g_list_append (ctx->sorted_sims, g_object_ref (sim)); + else + ctx->sorted_sims = g_list_prepend (ctx->sorted_sims, g_object_ref (sim)); + } + g_assert_cmpuint (ctx->sim_slots->len, ==, physical_slots->len); + + /* Now, iterate over all the SIMs, we'll attempt to load info from them by + * quickly switching over to them, leaving the active SIM to the end */ + load_next_sim_info (task); +} + +void +mm_shared_qmi_load_sim_slots (MMIfaceModem *self, + GAsyncReadyCallback callback, + gpointer user_data) +{ + LoadSimSlotsContext *ctx; + GTask *task; + QmiClient *client = NULL; + + if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), + QMI_SERVICE_UIM, &client, + callback, user_data)) + return; + + task = g_task_new (self, NULL, callback, user_data); + + ctx = g_slice_new0 (LoadSimSlotsContext); + ctx->client_uim = g_object_ref (client); + g_task_set_task_data (task, ctx, (GDestroyNotify) load_sim_slots_context_free); + + qmi_client_uim_get_slot_status (ctx->client_uim, + NULL, + 10, + NULL, + (GAsyncReadyCallback) uim_get_slot_status_ready, + task); +} + +/*****************************************************************************/ +/* Set Primary SIM slot (modem interface) */ + +gboolean +mm_shared_qmi_set_primary_sim_slot_finish (MMIfaceModem *self, + GAsyncResult *res, + GError **error) +{ + return g_task_propagate_boolean (G_TASK (res), error); +} + +static void +uim_switch_slot_ready (QmiClientUim *client, + GAsyncResult *res, + GTask *task) +{ + g_autoptr(QmiMessageUimSwitchSlotOutput) output = NULL; + g_autoptr(GError) error = NULL; + MMIfaceModem *self; + + self = g_task_get_source_object (task); + + output = qmi_client_uim_switch_slot_finish (client, res, &error); + if (!output || !qmi_message_uim_switch_slot_output_get_result (output, &error)) { + if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_NO_EFFECT)) + g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_EXISTS, + "SIM slot switch operation not needed"); + else + g_task_return_error (task, g_steal_pointer (&error)); + } else { + mm_obj_info (self, "SIM slot switch operation request successful"); + g_task_return_boolean (task, TRUE); + } + g_object_unref (task); +} + +static void +uim_switch_get_slot_status_ready (QmiClientUim *client, + GAsyncResult *res, + GTask *task) +{ + g_autoptr(QmiMessageUimGetSlotStatusOutput) output = NULL; + g_autoptr(QmiMessageUimSwitchSlotInput) input = NULL; + MMIfaceModem *self; + GError *error = NULL; + GArray *physical_slots = NULL; + guint i; + guint active_logical_id = 0; + guint active_slot_number; + guint slot_number; + + self = g_task_get_source_object (task); + slot_number = GPOINTER_TO_UINT (g_task_get_task_data (task)); + + output = qmi_client_uim_get_slot_status_finish (client, res, &error); + if (!output || + !qmi_message_uim_get_slot_status_output_get_result (output, &error) || + !qmi_message_uim_get_slot_status_output_get_physical_slot_status (output, &physical_slots, &error)) { + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + for (i = 0; i < physical_slots->len; i++) { + QmiPhysicalSlotStatusSlot *slot_status; + + /* We look for the currently ACTIVE SIM card only! */ + slot_status = &g_array_index (physical_slots, QmiPhysicalSlotStatusSlot, i); + if (slot_status->physical_slot_status != QMI_UIM_SLOT_STATE_ACTIVE) + continue; + + active_logical_id = slot_status->logical_slot; + active_slot_number = i + 1; + } + + if (!active_logical_id) { + g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, + "couldn't find active slot logical ID"); + g_object_unref (task); + return; + } + + if (active_slot_number == slot_number) { + g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_EXISTS, + "SIM slot switch operation not needed"); + g_object_unref (task); + return; + } + + mm_obj_dbg (self, "requesting active logical id %d switch to SIM slot %u", active_logical_id, slot_number); + + input = qmi_message_uim_switch_slot_input_new (); + qmi_message_uim_switch_slot_input_set_logical_slot (input, (guint8) active_logical_id, NULL); + qmi_message_uim_switch_slot_input_set_physical_slot (input, slot_number, NULL); + qmi_client_uim_switch_slot (client, + input, + 10, + NULL, + (GAsyncReadyCallback) uim_switch_slot_ready, + task); +} + +void +mm_shared_qmi_set_primary_sim_slot (MMIfaceModem *self, + guint sim_slot, + GAsyncReadyCallback callback, + gpointer user_data) +{ + GTask *task; + QmiClient *client = NULL; + + if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), + QMI_SERVICE_UIM, &client, + callback, user_data)) + return; + + task = g_task_new (self, NULL, callback, user_data); + g_task_set_task_data (task, GUINT_TO_POINTER (sim_slot), NULL); + + qmi_client_uim_get_slot_status (QMI_CLIENT_UIM (client), + NULL, + 10, + NULL, + (GAsyncReadyCallback) uim_switch_get_slot_status_ready, + task); +} + +/*****************************************************************************/ +/* SIM hot swap detection */ + +#define REFRESH_START_TIMEOUT_SECS 3 + +gboolean +mm_shared_qmi_setup_sim_hot_swap_finish (MMIfaceModem *self, + GAsyncResult *res, + GError **error) +{ + return g_task_propagate_boolean (G_TASK (res), error); +} + +static void +uim_refresh_complete (QmiClientUim *client, + QmiUimSessionType session_type) +{ + g_autoptr(QmiMessageUimRefreshCompleteInput) refresh_complete_input = NULL; + GArray *dummy_aid; + + dummy_aid = g_array_new (FALSE, FALSE, sizeof (guint8)); + + refresh_complete_input = qmi_message_uim_refresh_complete_input_new (); + qmi_message_uim_refresh_complete_input_set_session ( + refresh_complete_input, + session_type, + dummy_aid, /* ignored */ + NULL); + qmi_message_uim_refresh_complete_input_set_info ( + refresh_complete_input, + TRUE, + NULL); + + qmi_client_uim_refresh_complete ( + client, + refresh_complete_input, + 10, + NULL, + NULL, + NULL); + g_array_unref (dummy_aid); +} + +static gboolean +uim_start_refresh_timeout (MMSharedQmi *self) +{ + Private *priv; + + priv = get_private (self); + priv->uim_refresh_start_timeout_id = 0; + + mm_obj_dbg (self, "refresh start timed out; trigger SIM change check"); + + mm_iface_modem_check_for_sim_swap (MM_IFACE_MODEM (self), 0, NULL, NULL, NULL); + + return G_SOURCE_REMOVE; +} + +static void +uim_refresh_indication_cb (QmiClientUim *client, + QmiIndicationUimRefreshOutput *output, + MMSharedQmi *self) +{ + QmiUimRefreshStage stage; + QmiUimRefreshMode mode; + QmiUimSessionType session_type; + Private *priv; + g_autoptr(GError) error = NULL; + + priv = get_private (self); + + if (!qmi_indication_uim_refresh_output_get_event (output, + &stage, + &mode, + &session_type, + NULL, + NULL, + &error)) { + mm_obj_warn (self, "couldn't process UIM refresh indication: %s", error->message); + return; + } + + mm_obj_dbg (self, "refresh indication received: session type '%s', stage '%s', mode '%s'", + qmi_uim_session_type_get_string (session_type), + qmi_uim_refresh_stage_get_string (stage), + qmi_uim_refresh_mode_get_string (mode)); + + /* Support only the first slot for now. Primary GW provisioning is used in old modems. */ + if (session_type != QMI_UIM_SESSION_TYPE_CARD_SLOT_1 && + session_type != QMI_UIM_SESSION_TYPE_PRIMARY_GW_PROVISIONING) { + mm_obj_warn (self, "refresh session type not supported: %s", qmi_uim_session_type_get_string (session_type)); + return; + } + + /* Currently we handle only UICC Reset type refresh, which can be used + * in profile switch scenarios. In other cases we just trigger 'refresh + * complete' during start phase. Signal to notify about potential SIM + * profile switch is triggered when the refresh is ending. If it were + * triggered in start phase, reading SIM files seems to fail with + * an internal error. + * + * It's possible that 'end-with-success' stage never appears. For that, + * we start a timer at 'start' stage and if it expires, the SIM change + * check is triggered anyway. */ + if (stage == QMI_UIM_REFRESH_STAGE_START) { + if (mode == QMI_UIM_REFRESH_MODE_RESET) { + if (!priv->uim_refresh_start_timeout_id) + priv->uim_refresh_start_timeout_id = g_timeout_add_seconds (REFRESH_START_TIMEOUT_SECS, + (GSourceFunc)uim_start_refresh_timeout, + self); + } else + uim_refresh_complete (client, session_type); + } else if (stage == QMI_UIM_REFRESH_STAGE_END_WITH_SUCCESS) { + if (mode == QMI_UIM_REFRESH_MODE_RESET) { + if (priv->uim_refresh_start_timeout_id) { + g_source_remove (priv->uim_refresh_start_timeout_id); + priv->uim_refresh_start_timeout_id = 0; + } + mm_iface_modem_check_for_sim_swap (MM_IFACE_MODEM (self), 0, NULL, NULL, NULL); + } + } +} + +static void +uim_slot_status_indication_cb (QmiClientUim *client, + QmiIndicationUimSlotStatusOutput *output, + MMSharedQmi *self) +{ + GArray *physical_slots = NULL; + guint i; + g_autoptr(GError) error = NULL; + + mm_obj_dbg (self, "received slot status indication"); + + if (!qmi_indication_uim_slot_status_output_get_physical_slot_status (output, + &physical_slots, + &error)) { + mm_obj_warn (self, "could not process slot status indication: %s", error->message); + return; + } + + for (i = 0; i < physical_slots->len; i++) { + QmiPhysicalSlotStatusSlot *slot_status; + + slot_status = &g_array_index (physical_slots, QmiPhysicalSlotStatusSlot, i); + + /* We only care about active slot changes */ + if (slot_status->physical_slot_status == QMI_UIM_SLOT_STATE_ACTIVE) { + g_autofree gchar *iccid = NULL; + + if (slot_status->iccid && slot_status->iccid->len > 0) { + iccid = mm_bcd_to_string ((const guint8 *) slot_status->iccid->data, slot_status->iccid->len, + TRUE /* low_nybble_first */); + } + + mm_iface_modem_check_for_sim_swap (MM_IFACE_MODEM (self), + i + 1, /* Slot index */ + iccid, + NULL, + NULL); + } + } +} + +static void +uim_refresh_register_iccid_change_ready (QmiClientUim *client, + GAsyncResult *res, + GTask *task) +{ + MMSharedQmi *self; + Private *priv; + g_autoptr(QmiMessageUimRefreshRegisterOutput) output = NULL; + g_autoptr(GError) error = NULL; + + self = g_task_get_source_object (task); + priv = get_private (self); + + output = qmi_client_uim_refresh_register_finish (client, res, &error); + if (!output || !qmi_message_uim_refresh_register_output_get_result (output, &error)) { + mm_obj_dbg (self, "refresh registration using 'refresh register' failed: %s", error->message); + g_clear_object (&priv->uim_client); + g_task_return_new_error (task, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_NOT_SUPPORTED, + "SIM hot swap detection not supported by modem"); + } else { + mm_obj_dbg (self, "registered for SIM refresh events using 'refresh register'"); + priv->uim_refresh_indication_id = + g_signal_connect (client, + "refresh", + G_CALLBACK (uim_refresh_indication_cb), + self); + g_task_return_boolean (task, TRUE); + } + g_object_unref (task); +} + +/* This is the last resort if 'refresh register all' does not work. It works + * on some older modems. Those modems may not also support QMI_UIM_SESSION_TYPE_CARD_SLOT_1 + * so we'll use QMI_UIM_SESSION_TYPE_PRIMARY_GW_PROVISIONING */ +static void +uim_refresh_register_iccid_change (GTask *task) +{ + MMSharedQmi *self; + Private *priv; + QmiMessageUimRefreshRegisterInputInfoFilesElement file_element; + guint8 val; + g_autoptr(QmiMessageUimRefreshRegisterInput) refresh_register_input = NULL; + g_autoptr(GArray) dummy_aid = NULL; + g_autoptr(GArray) file = NULL; + g_autoptr(GArray) file_element_path = NULL; + + self = g_task_get_source_object (task); + priv = get_private (MM_SHARED_QMI (self)); + + mm_obj_dbg (self, "register for refresh file indication"); + + dummy_aid = g_array_new (FALSE, FALSE, sizeof (guint8)); + + file = g_array_sized_new (FALSE, FALSE, sizeof (QmiMessageUimRefreshRegisterInputInfoFilesElement), 1); + + file_element_path = g_array_sized_new (FALSE, FALSE, sizeof (guint8), 2); + val = 0x00; + g_array_append_val (file_element_path, val); + val = 0x3F; + g_array_append_val (file_element_path, val); + + + memset (&file_element, 0, sizeof (file_element)); + file_element.file_id = 0x2FE2; /* ICCID */ + file_element.path = file_element_path; + g_array_append_val (file, file_element); + + refresh_register_input = qmi_message_uim_refresh_register_input_new (); + qmi_message_uim_refresh_register_input_set_info (refresh_register_input, + TRUE, + FALSE, + file, + NULL); + qmi_message_uim_refresh_register_input_set_session (refresh_register_input, + QMI_UIM_SESSION_TYPE_PRIMARY_GW_PROVISIONING, + dummy_aid, + NULL); + + qmi_client_uim_refresh_register (QMI_CLIENT_UIM (priv->uim_client), + refresh_register_input, + 10, + NULL, + (GAsyncReadyCallback) uim_refresh_register_iccid_change_ready, + task); +} + +/* Refresh registration and event handling. + * This is used only as fallback in case slot status indications do not work + * in the particular modem (determined by UIM Get Slot Status failing) for + * detecting ICCID changing due to a profile switch. + * + * We assume that devices not supporting UIM Get Slot Status only have a + * single slot, for which we register refresh events. + */ + +static void +uim_refresh_register_all_ready (QmiClientUim *client, + GAsyncResult *res, + GTask *task) +{ + g_autoptr(QmiMessageUimRefreshRegisterAllOutput) output = NULL; + g_autoptr(GError) error = NULL; + MMIfaceModem *self; + Private *priv; + + self = g_task_get_source_object (task); + priv = get_private (MM_SHARED_QMI (self)); + + output = qmi_client_uim_refresh_register_all_finish (client, res, &error); + if (!output || !qmi_message_uim_refresh_register_all_output_get_result (output, &error)) { + if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_NOT_SUPPORTED) || + g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND)) { + /* As last resort, if 'refresh register all' fails, try a plain 'refresh register'. + * Some older modems may not support 'refresh register all'. */ + uim_refresh_register_iccid_change (task); + return; + } + + mm_obj_dbg (self, "refresh register all operation failed: %s", error->message); + g_clear_object (&priv->uim_client); + g_task_return_error (task, g_steal_pointer (&error)); + } else { + mm_obj_dbg (self, "registered for all SIM refresh events"); + priv->uim_refresh_indication_id = + g_signal_connect (client, + "refresh", + G_CALLBACK (uim_refresh_indication_cb), + self); + g_task_return_boolean (task, TRUE); + } + g_object_unref (task); +} + +static void +uim_slot_status_not_supported (GTask *task) +{ + MMIfaceModem *self; + Private *priv; + g_autoptr(QmiMessageUimRefreshRegisterAllInput) refresh_register_all_input = NULL; + g_autoptr(GArray) dummy_aid = NULL; + + self = g_task_get_source_object (task); + priv = get_private (MM_SHARED_QMI (self)); + + g_assert (!priv->uim_refresh_indication_id); + + mm_obj_dbg (self, "slot status not supported by modem: register for refresh indications"); + + dummy_aid = g_array_new (FALSE, FALSE, sizeof (guint8)); + refresh_register_all_input = qmi_message_uim_refresh_register_all_input_new (); + + qmi_message_uim_refresh_register_all_input_set_info (refresh_register_all_input, + TRUE, + NULL); + qmi_message_uim_refresh_register_all_input_set_session (refresh_register_all_input, + QMI_UIM_SESSION_TYPE_CARD_SLOT_1, + dummy_aid, + NULL); + + qmi_client_uim_refresh_register_all (QMI_CLIENT_UIM (priv->uim_client), + refresh_register_all_input, + 10, + NULL, + (GAsyncReadyCallback) uim_refresh_register_all_ready, + task); +} + +static void +uim_check_get_slot_status_ready (QmiClientUim *client, + GAsyncResult *res, + GTask *task) +{ + g_autoptr(QmiMessageUimGetSlotStatusOutput) output = NULL; + g_autoptr(GError) error = NULL; + MMIfaceModem *self; + Private *priv; + + self = g_task_get_source_object (task); + priv = get_private (MM_SHARED_QMI (self)); + + output = qmi_client_uim_get_slot_status_finish (client, res, &error); + if (!output || !qmi_message_uim_get_slot_status_output_get_result (output, &error)) { + if (priv->uim_slot_status_indication_id) { + g_signal_handler_disconnect (client, priv->uim_slot_status_indication_id); + priv->uim_slot_status_indication_id = 0; + } + + if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_NOT_SUPPORTED) || + g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND)) { + uim_slot_status_not_supported (task); + return; + } + + mm_obj_dbg (self, "slot status retrieval failed: %s", error->message); + g_clear_object (&priv->uim_client); + g_task_return_error (task, g_steal_pointer (&error)); + g_object_unref (task); + return; + } + + mm_obj_dbg (self, "slot status retrieval succeeded: monitoring slot status indications"); + g_task_return_boolean (task, TRUE); + g_object_unref (task); +} + +static void +uim_register_events_ready (QmiClientUim *client, + GAsyncResult *res, + GTask *task) +{ + g_autoptr(QmiMessageUimRegisterEventsOutput) output = NULL; + g_autoptr(GError) error = NULL; + MMIfaceModem *self; + Private *priv; + + self = g_task_get_source_object (task); + priv = get_private (MM_SHARED_QMI (self)); + + /* If event registration fails, go on with initialization. In that case + * we cannot use slot status indications to detect eUICC profile switches. */ + output = qmi_client_uim_register_events_finish (client, res, &error); + if (output && qmi_message_uim_register_events_output_get_result (output, &error)) { + g_assert (!priv->uim_slot_status_indication_id); + priv->uim_slot_status_indication_id = g_signal_connect (priv->uim_client, + "slot-status", + G_CALLBACK (uim_slot_status_indication_cb), + self); + mm_obj_dbg (self, "registered for slot status indications"); + + /* Successful registration does not mean that the modem actually sends + * physical slot status indications; invoke Get Slot Status to find out if + * the modem really supports slot status. */ + qmi_client_uim_get_slot_status (client, + NULL, + 10, + NULL, + (GAsyncReadyCallback) uim_check_get_slot_status_ready, + task); + return; + } + + mm_obj_dbg (self, "not registered for slot status indications: %s", error->message); + uim_slot_status_not_supported (task); +} + +void +mm_shared_qmi_setup_sim_hot_swap (MMIfaceModem *self, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_autoptr(QmiMessageUimRegisterEventsInput) register_events_input = NULL; + GTask *task; + QmiClient *client = NULL; + Private *priv; + + if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), + QMI_SERVICE_UIM, &client, + callback, user_data)) + return; + + task = g_task_new (self, NULL, callback, user_data); + priv = get_private (MM_SHARED_QMI (self)); + + g_assert (!priv->uim_slot_status_indication_id); + g_assert (!priv->uim_client); + priv->uim_client = g_object_ref (client); + + register_events_input = qmi_message_uim_register_events_input_new (); + qmi_message_uim_register_events_input_set_event_registration_mask (register_events_input, + QMI_UIM_EVENT_REGISTRATION_FLAG_PHYSICAL_SLOT_STATUS, + NULL); + qmi_client_uim_register_events (QMI_CLIENT_UIM (priv->uim_client), + register_events_input, + 10, + NULL, + (GAsyncReadyCallback) uim_register_events_ready, + task); +} + +/*****************************************************************************/ +/* FCC unlock (Modem interface) */ + +gboolean +mm_shared_qmi_fcc_unlock_finish (MMIfaceModem *self, + GAsyncResult *res, + GError **error) +{ + return g_task_propagate_boolean (G_TASK (res), error); +} + +static void +dms_set_fcc_authentication_ready (QmiClientDms *client, + GAsyncResult *res, + GTask *task) +{ + GError *error = NULL; + g_autoptr(QmiMessageDmsSetFccAuthenticationOutput) output = NULL; + + output = qmi_client_dms_set_fcc_authentication_finish (client, res, &error); + if (!output || !qmi_message_dms_set_fcc_authentication_output_get_result (output, &error)) + g_task_return_error (task, error); + else + g_task_return_boolean (task, TRUE); + g_object_unref (task); +} + +void +mm_shared_qmi_fcc_unlock (MMIfaceModem *self, + GAsyncReadyCallback callback, + gpointer user_data) +{ + GTask *task; + QmiClient *client = NULL; + + if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), + QMI_SERVICE_DMS, &client, + callback, user_data)) + return; + + task = g_task_new (self, NULL, callback, user_data); + + qmi_client_dms_set_fcc_authentication (QMI_CLIENT_DMS (client), + NULL, + 5, + NULL, + (GAsyncReadyCallback)dms_set_fcc_authentication_ready, + task); +} + +/*****************************************************************************/ /* Location: Set SUPL server */ typedef struct { @@ -3816,15 +4911,15 @@ output, &session_status, NULL)) { - mm_dbg ("[GPS] session status changed: '%s'", - qmi_pds_position_session_status_get_string (session_status)); + mm_obj_dbg (self, "[GPS] session status changed: '%s'", + qmi_pds_position_session_status_get_string (session_status)); } if (qmi_indication_pds_event_report_output_get_nmea_position ( output, &nmea, NULL)) { - mm_dbg ("[NMEA] %s", nmea); + mm_obj_dbg (self, "[NMEA] %s", nmea); mm_iface_modem_location_gps_update (MM_IFACE_MODEM_LOCATION (self), nmea); } } @@ -3840,11 +4935,235 @@ if (!nmea) return; - mm_dbg ("[NMEA] %s", nmea); + mm_obj_dbg (self, "[NMEA] %s", nmea); mm_iface_modem_location_gps_update (MM_IFACE_MODEM_LOCATION (self), nmea); } /*****************************************************************************/ +/* Location: internal helper: setup minimum required NMEA traces */ + +typedef struct { + QmiClientLoc *client; + guint timeout_id; + gulong indication_id; +} SetupRequiredNmeaTracesContext; + +static void +setup_required_nmea_traces_cleanup_action (SetupRequiredNmeaTracesContext *ctx) +{ + if (ctx->indication_id) { + g_signal_handler_disconnect (ctx->client, ctx->indication_id); + ctx->indication_id = 0; + } + if (ctx->timeout_id) { + g_source_remove (ctx->timeout_id); + ctx->timeout_id = 0; + } +} + +static void +setup_required_nmea_traces_context_free (SetupRequiredNmeaTracesContext *ctx) +{ + setup_required_nmea_traces_cleanup_action (ctx); + g_clear_object (&ctx->client); + g_slice_free (SetupRequiredNmeaTracesContext, ctx); +} + +static gboolean +setup_required_nmea_traces_finish (MMSharedQmi *self, + GAsyncResult *res, + GError **error) +{ + return g_task_propagate_boolean (G_TASK (res), error); +} + +static gboolean +setup_required_nmea_traces_timeout (GTask *task) +{ + SetupRequiredNmeaTracesContext *ctx; + + ctx = g_task_get_task_data (task); + g_assert (ctx->timeout_id); + setup_required_nmea_traces_cleanup_action (ctx); + + g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_ABORTED, + "Operation timed out"); + g_object_unref (task); + return G_SOURCE_REMOVE; +} + +static void +loc_set_nmea_types_indication_cb (QmiClientLoc *client, + QmiIndicationLocSetNmeaTypesOutput *output, + GTask *task) +{ + SetupRequiredNmeaTracesContext *ctx; + QmiLocIndicationStatus status; + GError *error = NULL; + + ctx = g_task_get_task_data (task); + g_assert (ctx->indication_id); + setup_required_nmea_traces_cleanup_action (ctx); + + if (!qmi_indication_loc_set_nmea_types_output_get_indication_status (output, &status, &error) || + !mm_error_from_qmi_loc_indication_status (status, &error)) + g_task_return_error (task, error); + else + g_task_return_boolean (task, TRUE); + g_object_unref (task); +} + +static void +loc_set_nmea_types_ready (QmiClientLoc *client, + GAsyncResult *res, + GTask *task) +{ + SetupRequiredNmeaTracesContext *ctx; + GError *error = NULL; + g_autoptr(QmiMessageLocSetNmeaTypesOutput) output = NULL; + + output = qmi_client_loc_set_nmea_types_finish (client, res, &error); + if (!output || !qmi_message_loc_set_nmea_types_output_get_result (output, &error)) { + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + /* The task ownership is shared between signal and timeout; the one which is + * scheduled first will cancel the other. */ + ctx = g_task_get_task_data (task); + g_assert (!ctx->indication_id); + ctx->indication_id = g_signal_connect (ctx->client, + "set-nmea-types", + G_CALLBACK (loc_set_nmea_types_indication_cb), + task); + g_assert (!ctx->timeout_id); + ctx->timeout_id = g_timeout_add_seconds (10, + (GSourceFunc)setup_required_nmea_traces_timeout, + task); +} + +static void +loc_get_nmea_types_indication_cb (QmiClientLoc *client, + QmiIndicationLocGetNmeaTypesOutput *output, + GTask *task) +{ + SetupRequiredNmeaTracesContext *ctx; + QmiLocIndicationStatus status; + QmiLocNmeaType nmea_types_mask = 0; + QmiLocNmeaType desired_nmea_types_mask = (QMI_LOC_NMEA_TYPE_GGA | QMI_LOC_NMEA_TYPE_GSA | QMI_LOC_NMEA_TYPE_GSV); + GError *error = NULL; + g_autoptr(QmiMessageLocSetNmeaTypesInput) input = NULL; + + ctx = g_task_get_task_data (task); + g_assert (ctx->indication_id); + setup_required_nmea_traces_cleanup_action (ctx); + + if (!qmi_indication_loc_get_nmea_types_output_get_indication_status (output, &status, &error) || + !mm_error_from_qmi_loc_indication_status (status, &error)) { + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + qmi_indication_loc_get_nmea_types_output_get_nmea_types (output, &nmea_types_mask, NULL); + + /* If the configured NMEA types already include GGA, GSV and GSA, we're fine. For raw + * GPS sources GGA is the only required one, the other two are given for completeness */ + if ((nmea_types_mask & desired_nmea_types_mask) == desired_nmea_types_mask) { + g_task_return_boolean (task, TRUE); + g_object_unref (task); + return; + } + + input = qmi_message_loc_set_nmea_types_input_new (); + qmi_message_loc_set_nmea_types_input_set_nmea_types (input, (nmea_types_mask | desired_nmea_types_mask), NULL); + qmi_client_loc_set_nmea_types (ctx->client, + input, + 10, + NULL, + (GAsyncReadyCallback)loc_set_nmea_types_ready, + task); +} + +static void +loc_get_nmea_types_ready (QmiClientLoc *client, + GAsyncResult *res, + GTask *task) +{ + SetupRequiredNmeaTracesContext *ctx; + GError *error = NULL; + g_autoptr(QmiMessageLocGetNmeaTypesOutput) output = NULL; + + output = qmi_client_loc_get_nmea_types_finish (client, res, &error); + if (!output || !qmi_message_loc_get_nmea_types_output_get_result (output, &error)) { + g_task_return_error (task, error); + g_object_unref (task); + return; + } + + /* The task ownership is shared between signal and timeout; the one which is + * scheduled first will cancel the other. */ + ctx = g_task_get_task_data (task); + g_assert (!ctx->indication_id); + ctx->indication_id = g_signal_connect (ctx->client, + "get-nmea-types", + G_CALLBACK (loc_get_nmea_types_indication_cb), + task); + g_assert (!ctx->timeout_id); + ctx->timeout_id = g_timeout_add_seconds (10, + (GSourceFunc)setup_required_nmea_traces_timeout, + task); +} + +static void +setup_required_nmea_traces (MMSharedQmi *self, + GAsyncReadyCallback callback, + gpointer user_data) +{ + QmiClient *client; + GTask *task; + + task = g_task_new (self, NULL, callback, user_data); + + /* If using PDS, no further setup required */ + client = mm_shared_qmi_peek_client (MM_SHARED_QMI (self), + QMI_SERVICE_PDS, + MM_PORT_QMI_FLAG_DEFAULT, + NULL); + if (client) { + g_task_return_boolean (task, TRUE); + g_object_unref (task); + return; + } + + /* Otherwise LOC */ + client = mm_shared_qmi_peek_client (MM_SHARED_QMI (self), + QMI_SERVICE_LOC, + MM_PORT_QMI_FLAG_DEFAULT, + NULL); + if (client) { + SetupRequiredNmeaTracesContext *ctx; + + ctx = g_slice_new0 (SetupRequiredNmeaTracesContext); + ctx->client = g_object_ref (client); + g_task_set_task_data (task, ctx, (GDestroyNotify)setup_required_nmea_traces_context_free); + + qmi_client_loc_get_nmea_types (ctx->client, + NULL, + 10, + NULL, + (GAsyncReadyCallback)loc_get_nmea_types_ready, + task); + return; + } + + g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, + "Couldn't find any PDS/LOC client"); + g_object_unref (task); +} + +/*****************************************************************************/ /* Location: internal helper: start gps engine */ static gboolean @@ -4170,11 +5489,13 @@ GAsyncResult *res, GTask *task) { + MMSharedQmi *self; SetGpsOperationModeContext *ctx; QmiMessagePdsSetDefaultTrackingSessionOutput *output; GError *error = NULL; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); output = qmi_client_pds_set_default_tracking_session_finish (client, res, &error); if (!output) { @@ -4196,14 +5517,15 @@ switch (ctx->mode) { case GPS_OPERATION_MODE_AGPS_MSA: - mm_dbg ("MSA A-GPS operation mode enabled"); + mm_obj_dbg (self, "MSA A-GPS operation mode enabled"); break; case GPS_OPERATION_MODE_AGPS_MSB: - mm_dbg ("MSB A-GPS operation mode enabled"); + mm_obj_dbg (self, "MSB A-GPS operation mode enabled"); break; case GPS_OPERATION_MODE_STANDALONE: - mm_dbg ("Standalone mode enabled (A-GPS disabled)"); + mm_obj_dbg (self, "standalone mode enabled (A-GPS disabled)"); break; + case GPS_OPERATION_MODE_UNKNOWN: default: g_assert_not_reached (); } @@ -4216,6 +5538,7 @@ GAsyncResult *res, GTask *task) { + MMSharedQmi *self; SetGpsOperationModeContext *ctx; QmiMessagePdsSetDefaultTrackingSessionInput *input; QmiMessagePdsGetDefaultTrackingSessionOutput *output; @@ -4225,6 +5548,9 @@ guint32 interval; guint32 accuracy_threshold; + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); + output = qmi_client_pds_get_default_tracking_session_finish (client, res, &error); if (!output) { g_prefix_error (&error, "QMI operation failed: "); @@ -4241,8 +5567,6 @@ return; } - ctx = g_task_get_task_data (task); - qmi_message_pds_get_default_tracking_session_output_get_info ( output, &session_operation, @@ -4255,30 +5579,30 @@ if (ctx->mode == GPS_OPERATION_MODE_AGPS_MSA) { if (session_operation == QMI_PDS_OPERATING_MODE_MS_ASSISTED) { - mm_dbg ("MSA A-GPS already enabled"); + mm_obj_dbg (self, "MSA A-GPS already enabled"); g_task_return_boolean (task, TRUE); g_object_unref (task); return; } - mm_dbg ("Need to enable MSA A-GPS"); + mm_obj_dbg (self, "need to enable MSA A-GPS"); session_operation = QMI_PDS_OPERATING_MODE_MS_ASSISTED; } else if (ctx->mode == GPS_OPERATION_MODE_AGPS_MSB) { if (session_operation == QMI_PDS_OPERATING_MODE_MS_BASED) { - mm_dbg ("MSB A-GPS already enabled"); + mm_obj_dbg (self, "MSB A-GPS already enabled"); g_task_return_boolean (task, TRUE); g_object_unref (task); return; } - mm_dbg ("Need to enable MSB A-GPS"); + mm_obj_dbg (self, "need to enable MSB A-GPS"); session_operation = QMI_PDS_OPERATING_MODE_MS_BASED; } else if (ctx->mode == GPS_OPERATION_MODE_STANDALONE) { if (session_operation == QMI_PDS_OPERATING_MODE_STANDALONE) { - mm_dbg ("A-GPS already disabled"); + mm_obj_dbg (self, "A-GPS already disabled"); g_task_return_boolean (task, TRUE); g_object_unref (task); return; } - mm_dbg ("Need to disable A-GPS"); + mm_obj_dbg (self, "need to disable A-GPS"); session_operation = QMI_PDS_OPERATING_MODE_STANDALONE; } else g_assert_not_reached (); @@ -4320,11 +5644,13 @@ QmiIndicationLocSetOperationModeOutput *output, GTask *task) { + MMSharedQmi *self; SetGpsOperationModeContext *ctx; QmiLocIndicationStatus status; GError *error = NULL; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); if (!qmi_indication_loc_set_operation_mode_output_get_indication_status (output, &status, &error)) { g_prefix_error (&error, "QMI operation failed: "); @@ -4341,14 +5667,15 @@ switch (ctx->mode) { case GPS_OPERATION_MODE_AGPS_MSA: - mm_dbg ("MSA A-GPS operation mode enabled"); + mm_obj_dbg (self, "MSA A-GPS operation mode enabled"); break; case GPS_OPERATION_MODE_AGPS_MSB: - mm_dbg ("MSB A-GPS operation mode enabled"); + mm_obj_dbg (self, "MSB A-GPS operation mode enabled"); break; case GPS_OPERATION_MODE_STANDALONE: - mm_dbg ("Standalone mode enabled (A-GPS disabled)"); + mm_obj_dbg (self, "standalone mode enabled (A-GPS disabled)"); break; + case GPS_OPERATION_MODE_UNKNOWN: default: g_assert_not_reached (); } @@ -4400,13 +5727,15 @@ QmiIndicationLocGetOperationModeOutput *output, GTask *task) { + MMSharedQmi *self; SetGpsOperationModeContext *ctx; QmiLocIndicationStatus status; GError *error = NULL; QmiLocOperationMode mode = QMI_LOC_OPERATION_MODE_DEFAULT; QmiMessageLocSetOperationModeInput *input; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); if (!qmi_indication_loc_get_operation_mode_output_get_indication_status (output, &status, &error)) { g_prefix_error (&error, "QMI operation failed: "); @@ -4425,30 +5754,30 @@ if (ctx->mode == GPS_OPERATION_MODE_AGPS_MSA) { if (mode == QMI_LOC_OPERATION_MODE_MSA) { - mm_dbg ("MSA A-GPS already enabled"); + mm_obj_dbg (self, "MSA A-GPS already enabled"); g_task_return_boolean (task, TRUE); g_object_unref (task); return; } - mm_dbg ("Need to enable MSA A-GPS"); + mm_obj_dbg (self, "need to enable MSA A-GPS"); mode = QMI_LOC_OPERATION_MODE_MSA; } else if (ctx->mode == GPS_OPERATION_MODE_AGPS_MSB) { if (mode == QMI_LOC_OPERATION_MODE_MSB) { - mm_dbg ("MSB A-GPS already enabled"); + mm_obj_dbg (self, "MSB A-GPS already enabled"); g_task_return_boolean (task, TRUE); g_object_unref (task); return; } - mm_dbg ("Need to enable MSB A-GPS"); + mm_obj_dbg (self, "need to enable MSB A-GPS"); mode = QMI_LOC_OPERATION_MODE_MSB; } else if (ctx->mode == GPS_OPERATION_MODE_STANDALONE) { if (mode == QMI_LOC_OPERATION_MODE_STANDALONE) { - mm_dbg ("A-GPS already disabled"); + mm_obj_dbg (self, "A-GPS already disabled"); g_task_return_boolean (task, TRUE); g_object_unref (task); return; } - mm_dbg ("Need to disable A-GPS"); + mm_obj_dbg (self, "need to disable A-GPS"); mode = QMI_LOC_OPERATION_MODE_STANDALONE; } else g_assert_not_reached (); @@ -4720,6 +6049,22 @@ } static void +setup_required_nmea_traces_ready (MMSharedQmi *self, + GAsyncResult *res, + GTask *task) +{ + g_autoptr(GError) error = NULL; + + /* don't treat this error as fatal */ + if (!setup_required_nmea_traces_finish (self, res, &error)) + mm_obj_warn (self, "couldn't setup required NMEA traces: %s", error->message); + + start_gps_engine (self, + (GAsyncReadyCallback)start_gps_engine_ready, + task); +} + +static void set_gps_operation_mode_agps_ready (MMSharedQmi *self, GAsyncResult *res, GTask *task) @@ -4791,11 +6136,11 @@ return; } - /* Only start GPS engine if not done already */ + /* Only setup NMEA traces and start GPS engine if not done already */ if (!(priv->enabled_sources & (MM_MODEM_LOCATION_SOURCE_GPS_NMEA | MM_MODEM_LOCATION_SOURCE_GPS_RAW))) { - start_gps_engine (self, - (GAsyncReadyCallback)start_gps_engine_ready, - task); + setup_required_nmea_traces (self, + (GAsyncReadyCallback)setup_required_nmea_traces_ready, + task); return; } @@ -5240,13 +6585,15 @@ static void inject_xtra_data_next (GTask *task) { + MMSharedQmi *self; QmiMessageLocInjectXtraDataInput *input; InjectAssistanceDataContext *ctx; goffset total_bytes_left; gsize count; GArray *data; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); g_assert (ctx->data_size >= ctx->i); total_bytes_left = ctx->data_size - ctx->i; @@ -5281,8 +6628,8 @@ ctx->i += count; - mm_info ("injecting xtra data: %" G_GSIZE_FORMAT " bytes (%u/%u)", - count, (guint) ctx->n_part, (guint) ctx->total_parts); + mm_obj_info (self, "injecting xtra data: %" G_GSIZE_FORMAT " bytes (%u/%u)", + count, (guint) ctx->n_part, (guint) ctx->total_parts); qmi_client_loc_inject_xtra_data (ctx->client, input, 10, @@ -5387,13 +6734,15 @@ static void inject_assistance_data_next (GTask *task) { + MMSharedQmi *self; QmiMessageLocInjectPredictedOrbitsDataInput *input; InjectAssistanceDataContext *ctx; goffset total_bytes_left; gsize count; GArray *data; - ctx = g_task_get_task_data (task); + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); g_assert (ctx->data_size >= ctx->i); total_bytes_left = ctx->data_size - ctx->i; @@ -5432,8 +6781,8 @@ ctx->i += count; - mm_info ("injecting predicted orbits data: %" G_GSIZE_FORMAT " bytes (%u/%u)", - count, (guint) ctx->n_part, (guint) ctx->total_parts); + mm_obj_info (self, "injecting predicted orbits data: %" G_GSIZE_FORMAT " bytes (%u/%u)", + count, (guint) ctx->n_part, (guint) ctx->total_parts); qmi_client_loc_inject_predicted_orbits_data (ctx->client, input, 10, @@ -5484,7 +6833,7 @@ ctx->total_parts++; g_assert (ctx->total_parts <= G_MAXUINT16); - mm_dbg ("Injecting gpsOneXTRA data (%" G_GOFFSET_FORMAT " bytes)...", ctx->data_size); + mm_obj_dbg (self, "injecting gpsOneXTRA data (%" G_GOFFSET_FORMAT " bytes)...", ctx->data_size); inject_assistance_data_next (task); } diff -Nru modemmanager-1.12.8/src/mm-shared-qmi.h modemmanager-1.16.6/src/mm-shared-qmi.h --- modemmanager-1.12.8/src/mm-shared-qmi.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-shared-qmi.h 2021-06-06 21:40:59.000000000 +0800 @@ -49,6 +49,7 @@ }; GType mm_shared_qmi_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMSharedQmi, g_object_unref) QmiClient *mm_shared_qmi_peek_client (MMSharedQmi *self, QmiService service, @@ -163,6 +164,33 @@ gboolean mm_shared_qmi_setup_carrier_config_finish (MMIfaceModem *self, GAsyncResult *res, GError **error); +void mm_shared_qmi_load_sim_slots (MMIfaceModem *self, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean mm_shared_qmi_load_sim_slots_finish (MMIfaceModem *self, + GAsyncResult *res, + GPtrArray **sim_slots, + guint *primary_sim_slot, + GError **error); +void mm_shared_qmi_set_primary_sim_slot (MMIfaceModem *self, + guint sim_slot, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean mm_shared_qmi_set_primary_sim_slot_finish (MMIfaceModem *self, + GAsyncResult *res, + GError **error); +void mm_shared_qmi_setup_sim_hot_swap (MMIfaceModem *self, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean mm_shared_qmi_setup_sim_hot_swap_finish (MMIfaceModem *self, + GAsyncResult *res, + GError **error); +void mm_shared_qmi_fcc_unlock (MMIfaceModem *self, + GAsyncReadyCallback callback, + gpointer user_data); +gboolean mm_shared_qmi_fcc_unlock_finish (MMIfaceModem *self, + GAsyncResult *res, + GError **error); /* Shared QMI location support */ diff -Nru modemmanager-1.12.8/src/mm-sim-mbim.c modemmanager-1.16.6/src/mm-sim-mbim.c --- modemmanager-1.12.8/src/mm-sim-mbim.c 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-sim-mbim.c 2021-06-06 21:40:59.000000000 +0800 @@ -24,9 +24,10 @@ #define _LIBMM_INSIDE_MM #include +#include "mm-broadband-modem-mbim.h" #include "mm-error-helpers.h" #include "mm-iface-modem.h" -#include "mm-log.h" +#include "mm-log-object.h" #include "mm-modem-helpers-mbim.h" #include "mm-sim-mbim.h" @@ -48,7 +49,7 @@ NULL); g_assert (MM_IS_BASE_MODEM (modem)); - port = mm_base_modem_peek_port_mbim (modem); + port = mm_broadband_modem_mbim_peek_port_mbim (MM_BROADBAND_MODEM_MBIM (modem)); g_object_unref (modem); if (!port) { @@ -382,10 +383,10 @@ /* Sending PIN failed, build a better error to report */ if (pin_type == MBIM_PIN_TYPE_PIN1 && pin_state == MBIM_PIN_STATE_LOCKED) { g_error_free (error); - error = mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_INCORRECT_PASSWORD); + error = mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_INCORRECT_PASSWORD, self); } else if (pin_type == MBIM_PIN_TYPE_PUK1 && pin_state == MBIM_PIN_STATE_LOCKED) { g_error_free (error); - error = mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_SIM_PUK); + error = mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_SIM_PUK, self); } } } @@ -416,7 +417,7 @@ task = g_task_new (self, NULL, callback, user_data); - mm_dbg ("Sending PIN..."); + mm_obj_dbg (self, "sending PIN..."); message = (mbim_message_pin_set_new ( MBIM_PIN_TYPE_PIN1, MBIM_PIN_OPERATION_ENTER, @@ -480,9 +481,9 @@ if (pin_type == MBIM_PIN_TYPE_PUK1 && pin_state == MBIM_PIN_STATE_LOCKED) { g_error_free (error); if (remaining_attempts == 0) - error = mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_SIM_WRONG); + error = mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_SIM_WRONG, self); else - error = mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_INCORRECT_PASSWORD); + error = mm_mobile_equipment_error_for_code (MM_MOBILE_EQUIPMENT_ERROR_INCORRECT_PASSWORD, self); } } } @@ -514,7 +515,7 @@ task = g_task_new (self, NULL, callback, user_data); - mm_dbg ("Sending PUK..."); + mm_obj_dbg (self, "sending PUK..."); message = (mbim_message_pin_set_new ( MBIM_PIN_TYPE_PUK1, MBIM_PIN_OPERATION_ENTER, @@ -605,7 +606,7 @@ task = g_task_new (self, NULL, callback, user_data); - mm_dbg ("%s PIN ...", enabled ? "Enabling" : "Disabling"); + mm_obj_dbg (self, "%s PIN ...", enabled ? "enabling" : "disabling"); message = (mbim_message_pin_set_new ( MBIM_PIN_TYPE_PIN1, enabled ? MBIM_PIN_OPERATION_ENABLE : MBIM_PIN_OPERATION_DISABLE, @@ -696,7 +697,7 @@ task = g_task_new (self, NULL, callback, user_data); - mm_dbg ("Changing PIN"); + mm_obj_dbg (self, "changing PIN..."); message = (mbim_message_pin_set_new ( MBIM_PIN_TYPE_PIN1, MBIM_PIN_OPERATION_CHANGE, @@ -752,6 +753,7 @@ callback, user_data, MM_BASE_SIM_MODEM, modem, + "active", TRUE, /* by default always active */ NULL); } diff -Nru modemmanager-1.12.8/src/mm-sim-mbim.h modemmanager-1.16.6/src/mm-sim-mbim.h --- modemmanager-1.12.8/src/mm-sim-mbim.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-sim-mbim.h 2021-06-06 21:40:59.000000000 +0800 @@ -40,6 +40,7 @@ }; GType mm_sim_mbim_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMSimMbim, g_object_unref) void mm_sim_mbim_new (MMBaseModem *modem, GCancellable *cancellable, diff -Nru modemmanager-1.12.8/src/mm-sim-qmi.c modemmanager-1.16.6/src/mm-sim-qmi.c --- modemmanager-1.12.8/src/mm-sim-qmi.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-sim-qmi.c 2021-06-06 21:40:59.000000000 +0800 @@ -25,8 +25,10 @@ #define _LIBMM_INSIDE_MM #include -#include "mm-log.h" +#include "mm-broadband-modem-qmi.h" +#include "mm-log-object.h" #include "mm-sim-qmi.h" +#include "mm-modem-helpers-qmi.h" G_DEFINE_TYPE (MMSimQmi, mm_sim_qmi, MM_TYPE_BASE_SIM) @@ -59,7 +61,7 @@ NULL); g_assert (MM_IS_BASE_MODEM (modem)); - port = mm_base_modem_peek_port_qmi (modem); + port = mm_broadband_modem_qmi_peek_port_qmi (MM_BROADBAND_MODEM_QMI (modem)); g_object_unref (modem); if (!port) { @@ -89,6 +91,131 @@ } /*****************************************************************************/ +/* Wait for SIM ready */ + +#define SIM_READY_CHECKS_MAX 5 +#define SIM_READY_CHECKS_TIMEOUT_SECS 1 + +typedef struct { + QmiClient *client_uim; + guint ready_checks_n; +} WaitSimReadyContext; + +static void +wait_sim_ready_context_free (WaitSimReadyContext *ctx) +{ + g_clear_object (&ctx->client_uim); + g_slice_free (WaitSimReadyContext, ctx); +} + +static gboolean +wait_sim_ready_finish (MMBaseSim *self, + GAsyncResult *res, + GError **error) +{ + return g_task_propagate_boolean (G_TASK (res), error); +} + +static void sim_ready_check (GTask *task); + +static gboolean +sim_ready_retry_cb (GTask *task) +{ + sim_ready_check (task); + return G_SOURCE_REMOVE; +} + +static void +sim_ready_retry (GTask *task) +{ + g_timeout_add_seconds (SIM_READY_CHECKS_TIMEOUT_SECS, (GSourceFunc) sim_ready_retry_cb, task); +} + +static void +uim_get_card_status_ready (QmiClientUim *client, + GAsyncResult *res, + GTask *task) +{ + g_autoptr(QmiMessageUimGetCardStatusOutput) output = NULL; + g_autoptr(GError) error = NULL; + MMSimQmi *self; + + self = g_task_get_source_object (task); + + output = qmi_client_uim_get_card_status_finish (client, res, &error); + if (!output || + !qmi_message_uim_get_card_status_output_get_result (output, &error) || + (!mm_qmi_uim_get_card_status_output_parse (self, output, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &error) && + (g_error_matches (error, MM_MOBILE_EQUIPMENT_ERROR, MM_MOBILE_EQUIPMENT_ERROR_SIM_NOT_INSERTED) || + g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_RETRY)))) { + mm_obj_dbg (self, "sim not yet considered ready... retrying"); + sim_ready_retry (task); + return; + } + + /* SIM is considered ready now */ + mm_obj_dbg (self, "sim is ready"); + g_task_return_boolean (task, TRUE); + g_object_unref (task); +} + +static void +sim_ready_check (GTask *task) +{ + WaitSimReadyContext *ctx; + MMSimQmi *self; + + self = g_task_get_source_object (task); + ctx = g_task_get_task_data (task); + + ctx->ready_checks_n++; + if (ctx->ready_checks_n == SIM_READY_CHECKS_MAX) { + g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, + "failed waiting for SIM readiness"); + g_object_unref (task); + return; + } + + mm_obj_dbg (self, "checking SIM readiness"); + qmi_client_uim_get_card_status (QMI_CLIENT_UIM (ctx->client_uim), + NULL, + 5, + NULL, + (GAsyncReadyCallback) uim_get_card_status_ready, + task); +} + +static void +wait_sim_ready (MMBaseSim *_self, + GAsyncReadyCallback callback, + gpointer user_data) +{ + QmiClient *client; + MMSimQmi *self; + GTask *task; + WaitSimReadyContext *ctx; + + self = MM_SIM_QMI (_self); + task = g_task_new (self, NULL, callback, user_data); + + mm_obj_dbg (self, "waiting for SIM to be ready..."); + if (!self->priv->dms_uim_deprecated) { + g_task_return_boolean (task, TRUE); + g_object_unref (task); + return; + } + + if (!ensure_qmi_client (task, self, QMI_SERVICE_UIM, &client)) + return; + + ctx = g_slice_new0 (WaitSimReadyContext); + ctx->client_uim = g_object_ref (client); + g_task_set_task_data (task, ctx, (GDestroyNotify) wait_sim_ready_context_free); + + sim_ready_check (task); +} + +/*****************************************************************************/ /* Load SIM ID (ICCID) */ static GArray * @@ -148,6 +275,7 @@ GArray *file_path_bytes; gsize i; QmiMessageUimReadTransparentInput *input; + GArray *aid; task = g_task_new (self, NULL, callback, user_data); @@ -167,11 +295,13 @@ } input = qmi_message_uim_read_transparent_input_new (); - qmi_message_uim_read_transparent_input_set_session_information ( + aid = g_array_new (FALSE, FALSE, sizeof (guint8)); /* empty AID */ + qmi_message_uim_read_transparent_input_set_session ( input, QMI_UIM_SESSION_TYPE_PRIMARY_GW_PROVISIONING, - "", + aid, NULL); + g_array_unref (aid); qmi_message_uim_read_transparent_input_set_file (input, file_id, file_path_bytes, @@ -215,7 +345,8 @@ return; } - iccid = mm_bcd_to_string ((const guint8 *) read_result->data, read_result->len); + iccid = mm_bcd_to_string ((const guint8 *) read_result->data, read_result->len, + TRUE /* low_nybble_first */); g_assert (iccid); g_task_return_pointer (task, iccid, g_free); g_object_unref (task); @@ -295,7 +426,7 @@ self = MM_SIM_QMI (_self); task = g_task_new (self, NULL, callback, user_data); - mm_dbg ("loading SIM identifier..."); + mm_obj_dbg (self, "loading SIM identifier..."); if (!self->priv->dms_uim_deprecated) dms_uim_get_iccid (self, task); else @@ -329,7 +460,8 @@ return; } - imsi = mm_bcd_to_string ((const guint8 *) read_result->data, read_result->len); + imsi = mm_bcd_to_string ((const guint8 *) read_result->data, read_result->len, + TRUE /* low_nybble_first */); g_assert (imsi); if (strlen (imsi) < 3) g_task_return_new_error (task, @@ -420,7 +552,7 @@ self = MM_SIM_QMI (_self); task = g_task_new (self, NULL, callback, user_data); - mm_dbg ("loading IMSI..."); + mm_obj_dbg (self, "loading IMSI..."); if (!self->priv->dms_uim_deprecated) dms_uim_get_imsi (self, task); else @@ -537,7 +669,7 @@ QMI_SERVICE_NAS, &client)) return; - mm_dbg ("loading SIM operator identifier..."); + mm_obj_dbg (self, "loading SIM operator identifier..."); qmi_client_nas_get_home_network (QMI_CLIENT_NAS (client), NULL, 5, @@ -586,7 +718,7 @@ QMI_SERVICE_NAS, &client)) return; - mm_dbg ("loading SIM operator name..."); + mm_obj_dbg (self, "loading SIM operator name..."); qmi_client_nas_get_home_network (QMI_CLIENT_NAS (client), NULL, 5, @@ -662,6 +794,7 @@ { QmiMessageUimVerifyPinInput *input; QmiClient *client = NULL; + GArray *aid; if (!ensure_qmi_client (task, self, @@ -674,11 +807,13 @@ QMI_UIM_PIN_ID_PIN1, g_task_get_task_data (task), NULL); - qmi_message_uim_verify_pin_input_set_session_information ( + aid = g_array_new (FALSE, FALSE, sizeof (guint8)); /* empty AID */ + qmi_message_uim_verify_pin_input_set_session ( input, QMI_UIM_SESSION_TYPE_CARD_SLOT_1, - "", /* ignored */ + aid, NULL); + g_array_unref (aid); qmi_client_uim_verify_pin (QMI_CLIENT_UIM (client), input, 5, @@ -727,7 +862,7 @@ return; } - mm_dbg ("Sending PIN..."); + mm_obj_dbg (self, "sending PIN..."); input = qmi_message_dms_uim_verify_pin_input_new (); qmi_message_dms_uim_verify_pin_input_set_info ( input, @@ -757,7 +892,7 @@ g_task_set_task_data (task, g_strdup (pin), g_free); - mm_dbg ("Verifying PIN..."); + mm_obj_dbg (self, "verifying PIN..."); if (!self->priv->dms_uim_deprecated) dms_uim_verify_pin (self, task); else @@ -818,6 +953,7 @@ QmiMessageUimUnblockPinInput *input; QmiClient *client = NULL; UnblockPinContext *ctx; + GArray *aid; if (!ensure_qmi_client (task, self, @@ -833,11 +969,13 @@ ctx->puk, ctx->new_pin, NULL); - qmi_message_uim_unblock_pin_input_set_session_information ( + aid = g_array_new (FALSE, FALSE, sizeof (guint8)); /* empty AID */ + qmi_message_uim_unblock_pin_input_set_session ( input, QMI_UIM_SESSION_TYPE_CARD_SLOT_1, - "", /* ignored */ + aid, NULL); + g_array_unref (aid); qmi_client_uim_unblock_pin (QMI_CLIENT_UIM (client), input, 5, @@ -924,7 +1062,7 @@ ctx->new_pin = g_strdup (new_pin); g_task_set_task_data (task, ctx, (GDestroyNotify) unblock_pin_context_free); - mm_dbg ("Unblocking PIN..."); + mm_obj_dbg (self, "unblocking PIN..."); if (!self->priv->dms_uim_deprecated) dms_uim_unblock_pin (self, task); else @@ -985,6 +1123,7 @@ QmiMessageUimChangePinInput *input; QmiClient *client = NULL; ChangePinContext *ctx; + GArray *aid; if (!ensure_qmi_client (task, self, @@ -1000,11 +1139,13 @@ ctx->old_pin, ctx->new_pin, NULL); - qmi_message_uim_change_pin_input_set_session_information ( + aid = g_array_new (FALSE, FALSE, sizeof (guint8)); /* empty AID */ + qmi_message_uim_change_pin_input_set_session ( input, QMI_UIM_SESSION_TYPE_CARD_SLOT_1, - "", /* ignored */ + aid, NULL); + g_array_unref (aid); qmi_client_uim_change_pin (QMI_CLIENT_UIM (client), input, 5, @@ -1091,7 +1232,7 @@ ctx->new_pin = g_strdup (new_pin); g_task_set_task_data (task, ctx, (GDestroyNotify) change_pin_context_free); - mm_dbg ("Changing PIN..."); + mm_obj_dbg (self, "changing PIN..."); if (!self->priv->dms_uim_deprecated) dms_uim_change_pin (self, task); else @@ -1151,6 +1292,7 @@ QmiMessageUimSetPinProtectionInput *input; QmiClient *client = NULL; EnablePinContext *ctx; + GArray *aid; if (!ensure_qmi_client (task, MM_SIM_QMI (self), @@ -1166,11 +1308,13 @@ ctx->enabled, ctx->pin, NULL); - qmi_message_uim_set_pin_protection_input_set_session_information ( + aid = g_array_new (FALSE, FALSE, sizeof (guint8)); /* empty AID */ + qmi_message_uim_set_pin_protection_input_set_session ( input, QMI_UIM_SESSION_TYPE_CARD_SLOT_1, - "", /* ignored */ + aid, NULL); + g_array_unref (aid); qmi_client_uim_set_pin_protection (QMI_CLIENT_UIM (client), input, 5, @@ -1257,7 +1401,7 @@ ctx->enabled = enabled; g_task_set_task_data (task, ctx, (GDestroyNotify) enable_pin_context_free); - mm_dbg ("%s PIN...", enabled ? "Enabling" : "Disabling"); + mm_obj_dbg (self, "%s PIN...", enabled ? "enabling" : "disabling"); if (!self->priv->dms_uim_deprecated) dms_uim_enable_pin (self, task); else @@ -1300,9 +1444,43 @@ user_data, MM_BASE_SIM_MODEM, modem, MM_SIM_QMI_DMS_UIM_DEPRECATED, dms_uim_deprecated, + "active", TRUE, /* by default always active */ NULL); } +MMBaseSim * +mm_sim_qmi_new_initialized (MMBaseModem *modem, + gboolean dms_uim_deprecated, + guint slot_number, + gboolean active, + const gchar *sim_identifier, + const gchar *imsi, + const gchar *eid, + const gchar *operator_identifier, + const gchar *operator_name, + const GStrv emergency_numbers) +{ + MMBaseSim *sim; + + sim = MM_BASE_SIM (g_object_new (MM_TYPE_SIM_QMI, + MM_BASE_SIM_MODEM, modem, + MM_SIM_QMI_DMS_UIM_DEPRECATED, dms_uim_deprecated, + MM_BASE_SIM_SLOT_NUMBER, slot_number, + "active", active, + "sim-identifier", sim_identifier, + "imsi", imsi, + "eid", eid, + "operator-identifier", operator_identifier, + "operator-name", operator_name, + "emergency-numbers", emergency_numbers, + NULL)); + + mm_base_sim_export (sim); + return sim; +} + +/*****************************************************************************/ + static void mm_sim_qmi_init (MMSimQmi *self) { @@ -1359,6 +1537,8 @@ object_class->get_property = get_property; object_class->set_property = set_property; + base_sim_class->wait_sim_ready = wait_sim_ready; + base_sim_class->wait_sim_ready_finish = wait_sim_ready_finish; base_sim_class->load_sim_identifier = load_sim_identifier; base_sim_class->load_sim_identifier_finish = load_sim_identifier_finish; base_sim_class->load_imsi = load_imsi; diff -Nru modemmanager-1.12.8/src/mm-sim-qmi.h modemmanager-1.16.6/src/mm-sim-qmi.h --- modemmanager-1.12.8/src/mm-sim-qmi.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-sim-qmi.h 2021-06-06 21:40:59.000000000 +0800 @@ -44,6 +44,7 @@ }; GType mm_sim_qmi_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMSimQmi, g_object_unref) void mm_sim_qmi_new (MMBaseModem *modem, gboolean dms_uim_deprecated, @@ -53,4 +54,15 @@ MMBaseSim *mm_sim_qmi_new_finish (GAsyncResult *res, GError **error); +MMBaseSim *mm_sim_qmi_new_initialized (MMBaseModem *modem, + gboolean dms_uim_deprecated, + guint slot_number, + gboolean active, + const gchar *sim_identifier, + const gchar *imsi, + const gchar *eid, + const gchar *operator_identifier, + const gchar *operator_name, + const GStrv emergency_numbers); + #endif /* MM_SIM_QMI_H */ diff -Nru modemmanager-1.12.8/src/mm-sleep-monitor.c modemmanager-1.16.6/src/mm-sleep-monitor.c --- modemmanager-1.12.8/src/mm-sleep-monitor.c 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-sleep-monitor.c 2021-06-06 21:40:59.000000000 +0800 @@ -26,7 +26,7 @@ #include #include -#include "mm-log.h" +#include "mm-log-object.h" #include "mm-utils.h" #include "mm-sleep-monitor.h" @@ -57,7 +57,18 @@ }; static guint signals[LAST_SIGNAL] = {0}; -G_DEFINE_TYPE (MMSleepMonitor, mm_sleep_monitor, G_TYPE_OBJECT); +static void log_object_iface_init (MMLogObjectInterface *iface); + +G_DEFINE_TYPE_EXTENDED (MMSleepMonitor, mm_sleep_monitor, G_TYPE_OBJECT, 0, + G_IMPLEMENT_INTERFACE (MM_TYPE_LOG_OBJECT, log_object_iface_init)) + +/*****************************************************************************/ + +static gchar * +log_object_build_id (MMLogObject *_self) +{ + return g_strdup ("sleep-monitor"); +} /********************************************************************/ @@ -65,7 +76,7 @@ drop_inhibitor (MMSleepMonitor *self) { if (self->inhibit_fd >= 0) { - mm_dbg ("[sleep-monitor] dropping systemd sleep inhibitor"); + mm_obj_dbg (self, "dropping systemd sleep inhibitor"); close (self->inhibit_fd); self->inhibit_fd = -1; return TRUE; @@ -86,15 +97,15 @@ res = g_dbus_proxy_call_with_unix_fd_list_finish (sd_proxy, &fd_list, result, &error); if (!res) { - mm_warn ("[sleep-monitor] inhibit failed: %s", error->message); + mm_obj_warn (self, "inhibit failed: %s", error->message); g_error_free (error); } else { if (!fd_list || g_unix_fd_list_get_length (fd_list) != 1) - mm_warn ("[sleep-monitor] didn't get a single fd back"); + mm_obj_warn (self, "didn't get a single fd back"); self->inhibit_fd = g_unix_fd_list_get (fd_list, 0, NULL); - mm_dbg ("[sleep-monitor] inhibitor fd is %d", self->inhibit_fd); + mm_obj_dbg (self, "inhibitor fd is %d", self->inhibit_fd); g_object_unref (fd_list); g_variant_unref (res); } @@ -105,7 +116,7 @@ { g_assert (self->inhibit_fd == -1); - mm_dbg ("[sleep-monitor] taking systemd sleep inhibitor"); + mm_obj_dbg (self, "taking systemd sleep inhibitor"); g_dbus_proxy_call_with_unix_fd_list (self->sd_proxy, "Inhibit", g_variant_new ("(ssss)", @@ -135,12 +146,13 @@ return; g_variant_get (args, "(b)", &is_about_to_suspend); - mm_dbg ("[sleep-monitor] received PrepareForSleep signal: %d", is_about_to_suspend); if (is_about_to_suspend) { + mm_obj_info (self, "system is about to suspend"); g_signal_emit (self, signals[SLEEPING], 0); drop_inhibitor (self); } else { + mm_obj_info (self, "system is resuming"); take_inhibitor (self); g_signal_emit (self, signals[RESUMING], 0); } @@ -175,7 +187,7 @@ self->sd_proxy = g_dbus_proxy_new_for_bus_finish (res, &error); if (!self->sd_proxy) { - mm_warn ("[sleep-monitor] failed to acquire logind proxy: %s", error->message); + mm_obj_warn (self, "failed to acquire logind proxy: %s", error->message); g_clear_error (&error); return; } @@ -216,6 +228,12 @@ } static void +log_object_iface_init (MMLogObjectInterface *iface) +{ + iface->build_id = log_object_build_id; +} + +static void mm_sleep_monitor_class_init (MMSleepMonitorClass *klass) { GObjectClass *gobject_class; diff -Nru modemmanager-1.12.8/src/mm-sms-list.c modemmanager-1.16.6/src/mm-sms-list.c --- modemmanager-1.12.8/src/mm-sms-list.c 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/src/mm-sms-list.c 2021-06-06 21:40:59.000000000 +0800 @@ -27,9 +27,12 @@ #include "mm-iface-modem-messaging.h" #include "mm-sms-list.h" #include "mm-base-sms.h" -#include "mm-log.h" +#include "mm-log-object.h" -G_DEFINE_TYPE (MMSmsList, mm_sms_list, G_TYPE_OBJECT); +static void log_object_iface_init (MMLogObjectInterface *iface); + +G_DEFINE_TYPE_EXTENDED (MMSmsList, mm_sms_list, G_TYPE_OBJECT, 0, + G_IMPLEMENT_INTERFACE (MM_TYPE_LOG_OBJECT, log_object_iface_init)) enum { PROP_0, @@ -280,8 +283,7 @@ (GCompareFunc)cmp_sms_by_concat_reference); if (l) { /* Try to take the part */ - mm_dbg ("Found existing multipart SMS object with reference '%u': adding new part", - concat_reference); + mm_obj_dbg (self, "found existing multipart SMS object with reference '%u': adding new part", concat_reference); return mm_base_sms_multipart_take_part (MM_BASE_SMS (l->data), part, error); } @@ -296,9 +298,9 @@ if (!sms) return FALSE; - mm_dbg ("Creating new multipart SMS object: need to receive %u parts with reference '%u'", - mm_sms_part_get_concat_max (part), - concat_reference); + mm_obj_dbg (self, "creating new multipart SMS object: need to receive %u parts with reference '%u'", + mm_sms_part_get_concat_max (part), + concat_reference); self->priv->list = g_list_prepend (self->priv->list, sms); g_signal_emit (self, signals[SIGNAL_ADDED], 0, mm_base_sms_get_path (sms), @@ -349,33 +351,41 @@ /* Did we just get a part of a multi-part SMS? */ if (mm_sms_part_should_concat (part)) { if (mm_sms_part_get_index (part) != SMS_PART_INVALID_INDEX) - mm_dbg ("SMS part at '%s/%u' is from a multipart SMS (reference: '%u', sequence: '%u/%u')", - mm_sms_storage_get_string (storage), - mm_sms_part_get_index (part), - mm_sms_part_get_concat_reference (part), - mm_sms_part_get_concat_sequence (part), - mm_sms_part_get_concat_max (part)); + mm_obj_dbg (self, "SMS part at '%s/%u' is from a multipart SMS (reference: '%u', sequence: '%u/%u')", + mm_sms_storage_get_string (storage), + mm_sms_part_get_index (part), + mm_sms_part_get_concat_reference (part), + mm_sms_part_get_concat_sequence (part), + mm_sms_part_get_concat_max (part)); else - mm_dbg ("SMS part (not stored) is from a multipart SMS (reference: '%u', sequence: '%u/%u')", - mm_sms_part_get_concat_reference (part), - mm_sms_part_get_concat_sequence (part), - mm_sms_part_get_concat_max (part)); + mm_obj_dbg (self, "SMS part (not stored) is from a multipart SMS (reference: '%u', sequence: '%u/%u')", + mm_sms_part_get_concat_reference (part), + mm_sms_part_get_concat_sequence (part), + mm_sms_part_get_concat_max (part)); return take_multipart (self, part, state, storage, error); } /* Otherwise, we build a whole new single-part MMSms just from this part */ if (mm_sms_part_get_index (part) != SMS_PART_INVALID_INDEX) - mm_dbg ("SMS part at '%s/%u' is from a singlepart SMS", - mm_sms_storage_get_string (storage), - mm_sms_part_get_index (part)); + mm_obj_dbg (self, "SMS part at '%s/%u' is from a singlepart SMS", + mm_sms_storage_get_string (storage), + mm_sms_part_get_index (part)); else - mm_dbg ("SMS part (not stored) is from a singlepart SMS"); + mm_obj_dbg (self, "SMS part (not stored) is from a singlepart SMS"); return take_singlepart (self, part, state, storage, error); } /*****************************************************************************/ +static gchar * +log_object_build_id (MMLogObject *_self) +{ + return g_strdup ("sms-list"); +} + +/*****************************************************************************/ + MMSmsList * mm_sms_list_new (MMBaseModem *modem) { @@ -397,6 +407,10 @@ case PROP_MODEM: g_clear_object (&self->priv->modem); self->priv->modem = g_value_dup_object (value); + if (self->priv->modem) { + /* Set owner ID */ + mm_log_object_set_owner_id (MM_LOG_OBJECT (self), mm_log_object_get_id (MM_LOG_OBJECT (self->priv->modem))); + } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -444,6 +458,12 @@ } static void +log_object_iface_init (MMLogObjectInterface *iface) +{ + iface->build_id = log_object_build_id; +} + +static void mm_sms_list_class_init (MMSmsListClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); diff -Nru modemmanager-1.12.8/src/mm-sms-list.h modemmanager-1.16.6/src/mm-sms-list.h --- modemmanager-1.12.8/src/mm-sms-list.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-sms-list.h 2021-06-06 21:40:59.000000000 +0800 @@ -55,6 +55,7 @@ }; GType mm_sms_list_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMSmsList, g_object_unref) MMSmsList *mm_sms_list_new (MMBaseModem *modem); diff -Nru modemmanager-1.12.8/src/mm-sms-mbim.c modemmanager-1.16.6/src/mm-sms-mbim.c --- modemmanager-1.12.8/src/mm-sms-mbim.c 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-sms-mbim.c 2021-06-06 21:40:59.000000000 +0800 @@ -24,11 +24,12 @@ #define _LIBMM_INSIDE_MM #include +#include "mm-broadband-modem-mbim.h" #include "mm-modem-helpers-mbim.h" #include "mm-iface-modem-messaging.h" #include "mm-sms-mbim.h" #include "mm-base-modem.h" -#include "mm-log.h" +#include "mm-log-object.h" #include "mm-sms-part-3gpp.h" G_DEFINE_TYPE (MMSmsMbim, mm_sms_mbim, MM_TYPE_BASE_SMS) @@ -51,7 +52,7 @@ if (o_device) { MMPortMbim *port; - port = mm_base_modem_peek_port_mbim (modem); + port = mm_broadband_modem_mbim_peek_port_mbim (MM_BROADBAND_MODEM_MBIM (modem)); if (!port) { g_task_report_new_error (self, callback, @@ -138,6 +139,7 @@ static void sms_send_next_part (GTask *task) { + MMSmsMbim *self; SmsSendContext *ctx; MbimMessage *message; guint8 *pdu; @@ -146,7 +148,9 @@ GError *error = NULL; MbimSmsPduSendRecord send_record; + self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); + if (!ctx->current) { /* Done we are */ g_task_return_boolean (task, TRUE); @@ -155,7 +159,7 @@ } /* Get PDU */ - pdu = mm_sms_part_3gpp_get_submit_pdu ((MMSmsPart *)ctx->current->data, &pdulen, &msgstart, &error); + pdu = mm_sms_part_3gpp_get_submit_pdu ((MMSmsPart *)ctx->current->data, &pdulen, &msgstart, self, &error); if (!pdu) { g_task_return_error (task, error); g_object_unref (task); @@ -237,11 +241,14 @@ GAsyncResult *res, GTask *task) { + MMSmsMbim *self; SmsDeletePartsContext *ctx; MbimMessage *response; GError *error = NULL; + self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); + response = mbim_device_command_finish (device, res, &error); if (response && mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error)) @@ -252,9 +259,9 @@ if (error) { ctx->n_failed++; - mm_dbg ("Couldn't delete SMS part with index %u: '%s'", - mm_sms_part_get_index ((MMSmsPart *)ctx->current->data), - error->message); + mm_obj_dbg (self, "couldn't delete SMS part with index %u: %s", + mm_sms_part_get_index ((MMSmsPart *)ctx->current->data), + error->message); g_error_free (error); } diff -Nru modemmanager-1.12.8/src/mm-sms-mbim.h modemmanager-1.16.6/src/mm-sms-mbim.h --- modemmanager-1.12.8/src/mm-sms-mbim.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-sms-mbim.h 2021-06-06 21:40:59.000000000 +0800 @@ -43,6 +43,7 @@ }; GType mm_sms_mbim_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMSmsMbim, g_object_unref) MMBaseSms *mm_sms_mbim_new (MMBaseModem *modem); diff -Nru modemmanager-1.12.8/src/mm-sms-part-3gpp.c modemmanager-1.16.6/src/mm-sms-part-3gpp.c --- modemmanager-1.12.8/src/mm-sms-part-3gpp.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-sms-part-3gpp.c 2021-06-06 21:40:59.000000000 +0800 @@ -120,23 +120,26 @@ } /* len is in semi-octets */ -static char * -sms_decode_address (const guint8 *address, int len) +static gchar * +sms_decode_address (const guint8 *address, + gint len, + GError **error) { guint8 addrtype, addrplan; - char *utf8; + gchar *utf8; addrtype = address[0] & SMS_NUMBER_TYPE_MASK; addrplan = address[0] & SMS_NUMBER_PLAN_MASK; address++; if (addrtype == SMS_NUMBER_TYPE_ALPHA) { - guint8 *unpacked; - guint32 unpacked_len; + g_autoptr(GByteArray) unpacked_array = NULL; + guint8 *unpacked = NULL; + guint32 unpacked_len; + unpacked = mm_charset_gsm_unpack (address, (len * 4) / 7, 0, &unpacked_len); - utf8 = (char *)mm_charset_gsm_unpacked_to_utf8 (unpacked, - unpacked_len); - g_free (unpacked); + unpacked_array = g_byte_array_new_take (unpacked, unpacked_len); + utf8 = mm_modem_charset_bytearray_to_utf8 (unpacked_array, MM_MODEM_CHARSET_GSM, FALSE, error); } else if (addrtype == SMS_NUMBER_TYPE_INTL && addrplan == SMS_NUMBER_PLAN_TELEPHONE) { /* International telphone number, format as "+1234567890" */ @@ -192,14 +195,16 @@ scheme = MM_SMS_ENCODING_UCS2; break; case 0x00: - /* fallthrough */ /* reserved - spec says to treat it as default alphabet */ + /* Fall through */ case 0x0c: scheme = MM_SMS_ENCODING_GSM7; break; case 0x04: scheme = MM_SMS_ENCODING_8BIT; break; + default: + g_assert_not_reached (); } break; @@ -223,6 +228,8 @@ case 0x04: scheme = MM_SMS_ENCODING_8BIT; break; + default: + g_assert_not_reached (); } break; @@ -235,50 +242,44 @@ return scheme; } -static char * -sms_decode_text (const guint8 *text, int len, MMSmsEncoding encoding, int bit_offset) +static gchar * +sms_decode_text (const guint8 *text, + int len, + MMSmsEncoding encoding, + int bit_offset, + gpointer log_object, + GError **error) { - char *utf8; - guint8 *unpacked; - guint32 unpacked_len; - if (encoding == MM_SMS_ENCODING_GSM7) { - mm_dbg ("Converting SMS part text from GSM-7 to UTF-8..."); - unpacked = mm_charset_gsm_unpack ((const guint8 *) text, len, bit_offset, &unpacked_len); - utf8 = (char *) mm_charset_gsm_unpacked_to_utf8 (unpacked, unpacked_len); - mm_dbg (" Got UTF-8 text: '%s'", utf8); - g_free (unpacked); - } else if (encoding == MM_SMS_ENCODING_UCS2) { - /* Despite 3GPP TS 23.038 specifies that Unicode SMS messages are - * encoded in UCS-2, UTF-16 encoding is commonly used instead on many - * modern platforms to allow encoding code points that fall outside the - * Basic Multilingual Plane (BMP), such as Emoji. Most of the UCS-2 - * code points are identical to their equivalent UTF-16 code points. - * In UTF-16, non-BMP code points are encoded in a pair of surrogate - * code points (i.e. a high surrogate in 0xD800..0xDBFF, followed by a - * low surrogate in 0xDC00..0xDFFF). An isolated surrogate code point - * has no general interpretation in UTF-16, but could be a valid - * (though unmapped) code point in UCS-2. Here we first try to decode - * the SMS message in UTF-16BE, and if that fails, fall back to decode - * in UCS-2BE. - */ - mm_dbg ("Converting SMS part text from UTF-16BE to UTF-8..."); - utf8 = g_convert ((const gchar *) text, len, "UTF8", "UTF16BE", NULL, NULL, NULL); - if (!utf8) { - mm_dbg ("Converting SMS part text from UCS-2BE to UTF8..."); - utf8 = g_convert ((const gchar *) text, len, "UTF8", "UCS-2BE", NULL, NULL, NULL); - } - if (!utf8) { - mm_warn ("Couldn't convert SMS part contents from UTF-16BE/UCS-2BE to UTF-8: not decoding any text"); - utf8 = g_strdup (""); - } else - mm_dbg (" Got UTF-8 text: '%s'", utf8); - } else { - mm_warn ("Unexpected encoding '%s': not decoding any text", mm_sms_encoding_get_string (encoding)); - utf8 = g_strdup (""); - } + g_autoptr(GByteArray) unpacked_array = NULL; + guint8 *unpacked = NULL; + guint32 unpacked_len; + gchar *utf8; - return utf8; + unpacked = mm_charset_gsm_unpack ((const guint8 *) text, len, bit_offset, &unpacked_len); + unpacked_array = g_byte_array_new_take (unpacked, unpacked_len); + utf8 = mm_modem_charset_bytearray_to_utf8 (unpacked_array, MM_MODEM_CHARSET_GSM, FALSE, error); + if (utf8) + mm_obj_dbg (log_object, "converted SMS part text from GSM-7 to UTF-8: %s", utf8); + return utf8; + } + + /* Always assume UTF-16 instead of UCS-2! */ + if (encoding == MM_SMS_ENCODING_UCS2) { + g_autoptr(GByteArray) bytearray = NULL; + gchar *utf8; + + bytearray = g_byte_array_append (g_byte_array_sized_new (len), (const guint8 *)text, len); + utf8 = mm_modem_charset_bytearray_to_utf8 (bytearray, MM_MODEM_CHARSET_UTF16, FALSE, error); + if (utf8) + mm_obj_dbg (log_object, "converted SMS part text from UTF-16BE to UTF-8: %s", utf8); + return utf8; + } + + g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, + "Couldn't convert SMS part contents from %s to UTF-8", + mm_sms_encoding_get_string (encoding)); + return NULL; } static guint @@ -339,35 +340,31 @@ } MMSmsPart * -mm_sms_part_3gpp_new_from_pdu (guint index, - const gchar *hexpdu, - GError **error) +mm_sms_part_3gpp_new_from_pdu (guint index, + const gchar *hexpdu, + gpointer log_object, + GError **error) { - gsize pdu_len; - guint8 *pdu; - MMSmsPart *part; + g_autofree guint8 *pdu = NULL; + gsize pdu_len; /* Convert PDU from hex to binary */ - pdu = (guint8 *) mm_utils_hexstr2bin (hexpdu, &pdu_len); + pdu = mm_utils_hexstr2bin (hexpdu, -1, &pdu_len, error); if (!pdu) { - g_set_error_literal (error, - MM_CORE_ERROR, - MM_CORE_ERROR_FAILED, - "Couldn't convert 3GPP PDU from hex to binary"); + g_prefix_error (error, "Couldn't convert 3GPP PDU from hex to binary: "); return NULL; } - part = mm_sms_part_3gpp_new_from_binary_pdu (index, pdu, pdu_len, error); - g_free (pdu); - - return part; + return mm_sms_part_3gpp_new_from_binary_pdu (index, pdu, pdu_len, log_object, FALSE, error); } MMSmsPart * -mm_sms_part_3gpp_new_from_binary_pdu (guint index, - const guint8 *pdu, - gsize pdu_len, - GError **error) +mm_sms_part_3gpp_new_from_binary_pdu (guint index, + const guint8 *pdu, + gsize pdu_len, + gpointer log_object, + gboolean transfer_route, + GError **error) { MMSmsPart *sms_part; guint8 pdu_type; @@ -383,14 +380,15 @@ guint tp_dcs_offset = 0; guint tp_user_data_len_offset = 0; MMSmsEncoding user_data_encoding = MM_SMS_ENCODING_UNKNOWN; + gchar *address; /* Create the new MMSmsPart */ sms_part = mm_sms_part_new (index, MM_SMS_PDU_TYPE_UNKNOWN); if (index != SMS_PART_INVALID_INDEX) - mm_dbg ("Parsing PDU (%u)...", index); + mm_obj_dbg (log_object, "parsing PDU (%u)...", index); else - mm_dbg ("Parsing PDU..."); + mm_obj_dbg (log_object, "parsing PDU..."); #define PDU_SIZE_CHECK(required_size, check_descr_str) \ if (pdu_len < required_size) { \ @@ -407,20 +405,28 @@ offset = 0; - /* ---------------------------------------------------------------------- */ - /* SMSC, in address format, precedes the TPDU - * First byte represents the number of BYTES for the address value */ - PDU_SIZE_CHECK (1, "cannot read SMSC address length"); - smsc_addr_size_bytes = pdu[offset++]; - if (smsc_addr_size_bytes > 0) { - PDU_SIZE_CHECK (offset + smsc_addr_size_bytes, "cannot read SMSC address"); - /* SMSC may not be given in DELIVER PDUs */ - mm_sms_part_take_smsc (sms_part, - sms_decode_address (&pdu[1], 2 * (smsc_addr_size_bytes - 1))); - mm_dbg (" SMSC address parsed: '%s'", mm_sms_part_get_smsc (sms_part)); - offset += smsc_addr_size_bytes; + if (!transfer_route) { + /* ---------------------------------------------------------------------- */ + /* SMSC, in address format, precedes the TPDU + * First byte represents the number of BYTES for the address value */ + PDU_SIZE_CHECK (1, "cannot read SMSC address length"); + smsc_addr_size_bytes = pdu[offset++]; + if (smsc_addr_size_bytes > 0) { + PDU_SIZE_CHECK (offset + smsc_addr_size_bytes, "cannot read SMSC address"); + /* SMSC may not be given in DELIVER PDUs */ + address = sms_decode_address (&pdu[1], 2 * (smsc_addr_size_bytes - 1), error); + if (!address) { + g_prefix_error (error, "Couldn't read SMSC address: "); + mm_sms_part_free (sms_part); + return NULL; + } + mm_sms_part_take_smsc (sms_part, g_steal_pointer (&address)); + mm_obj_dbg (log_object, " SMSC address parsed: '%s'", mm_sms_part_get_smsc (sms_part)); + offset += smsc_addr_size_bytes; + } else + mm_obj_dbg (log_object, " no SMSC address given"); } else - mm_dbg (" No SMSC address given"); + mm_obj_dbg (log_object, " This is a transfer-route message"); /* ---------------------------------------------------------------------- */ @@ -430,15 +436,15 @@ pdu_type = (pdu[offset] & SMS_TP_MTI_MASK); switch (pdu_type) { case SMS_TP_MTI_SMS_DELIVER: - mm_dbg (" Deliver type PDU detected"); + mm_obj_dbg (log_object, " deliver type PDU detected"); mm_sms_part_set_pdu_type (sms_part, MM_SMS_PDU_TYPE_DELIVER); break; case SMS_TP_MTI_SMS_SUBMIT: - mm_dbg (" Submit type PDU detected"); + mm_obj_dbg (log_object, " submit type PDU detected"); mm_sms_part_set_pdu_type (sms_part, MM_SMS_PDU_TYPE_SUBMIT); break; case SMS_TP_MTI_SMS_STATUS_REPORT: - mm_dbg (" Status report type PDU detected"); + mm_obj_dbg (log_object, " status report type PDU detected"); mm_sms_part_set_pdu_type (sms_part, MM_SMS_PDU_TYPE_STATUS_REPORT); break; default: @@ -471,7 +477,7 @@ pdu_type == SMS_TP_MTI_SMS_SUBMIT) { PDU_SIZE_CHECK (offset + 1, "cannot read message reference"); - mm_dbg (" message reference: %u", (guint)pdu[offset]); + mm_obj_dbg (log_object, " message reference: %u", (guint)pdu[offset]); mm_sms_part_set_message_reference (sms_part, pdu[offset]); offset++; } @@ -488,10 +494,14 @@ tp_addr_size_bytes = (tp_addr_size_digits + 1) >> 1; PDU_SIZE_CHECK (offset + tp_addr_size_bytes, "cannot read number"); - mm_sms_part_take_number (sms_part, - sms_decode_address (&pdu[offset], - tp_addr_size_digits)); - mm_dbg (" Number parsed: '%s'", mm_sms_part_get_number (sms_part)); + address = sms_decode_address (&pdu[offset], tp_addr_size_digits, error); + if (!address) { + g_prefix_error (error, "Couldn't read address: "); + mm_sms_part_free (sms_part); + return NULL; + } + mm_sms_part_take_number (sms_part, g_steal_pointer (&address)); + mm_obj_dbg (log_object, " number parsed: %s", mm_sms_part_get_number (sms_part)); offset += (1 + tp_addr_size_bytes); /* +1 due to the Type of Address byte */ /* ---------------------------------------------------------------------- */ @@ -527,20 +537,20 @@ if (validity_format) { switch (validity_format) { case 0x10: - mm_dbg (" validity available, format relative"); + mm_obj_dbg (log_object, " validity available, format relative"); mm_sms_part_set_validity_relative (sms_part, relative_to_validity (pdu[offset])); offset++; break; case 0x08: /* TODO: support enhanced format; GSM 03.40 */ - mm_dbg (" validity available, format enhanced (not implemented)"); + mm_obj_dbg (log_object, " validity available, format enhanced (not implemented)"); /* 7 bytes for enhanced validity */ offset += 7; break; case 0x18: /* TODO: support absolute format; GSM 03.40 */ - mm_dbg (" validity available, format absolute (not implemented)"); + mm_obj_dbg (log_object, " validity available, format absolute (not implemented)"); /* 7 bytes for absolute validity */ offset += 7; break; @@ -570,7 +580,7 @@ offset += 7; /* ----- TP-STATUS (1 byte) ------ */ - mm_dbg (" delivery state: %u", (guint)pdu[offset]); + mm_obj_dbg (log_object, " delivery state: %u", (guint)pdu[offset]); mm_sms_part_set_delivery_state (sms_part, pdu[offset]); offset++; @@ -595,7 +605,7 @@ if (tp_pid_offset > 0) { PDU_SIZE_CHECK (tp_pid_offset + 1, "cannot read TP-PID"); - mm_dbg (" PID: %u", (guint)pdu[tp_pid_offset]); + mm_obj_dbg (log_object, " PID: %u", (guint)pdu[tp_pid_offset]); } /* Grab user data encoding and message class */ @@ -606,17 +616,20 @@ user_data_encoding = sms_encoding_type (pdu[tp_dcs_offset]); switch (user_data_encoding) { case MM_SMS_ENCODING_GSM7: - mm_dbg (" user data encoding is GSM7"); + mm_obj_dbg (log_object, " user data encoding is GSM7"); break; case MM_SMS_ENCODING_UCS2: - mm_dbg (" user data encoding is UCS2"); + mm_obj_dbg (log_object, " user data encoding is UCS2"); break; case MM_SMS_ENCODING_8BIT: - mm_dbg (" user data encoding is 8bit"); + mm_obj_dbg (log_object, " user data encoding is 8bit"); break; - default: - mm_dbg (" user data encoding is unknown"); + case MM_SMS_ENCODING_UNKNOWN: + mm_obj_dbg (log_object, " user data encoding is unknown"); break; + default: + g_assert_not_reached (); + } mm_sms_part_set_encoding (sms_part, user_data_encoding); @@ -634,13 +647,13 @@ PDU_SIZE_CHECK (tp_user_data_len_offset + 1, "cannot read TP-UDL"); tp_user_data_size_elements = pdu[tp_user_data_len_offset]; - mm_dbg (" user data length: %u elements", tp_user_data_size_elements); + mm_obj_dbg (log_object, " user data length: %u elements", tp_user_data_size_elements); if (user_data_encoding == MM_SMS_ENCODING_GSM7) tp_user_data_size_bytes = (7 * (tp_user_data_size_elements + 1 )) / 8; else tp_user_data_size_bytes = tp_user_data_size_elements; - mm_dbg (" user data length: %u bytes", tp_user_data_size_bytes); + mm_obj_dbg (log_object, " user data length: %u bytes", tp_user_data_size_bytes); tp_user_data_offset = tp_user_data_len_offset + 1; PDU_SIZE_CHECK (tp_user_data_offset + tp_user_data_size_bytes, "cannot read TP-UD"); @@ -689,6 +702,8 @@ mm_sms_part_set_concat_max (sms_part,pdu[offset + 2]); mm_sms_part_set_concat_sequence (sms_part, pdu[offset + 3]); break; + default: + break; } offset += ie_len; @@ -714,21 +729,31 @@ switch (user_data_encoding) { case MM_SMS_ENCODING_GSM7: case MM_SMS_ENCODING_UCS2: - /* Otherwise if it's 7-bit or UCS2 we can decode it */ - mm_dbg ("Decoding SMS text with '%u' elements", tp_user_data_size_elements); - mm_sms_part_take_text (sms_part, - sms_decode_text (&pdu[tp_user_data_offset], - tp_user_data_size_elements, - user_data_encoding, - bit_offset)); - g_warn_if_fail (mm_sms_part_get_text (sms_part) != NULL); - break; + { + gchar *text; + /* Otherwise if it's 7-bit or UCS2 we can decode it */ + mm_obj_dbg (log_object, "decoding SMS text with %u elements", tp_user_data_size_elements); + text = sms_decode_text (&pdu[tp_user_data_offset], + tp_user_data_size_elements, + user_data_encoding, + bit_offset, + log_object, + error); + if (!text) { + mm_sms_part_free (sms_part); + return NULL; + } + mm_sms_part_take_text (sms_part, text); + break; + } + case MM_SMS_ENCODING_8BIT: + case MM_SMS_ENCODING_UNKNOWN: default: { GByteArray *raw; - mm_dbg ("Skipping SMS text: Unknown encoding (0x%02X)", user_data_encoding); + mm_obj_dbg (log_object, "skipping SMS text: unknown encoding (0x%02X)", user_data_encoding); PDU_SIZE_CHECK (tp_user_data_offset + tp_user_data_size_bytes, "cannot read user data"); @@ -806,12 +831,14 @@ mm_sms_part_3gpp_get_submit_pdu (MMSmsPart *part, guint *out_pdulen, guint *out_msgstart, + gpointer log_object, GError **error) { guint8 *pdu; guint len, offset = 0; guint shift = 0; guint8 *udl_ptr; + MMSmsEncoding encoding; g_return_val_if_fail (mm_sms_part_get_number (part) != NULL, NULL); g_return_val_if_fail (mm_sms_part_get_text (part) != NULL || mm_sms_part_get_data (part) != NULL, NULL); @@ -825,13 +852,13 @@ return NULL; } - mm_dbg ("Creating PDU for part..."); + mm_obj_dbg (log_object, "creating PDU for part..."); /* Build up the PDU */ pdu = g_malloc0 (PDU_SIZE); if (mm_sms_part_get_smsc (part)) { - mm_dbg (" adding SMSC to PDU..."); + mm_obj_dbg (log_object, " adding SMSC to PDU..."); len = mm_sms_part_3gpp_encode_address (mm_sms_part_get_smsc (part), pdu, PDU_SIZE, TRUE); if (len == 0) { g_set_error (error, @@ -854,13 +881,13 @@ /* TP-VP present; format RELATIVE */ if (mm_sms_part_get_validity_relative (part) > 0) { - mm_dbg (" adding validity to PDU..."); + mm_obj_dbg (log_object, " adding validity to PDU..."); pdu[offset] |= 0x10; } /* Concatenation sequence only found in multipart SMS */ if (mm_sms_part_get_concat_sequence (part)) { - mm_dbg (" adding UDHI to PDU..."); + mm_obj_dbg (log_object, " adding UDHI to PDU..."); pdu[offset] |= 0x40; /* UDHI */ } @@ -869,7 +896,7 @@ if (mm_sms_part_get_delivery_report_request (part) && (!mm_sms_part_get_concat_sequence (part) || mm_sms_part_get_concat_max (part) == mm_sms_part_get_concat_sequence (part))) { - mm_dbg (" requesting delivery report..."); + mm_obj_dbg (log_object, " requesting delivery report..."); pdu[offset] |= 0x20; } @@ -901,22 +928,26 @@ pdu[offset] = 0x00; if (mm_sms_part_get_class (part) >= 0 && mm_sms_part_get_class (part) <= 3) { - mm_dbg (" using class %d...", mm_sms_part_get_class (part)); + mm_obj_dbg (log_object, " using class %d...", mm_sms_part_get_class (part)); pdu[offset] |= SMS_DCS_CLASS_VALID; pdu[offset] |= mm_sms_part_get_class (part); } - switch (mm_sms_part_get_encoding (part)) { + encoding = mm_sms_part_get_encoding (part); + + switch (encoding) { case MM_SMS_ENCODING_UCS2: - mm_dbg (" using UCS2 encoding..."); + mm_obj_dbg (log_object, " using UCS2 encoding..."); pdu[offset] |= SMS_DCS_CODING_UCS2; break; case MM_SMS_ENCODING_GSM7: - mm_dbg (" using GSM7 encoding..."); + mm_obj_dbg (log_object, " using GSM7 encoding..."); pdu[offset] |= SMS_DCS_CODING_DEFAULT; /* GSM */ break; + case MM_SMS_ENCODING_8BIT: + case MM_SMS_ENCODING_UNKNOWN: default: - mm_dbg (" using 8bit encoding..."); + mm_obj_dbg (log_object, " using 8bit encoding..."); pdu[offset] |= SMS_DCS_CODING_8BIT; break; } @@ -935,7 +966,7 @@ /* Build UDH */ if (mm_sms_part_get_concat_sequence (part)) { - mm_dbg (" adding UDH header in PDU... (reference: %u, max: %u, sequence: %u)", + mm_obj_dbg (log_object, " adding UDH header in PDU... (reference: %u, max: %u, sequence: %u)", mm_sms_part_get_concat_reference (part), mm_sms_part_get_concat_max (part), mm_sms_part_get_concat_sequence (part)); @@ -957,13 +988,16 @@ shift = 1; } - if (mm_sms_part_get_encoding (part) == MM_SMS_ENCODING_GSM7) { - guint8 *unpacked, *packed; - guint32 unlen = 0, packlen = 0; - - unpacked = mm_charset_utf8_to_unpacked_gsm (mm_sms_part_get_text (part), &unlen); - if (!unpacked || unlen == 0) { - g_free (unpacked); + if (encoding == MM_SMS_ENCODING_GSM7) { + g_autoptr(GByteArray) unpacked = NULL; + g_autofree guint8 *packed = NULL; + guint32 packlen = 0; + + unpacked = mm_modem_charset_bytearray_from_utf8 (mm_sms_part_get_text (part), MM_MODEM_CHARSET_GSM, FALSE, error); + if (!unpacked) + goto error; + + if (unpacked->len == 0) { g_set_error_literal (error, MM_MESSAGE_ERROR, MM_MESSAGE_ERROR_INVALID_PDU_PARAMETER, @@ -974,15 +1008,13 @@ /* Set real data length, in septets * If we had UDH, add 7 septets */ - *udl_ptr = mm_sms_part_get_concat_sequence (part) ? (7 + unlen) : unlen; - mm_dbg (" user data length is '%u' septets (%s UDH)", - *udl_ptr, - mm_sms_part_get_concat_sequence (part) ? "with" : "without"); + *udl_ptr = mm_sms_part_get_concat_sequence (part) ? (7 + unpacked->len) : unpacked->len; + mm_obj_dbg (log_object, " user data length is %u septets (%s UDH)", + *udl_ptr, + mm_sms_part_get_concat_sequence (part) ? "with" : "without"); - packed = mm_charset_gsm_pack (unpacked, unlen, shift, &packlen); - g_free (unpacked); + packed = mm_charset_gsm_pack (unpacked->data, unpacked->len, shift, &packlen); if (!packed || packlen == 0) { - g_free (packed); g_set_error_literal (error, MM_MESSAGE_ERROR, MM_MESSAGE_ERROR_INVALID_PDU_PARAMETER, @@ -991,19 +1023,19 @@ } memcpy (&pdu[offset], packed, packlen); - g_free (packed); offset += packlen; - } else if (mm_sms_part_get_encoding (part) == MM_SMS_ENCODING_UCS2) { - GByteArray *array; + } else if (encoding == MM_SMS_ENCODING_UCS2) { + g_autoptr(GByteArray) array = NULL; + g_autoptr(GError) inner_error = NULL; - /* Try to guess a good value for the array */ - array = g_byte_array_sized_new (strlen (mm_sms_part_get_text (part)) * 2); - if (!mm_modem_charset_byte_array_append (array, mm_sms_part_get_text (part), FALSE, MM_MODEM_CHARSET_UCS2)) { - g_byte_array_free (array, TRUE); - g_set_error_literal (error, - MM_MESSAGE_ERROR, - MM_MESSAGE_ERROR_INVALID_PDU_PARAMETER, - "Failed to convert message text to UCS2"); + /* Always assume UTF-16 instead of UCS-2! */ + array = mm_modem_charset_bytearray_from_utf8 (mm_sms_part_get_text (part), MM_MODEM_CHARSET_UTF16, FALSE, &inner_error); + if (!array) { + g_set_error (error, + MM_MESSAGE_ERROR, + MM_MESSAGE_ERROR_INVALID_PDU_PARAMETER, + "Failed to convert message text to UTF-16: %s", + inner_error->message); goto error; } @@ -1011,13 +1043,12 @@ * If we had UDH, add 6 octets */ *udl_ptr = mm_sms_part_get_concat_sequence (part) ? (6 + array->len) : array->len; - mm_dbg (" user data length is '%u' octets (%s UDH)", - *udl_ptr, - mm_sms_part_get_concat_sequence (part) ? "with" : "without"); + mm_obj_dbg (log_object, " user data length is %u octets (%s UDH)", + *udl_ptr, + mm_sms_part_get_concat_sequence (part) ? "with" : "without"); memcpy (&pdu[offset], array->data, array->len); offset += array->len; - g_byte_array_free (array, TRUE); } else if (mm_sms_part_get_encoding (part) == MM_SMS_ENCODING_8BIT) { const GByteArray *data; @@ -1027,7 +1058,7 @@ * If we had UDH, add 6 octets */ *udl_ptr = mm_sms_part_get_concat_sequence (part) ? (6 + data->len) : data->len; - mm_dbg (" binary user data length is '%u' octets (%s UDH)", + mm_obj_dbg (log_object, " binary user data length is %u octets (%s UDH)", *udl_ptr, mm_sms_part_get_concat_sequence (part) ? "with" : "without"); @@ -1045,21 +1076,109 @@ return NULL; } -gchar ** -mm_sms_part_3gpp_util_split_text (const gchar *text, - MMSmsEncoding *encoding) +static gchar ** +util_split_text_gsm7 (const gchar *text, + gsize text_len, + gpointer log_object) { gchar **out; - guint n_chunks; - guint i; - guint j; - gsize in_len; + guint n_chunks; + guint i; + guint j; + + /* No splitting needed? */ + if (text_len <= 160) { + out = g_new0 (gchar *, 2); + out[0] = g_strdup (text); + return out; + } + + /* Compute number of chunks needed */ + n_chunks = text_len / 153; + if (text_len % 153 != 0) + n_chunks++; + + /* Fill in all chunks */ + out = g_new0 (gchar *, n_chunks + 1); + for (i = 0, j = 0; i < n_chunks; i++, j += 153) + out[i] = g_strndup (&text[j], 153); + + return out; +} + +static gchar ** +util_split_text_utf16_or_ucs2 (const gchar *text, + gsize text_len, + gpointer log_object) +{ + g_autoptr(GPtrArray) chunks = NULL; + const gchar *walker; + const gchar *chunk_start; + glong encoded_chunk_length; + glong total_encoded_chunk_length; + + chunks = g_ptr_array_new_with_free_func ((GDestroyNotify)g_free); + + walker = text; + chunk_start = text; + encoded_chunk_length = 0; + total_encoded_chunk_length = 0; + while (walker && *walker) { + g_autofree gunichar2 *unichar2 = NULL; + glong unichar2_written = 0; + glong unichar2_written_bytes = 0; + gunichar single; + + single = g_utf8_get_char (walker); + unichar2 = g_ucs4_to_utf16 (&single, 1, NULL, &unichar2_written, NULL); + g_assert (unichar2_written > 0); + + /* When splitting for UCS-2 encoding, only one single unichar2 will be + * written, because all codepoints represented in UCS2 fit in the BMP. + * When splitting for UTF-16, though, we may end up writing one or two + * unichar2 (without or with surrogate pairs), because UTF-16 covers the + * whole Unicode spectrum. */ + unichar2_written_bytes = (unichar2_written * sizeof (gunichar2)); + if ((encoded_chunk_length + unichar2_written_bytes) > 134) { + g_ptr_array_add (chunks, g_strndup (chunk_start, walker - chunk_start)); + chunk_start = walker; + encoded_chunk_length = unichar2_written_bytes; + } else + encoded_chunk_length += unichar2_written_bytes; + + total_encoded_chunk_length += unichar2_written_bytes; + walker = g_utf8_next_char (walker); + } + + /* We have split the original string in chunks, where each chunk + * does not require more than 134 bytes when encoded in UTF-16. + * As a special case now, we consider the case that no splitting + * is necessary, i.e. if the total amount of bytes after encoding + * in UTF-16 is less or equal than 140. */ + if (total_encoded_chunk_length <= 140) { + gchar **out; + out = g_new0 (gchar *, 2); + out[0] = g_strdup (text); + return out; + } + + /* Otherwise, we do need the splitted chunks. Add the last one + * with contents plus the last trailing NULL */ + g_ptr_array_add (chunks, g_strndup (chunk_start, walker - chunk_start)); + g_ptr_array_add (chunks, NULL); + + return (gchar **) g_ptr_array_free (g_steal_pointer (&chunks), FALSE); +} + +gchar ** +mm_sms_part_3gpp_util_split_text (const gchar *text, + MMSmsEncoding *encoding, + gpointer log_object) +{ if (!text) return NULL; - in_len = strlen (text); - /* Some info about the rules for splitting. * * The User Data can be up to 140 bytes in the SMS part: @@ -1074,78 +1193,25 @@ * 134 * 8 = 1072; 1072/7=153.14 * 2) If we're using UCS2 encoding, we can pack up to 70 characters in * 140 bytes (each with 2 bytes), or up to 67 characters in 134 bytes. + * 3) If we're using UTF-16 encoding (instead of UCS2), the amount of + * characters we can pack is variable, depends on how the characters + * are encoded in UTF-16 (e.g. if there are characters out of the BMP + * we'll need surrogate pairs and a single character will need 4 bytes + * instead of 2). * * This method does the split of the input string into N strings, so that * each of the strings can be placed in a SMS part. */ /* Check if we can do GSM encoding */ - if (!mm_charset_can_convert_to (text, MM_MODEM_CHARSET_GSM)) { - /* If cannot do it in GSM encoding, do it in UCS-2 */ - GByteArray *array; - - *encoding = MM_SMS_ENCODING_UCS2; - - /* Guess more or less the size of the output array to avoid multiple - * allocations */ - array = g_byte_array_sized_new (in_len * 2); - if (!mm_modem_charset_byte_array_append (array, - text, - FALSE, - MM_MODEM_CHARSET_UCS2)) { - g_byte_array_unref (array); - return NULL; - } - - /* Our bytearray has it in UCS-2 now. - * UCS-2 is a fixed-size encoding, which means that the text has exactly - * 2 bytes for each unicode point. We can now split this array into - * chunks of 67 UCS-2 characters (134 bytes). - * - * Note that UCS-2 covers unicode points between U+0000 and U+FFFF, which - * means that there is no direct relationship between the size of the - * input text in UTF-8 and the size of the text in UCS-2. A 3-byte UTF-8 - * encoded character will still be represented with 2 bytes in UCS-2. - */ - if (array->len <= 140) { - out = g_new (gchar *, 2); - out[0] = g_strdup (text); - out[1] = NULL; - } else { - n_chunks = array->len / 134; - if (array->len % 134 != 0) - n_chunks++; - - out = g_new0 (gchar *, n_chunks + 1); - for (i = 0, j = 0; i < n_chunks; i++, j += 134) { - out[i] = sms_decode_text (&array->data[j], - MIN (array->len - j, 134), - MM_SMS_ENCODING_UCS2, - 0); - } - } - g_byte_array_unref (array); - } else { - /* Do it with GSM encoding */ + if (mm_charset_can_convert_to (text, MM_MODEM_CHARSET_GSM)) { *encoding = MM_SMS_ENCODING_GSM7; - - if (in_len <= 160) { - out = g_new (gchar *, 2); - out[0] = g_strdup (text); - out[1] = NULL; - } else { - n_chunks = in_len / 153; - if (in_len % 153 != 0) - n_chunks++; - - out = g_new0 (gchar *, n_chunks + 1); - for (i = 0, j = 0; i < n_chunks; i++, j += 153) { - out[i] = g_strndup (&text[j], 153); - } - } + return util_split_text_gsm7 (text, strlen (text), log_object); } - return out; + /* Otherwise fallback to report UCS-2 and split supporting UTF-16 */ + *encoding = MM_SMS_ENCODING_UCS2; + return util_split_text_utf16_or_ucs2 (text, strlen (text), log_object); } GByteArray ** diff -Nru modemmanager-1.12.8/src/mm-sms-part-3gpp.h modemmanager-1.16.6/src/mm-sms-part-3gpp.h --- modemmanager-1.12.8/src/mm-sms-part-3gpp.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-sms-part-3gpp.h 2021-06-06 21:40:59.000000000 +0800 @@ -22,31 +22,32 @@ #include "mm-sms-part.h" -MMSmsPart *mm_sms_part_3gpp_new_from_pdu (guint index, - const gchar *hexpdu, - GError **error); - -MMSmsPart *mm_sms_part_3gpp_new_from_binary_pdu (guint index, - const guint8 *pdu, - gsize pdu_len, - GError **error); - -guint8 *mm_sms_part_3gpp_get_submit_pdu (MMSmsPart *part, - guint *out_pdulen, - guint *out_msgstart, - GError **error); +MMSmsPart *mm_sms_part_3gpp_new_from_pdu (guint index, + const gchar *hexpdu, + gpointer log_object, + GError **error); +MMSmsPart *mm_sms_part_3gpp_new_from_binary_pdu (guint index, + const guint8 *pdu, + gsize pdu_len, + gpointer log_object, + gboolean transfer_route, + GError **error); +guint8 *mm_sms_part_3gpp_get_submit_pdu (MMSmsPart *part, + guint *out_pdulen, + guint *out_msgstart, + gpointer log_object, + GError **error); /* For testcases only */ -guint mm_sms_part_3gpp_encode_address (const gchar *address, - guint8 *buf, - gsize buflen, - gboolean is_smsc); - -gchar **mm_sms_part_3gpp_util_split_text (const gchar *text, - MMSmsEncoding *encoding); - -GByteArray **mm_sms_part_3gpp_util_split_data (const guint8 *data, - gsize data_len); +guint mm_sms_part_3gpp_encode_address (const gchar *address, + guint8 *buf, + gsize buflen, + gboolean is_smsc); +gchar **mm_sms_part_3gpp_util_split_text (const gchar *text, + MMSmsEncoding *encoding, + gpointer log_object); +GByteArray **mm_sms_part_3gpp_util_split_data (const guint8 *data, + gsize data_len); #endif /* MM_SMS_PART_3GPP_H */ diff -Nru modemmanager-1.12.8/src/mm-sms-part-cdma.c modemmanager-1.16.6/src/mm-sms-part-cdma.c --- modemmanager-1.12.8/src/mm-sms-part-cdma.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-sms-part-cdma.c 2021-06-06 21:40:59.000000000 +0800 @@ -24,7 +24,7 @@ #include "mm-charsets.h" #include "mm-sms-part-cdma.h" -#include "mm-log.h" +#include "mm-log-object.h" /* * Documentation that you may want to have around: @@ -312,28 +312,22 @@ /*****************************************************************************/ MMSmsPart * -mm_sms_part_cdma_new_from_pdu (guint index, - const gchar *hexpdu, - GError **error) +mm_sms_part_cdma_new_from_pdu (guint index, + const gchar *hexpdu, + gpointer log_object, + GError **error) { - gsize pdu_len; - guint8 *pdu; - MMSmsPart *part; + g_autofree guint8 *pdu = NULL; + gsize pdu_len; /* Convert PDU from hex to binary */ - pdu = (guint8 *) mm_utils_hexstr2bin (hexpdu, &pdu_len); + pdu = mm_utils_hexstr2bin (hexpdu, -1, &pdu_len, error); if (!pdu) { - g_set_error_literal (error, - MM_CORE_ERROR, - MM_CORE_ERROR_FAILED, - "Couldn't convert CDMA PDU from hex to binary"); + g_prefix_error (error, "Couldn't convert CDMA PDU from hex to binary: "); return NULL; } - part = mm_sms_part_cdma_new_from_binary_pdu (index, pdu, pdu_len, error); - g_free (pdu); - - return part; + return mm_sms_part_cdma_new_from_binary_pdu (index, pdu, pdu_len, log_object, error); } struct Parameter { @@ -343,16 +337,17 @@ } __attribute__((packed)); static void -read_teleservice_id (MMSmsPart *sms_part, - const struct Parameter *parameter) +read_teleservice_id (MMSmsPart *sms_part, + const struct Parameter *parameter, + gpointer log_object) { guint16 teleservice_id; g_assert (parameter->parameter_id == PARAMETER_ID_TELESERVICE_ID); if (parameter->parameter_len != 2) { - mm_dbg (" invalid teleservice ID length found (%u != 2): ignoring", - parameter->parameter_len); + mm_obj_dbg (log_object, " invalid teleservice ID length found (%u != 2): ignoring", + parameter->parameter_len); return; } @@ -370,29 +365,30 @@ case MM_SMS_CDMA_TELESERVICE_ID_CATPT: break; default: - mm_dbg (" invalid teleservice ID found (%u): ignoring", teleservice_id); + mm_obj_dbg (log_object, " invalid teleservice ID found (%u): ignoring", teleservice_id); return; } - mm_dbg (" teleservice ID: %s (%u)", - mm_sms_cdma_teleservice_id_get_string (teleservice_id), - teleservice_id); + mm_obj_dbg (log_object, " teleservice ID: %s (%u)", + mm_sms_cdma_teleservice_id_get_string (teleservice_id), + teleservice_id); mm_sms_part_set_cdma_teleservice_id (sms_part, (MMSmsCdmaTeleserviceId)teleservice_id); } static void -read_service_category (MMSmsPart *sms_part, - const struct Parameter *parameter) +read_service_category (MMSmsPart *sms_part, + const struct Parameter *parameter, + gpointer log_object) { guint16 service_category; g_assert (parameter->parameter_id == PARAMETER_ID_SERVICE_CATEGORY); if (parameter->parameter_len != 2) { - mm_dbg (" invalid service category length found (%u != 2): ignoring", - parameter->parameter_len); + mm_obj_dbg (log_object, " invalid service category length found (%u != 2): ignoring", + parameter->parameter_len); return; } @@ -438,20 +434,21 @@ case MM_SMS_CDMA_SERVICE_CATEGORY_CMAS_TEST: break; default: - mm_dbg (" invalid service category found (%u): ignoring", service_category); + mm_obj_dbg (log_object, " invalid service category found (%u): ignoring", service_category); return; } - mm_dbg (" service category: %s (%u)", - mm_sms_cdma_service_category_get_string (service_category), - service_category); + mm_obj_dbg (log_object, " service category: %s (%u)", + mm_sms_cdma_service_category_get_string (service_category), + service_category); mm_sms_part_set_cdma_service_category (sms_part, - (MMSmsCdmaServiceCategory)service_category); + (MMSmsCdmaServiceCategory)service_category); } static guint8 -dtmf_to_ascii (guint8 dtmf) +dtmf_to_ascii (guint8 dtmf, + gpointer log_object) { static const gchar dtmf_to_ascii_digits[13] = { '\0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '*', '#' }; @@ -459,13 +456,14 @@ if (dtmf > 0 && dtmf < 13) return dtmf_to_ascii_digits[dtmf]; - mm_dbg (" invalid dtmf digit: %u", dtmf); + mm_obj_dbg (log_object, " invalid dtmf digit: %u", dtmf); return '\0'; } static void -read_address (MMSmsPart *sms_part, - const struct Parameter *parameter) +read_address (MMSmsPart *sms_part, + const struct Parameter *parameter, + gpointer log_object) { guint8 digit_mode; guint8 number_mode; @@ -487,9 +485,9 @@ #define PARAMETER_SIZE_CHECK(required_size) \ if (parameter->parameter_len < required_size) { \ - mm_dbg (" cannot read address, need at least %u bytes (got %u)", \ - required_size, \ - parameter->parameter_len); \ + mm_obj_dbg (log_object, " cannot read address, need at least %u bytes (got %u)", \ + required_size, \ + parameter->parameter_len); \ return; \ } @@ -502,10 +500,10 @@ g_assert (digit_mode <= 1); switch (digit_mode) { case DIGIT_MODE_DTMF: - mm_dbg (" digit mode: dtmf"); + mm_obj_dbg (log_object, " digit mode: dtmf"); break; case DIGIT_MODE_ASCII: - mm_dbg (" digit mode: ascii"); + mm_obj_dbg (log_object, " digit mode: ascii"); break; default: g_assert_not_reached (); @@ -516,10 +514,10 @@ OFFSETS_UPDATE (1); switch (number_mode) { case NUMBER_MODE_DIGIT: - mm_dbg (" number mode: digit"); + mm_obj_dbg (log_object, " number mode: digit"); break; case NUMBER_MODE_DATA_NETWORK_ADDRESS: - mm_dbg (" number mode: data network address"); + mm_obj_dbg (log_object, " number mode: data network address"); break; default: g_assert_not_reached (); @@ -532,25 +530,25 @@ OFFSETS_UPDATE (3); switch (number_type) { case NUMBER_TYPE_UNKNOWN: - mm_dbg (" number type: unknown"); + mm_obj_dbg (log_object, " number type: unknown"); break; case NUMBER_TYPE_INTERNATIONAL: - mm_dbg (" number type: international"); + mm_obj_dbg (log_object, " number type: international"); break; case NUMBER_TYPE_NATIONAL: - mm_dbg (" number type: national"); + mm_obj_dbg (log_object, " number type: national"); break; case NUMBER_TYPE_NETWORK_SPECIFIC: - mm_dbg (" number type: specific"); + mm_obj_dbg (log_object, " number type: specific"); break; case NUMBER_TYPE_SUBSCRIBER: - mm_dbg (" number type: subscriber"); + mm_obj_dbg (log_object, " number type: subscriber"); break; case NUMBER_TYPE_ABBREVIATED: - mm_dbg (" number type: abbreviated"); + mm_obj_dbg (log_object, " number type: abbreviated"); break; default: - mm_dbg (" number type unknown (%u)", number_type); + mm_obj_dbg (log_object, " number type unknown (%u)", number_type); break; } } else @@ -564,22 +562,22 @@ OFFSETS_UPDATE (4); switch (numbering_plan) { case NUMBERING_PLAN_UNKNOWN: - mm_dbg (" numbering plan: unknown"); + mm_obj_dbg (log_object, " numbering plan: unknown"); break; case NUMBERING_PLAN_ISDN: - mm_dbg (" numbering plan: isdn"); + mm_obj_dbg (log_object, " numbering plan: isdn"); break; case NUMBERING_PLAN_DATA: - mm_dbg (" numbering plan: data"); + mm_obj_dbg (log_object, " numbering plan: data"); break; case NUMBERING_PLAN_TELEX: - mm_dbg (" numbering plan: telex"); + mm_obj_dbg (log_object, " numbering plan: telex"); break; case NUMBERING_PLAN_PRIVATE: - mm_dbg (" numbering plan: private"); + mm_obj_dbg (log_object, " numbering plan: private"); break; default: - mm_dbg (" numbering plan unknown (%u)", numbering_plan); + mm_obj_dbg (log_object, " numbering plan unknown (%u)", numbering_plan); break; } } else @@ -589,7 +587,7 @@ PARAMETER_SIZE_CHECK (byte_offset + 2); num_fields = read_bits (¶meter->parameter_value[byte_offset], bit_offset, 8); OFFSETS_UPDATE (8); - mm_dbg (" num fields: %u", num_fields); + mm_obj_dbg (log_object, " num fields: %u", num_fields); /* Address string */ @@ -598,7 +596,7 @@ PARAMETER_SIZE_CHECK (byte_offset + 1 + ((bit_offset + (num_fields * 4)) / 8)); number = g_malloc (num_fields + 1); for (i = 0; i < num_fields; i++) { - number[i] = dtmf_to_ascii (read_bits (¶meter->parameter_value[byte_offset], bit_offset, 4)); + number[i] = dtmf_to_ascii (read_bits (¶meter->parameter_value[byte_offset], bit_offset, 4), log_object); OFFSETS_UPDATE (4); } number[i] = '\0'; @@ -634,9 +632,9 @@ } number = g_string_free (str, FALSE); } else - mm_dbg (" data network address number type unknown (%u)", number_type); + mm_obj_dbg (log_object, " data network address number type unknown (%u)", number_type); - mm_dbg (" address: %s", number); + mm_obj_dbg (log_object, " address: %s", number); mm_sms_part_set_number (sms_part, number); g_free (number); @@ -646,28 +644,30 @@ } static void -read_bearer_reply_option (MMSmsPart *sms_part, - const struct Parameter *parameter) +read_bearer_reply_option (MMSmsPart *sms_part, + const struct Parameter *parameter, + gpointer log_object) { guint8 sequence; g_assert (parameter->parameter_id == PARAMETER_ID_BEARER_REPLY_OPTION); if (parameter->parameter_len != 1) { - mm_dbg (" invalid bearer reply option length found (%u != 1): ignoring", + mm_obj_dbg (log_object, " invalid bearer reply option length found (%u != 1): ignoring", parameter->parameter_len); return; } sequence = read_bits (¶meter->parameter_value[0], 0, 6); - mm_dbg (" sequence: %u", sequence); + mm_obj_dbg (log_object, " sequence: %u", sequence); mm_sms_part_set_message_reference (sms_part, sequence); } static void -read_cause_codes (MMSmsPart *sms_part, - const struct Parameter *parameter) +read_cause_codes (MMSmsPart *sms_part, + const struct Parameter *parameter, + gpointer log_object) { guint8 sequence; guint8 error_class; @@ -677,38 +677,39 @@ g_assert (parameter->parameter_id == PARAMETER_ID_BEARER_REPLY_OPTION); if (parameter->parameter_len != 1 && parameter->parameter_len != 2) { - mm_dbg (" invalid cause codes length found (%u): ignoring", + mm_obj_dbg (log_object, " invalid cause codes length found (%u): ignoring", parameter->parameter_len); return; } sequence = read_bits (¶meter->parameter_value[0], 0, 6); - mm_dbg (" sequence: %u", sequence); + mm_obj_dbg (log_object, " sequence: %u", sequence); error_class = read_bits (¶meter->parameter_value[0], 6, 2); - mm_dbg (" error class: %u", error_class); + mm_obj_dbg (log_object, " error class: %u", error_class); if (error_class != ERROR_CLASS_NO_ERROR) { if (parameter->parameter_len != 2) { - mm_dbg (" invalid cause codes length found (%u != 2): ignoring", + mm_obj_dbg (log_object, " invalid cause codes length found (%u != 2): ignoring", parameter->parameter_len); return; } cause_code = parameter->parameter_value[1]; - mm_dbg (" cause code: %u", cause_code); + mm_obj_dbg (log_object, " cause code: %u", cause_code); } else cause_code = 0; delivery_state = cause_code_to_delivery_state (error_class, cause_code); - mm_dbg (" delivery state: %s", mm_sms_delivery_state_get_string (delivery_state)); + mm_obj_dbg (log_object, " delivery state: %s", mm_sms_delivery_state_get_string (delivery_state)); mm_sms_part_set_message_reference (sms_part, sequence); mm_sms_part_set_delivery_state (sms_part, delivery_state); } static void -read_bearer_data_message_identifier (MMSmsPart *sms_part, - const struct Parameter *subparameter) +read_bearer_data_message_identifier (MMSmsPart *sms_part, + const struct Parameter *subparameter, + gpointer log_object) { guint8 message_type; guint16 message_id; @@ -717,7 +718,7 @@ g_assert (subparameter->parameter_id == SUBPARAMETER_ID_MESSAGE_ID); if (subparameter->parameter_len != 3) { - mm_dbg (" invalid message identifier length found (%u): ignoring", + mm_obj_dbg (log_object, " invalid message identifier length found (%u): ignoring", subparameter->parameter_len); return; } @@ -725,49 +726,50 @@ message_type = read_bits (&subparameter->parameter_value[0], 0, 4); switch (message_type) { case TELESERVICE_MESSAGE_TYPE_UNKNOWN: - mm_dbg (" message type: unknown"); + mm_obj_dbg (log_object, " message type: unknown"); break; case TELESERVICE_MESSAGE_TYPE_DELIVER: - mm_dbg (" message type: deliver"); + mm_obj_dbg (log_object, " message type: deliver"); mm_sms_part_set_pdu_type (sms_part, MM_SMS_PDU_TYPE_CDMA_DELIVER); break; case TELESERVICE_MESSAGE_TYPE_SUBMIT: - mm_dbg (" message type: submit"); + mm_obj_dbg (log_object, " message type: submit"); mm_sms_part_set_pdu_type (sms_part, MM_SMS_PDU_TYPE_CDMA_SUBMIT); break; case TELESERVICE_MESSAGE_TYPE_CANCELLATION: - mm_dbg (" message type: cancellation"); + mm_obj_dbg (log_object, " message type: cancellation"); mm_sms_part_set_pdu_type (sms_part, MM_SMS_PDU_TYPE_CDMA_CANCELLATION); break; case TELESERVICE_MESSAGE_TYPE_DELIVERY_ACKNOWLEDGEMENT: - mm_dbg (" message type: delivery acknowledgement"); + mm_obj_dbg (log_object, " message type: delivery acknowledgement"); mm_sms_part_set_pdu_type (sms_part, MM_SMS_PDU_TYPE_CDMA_DELIVERY_ACKNOWLEDGEMENT); break; case TELESERVICE_MESSAGE_TYPE_USER_ACKNOWLEDGEMENT: - mm_dbg (" message type: user acknowledgement"); + mm_obj_dbg (log_object, " message type: user acknowledgement"); mm_sms_part_set_pdu_type (sms_part, MM_SMS_PDU_TYPE_CDMA_USER_ACKNOWLEDGEMENT); break; case TELESERVICE_MESSAGE_TYPE_READ_ACKNOWLEDGEMENT: - mm_dbg (" message type: read acknowledgement"); + mm_obj_dbg (log_object, " message type: read acknowledgement"); mm_sms_part_set_pdu_type (sms_part, MM_SMS_PDU_TYPE_CDMA_READ_ACKNOWLEDGEMENT); break; default: - mm_dbg (" message type unknown (%u)", message_type); + mm_obj_dbg (log_object, " message type unknown (%u)", message_type); break; } message_id = ((read_bits (&subparameter->parameter_value[0], 4, 8) << 8) | (read_bits (&subparameter->parameter_value[1], 4, 8))); message_id = GUINT16_FROM_BE (message_id); - mm_dbg (" message id: %u", (guint) message_id); + mm_obj_dbg (log_object, " message id: %u", (guint) message_id); header_ind = read_bits (&subparameter->parameter_value[2], 4, 1); - mm_dbg (" header indicator: %u", header_ind); + mm_obj_dbg (log_object, " header indicator: %u", header_ind); } static void -read_bearer_data_user_data (MMSmsPart *sms_part, - const struct Parameter *subparameter) +read_bearer_data_user_data (MMSmsPart *sms_part, + const struct Parameter *subparameter, + gpointer log_object) { guint8 message_encoding; guint8 message_type = 0; @@ -785,7 +787,7 @@ #define SUBPARAMETER_SIZE_CHECK(required_size) \ if (subparameter->parameter_len < required_size) { \ - mm_dbg (" cannot read user data, need at least %u bytes (got %u)", \ + mm_obj_dbg (log_object, " cannot read user data, need at least %u bytes (got %u)", \ required_size, \ subparameter->parameter_len); \ return; \ @@ -797,21 +799,21 @@ SUBPARAMETER_SIZE_CHECK (1); message_encoding = read_bits (&subparameter->parameter_value[byte_offset], bit_offset, 5); OFFSETS_UPDATE (5); - mm_dbg (" message encoding: %s", encoding_to_string (message_encoding)); + mm_obj_dbg (log_object, " message encoding: %s", encoding_to_string (message_encoding)); /* Message type, only if extended protocol message */ if (message_encoding == ENCODING_EXTENDED_PROTOCOL_MESSAGE) { SUBPARAMETER_SIZE_CHECK (2); message_type = read_bits (&subparameter->parameter_value[byte_offset], bit_offset, 8); OFFSETS_UPDATE (8); - mm_dbg (" message type: %u", message_type); + mm_obj_dbg (log_object, " message type: %u", message_type); } /* Number of fields */ SUBPARAMETER_SIZE_CHECK (byte_offset + 1 + ((bit_offset + 8) / 8)); num_fields = read_bits (&subparameter->parameter_value[byte_offset], bit_offset, 8); OFFSETS_UPDATE (8); - mm_dbg (" num fields: %u", num_fields); + mm_obj_dbg (log_object, " num fields: %u", num_fields); /* Now, process actual text or data */ switch (message_encoding) { @@ -828,7 +830,7 @@ OFFSETS_UPDATE (8); } - mm_dbg (" data: (%u bytes)", num_fields); + mm_obj_dbg (log_object, " data: (%u bytes)", num_fields); mm_sms_part_take_data (sms_part, data); break; } @@ -837,7 +839,7 @@ gchar *text; guint i; - SUBPARAMETER_SIZE_CHECK (byte_offset + 1 + ((bit_offset + (num_fields * 7)) / 8)); + SUBPARAMETER_SIZE_CHECK (byte_offset + ((bit_offset + (num_fields * 7)) / 8)); text = g_malloc (num_fields + 1); for (i = 0; i < num_fields; i++) { @@ -846,7 +848,7 @@ } text[i] = '\0'; - mm_dbg (" text: '%s'", text); + mm_obj_dbg (log_object, " text: '%s'", text); mm_sms_part_take_text (sms_part, text); break; } @@ -865,11 +867,11 @@ } latin[i] = '\0'; - text = g_convert (latin, -1, "UTF-8", "ISO−8859−1", NULL, NULL, NULL); + text = g_convert (latin, -1, "UTF-8", "ISO-8859-1", NULL, NULL, NULL); if (!text) { - mm_dbg (" text/data: ignored (latin to UTF-8 conversion error)"); + mm_obj_dbg (log_object, " text/data: ignored (latin to UTF-8 conversion error)"); } else { - mm_dbg (" text: '%s'", text); + mm_obj_dbg (log_object, " text: '%s'", text); mm_sms_part_take_text (sms_part, text); } @@ -896,9 +898,9 @@ text = g_convert (utf16, num_bytes, "UTF-8", "UCS-2BE", NULL, NULL, NULL); if (!text) { - mm_dbg (" text/data: ignored (UTF-16 to UTF-8 conversion error)"); + mm_obj_dbg (log_object, " text/data: ignored (UTF-16 to UTF-8 conversion error)"); } else { - mm_dbg (" text: '%s'", text); + mm_obj_dbg (log_object, " text: '%s'", text); mm_sms_part_take_text (sms_part, text); } @@ -907,7 +909,7 @@ } default: - mm_dbg (" text/data: ignored (unsupported encoding)"); + mm_obj_dbg (log_object, " text/data: ignored (unsupported encoding)"); } #undef OFFSETS_UPDATE @@ -915,16 +917,17 @@ } static void -read_bearer_data (MMSmsPart *sms_part, - const struct Parameter *parameter) +read_bearer_data (MMSmsPart *sms_part, + const struct Parameter *parameter, + gpointer log_object) { guint offset; #define PARAMETER_SIZE_CHECK(required_size) \ if (parameter->parameter_len < required_size) { \ - mm_dbg (" cannot read bearer data, need at least %u bytes (got %u)", \ - required_size, \ - parameter->parameter_len); \ + mm_obj_dbg (log_object, " cannot read bearer data, need at least %u bytes (got %u)", \ + required_size, \ + parameter->parameter_len); \ return; \ } @@ -941,81 +944,81 @@ switch (subparameter->parameter_id) { case SUBPARAMETER_ID_MESSAGE_ID: - mm_dbg (" reading message ID..."); - read_bearer_data_message_identifier (sms_part, subparameter); + mm_obj_dbg (log_object, " reading message ID..."); + read_bearer_data_message_identifier (sms_part, subparameter, log_object); break; case SUBPARAMETER_ID_USER_DATA: - mm_dbg (" reading user data..."); - read_bearer_data_user_data (sms_part, subparameter); + mm_obj_dbg (log_object, " reading user data..."); + read_bearer_data_user_data (sms_part, subparameter, log_object); break; case SUBPARAMETER_ID_USER_RESPONSE_CODE: - mm_dbg (" skipping user response code..."); + mm_obj_dbg (log_object, " skipping user response code..."); break; case SUBPARAMETER_ID_MESSAGE_CENTER_TIME_STAMP: - mm_dbg (" skipping message center timestamp..."); + mm_obj_dbg (log_object, " skipping message center timestamp..."); break; case SUBPARAMETER_ID_VALIDITY_PERIOD_ABSOLUTE: - mm_dbg (" skipping absolute validity period..."); + mm_obj_dbg (log_object, " skipping absolute validity period..."); break; case SUBPARAMETER_ID_VALIDITY_PERIOD_RELATIVE: - mm_dbg (" skipping relative validity period..."); + mm_obj_dbg (log_object, " skipping relative validity period..."); break; case SUBPARAMETER_ID_DEFERRED_DELIVERY_TIME_ABSOLUTE: - mm_dbg (" skipping absolute deferred delivery time..."); + mm_obj_dbg (log_object, " skipping absolute deferred delivery time..."); break; case SUBPARAMETER_ID_DEFERRED_DELIVERY_TIME_RELATIVE: - mm_dbg (" skipping relative deferred delivery time..."); + mm_obj_dbg (log_object, " skipping relative deferred delivery time..."); break; case SUBPARAMETER_ID_PRIORITY_INDICATOR: - mm_dbg (" skipping priority indicator..."); + mm_obj_dbg (log_object, " skipping priority indicator..."); break; case SUBPARAMETER_ID_PRIVACY_INDICATOR: - mm_dbg (" skipping privacy indicator..."); + mm_obj_dbg (log_object, " skipping privacy indicator..."); break; case SUBPARAMETER_ID_REPLY_OPTION: - mm_dbg (" skipping reply option..."); + mm_obj_dbg (log_object, " skipping reply option..."); break; case SUBPARAMETER_ID_NUMBER_OF_MESSAGES: - mm_dbg (" skipping number of messages..."); + mm_obj_dbg (log_object, " skipping number of messages..."); break; case SUBPARAMETER_ID_ALERT_ON_MESSAGE_DELIVERY: - mm_dbg (" skipping alert on message delivery..."); + mm_obj_dbg (log_object, " skipping alert on message delivery..."); break; case SUBPARAMETER_ID_LANGUAGE_INDICATOR: - mm_dbg (" skipping language indicator..."); + mm_obj_dbg (log_object, " skipping language indicator..."); break; case SUBPARAMETER_ID_CALL_BACK_NUMBER: - mm_dbg (" skipping call back number..."); + mm_obj_dbg (log_object, " skipping call back number..."); break; case SUBPARAMETER_ID_MESSAGE_DISPLAY_MODE: - mm_dbg (" skipping message display mode..."); + mm_obj_dbg (log_object, " skipping message display mode..."); break; case SUBPARAMETER_ID_MULTIPLE_ENCODING_USER_DATA: - mm_dbg (" skipping multiple encoding user data..."); + mm_obj_dbg (log_object, " skipping multiple encoding user data..."); break; case SUBPARAMETER_ID_MESSAGE_DEPOSIT_INDEX: - mm_dbg (" skipping message deposit index..."); + mm_obj_dbg (log_object, " skipping message deposit index..."); break; case SUBPARAMETER_ID_SERVICE_CATEGORY_PROGRAM_DATA: - mm_dbg (" skipping service category program data..."); + mm_obj_dbg (log_object, " skipping service category program data..."); break; case SUBPARAMETER_ID_SERVICE_CATEGORY_PROGRAM_RESULT: - mm_dbg (" skipping service category program result..."); + mm_obj_dbg (log_object, " skipping service category program result..."); break; case SUBPARAMETER_ID_MESSAGE_STATUS: - mm_dbg (" skipping message status..."); + mm_obj_dbg (log_object, " skipping message status..."); break; case SUBPARAMETER_ID_TP_FAILURE_CAUSE: - mm_dbg (" skipping TP failure case..."); + mm_obj_dbg (log_object, " skipping TP failure case..."); break; case SUBPARAMETER_ID_ENHANCED_VMN: - mm_dbg (" skipping enhanced vmn..."); + mm_obj_dbg (log_object, " skipping enhanced vmn..."); break; case SUBPARAMETER_ID_ENHANCED_VMN_ACK: - mm_dbg (" skipping enhanced vmn ack..."); + mm_obj_dbg (log_object, " skipping enhanced vmn ack..."); break; default: - mm_dbg (" unknown subparameter found: '%u' (ignoring)", + mm_obj_dbg (log_object, " unknown subparameter found: '%u' (ignoring)", subparameter->parameter_id); break; } @@ -1025,10 +1028,11 @@ } MMSmsPart * -mm_sms_part_cdma_new_from_binary_pdu (guint index, - const guint8 *pdu, - gsize pdu_len, - GError **error) +mm_sms_part_cdma_new_from_binary_pdu (guint index, + const guint8 *pdu, + gsize pdu_len, + gpointer log_object, + GError **error) { MMSmsPart *sms_part; guint offset; @@ -1038,9 +1042,9 @@ sms_part = mm_sms_part_new (index, MM_SMS_PDU_TYPE_UNKNOWN); if (index != SMS_PART_INVALID_INDEX) - mm_dbg ("Parsing CDMA PDU (%u)...", index); + mm_obj_dbg (log_object, "parsing CDMA PDU (%u)...", index); else - mm_dbg ("Parsing CDMA PDU..."); + mm_obj_dbg (log_object, "parsing CDMA PDU..."); #define PDU_SIZE_CHECK(required_size, check_descr_str) \ if (pdu_len < required_size) { \ @@ -1088,47 +1092,47 @@ switch (parameter->parameter_id) { case PARAMETER_ID_TELESERVICE_ID: - mm_dbg (" reading teleservice ID..."); - read_teleservice_id (sms_part, parameter); + mm_obj_dbg (log_object, " reading teleservice ID..."); + read_teleservice_id (sms_part, parameter, log_object); break; case PARAMETER_ID_SERVICE_CATEGORY: - mm_dbg (" reading service category..."); - read_service_category (sms_part, parameter); + mm_obj_dbg (log_object, " reading service category..."); + read_service_category (sms_part, parameter, log_object); break; case PARAMETER_ID_ORIGINATING_ADDRESS: - mm_dbg (" reading originating address..."); + mm_obj_dbg (log_object, " reading originating address..."); if (mm_sms_part_get_number (sms_part)) - mm_dbg (" cannot read originating address; an address field was already read"); + mm_obj_dbg (log_object, " cannot read originating address; an address field was already read"); else - read_address (sms_part, parameter); + read_address (sms_part, parameter, log_object); break; case PARAMETER_ID_ORIGINATING_SUBADDRESS: - mm_dbg (" skipping originating subaddress..."); + mm_obj_dbg (log_object, " skipping originating subaddress..."); break; case PARAMETER_ID_DESTINATION_ADDRESS: - mm_dbg (" reading destination address..."); + mm_obj_dbg (log_object, " reading destination address..."); if (mm_sms_part_get_number (sms_part)) - mm_dbg (" cannot read destination address; an address field was already read"); + mm_obj_dbg (log_object, " cannot read destination address; an address field was already read"); else - read_address (sms_part, parameter); + read_address (sms_part, parameter, log_object); break; case PARAMETER_ID_DESTINATION_SUBADDRESS: - mm_dbg (" skipping destination subaddress..."); + mm_obj_dbg (log_object, " skipping destination subaddress..."); break; case PARAMETER_ID_BEARER_REPLY_OPTION: - mm_dbg (" reading bearer reply option..."); - read_bearer_reply_option (sms_part, parameter); + mm_obj_dbg (log_object, " reading bearer reply option..."); + read_bearer_reply_option (sms_part, parameter, log_object); break; case PARAMETER_ID_CAUSE_CODES: - mm_dbg (" reading cause codes..."); - read_cause_codes (sms_part, parameter); + mm_obj_dbg (log_object, " reading cause codes..."); + read_cause_codes (sms_part, parameter, log_object); break; case PARAMETER_ID_BEARER_DATA: - mm_dbg (" reading bearer data..."); - read_bearer_data (sms_part, parameter); + mm_obj_dbg (log_object, " reading bearer data..."); + read_bearer_data (sms_part, parameter, log_object); break; default: - mm_dbg (" unknown parameter found: '%u' (ignoring)", + mm_obj_dbg (log_object, " unknown parameter found: '%u' (ignoring)", parameter->parameter_id); break; } @@ -1138,15 +1142,17 @@ switch (message_type) { case MESSAGE_TYPE_POINT_TO_POINT: if (mm_sms_part_get_cdma_teleservice_id (sms_part) == MM_SMS_CDMA_TELESERVICE_ID_UNKNOWN) - mm_dbg (" mandatory parameter missing: teleservice ID not found or invalid in point-to-point message"); + mm_obj_dbg (log_object, " mandatory parameter missing: teleservice ID not found or invalid in point-to-point message"); break; case MESSAGE_TYPE_BROADCAST: if (mm_sms_part_get_cdma_service_category (sms_part) == MM_SMS_CDMA_SERVICE_CATEGORY_UNKNOWN) - mm_dbg (" mandatory parameter missing: service category not found or invalid in broadcast message"); + mm_obj_dbg (log_object, " mandatory parameter missing: service category not found or invalid in broadcast message"); break; case MESSAGE_TYPE_ACKNOWLEDGE: if (mm_sms_part_get_message_reference (sms_part) == 0) - mm_dbg (" mandatory parameter missing: cause codes not found or invalid in acknowledge message"); + mm_obj_dbg (log_object, " mandatory parameter missing: cause codes not found or invalid in acknowledge message"); + break; + default: break; } @@ -1195,7 +1201,8 @@ /*****************************************************************************/ static guint8 -dtmf_from_ascii (guint8 ascii) +dtmf_from_ascii (guint8 ascii, + gpointer log_object) { if (ascii >= '1' && ascii <= '9') return ascii - '0'; @@ -1206,19 +1213,20 @@ if (ascii == '#') return 12; - mm_dbg (" invalid ascii digit in dtmf conversion: %c", ascii); + mm_obj_dbg (log_object, " invalid ascii digit in dtmf conversion: %c", ascii); return 0; } static gboolean -write_teleservice_id (MMSmsPart *part, - guint8 *pdu, - guint *absolute_offset, - GError **error) +write_teleservice_id (MMSmsPart *part, + guint8 *pdu, + guint *absolute_offset, + gpointer log_object, + GError **error) { guint16 aux16; - mm_dbg (" writing teleservice ID..."); + mm_obj_dbg (log_object, " writing teleservice ID..."); if (mm_sms_part_get_cdma_teleservice_id (part) != MM_SMS_CDMA_TELESERVICE_ID_WMT) { g_set_error (error, @@ -1230,9 +1238,9 @@ return FALSE; } - mm_dbg (" teleservice ID: %s (%u)", - mm_sms_cdma_teleservice_id_get_string (MM_SMS_CDMA_TELESERVICE_ID_WMT), - MM_SMS_CDMA_TELESERVICE_ID_WMT); + mm_obj_dbg (log_object, " teleservice ID: %s (%u)", + mm_sms_cdma_teleservice_id_get_string (MM_SMS_CDMA_TELESERVICE_ID_WMT), + MM_SMS_CDMA_TELESERVICE_ID_WMT); /* Teleservice ID: WMT always */ pdu[0] = PARAMETER_ID_TELESERVICE_ID; @@ -1245,10 +1253,11 @@ } static gboolean -write_destination_address (MMSmsPart *part, - guint8 *pdu, - guint *absolute_offset, - GError **error) +write_destination_address (MMSmsPart *part, + guint8 *pdu, + guint *absolute_offset, + gpointer log_object, + GError **error) { const gchar *number; guint bit_offset; @@ -1256,7 +1265,7 @@ guint n_digits; guint i; - mm_dbg (" writing destination address..."); + mm_obj_dbg (log_object, " writing destination address..."); #define OFFSETS_UPDATE(n_bits) do { \ bit_offset += n_bits; \ @@ -1276,12 +1285,12 @@ bit_offset = 0; /* Digit mode: DTMF always */ - mm_dbg (" digit mode: dtmf"); + mm_obj_dbg (log_object, " digit mode: dtmf"); write_bits (&pdu[byte_offset], bit_offset, 1, DIGIT_MODE_DTMF); OFFSETS_UPDATE (1); /* Number mode: DIGIT always */ - mm_dbg (" number mode: digit"); + mm_obj_dbg (log_object, " number mode: digit"); write_bits (&pdu[byte_offset], bit_offset, 1, NUMBER_MODE_DIGIT); OFFSETS_UPDATE (1); @@ -1296,16 +1305,16 @@ n_digits); return FALSE; } - mm_dbg (" num fields: %u", n_digits); + mm_obj_dbg (log_object, " num fields: %u", n_digits); write_bits (&pdu[byte_offset], bit_offset, 8, n_digits); OFFSETS_UPDATE (8); /* Actual DTMF encoded number */ - mm_dbg (" address: %s", number); + mm_obj_dbg (log_object, " address: %s", number); for (i = 0; i < n_digits; i++) { guint8 dtmf; - dtmf = dtmf_from_ascii (number[i]); + dtmf = dtmf_from_ascii (number[i], log_object); if (!dtmf) { g_set_error (error, MM_CORE_ERROR, @@ -1337,15 +1346,16 @@ } static gboolean -write_bearer_data_message_identifier (MMSmsPart *part, - guint8 *pdu, - guint *parameter_offset, - GError **error) +write_bearer_data_message_identifier (MMSmsPart *part, + guint8 *pdu, + guint *parameter_offset, + gpointer log_object, + GError **error) { pdu[0] = SUBPARAMETER_ID_MESSAGE_ID; pdu[1] = 3; /* subparameter_len, always 3 */ - mm_dbg (" writing message identifier: submit"); + mm_obj_dbg (log_object, " writing message identifier: submit"); /* Message type */ write_bits (&pdu[2], 0, 4, TELESERVICE_MESSAGE_TYPE_SUBMIT); @@ -1358,66 +1368,57 @@ return TRUE; } -static void +static GByteArray * decide_best_encoding (const gchar *text, - GByteArray **out, - guint *num_fields, - guint *num_bits_per_field, - Encoding *encoding) -{ - guint ascii_unsupported = 0; - guint i; - guint len; + gpointer log_object, + guint *num_fields, + guint *num_bits_per_field, + Encoding *encoding, + GError **error) +{ + g_autoptr(GByteArray) barray = NULL; + MMModemCharset target_charset = MM_MODEM_CHARSET_UNKNOWN; + guint len; len = strlen (text); - /* Check if we can do ASCII-7 */ - for (i = 0; i < len; i++) { - if (text[i] & 0x80) { - ascii_unsupported++; - break; - } + if (mm_charset_can_convert_to (text, MM_MODEM_CHARSET_IRA)) + target_charset = MM_MODEM_CHARSET_IRA; + else if (mm_charset_can_convert_to (text, MM_MODEM_CHARSET_8859_1)) + target_charset = MM_MODEM_CHARSET_8859_1; + else + target_charset = MM_MODEM_CHARSET_UCS2; + + barray = mm_modem_charset_bytearray_from_utf8 (text, target_charset, FALSE, error); + if (!barray) { + g_prefix_error (error, "Couldn't decide best encoding: "); + return NULL; } - /* If ASCII-7 already supported, done we are */ - if (!ascii_unsupported) { - *out = g_byte_array_sized_new (len); - g_byte_array_append (*out, (const guint8 *)text, len); + if (target_charset == MM_MODEM_CHARSET_IRA) { *num_fields = len; *num_bits_per_field = 7; *encoding = ENCODING_ASCII_7BIT; - return; - } - - /* Check if we can do Latin encoding */ - if (mm_charset_can_convert_to (text, MM_MODEM_CHARSET_8859_1)) { - *out = g_byte_array_sized_new (len); - mm_modem_charset_byte_array_append (*out, - text, - FALSE, - MM_MODEM_CHARSET_8859_1); - *num_fields = (*out)->len; + } else if (target_charset == MM_MODEM_CHARSET_8859_1) { + *num_fields = barray->len; *num_bits_per_field = 8; *encoding = ENCODING_LATIN; - return; - } + } else if (target_charset == MM_MODEM_CHARSET_UCS2) { + *num_fields = barray->len / 2; + *num_bits_per_field = 16; + *encoding = ENCODING_UNICODE; + } else + g_assert_not_reached (); - /* If no Latin and no ASCII, default to UTF-16 */ - *out = g_byte_array_sized_new (len * 2); - mm_modem_charset_byte_array_append (*out, - text, - FALSE, - MM_MODEM_CHARSET_UCS2); - *num_fields = (*out)->len / 2; - *num_bits_per_field = 16; - *encoding = ENCODING_UNICODE; + return g_steal_pointer (&barray); } static gboolean -write_bearer_data_user_data (MMSmsPart *part, - guint8 *pdu, - guint *parameter_offset, - GError **error) +write_bearer_data_user_data (MMSmsPart *part, + guint8 *pdu, + guint *parameter_offset, + gpointer log_object, + GError **error) { const gchar *text; const GByteArray *data; @@ -1431,7 +1432,7 @@ const GByteArray *aux; guint num_bits_per_iter; - mm_dbg (" writing user data..."); + mm_obj_dbg (log_object, " writing user data..."); #define OFFSETS_UPDATE(n_bits) do { \ bit_offset += n_bits; \ @@ -1453,11 +1454,14 @@ /* Text or Data */ if (text) { - decide_best_encoding (text, - &converted, - &num_fields, - &num_bits_per_field, - &encoding); + converted = decide_best_encoding (text, + log_object, + &num_fields, + &num_bits_per_field, + &encoding, + error); + if (!converted) + return FALSE; aux = (const GByteArray *)converted; } else { aux = data; @@ -1467,7 +1471,7 @@ } /* Message encoding*/ - mm_dbg (" message encoding: %s", encoding_to_string (encoding)); + mm_obj_dbg (log_object, " message encoding: %s", encoding_to_string (encoding)); write_bits (&pdu[byte_offset], bit_offset, 5, encoding); OFFSETS_UPDATE (5); @@ -1482,16 +1486,16 @@ num_fields); return FALSE; } - mm_dbg (" num fields: %u", num_fields); + mm_obj_dbg (log_object, " num fields: %u", num_fields); write_bits (&pdu[byte_offset], bit_offset, 8, num_fields); OFFSETS_UPDATE (8); /* For ASCII-7, write 7 bits in each iteration; for the remaining ones * go byte per byte */ if (text) - mm_dbg (" text: '%s'", text); + mm_obj_dbg (log_object, " text: '%s'", text); else - mm_dbg (" data: (%u bytes)", num_fields); + mm_obj_dbg (log_object, " data: (%u bytes)", num_fields); num_bits_per_iter = num_bits_per_field < 8 ? num_bits_per_field : 8; for (i = 0; i < aux->len; i++) { write_bits (&pdu[byte_offset], bit_offset, num_bits_per_iter, aux->data[i]); @@ -1520,24 +1524,25 @@ } static gboolean -write_bearer_data (MMSmsPart *part, - guint8 *pdu, - guint *absolute_offset, - GError **error) +write_bearer_data (MMSmsPart *part, + guint8 *pdu, + guint *absolute_offset, + gpointer log_object, + GError **error) { GError *inner_error = NULL; guint offset = 0; - mm_dbg (" writing bearer data..."); + mm_obj_dbg (log_object, " writing bearer data..."); pdu[0] = PARAMETER_ID_BEARER_DATA; /* Write parameter length at the end */ offset = 2; - if (!write_bearer_data_message_identifier (part, &pdu[offset], &offset, &inner_error)) - mm_dbg ("Error writing message identifier: %s", inner_error->message); - else if (!write_bearer_data_user_data (part, &pdu[offset], &offset, &inner_error)) - mm_dbg ("Error writing user data: %s", inner_error->message); + if (!write_bearer_data_message_identifier (part, &pdu[offset], &offset, log_object, &inner_error)) + mm_obj_dbg (log_object, "error writing message identifier: %s", inner_error->message); + else if (!write_bearer_data_user_data (part, &pdu[offset], &offset, log_object, &inner_error)) + mm_obj_dbg (log_object, "error writing user data: %s", inner_error->message); if (inner_error) { g_propagate_error (error, inner_error); @@ -1562,9 +1567,10 @@ } guint8 * -mm_sms_part_cdma_get_submit_pdu (MMSmsPart *part, - guint *out_pdulen, - GError **error) +mm_sms_part_cdma_get_submit_pdu (MMSmsPart *part, + guint *out_pdulen, + gpointer log_object, + GError **error) { GError *inner_error = NULL; guint offset = 0; @@ -1582,7 +1588,7 @@ return NULL; } - mm_dbg ("Creating PDU for part..."); + mm_obj_dbg (log_object, "creating PDU for part..."); /* Current max size estimations: * Message type: 1 byte @@ -1595,12 +1601,12 @@ /* First byte: SMS message type */ pdu[offset++] = MESSAGE_TYPE_POINT_TO_POINT; - if (!write_teleservice_id (part, &pdu[offset], &offset, &inner_error)) - mm_dbg ("Error writing Teleservice ID: %s", inner_error->message); - else if (!write_destination_address (part, &pdu[offset], &offset, &inner_error)) - mm_dbg ("Error writing destination address: %s", inner_error->message); - else if (!write_bearer_data (part, &pdu[offset], &offset, &inner_error)) - mm_dbg ("Error writing bearer data: %s", inner_error->message); + if (!write_teleservice_id (part, &pdu[offset], &offset, log_object, &inner_error)) + mm_obj_dbg (log_object, "error writing teleservice ID: %s", inner_error->message); + else if (!write_destination_address (part, &pdu[offset], &offset, log_object, &inner_error)) + mm_obj_dbg (log_object, "error writing destination address: %s", inner_error->message); + else if (!write_bearer_data (part, &pdu[offset], &offset, log_object, &inner_error)) + mm_obj_dbg (log_object, "error writing bearer data: %s", inner_error->message); if (inner_error) { g_propagate_error (error, inner_error); diff -Nru modemmanager-1.12.8/src/mm-sms-part-cdma.h modemmanager-1.16.6/src/mm-sms-part-cdma.h --- modemmanager-1.12.8/src/mm-sms-part-cdma.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-sms-part-cdma.h 2021-06-06 21:40:59.000000000 +0800 @@ -21,17 +21,18 @@ #include "mm-sms-part.h" -MMSmsPart *mm_sms_part_cdma_new_from_pdu (guint index, - const gchar *hexpdu, - GError **error); - -MMSmsPart *mm_sms_part_cdma_new_from_binary_pdu (guint index, - const guint8 *pdu, - gsize pdu_len, - GError **error); - -guint8 *mm_sms_part_cdma_get_submit_pdu (MMSmsPart *part, - guint *out_pdulen, - GError **error); +MMSmsPart *mm_sms_part_cdma_new_from_pdu (guint index, + const gchar *hexpdu, + gpointer log_object, + GError **error); +MMSmsPart *mm_sms_part_cdma_new_from_binary_pdu (guint index, + const guint8 *pdu, + gsize pdu_len, + gpointer log_object, + GError **error); +guint8 *mm_sms_part_cdma_get_submit_pdu (MMSmsPart *part, + guint *out_pdulen, + gpointer log_object, + GError **error); #endif /* MM_SMS_PART_CDMA_H */ diff -Nru modemmanager-1.12.8/src/mm-sms-part.h modemmanager-1.16.6/src/mm-sms-part.h --- modemmanager-1.12.8/src/mm-sms-part.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-sms-part.h 2021-06-06 21:40:59.000000000 +0800 @@ -20,11 +20,27 @@ #include #include +/* Despite 3GPP TS 23.038 specifies that Unicode SMS messages are + * encoded in UCS-2, UTF-16 encoding is commonly used instead on many + * modern platforms to allow encoding code points that fall outside the + * Basic Multilingual Plane (BMP), such as Emoji. Most of the UCS-2 + * code points are identical to their equivalent UTF-16 code points. + * In UTF-16, non-BMP code points are encoded in a pair of surrogate + * code points (i.e. a high surrogate in 0xD800..0xDBFF, followed by a + * low surrogate in 0xDC00..0xDFFF). An isolated surrogate code point + * has no general interpretation in UTF-16, but could be a valid + * (though unmapped) code point in UCS-2. + * + * The current implementation in ModemManager just assumes that whenever + * possible (i.e. when parsing received PDUs or when creating submit + * PDUs) UTF-16 will be used instead of plain UCS-2 (even if the PDUs + * report the encoding as UCS-2). + */ typedef enum { /*< underscore_name=mm_sms_encoding >*/ MM_SMS_ENCODING_UNKNOWN = 0x0, MM_SMS_ENCODING_GSM7, MM_SMS_ENCODING_8BIT, - MM_SMS_ENCODING_UCS2 + MM_SMS_ENCODING_UCS2, } MMSmsEncoding; typedef struct _MMSmsPart MMSmsPart; @@ -43,6 +59,8 @@ MMSmsPduType type); void mm_sms_part_free (MMSmsPart *part); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMSmsPart, mm_sms_part_free) + guint mm_sms_part_get_index (MMSmsPart *part); void mm_sms_part_set_index (MMSmsPart *part, guint index); diff -Nru modemmanager-1.12.8/src/mm-sms-qmi.c modemmanager-1.16.6/src/mm-sms-qmi.c --- modemmanager-1.12.8/src/mm-sms-qmi.c 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-sms-qmi.c 2021-06-06 21:40:59.000000000 +0800 @@ -24,6 +24,7 @@ #define _LIBMM_INSIDE_MM #include +#include "mm-broadband-modem-qmi.h" #include "mm-modem-helpers-qmi.h" #include "mm-iface-modem.h" #include "mm-iface-modem-messaging.h" @@ -31,7 +32,7 @@ #include "mm-base-modem.h" #include "mm-sms-part-3gpp.h" #include "mm-sms-part-cdma.h" -#include "mm-log.h" +#include "mm-log-object.h" G_DEFINE_TYPE (MMSmsQmi, mm_sms_qmi, MM_TYPE_BASE_SMS) @@ -53,7 +54,7 @@ NULL); g_assert (MM_IS_BASE_MODEM (modem)); - port = mm_base_modem_peek_port_qmi (modem); + port = mm_broadband_modem_qmi_peek_port_qmi (MM_BROADBAND_MODEM_QMI (modem)); g_object_unref (modem); if (!port) { @@ -190,6 +191,7 @@ static void sms_store_next_part (GTask *task) { + MMSmsQmi *self; SmsStoreContext *ctx; QmiMessageWmsRawWriteInput *input; guint8 *pdu = NULL; @@ -198,6 +200,7 @@ GArray *array; GError *error = NULL; + self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); if (!ctx->current) { @@ -209,9 +212,9 @@ /* Get PDU */ if (MM_SMS_PART_IS_3GPP ((MMSmsPart *)ctx->current->data)) - pdu = mm_sms_part_3gpp_get_submit_pdu ((MMSmsPart *)ctx->current->data, &pdulen, &msgstart, &error); + pdu = mm_sms_part_3gpp_get_submit_pdu ((MMSmsPart *)ctx->current->data, &pdulen, &msgstart, self, &error); else if (MM_SMS_PART_IS_CDMA ((MMSmsPart *)ctx->current->data)) - pdu = mm_sms_part_cdma_get_submit_pdu ((MMSmsPart *)ctx->current->data, &pdulen, &error); + pdu = mm_sms_part_cdma_get_submit_pdu ((MMSmsPart *)ctx->current->data, &pdulen, self, &error); if (!pdu) { if (error) @@ -329,11 +332,14 @@ GAsyncResult *res, GTask *task) { + MMSmsQmi *self; SmsSendContext *ctx; QmiMessageWmsRawSendOutput *output = NULL; GError *error = NULL; guint16 message_id; + self = g_task_get_source_object (task); + output = qmi_client_wms_raw_send_finish (client, res, &error); if (!output) { g_prefix_error (&error, "QMI operation failed: "); @@ -351,11 +357,11 @@ &rp_cause, &tp_cause, NULL)) { - mm_warn ("Couldn't send SMS; RP cause (%u): '%s'; TP cause (%u): '%s'", - rp_cause, - qmi_wms_gsm_umts_rp_cause_get_string (rp_cause), - tp_cause, - qmi_wms_gsm_umts_tp_cause_get_string (tp_cause)); + mm_obj_warn (self, "couldn't send SMS; RP cause (%u): %s; TP cause (%u): %s", + rp_cause, + qmi_wms_gsm_umts_rp_cause_get_string (rp_cause), + tp_cause, + qmi_wms_gsm_umts_tp_cause_get_string (tp_cause)); } qmi_message_wms_raw_send_output_unref (output); @@ -381,6 +387,7 @@ static void sms_send_generic (GTask *task) { + MMSmsQmi *self; SmsSendContext *ctx; QmiMessageWmsRawSendInput *input; guint8 *pdu = NULL; @@ -389,13 +396,14 @@ GArray *array; GError *error = NULL; + self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); /* Get PDU */ if (MM_SMS_PART_IS_3GPP ((MMSmsPart *)ctx->current->data)) - pdu = mm_sms_part_3gpp_get_submit_pdu ((MMSmsPart *)ctx->current->data, &pdulen, &msgstart, &error); + pdu = mm_sms_part_3gpp_get_submit_pdu ((MMSmsPart *)ctx->current->data, &pdulen, &msgstart, self, &error); else if (MM_SMS_PART_IS_CDMA ((MMSmsPart *)ctx->current->data)) - pdu = mm_sms_part_cdma_get_submit_pdu ((MMSmsPart *)ctx->current->data, &pdulen, &error); + pdu = mm_sms_part_cdma_get_submit_pdu ((MMSmsPart *)ctx->current->data, &pdulen, self, &error); if (!pdu) { if (error) @@ -442,11 +450,13 @@ GAsyncResult *res, GTask *task) { + MMSmsQmi *self; SmsSendContext *ctx; QmiMessageWmsSendFromMemoryStorageOutput *output = NULL; GError *error = NULL; guint16 message_id; + self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); output = qmi_client_wms_send_from_memory_storage_finish (client, res, &error); @@ -454,8 +464,7 @@ if (g_error_matches (error, QMI_CORE_ERROR, QMI_CORE_ERROR_UNSUPPORTED)) { - mm_dbg ("Couldn't send SMS from storage: '%s'; trying generic send...", - error->message); + mm_obj_dbg (self, "couldn't send SMS from storage: %s; trying generic send...", error->message); g_error_free (error); ctx->from_storage = FALSE; sms_send_next_part (task); @@ -473,8 +482,7 @@ if (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND)) { - mm_dbg ("Couldn't send SMS from storage: '%s'; trying generic send...", - error->message); + mm_obj_dbg (self, "couldn't send SMS from storage: %s; trying generic send...", error->message); g_error_free (error); ctx->from_storage = FALSE; sms_send_next_part (task); @@ -489,29 +497,29 @@ &rp_cause, &tp_cause, NULL)) { - mm_warn ("Couldn't send SMS; RP cause (%u): '%s'; TP cause (%u): '%s'", - rp_cause, - qmi_wms_gsm_umts_rp_cause_get_string (rp_cause), - tp_cause, - qmi_wms_gsm_umts_tp_cause_get_string (tp_cause)); + mm_obj_warn (self, "couldn't send SMS; RP cause (%u): %s; TP cause (%u): %s", + rp_cause, + qmi_wms_gsm_umts_rp_cause_get_string (rp_cause), + tp_cause, + qmi_wms_gsm_umts_tp_cause_get_string (tp_cause)); } if (qmi_message_wms_send_from_memory_storage_output_get_cdma_cause_code ( output, &cdma_cause_code, NULL)) { - mm_warn ("Couldn't send SMS; cause code (%u): '%s'", - cdma_cause_code, - qmi_wms_cdma_cause_code_get_string (cdma_cause_code)); + mm_obj_warn (self, "couldn't send SMS; cause code (%u): %s", + cdma_cause_code, + qmi_wms_cdma_cause_code_get_string (cdma_cause_code)); } if (qmi_message_wms_send_from_memory_storage_output_get_cdma_error_class ( output, &cdma_error_class, NULL)) { - mm_warn ("Couldn't send SMS; error class (%u): '%s'", - cdma_error_class, - qmi_wms_cdma_error_class_get_string (cdma_error_class)); + mm_obj_warn (self, "couldn't send SMS; error class (%u): %s", + cdma_error_class, + qmi_wms_cdma_error_class_get_string (cdma_error_class)); } g_prefix_error (&error, "Couldn't write SMS part: "); @@ -658,24 +666,26 @@ GAsyncResult *res, GTask *task) { + MMSmsQmi *self; SmsDeletePartsContext *ctx; QmiMessageWmsDeleteOutput *output = NULL; GError *error = NULL; + self = g_task_get_source_object (task); ctx = g_task_get_task_data (task); output = qmi_client_wms_delete_finish (client, res, &error); if (!output) { ctx->n_failed++; - mm_dbg ("QMI operation failed: Couldn't delete SMS part with index %u: '%s'", - mm_sms_part_get_index ((MMSmsPart *)ctx->current->data), - error->message); + mm_obj_dbg (self, "QMI operation failed: couldn't delete SMS part with index %u: %s", + mm_sms_part_get_index ((MMSmsPart *)ctx->current->data), + error->message); g_error_free (error); } else if (!qmi_message_wms_delete_output_get_result (output, &error)) { ctx->n_failed++; - mm_dbg ("Couldn't delete SMS part with index %u: '%s'", - mm_sms_part_get_index ((MMSmsPart *)ctx->current->data), - error->message); + mm_obj_dbg (self, "couldn't delete SMS part with index %u: %s", + mm_sms_part_get_index ((MMSmsPart *)ctx->current->data), + error->message); g_error_free (error); } diff -Nru modemmanager-1.12.8/src/mm-sms-qmi.h modemmanager-1.16.6/src/mm-sms-qmi.h --- modemmanager-1.12.8/src/mm-sms-qmi.h 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/src/mm-sms-qmi.h 2021-06-06 21:40:59.000000000 +0800 @@ -45,6 +45,7 @@ }; GType mm_sms_qmi_get_type (void); +G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMSmsQmi, g_object_unref) MMBaseSms *mm_sms_qmi_new (MMBaseModem *modem); diff -Nru modemmanager-1.12.8/src/mm-utils.c modemmanager-1.16.6/src/mm-utils.c --- modemmanager-1.12.8/src/mm-utils.c 1970-01-01 08:00:00.000000000 +0800 +++ modemmanager-1.16.6/src/mm-utils.c 2021-06-06 21:40:59.000000000 +0800 @@ -0,0 +1,47 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details: + * + * Singleton support imported from NetworkManager. + * (C) Copyright 2014 Red Hat, Inc. + * + * GPtrArray lookup with GEqualFunc imported from GLib 2.48 + */ + +#include "mm-utils.h" + +#if !GLIB_CHECK_VERSION(2,54,0) + +gboolean +mm_ptr_array_find_with_equal_func (GPtrArray *haystack, + gconstpointer needle, + GEqualFunc equal_func, + guint *index_) +{ + guint i; + + g_return_val_if_fail (haystack != NULL, FALSE); + + if (equal_func == NULL) + equal_func = g_direct_equal; + + for (i = 0; i < haystack->len; i++) { + if (equal_func (g_ptr_array_index (haystack, i), needle)) { + if (index_ != NULL) + *index_ = i; + return TRUE; + } + } + + return FALSE; +} + +#endif diff -Nru modemmanager-1.12.8/src/mm-utils.h modemmanager-1.16.6/src/mm-utils.h --- modemmanager-1.12.8/src/mm-utils.h 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/mm-utils.h 2021-06-06 21:40:59.000000000 +0800 @@ -12,6 +12,8 @@ * * Singleton support imported from NetworkManager. * (C) Copyright 2014 Red Hat, Inc. + * + * GPtrArray lookup with GEqualFunc imported from GLib 2.48 */ #ifndef MM_UTILS_H @@ -20,20 +22,19 @@ #include #include -#include "mm-log.h" +#include "mm-log-object.h" /*****************************************************************************/ #define MM_DEFINE_SINGLETON_INSTANCE(TYPE) \ - static TYPE *singleton_instance + static TYPE *singleton_instance; #define MM_DEFINE_SINGLETON_WEAK_REF(TYPE) \ - MM_DEFINE_SINGLETON_INSTANCE (TYPE); \ static void \ _singleton_instance_weak_ref_cb (gpointer data, \ GObject *where_the_object_was) \ { \ - mm_dbg ("disposing %s singleton (%p)", G_STRINGIFY (TYPE), singleton_instance); \ + mm_obj_dbg (singleton_instance, "singleton disposed"); \ singleton_instance = NULL; \ } \ static inline void \ @@ -43,13 +44,12 @@ } #define MM_DEFINE_SINGLETON_DESTRUCTOR(TYPE) \ - MM_DEFINE_SINGLETON_INSTANCE (TYPE); \ static void __attribute__((destructor)) \ _singleton_destructor (void) \ { \ if (singleton_instance) { \ if (G_OBJECT (singleton_instance)->ref_count > 1) \ - mm_dbg ("disown %s singleton (%p)", G_STRINGIFY (TYPE), singleton_instance); \ + mm_obj_dbg (singleton_instance, "singleton disowned"); \ g_object_unref (singleton_instance); \ } \ } @@ -61,8 +61,8 @@ #endif #define MM_DEFINE_SINGLETON_GETTER(TYPE, GETTER, GTYPE, ...) \ - MM_DEFINE_SINGLETON_INSTANCE (TYPE); \ - MM_DEFINE_SINGLETON_WEAK_REF (TYPE); \ + MM_DEFINE_SINGLETON_INSTANCE (TYPE) \ + MM_DEFINE_SINGLETON_WEAK_REF (TYPE) \ TYPE * \ GETTER (void) \ { \ @@ -72,12 +72,24 @@ g_assert (!_already_created || (MM_DEFINE_SINGLETON_ALLOW_MULTIPLE)); \ _already_created = TRUE; \ singleton_instance = (g_object_new (GTYPE, ##__VA_ARGS__, NULL)); \ - g_assert (singleton_instance); \ - mm_singleton_instance_weak_ref_register (); \ - mm_dbg ("create %s singleton (%p)", G_STRINGIFY (TYPE), singleton_instance); \ + g_assert (singleton_instance); \ + mm_singleton_instance_weak_ref_register (); \ + mm_obj_dbg (singleton_instance, "singleton created"); \ } \ return singleton_instance; \ } \ MM_DEFINE_SINGLETON_DESTRUCTOR(TYPE) + +#if !GLIB_CHECK_VERSION(2,54,0) + +/* Pointer Array lookup with a GEqualFunc, imported from GLib 2.54 */ +#define g_ptr_array_find_with_equal_func mm_ptr_array_find_with_equal_func +gboolean mm_ptr_array_find_with_equal_func (GPtrArray *haystack, + gconstpointer needle, + GEqualFunc equal_func, + guint *index_); + +#endif + #endif /* MM_UTILS_H */ diff -Nru modemmanager-1.12.8/src/tests/Makefile.am modemmanager-1.16.6/src/tests/Makefile.am --- modemmanager-1.12.8/src/tests/Makefile.am 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/tests/Makefile.am 2021-06-06 21:40:59.000000000 +0800 @@ -6,6 +6,7 @@ ################################################################################ AM_CFLAGS = \ + $(WARN_CFLAGS) \ $(MM_CFLAGS) \ $(CODE_COVERAGE_CFLAGS) \ -I$(top_srcdir) \ @@ -27,6 +28,7 @@ $(NULL) AM_LDFLAGS = \ + $(WARN_LDFLAGS) \ $(MM_LIBS) \ $(CODE_COVERAGE_LDFLAGS) \ -lutil \ diff -Nru modemmanager-1.12.8/src/tests/Makefile.in modemmanager-1.16.6/src/tests/Makefile.in --- modemmanager-1.12.8/src/tests/Makefile.in 2020-03-14 17:16:04.000000000 +0800 +++ modemmanager-1.16.6/src/tests/Makefile.in 2021-06-06 21:43:43.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -101,14 +101,14 @@ subdir = src/tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -322,6 +322,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -395,9 +397,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -442,6 +448,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -460,9 +467,10 @@ ################################################################################ # common ################################################################################ -AM_CFLAGS = $(MM_CFLAGS) $(CODE_COVERAGE_CFLAGS) -I$(top_srcdir) \ - -I$(top_srcdir)/include -I$(top_builddir)/include \ - -I$(top_srcdir)/libqcdm/src -I$(top_srcdir)/libmm-glib \ +AM_CFLAGS = $(WARN_CFLAGS) $(MM_CFLAGS) $(CODE_COVERAGE_CFLAGS) \ + -I$(top_srcdir) -I$(top_srcdir)/include \ + -I$(top_builddir)/include -I$(top_srcdir)/libqcdm/src \ + -I$(top_srcdir)/libmm-glib \ -I${top_builddir}/libmm-glib/generated -I${top_srcdir}/src/ \ -I${top_builddir}/src/ -I${top_srcdir}/src/kerneldevice \ -DTESTUDEVRULESDIR=\"${top_srcdir}/src/\" $(NULL) \ @@ -473,8 +481,8 @@ $(top_builddir)/src/libkerneldevice.la \ $(NULL) -AM_LDFLAGS = $(MM_LIBS) $(CODE_COVERAGE_LDFLAGS) -lutil $(NULL) \ - $(am__append_2) $(am__append_4) +AM_LDFLAGS = $(WARN_LDFLAGS) $(MM_LIBS) $(CODE_COVERAGE_LDFLAGS) \ + -lutil $(NULL) $(am__append_2) $(am__append_4) all: all-am .SUFFIXES: diff -Nru modemmanager-1.12.8/src/tests/test-at-serial-port.c modemmanager-1.16.6/src/tests/test-at-serial-port.c --- modemmanager-1.12.8/src/tests/test-at-serial-port.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/tests/test-at-serial-port.c 2021-06-06 21:40:59.000000000 +0800 @@ -18,13 +18,20 @@ #include #include "mm-port-serial-at.h" -#include "mm-log.h" +#include "mm-serial-parsers.h" +#include "mm-log-test.h" typedef struct { - gchar *original; - gchar *without_echo; + const gchar *original; + const gchar *without_echo; } EchoRemovalTest; +typedef struct { + const gchar *response; + const gboolean found; + const gboolean expected_error; +} ParseResponseTest; + static const EchoRemovalTest echo_removal_tests[] = { { "\r\n", "\r\n" }, { "\r", "\r" }, @@ -41,6 +48,41 @@ { "\r\nthis is valid\r\nand so is this\r\n", "\r\nthis is valid\r\nand so is this\r\n" }, }; +static const ParseResponseTest parse_ok_tests[] = { + { "\r\nOK\r\n", TRUE, FALSE}, + { "\r\nOK\r\n\r\n+CMTI: \"ME\",1\r\n", TRUE, FALSE}, + { "\r\nOK\r\n\r\n+CIEV: 7,1\r\n\r\n+CRING: VOICE\r\n\r\n+CLIP: \"+0123456789\",145,,,,0\r\n", TRUE, FALSE}, + { "\r\nUNKNOWN COMMAND\r\n", FALSE, FALSE} +}; + +static const ParseResponseTest parse_error_tests[] = { + { "\r\nUNKNOWN COMMAND\r\n", FALSE, FALSE}, + { "\r\nERROR\r\n", TRUE, TRUE}, + { "\r\nERROR\r\n\r\noooops\r\n", TRUE, TRUE}, + { "\r\n+CME ERROR: raspberry\r\n", TRUE, TRUE}, + { "\r\n+CME ERROR: 123\r\n", TRUE, TRUE}, + { "\r\n+CME ERROR: \r\n", TRUE, TRUE}, + { "\r\n+CME ERROR:\r\n", FALSE, FALSE}, + { "\r\n+CMS ERROR: bananas\r\n", TRUE, TRUE}, + { "\r\n+CMS ERROR: 456\r\n", TRUE, TRUE}, + { "\r\n+CMS ERROR: \r\n", TRUE, TRUE}, + { "\r\n+CMS ERROR:\r\n", FALSE, FALSE}, + { "\r\nMODEM ERROR: 5\r\n", TRUE, TRUE}, + { "\r\nMODEM ERROR: apple\r\n", FALSE, FALSE}, + { "\r\nMODEM ERROR: \r\n", FALSE, FALSE}, + { "\r\nMODEM ERROR:\r\n", FALSE, FALSE}, + { "\r\nCOMMAND NOT SUPPORT\r\n", TRUE, TRUE}, + { "\r\nCOMMAND NOT SUPPORT\r\n\r\nSomething extra\r\n", TRUE, TRUE}, + { "\r\nNO CARRIER\r\n", TRUE, TRUE}, + { "\r\nNO CARRIER\r\n\r\nSomething extra\r\n", TRUE, TRUE}, + { "\r\nBUSY\r\n", TRUE, TRUE}, + { "\r\nBUSY\r\n\r\nSomething extra\r\n", TRUE, TRUE}, + { "\r\nNO ANSWER\r\n", TRUE, TRUE}, + { "\r\nNO ANSWER\r\n\r\nSomething extra\r\n", TRUE, TRUE}, + { "\r\nNO DIALTONE\r\n", TRUE, TRUE}, + { "\r\nNO DIALTONE\r\n\r\nSomething extra\r\n", TRUE, TRUE} +}; + static void at_serial_echo_removal (void) { @@ -64,24 +106,47 @@ } } -void -_mm_log (const char *loc, - const char *func, - guint32 level, - const char *fmt, - ...) +static void +_run_parse_test (const ParseResponseTest tests[], guint number_of_tests) { - va_list args; - gchar *msg; + guint i; + gpointer parser; + GError *error = NULL; + gboolean found = FALSE; + GString *response; + + for (i = 0; i < number_of_tests; i++) { + parser = mm_serial_parser_v1_new (); + response = g_string_new (tests[i].response); + found = mm_serial_parser_v1_parse (parser, response, NULL, &error); + + /* Verify if we expect a match or not */ + g_assert_cmpint (found, ==, tests[i].found); + + /* Error expected */ + if (tests[i].expected_error) { + g_assert (error != NULL); + } + /* No error expected */ + else { + g_assert_no_error (error); + } - if (!g_test_verbose ()) - return; + g_string_free (response, TRUE); + error = NULL ; + } +} + +static void +at_serial_parse_ok (void) +{ + _run_parse_test (parse_ok_tests, G_N_ELEMENTS(parse_ok_tests)); +} - va_start (args, fmt); - msg = g_strdup_vprintf (fmt, args); - va_end (args); - g_print ("%s\n", msg); - g_free (msg); +static void +at_serial_parse_error (void) +{ + _run_parse_test (parse_error_tests, G_N_ELEMENTS(parse_error_tests)); } int main (int argc, char **argv) @@ -89,6 +154,8 @@ g_test_init (&argc, &argv, NULL); g_test_add_func ("/ModemManager/AT-serial/echo-removal", at_serial_echo_removal); + g_test_add_func ("/ModemManager/AT-serial/parse-ok", at_serial_parse_ok); + g_test_add_func ("/ModemManager/AT-serial/parse-error", at_serial_parse_error); return g_test_run (); } diff -Nru modemmanager-1.12.8/src/tests/test-charsets.c modemmanager-1.16.6/src/tests/test-charsets.c --- modemmanager-1.12.8/src/tests/test-charsets.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/tests/test-charsets.c 2021-06-06 21:40:59.000000000 +0800 @@ -18,7 +18,53 @@ #include #include "mm-modem-helpers.h" -#include "mm-log.h" +#include "mm-log-test.h" + +static void +common_test_gsm7 (const gchar *in_utf8) +{ + guint32 packed_gsm_len = 0; + guint32 unpacked_gsm_len_2 = 0; + g_autoptr(GByteArray) unpacked_gsm = NULL; + g_autofree guint8 *packed_gsm = NULL; + guint8 *unpacked_gsm_2 = NULL; + g_autoptr(GByteArray) unpacked_gsm_2_array = NULL; + g_autofree gchar *built_utf8 = NULL; + g_autoptr(GError) error = NULL; + + /* Convert to GSM */ + unpacked_gsm = mm_modem_charset_bytearray_from_utf8 (in_utf8, MM_MODEM_CHARSET_GSM, FALSE, &error); + g_assert_nonnull (unpacked_gsm); + g_assert_no_error (error); + + /* Pack */ + packed_gsm = mm_charset_gsm_pack (unpacked_gsm->data, unpacked_gsm->len, 0, &packed_gsm_len); + g_assert_nonnull (packed_gsm); + g_assert_cmpuint (packed_gsm_len, <=, unpacked_gsm->len); + +#if 0 + { + g_autofree gchar *hex_packed = NULL; + + /* Print */ + hex_packed = mm_utils_bin2hexstr (packed_gsm, packed_gsm_len); + g_print ("----------\n"); + g_print ("input string: '%s'\n", in_utf8); + g_print ("gsm-7 encoded string: %s\n", hex_packed); + } +#endif + + /* Unpack */ + unpacked_gsm_2 = mm_charset_gsm_unpack (packed_gsm, packed_gsm_len * 8 / 7, 0, &unpacked_gsm_len_2); + g_assert_nonnull (unpacked_gsm_2); + unpacked_gsm_2_array = g_byte_array_new_take (unpacked_gsm_2, unpacked_gsm_len_2); + + /* And back to UTF-8 */ + built_utf8 = mm_modem_charset_bytearray_to_utf8 (unpacked_gsm_2_array, MM_MODEM_CHARSET_GSM, FALSE, &error); + g_assert_nonnull (built_utf8); + g_assert_no_error (error); + g_assert_cmpstr (built_utf8, ==, in_utf8); +} static void test_gsm7_default_chars (void) @@ -27,21 +73,8 @@ * are converted from UTF-8 to GSM and back to UTF-8 successfully. */ static const char *s = "@£$¥èéùìòÇ\nØø\rÅåΔ_ΦΓΛΩΠΨΣΘΞÆæßÉ !\"#¤%&'()*+,-./0123456789:;<=>?¡ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÑܧ¿abcdefghijklmnopqrstuvwxyzäöñüà"; - guint8 *gsm, *utf8; - guint32 len = 0; - - /* Convert to GSM */ - gsm = mm_charset_utf8_to_unpacked_gsm (s, &len); - g_assert (gsm); - g_assert_cmpint (len, ==, 127); - /* And back to UTF-8 */ - utf8 = mm_charset_gsm_unpacked_to_utf8 (gsm, len); - g_assert (utf8); - g_assert_cmpstr (s, ==, (const char *) utf8); - - g_free (gsm); - g_free (utf8); + common_test_gsm7 (s); } static void @@ -51,21 +84,8 @@ * charset are converted from UTF-8 to GSM and back to UTF-8 successfully. */ static const char *s = "\f^{}\\[~]|€"; - guint8 *gsm, *utf8; - guint32 len = 0; - - /* Convert to GSM */ - gsm = mm_charset_utf8_to_unpacked_gsm (s, &len); - g_assert (gsm); - g_assert_cmpint (len, ==, 20); - - /* And back to UTF-8 */ - utf8 = mm_charset_gsm_unpacked_to_utf8 (gsm, len); - g_assert (utf8); - g_assert_cmpstr (s, ==, (const char *) utf8); - g_free (gsm); - g_free (utf8); + common_test_gsm7 (s); } static void @@ -75,21 +95,8 @@ * is converted from UTF-8 to GSM and back to UTF-8 successfully. */ static const char *s = "@£$¥èéùìø\fΩΠΨΣΘ{ΞÆæß(})789\\:;<=>[?¡QRS]TUÖ|Ñܧ¿abpqrstuvöñüà€"; - guint8 *gsm, *utf8; - guint32 len = 0; - - /* Convert to GSM */ - gsm = mm_charset_utf8_to_unpacked_gsm (s, &len); - g_assert (gsm); - g_assert_cmpint (len, ==, 69); - - /* And back to UTF-8 */ - utf8 = mm_charset_gsm_unpacked_to_utf8 (gsm, len); - g_assert (utf8); - g_assert_cmpstr (s, ==, (const char *) utf8); - g_free (gsm); - g_free (utf8); + common_test_gsm7 (s); } static void @@ -310,38 +317,71 @@ } static void -test_take_convert_ucs2_hex_utf8 (void) +test_str_ucs2_to_from_utf8 (void) { - gchar *src, *converted; + const gchar *src = "0054002D004D006F00620069006C0065"; + g_autofree gchar *utf8 = NULL; + g_autofree gchar *dst = NULL; + g_autoptr(GError) error = NULL; + + utf8 = mm_modem_charset_str_to_utf8 (src, -1, MM_MODEM_CHARSET_UCS2, FALSE, &error); + g_assert_no_error (error); + g_assert_cmpstr (utf8, ==, "T-Mobile"); - /* Ensure hex-encoded UCS-2 works */ - src = g_strdup ("0054002d004d006f00620069006c0065"); - converted = mm_charset_take_and_convert_to_utf8 (src, MM_MODEM_CHARSET_UCS2); - g_assert_cmpstr (converted, ==, "T-Mobile"); - g_free (converted); + dst = mm_modem_charset_str_from_utf8 (utf8, MM_MODEM_CHARSET_UCS2, FALSE, &error); + g_assert_no_error (error); + g_assert_cmpstr (dst, ==, src); } static void -test_take_convert_ucs2_bad_ascii (void) +test_str_gsm_to_from_utf8 (void) { - gchar *src, *converted; + const gchar *src = "T-Mobile"; + g_autofree gchar *utf8 = NULL; + g_autofree gchar *dst = NULL; + g_autoptr(GError) error = NULL; - /* Test that something mostly ASCII returns most of the original string */ - src = g_strdup ("Orange\241"); - converted = mm_charset_take_and_convert_to_utf8 (src, MM_MODEM_CHARSET_UCS2); - g_assert_cmpstr (converted, ==, "Orange"); - g_free (converted); + /* Note: as long as the GSM string doesn't contain the '@' character, str_to_utf8() + * and str_from_utf8() can safely be used */ + + utf8 = mm_modem_charset_str_to_utf8 (src, -1, MM_MODEM_CHARSET_GSM, FALSE, &error); + g_assert_no_error (error); + g_assert_cmpstr (utf8, ==, src); + + dst = mm_modem_charset_str_from_utf8 (utf8, MM_MODEM_CHARSET_GSM, FALSE, &error); + g_assert_no_error (error); + g_assert_cmpstr (dst, ==, src); } static void -test_take_convert_ucs2_bad_ascii2 (void) +test_str_gsm_to_from_utf8_with_at (void) { - gchar *src, *converted; + /* The NULs are '@' chars, except for the trailing one which is always taken as end-of-string */ + const gchar src[] = { 'T', '-', 'M', 0x00, 'o', 'b', 'i', 0x00, 'l', 'e', 0x00 }; + const gchar *utf8_expected = "T-M@obi@le"; + const gchar *src_translit = "T-M?obi?le"; + g_autofree gchar *utf8 = NULL; + g_autofree gchar *dst = NULL; + g_autoptr(GError) error = NULL; + + /* Note: as long as the GSM string doesn't contain the '@' character, str_to_utf8() + * and str_from_utf8() can safely be used */ + + utf8 = mm_modem_charset_str_to_utf8 (src, G_N_ELEMENTS (src), MM_MODEM_CHARSET_GSM, FALSE, &error); + g_assert_no_error (error); + g_assert_cmpstr (utf8, ==, utf8_expected); - /* Ensure something completely screwed up doesn't crash */ - src = g_strdup ("\241\255\254\250\244\234"); - converted = mm_charset_take_and_convert_to_utf8 (src, MM_MODEM_CHARSET_UCS2); - g_assert (converted == NULL); + /* if charset conversion from UTF-8 contains '@' chars, running without transliteration + * will return an error */ + dst = mm_modem_charset_str_from_utf8 (utf8, MM_MODEM_CHARSET_GSM, FALSE, &error); + g_assert_nonnull (error); + g_assert_null (dst); + g_clear_error (&error); + + /* with transliteration, '@'->'?' */ + dst = mm_modem_charset_str_from_utf8 (utf8, MM_MODEM_CHARSET_GSM, TRUE, &error); + g_assert_no_error (error); + g_assert_cmpstr (dst, ==, src_translit); } struct charset_can_convert_to_test_s { @@ -350,6 +390,7 @@ gboolean to_ira; gboolean to_8859_1; gboolean to_ucs2; + gboolean to_utf16; gboolean to_pccp437; gboolean to_pcdn; }; @@ -360,35 +401,35 @@ static const struct charset_can_convert_to_test_s charset_can_convert_to_test[] = { { .utf8 = "", - .to_gsm = TRUE, .to_ira = TRUE, .to_8859_1 = TRUE, .to_ucs2 = TRUE, .to_pccp437 = TRUE, .to_pcdn = TRUE, + .to_gsm = TRUE, .to_ira = TRUE, .to_8859_1 = TRUE, .to_ucs2 = TRUE, .to_utf16 = TRUE, .to_pccp437 = TRUE, .to_pcdn = TRUE, }, { .utf8 = " ", - .to_gsm = TRUE, .to_ira = TRUE, .to_8859_1 = TRUE, .to_ucs2 = TRUE, .to_pccp437 = TRUE, .to_pcdn = TRUE, + .to_gsm = TRUE, .to_ira = TRUE, .to_8859_1 = TRUE, .to_ucs2 = TRUE, .to_utf16 = TRUE, .to_pccp437 = TRUE, .to_pcdn = TRUE, }, { .utf8 = "some basic ascii", - .to_gsm = TRUE, .to_ira = TRUE, .to_8859_1 = TRUE, .to_ucs2 = TRUE, .to_pccp437 = TRUE, .to_pcdn = TRUE, + .to_gsm = TRUE, .to_ira = TRUE, .to_8859_1 = TRUE, .to_ucs2 = TRUE, .to_utf16 = TRUE, .to_pccp437 = TRUE, .to_pcdn = TRUE, }, { .utf8 = "ホモ・サピエンス 喂人类 katakana, chinese, english: UCS2 takes it all", - .to_gsm = FALSE, .to_ira = FALSE, .to_8859_1 = FALSE, .to_ucs2 = TRUE, .to_pccp437 = FALSE, .to_pcdn = FALSE, + .to_gsm = FALSE, .to_ira = FALSE, .to_8859_1 = FALSE, .to_ucs2 = TRUE, .to_utf16 = TRUE, .to_pccp437 = FALSE, .to_pcdn = FALSE, }, { .utf8 = "Some from the GSM7 basic set: a % Ψ Ω ñ ö è æ", - .to_gsm = TRUE, .to_ira = FALSE, .to_8859_1 = FALSE, .to_ucs2 = TRUE, .to_pccp437 = FALSE, .to_pcdn = FALSE, + .to_gsm = TRUE, .to_ira = FALSE, .to_8859_1 = FALSE, .to_ucs2 = TRUE, .to_utf16 = TRUE, .to_pccp437 = FALSE, .to_pcdn = FALSE, }, { .utf8 = "More from the GSM7 extended set: {} [] ~ € |", - .to_gsm = TRUE, .to_ira = FALSE, .to_8859_1 = FALSE, .to_ucs2 = TRUE, .to_pccp437 = FALSE, .to_pcdn = FALSE, + .to_gsm = TRUE, .to_ira = FALSE, .to_8859_1 = FALSE, .to_ucs2 = TRUE, .to_utf16 = TRUE, .to_pccp437 = FALSE, .to_pcdn = FALSE, }, { .utf8 = "patín cannot be encoded in GSM7 or IRA, but is valid UCS2, ISO-8859-1, CP437 and CP850", - .to_gsm = FALSE, .to_ira = FALSE, .to_8859_1 = TRUE, .to_ucs2 = TRUE, .to_pccp437 = TRUE, .to_pcdn = TRUE, + .to_gsm = FALSE, .to_ira = FALSE, .to_8859_1 = TRUE, .to_ucs2 = TRUE, .to_utf16 = TRUE, .to_pccp437 = TRUE, .to_pcdn = TRUE, }, { .utf8 = "ècole can be encoded in multiple ways, but not in IRA", - .to_gsm = TRUE, .to_ira = FALSE, .to_8859_1 = TRUE, .to_ucs2 = TRUE, .to_pccp437 = TRUE, .to_pcdn = TRUE, + .to_gsm = TRUE, .to_ira = FALSE, .to_8859_1 = TRUE, .to_ucs2 = TRUE, .to_utf16 = TRUE, .to_pccp437 = TRUE, .to_pcdn = TRUE, }, }; guint i; @@ -399,31 +440,12 @@ g_assert (mm_charset_can_convert_to (charset_can_convert_to_test[i].utf8, MM_MODEM_CHARSET_IRA) == charset_can_convert_to_test[i].to_ira); g_assert (mm_charset_can_convert_to (charset_can_convert_to_test[i].utf8, MM_MODEM_CHARSET_8859_1) == charset_can_convert_to_test[i].to_8859_1); g_assert (mm_charset_can_convert_to (charset_can_convert_to_test[i].utf8, MM_MODEM_CHARSET_UCS2) == charset_can_convert_to_test[i].to_ucs2); + g_assert (mm_charset_can_convert_to (charset_can_convert_to_test[i].utf8, MM_MODEM_CHARSET_UTF16) == charset_can_convert_to_test[i].to_utf16); g_assert (mm_charset_can_convert_to (charset_can_convert_to_test[i].utf8, MM_MODEM_CHARSET_PCCP437) == charset_can_convert_to_test[i].to_pccp437); g_assert (mm_charset_can_convert_to (charset_can_convert_to_test[i].utf8, MM_MODEM_CHARSET_PCDN) == charset_can_convert_to_test[i].to_pcdn); } } -void -_mm_log (const char *loc, - const char *func, - guint32 level, - const char *fmt, - ...) -{ - va_list args; - gchar *msg; - - if (!g_test_verbose ()) - return; - - va_start (args, fmt); - msg = g_strdup_vprintf (fmt, args); - va_end (args); - g_print ("%s\n", msg); - g_free (msg); -} - int main (int argc, char **argv) { setlocale (LC_ALL, ""); @@ -443,9 +465,9 @@ g_test_add_func ("/MM/charsets/gsm7/pack/last-septet-alone", test_gsm7_pack_last_septet_alone); g_test_add_func ("/MM/charsets/gsm7/pack/7-chars-offset", test_gsm7_pack_7_chars_offset); - g_test_add_func ("/MM/charsets/take-convert/ucs2/hex", test_take_convert_ucs2_hex_utf8); - g_test_add_func ("/MM/charsets/take-convert/ucs2/bad-ascii", test_take_convert_ucs2_bad_ascii); - g_test_add_func ("/MM/charsets/take-convert/ucs2/bad-ascii-2", test_take_convert_ucs2_bad_ascii2); + g_test_add_func ("/MM/charsets/str-from-to/ucs2", test_str_ucs2_to_from_utf8); + g_test_add_func ("/MM/charsets/str-from-to/gsm", test_str_gsm_to_from_utf8); + g_test_add_func ("/MM/charsets/str-from-to/gsm-with-at", test_str_gsm_to_from_utf8_with_at); g_test_add_func ("/MM/charsets/can-convert-to", test_charset_can_covert_to); diff -Nru modemmanager-1.12.8/src/tests/test-error-helpers.c modemmanager-1.16.6/src/tests/test-error-helpers.c --- modemmanager-1.12.8/src/tests/test-error-helpers.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/tests/test-error-helpers.c 2021-06-06 21:40:59.000000000 +0800 @@ -29,7 +29,7 @@ test_error_helpers_## ERROR_SMALL (void) \ { \ GError *error; \ - guint i; \ + gint i; \ GEnumClass *enum_class; \ \ enum_class = g_type_class_ref (MM_TYPE_ ## ERROR_CAPS); \ @@ -38,7 +38,7 @@ \ enum_value = g_enum_get_value (enum_class, i); \ if (enum_value) { \ - error = mm_## ERROR_SMALL ## _for_code ((MM##ERROR_CAMEL)i); \ + error = mm_## ERROR_SMALL ## _for_code ((MM##ERROR_CAMEL)i, NULL); \ g_assert_error (error, MM_ ## ERROR_CAPS, i); \ g_error_free (error); \ } \ @@ -52,26 +52,6 @@ /*****************************************************************************/ -void -_mm_log (const char *loc, - const char *func, - guint32 level, - const char *fmt, - ...) -{ - va_list args; - gchar *msg; - - if (!g_test_verbose ()) - return; - - va_start (args, fmt); - msg = g_strdup_vprintf (fmt, args); - va_end (args); - g_print ("%s\n", msg); - g_free (msg); -} - int main (int argc, char **argv) { setlocale (LC_ALL, ""); diff -Nru modemmanager-1.12.8/src/tests/test-modem-helpers-qmi.c modemmanager-1.16.6/src/tests/test-modem-helpers-qmi.c --- modemmanager-1.12.8/src/tests/test-modem-helpers-qmi.c 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/src/tests/test-modem-helpers-qmi.c 2021-06-06 21:40:59.000000000 +0800 @@ -21,7 +21,7 @@ #include "mm-enums-types.h" #include "mm-modem-helpers-qmi.h" -#include "mm-log.h" +#include "mm-log-test.h" static void test_capabilities_expected (MMQmiCapabilitiesContext *ctx, @@ -31,7 +31,7 @@ gchar *expected_str; gchar *built_str; - built = mm_modem_capability_from_qmi_capabilities_context (ctx); + built = mm_modem_capability_from_qmi_capabilities_context (ctx, NULL); expected_str = mm_modem_capability_build_string_from_mask (expected); built_str = mm_modem_capability_build_string_from_mask (built); @@ -309,26 +309,6 @@ /*****************************************************************************/ -void -_mm_log (const char *loc, - const char *func, - guint32 level, - const char *fmt, - ...) -{ - va_list args; - gchar *msg; - - if (!g_test_verbose ()) - return; - - va_start (args, fmt); - msg = g_strdup_vprintf (fmt, args); - va_end (args); - g_print ("%s\n", msg); - g_free (msg); -} - int main (int argc, char **argv) { setlocale (LC_ALL, ""); diff -Nru modemmanager-1.12.8/src/tests/test-modem-helpers.c modemmanager-1.16.6/src/tests/test-modem-helpers.c --- modemmanager-1.12.8/src/tests/test-modem-helpers.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/tests/test-modem-helpers.c 2021-06-06 21:40:59.000000000 +0800 @@ -22,7 +22,7 @@ #define _LIBMM_INSIDE_MM #include #include "mm-modem-helpers.h" -#include "mm-log.h" +#include "mm-log-test.h" #define g_assert_cmpfloat_tolerance(val1, val2, tolerance) \ g_assert_cmpfloat (fabs (val1 - val2), <, tolerance) @@ -37,7 +37,7 @@ MMFlowControl mask; GError *error = NULL; - mask = mm_parse_ifc_test_response (str, &error); + mask = mm_parse_ifc_test_response (str, NULL, &error); g_assert_no_error (error); g_assert_cmpuint (mask, ==, expected); } @@ -291,7 +291,7 @@ { .index = 0, .status = 1, - .pdu = "07914306073011F00405812261F700003130916191314095C27" + .pdu = (gchar *) "07914306073011F00405812261F700003130916191314095C27" "4D96D2FBBD3E437280CB2BEC961F3DB5D76818EF2F0381D9E83E06F39A8CC2E9FD372F" "77BEE0249CBE37A594E0E83E2F532085E2F93CB73D0B93CA7A7DFEEB01C447F93DF731" "0BD3E07CDCB727B7A9C7ECF41E432C8FC96B7C32079189E26874179D0F8DD7E93C3A0B" @@ -326,7 +326,7 @@ { .index = 0, .status = 1, - .pdu = "07914306073011F00405812261F700003130916191314095C27" + .pdu = (gchar *) "07914306073011F00405812261F700003130916191314095C27" "4D96D2FBBD3E437280CB2BEC961F3DB5D76818EF2F0381D9E83E06F39A8CC2E9FD372F" "77BEE0249CBE37A594E0E83E2F532085E2F93CB73D0B93CA7A7DFEEB01C447F93DF731" "0BD3E07CDCB727B7A9C7ECF41E432C8FC96B7C32079189E26874179D0F8DD7E93C3A0B" @@ -335,7 +335,7 @@ { .index = 1, .status = 1, - .pdu = "07914306073011F00405812261F700003130916191314095C27" + .pdu = (gchar *) "07914306073011F00405812261F700003130916191314095C27" "4D96D2FBBD3E437280CB2BEC961F3DB5D76818EF2F0381D9E83E06F39A8CC2E9FD372F" "77BEE0249CBE37A594E0E83E2F532085E2F93CB73D0B93CA7A7DFEEB01C447F93DF731" "0BD3E07CDCB727B7A9C7ECF41E432C8FC96B7C32079189E26874179D0F8DD7E93C3A0B" @@ -344,7 +344,7 @@ { .index = 2, .status = 1, - .pdu = "07914306073011F00405812261F700003130916191314095C27" + .pdu = (gchar *) "07914306073011F00405812261F700003130916191314095C27" "4D96D2FBBD3E437280CB2BEC961F3DB5D76818EF2F0381D9E83E06F39A8CC2E9FD372F" "77BEE0249CBE37A594E0E83E2F532085E2F93CB73D0B93CA7A7DFEEB01C447F93DF731" "0BD3E07CDCB727B7A9C7ECF41E432C8FC96B7C32079189E26874179D0F8DD7E93C3A0B" @@ -365,7 +365,7 @@ { .index = 17, .status = 3, - .pdu = "079100F40D1101000F001000B917118336058F300001954747A0E4ACF41F27298CDCE83C6EF371B0402814020" + .pdu = (gchar *) "079100F40D1101000F001000B917118336058F300001954747A0E4ACF41F27298CDCE83C6EF371B0402814020" } }; @@ -385,22 +385,22 @@ { .index = 17, .status = 3, - .pdu = "079100F40D1101000F001000B917118336058F300001954747A0E4ACF41F27298CDCE83C6EF371B0402814020" + .pdu = (gchar *) "079100F40D1101000F001000B917118336058F300001954747A0E4ACF41F27298CDCE83C6EF371B0402814020" }, { .index = 15, .status = 3, - .pdu = "079100F40D1101000F001000B917118336058F300001954747A0E4ACF41F27298CDCE83C6EF371B0402814020" + .pdu = (gchar *) "079100F40D1101000F001000B917118336058F300001954747A0E4ACF41F27298CDCE83C6EF371B0402814020" }, { .index = 13, .status = 3, - .pdu = "079100F40D1101000F001000B917118336058F300001954747A0E4ACF41F27298CDCE83C6EF371B0402814020" + .pdu = (gchar *) "079100F40D1101000F001000B917118336058F300001954747A0E4ACF41F27298CDCE83C6EF371B0402814020" }, { .index = 11, .status = 3, - .pdu = "079100F40D1101000F001000B917118336058F300" + .pdu = (gchar *) "079100F40D1101000F001000B917118336058F300" } }; @@ -441,7 +441,7 @@ const MM3gppPduInfo expected = { .index = 0, .status = 1, - .pdu = "07914306073011F00405812261F700003130916191314095C27" + .pdu = (gchar *) "07914306073011F00405812261F700003130916191314095C27" "4D96D2FBBD3E437280CB2BEC961F3DB5D76818EF2F0381D9E83E06F39A8CC2E9FD372F" "77BEE0249CBE37A594E0E83E2F532085E2F93CB73D0B93CA7A7DFEEB01C447F93DF731" "0BD3E07CDCB727B7A9C7ECF41E432C8FC96B7C32079189E26874179D0F8DD7E93C3A0B" @@ -463,7 +463,7 @@ const MM3gppPduInfo expected = { .index = 0, .status = 0, - .pdu = "07916163838428F9040B916121021021F7000051905141642" + .pdu = (gchar *) "07916163838428F9040B916121021021F7000051905141642" "20A23C4B0BCFD5E8740C4B0BCFD5E83C26E3248196687C9A0301D440DBBC3677918" }; @@ -476,6 +476,7 @@ static void test_cops_results (const gchar *desc, const gchar *reply, + MMModemCharset cur_charset, MM3gppNetworkInfo *expected_results, guint32 expected_results_len) { @@ -485,7 +486,7 @@ g_debug ("Testing %s +COPS response...", desc); - results = mm_3gpp_parse_cops_test_response (reply, &error); + results = mm_3gpp_parse_cops_test_response (reply, cur_charset, NULL, &error); g_assert (results); g_assert_no_error (error); g_assert_cmpuint (g_list_length (results), ==, expected_results_len); @@ -494,6 +495,7 @@ MM3gppNetworkInfo *info = l->data; gboolean found = FALSE; guint i; + gchar *access_tech_str; for (i = 0; !found && i < expected_results_len; i++) { MM3gppNetworkInfo *expected; @@ -514,11 +516,18 @@ g_assert_cmpstr (info->operator_short, ==, expected->operator_short); else g_assert (info->operator_short == NULL); - - g_debug ("info: %s, expected: %s", info->operator_code, expected->operator_code); } } + access_tech_str = mm_modem_access_technology_build_string_from_mask (info->access_tech); + g_debug ("info: [%s,%s,%s,%s] %sfound in expected results", + info->operator_long ? info->operator_long : "", + info->operator_short ? info->operator_short : "", + info->operator_code, + access_tech_str, + found ? "" : "not "); + g_free (access_tech_str); + g_assert (found == TRUE); } @@ -530,12 +539,12 @@ { const gchar *reply = "+COPS: (2,\"\",\"T-Mobile\",\"31026\",0),(2,\"T - Mobile\",\"T - Mobile\",\"310260\"),2),(1,\"AT&T\",\"AT&T\",\"310410\"),0)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, NULL, "T-Mobile", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "T - Mobile", "T - Mobile", "310260", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM } + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, NULL, (gchar *) "T-Mobile", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "T - Mobile", (gchar *) "T - Mobile", (gchar *) "310260", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM } }; - test_cops_results ("TM-506", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("TM-506", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -543,11 +552,11 @@ { const char *reply = "+COPS: (1,\"T-Mobile US\",\"TMO US\",\"31026\",0),(1,\"Cingular\",\"Cingular\",\"310410\",0),,(0, 1, 3),(0-2)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "T-Mobile US", "TMO US", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "Cingular", "Cingular", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "T-Mobile US", (gchar *) "TMO US", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "Cingular", (gchar *) "Cingular", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("GlobeTrotter 3G+ (nozomi)", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("GlobeTrotter 3G+ (nozomi)", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -555,12 +564,12 @@ { const char *reply = "+COPS: (1,\"T-Mobile\",\"TMO\",\"31026\",0),(1,\"AT&T\",\"AT&T\",\"310410\",2),(1,\"AT&T\",\"AT&T\",\"310410\",0),,(0,1,2,3,4),)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "T-Mobile", "TMO", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "T-Mobile", (gchar *) "TMO", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("Sierra AirCard 881", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Sierra AirCard 881", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -568,12 +577,12 @@ { const char *reply = "+COPS: (2,\"T-Mobile US\",\"TMO US\",\"31026\",0),(1,\"AT&T\",\"AT&T\",\"310410\",2),(1,\"AT&T\",\"AT&T\",\"310410\",0),,(0, 1,)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "T-Mobile US", "TMO US", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "T-Mobile US", (gchar *) "TMO US", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("Option GlobeTrotter MAX 3.6", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Option GlobeTrotter MAX 3.6", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -581,12 +590,12 @@ { const char *reply = "+COPS: (2,\"T-Mobile\",\"TMO\",\"31026\",0),(1,\"Cingular\",\"Cinglr\",\"310410\",2),(1,\"Cingular\",\"Cinglr\",\"310410\",0),,)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "T-Mobile", "TMO", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "Cingular", "Cinglr", "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "Cingular", "Cinglr", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "T-Mobile", (gchar *) "TMO", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "Cingular", (gchar *) "Cinglr", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "Cingular", (gchar *) "Cinglr", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("Sierra AirCard 860", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Sierra AirCard 860", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -594,12 +603,12 @@ { const char *reply = "+COPS: (2,\"T-Mobile\",\"T-Mobile\",\"31026\",0),(1,\"AT&T\",\"AT&T\",\"310410\",2),(1,\"AT&T\",\"AT&T\",\"310410\",0),,(0, 1, 3),(0-2)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "T-Mobile", "T-Mobile", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "T-Mobile", (gchar *) "T-Mobile", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("Option GTM378", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Option GTM378", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -607,35 +616,37 @@ { const char *reply = "+COPS: (2,\"T-Mobile\",\"\",\"310260\"),(0,\"Cingular Wireless\",\"\",\"310410\")"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "T-Mobile", NULL, "310260", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_UNKNOWN, "Cingular Wireless", NULL, "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "T-Mobile", NULL, (gchar *) "310260", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_UNKNOWN, (gchar *) "Cingular Wireless", NULL, (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("BUSlink SCWi275u (Motorola C-series)", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("BUSlink SCWi275u (Motorola C-series)", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void test_cops_response_mf627a (void *f, gpointer d) { - const char *reply = "+COPS: (2,\"AT&T@\",\"AT&TD\",\"310410\",0),(3,\"Voicestream Wireless Corporation\",\"VSTREAM\",\"31026\",0),"; + /* The '@' in this string is ASCII 0x40, and 0x40 is a valid GSM-7 char: '¡' (which is 0xc2,0xa1 in UTF-8) */ + const char *reply = "+COPS: (2,\"AT&T@\",\"AT&TD\",\"310410\",0),(3,\"Vstream Wireless\",\"VSTREAM\",\"31026\",0),"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "AT&T@", "AT&TD", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_FORBIDDEN, "Voicestream Wireless Corporation", "VSTREAM", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "AT&T¡", (gchar *) "AT&TD", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_FORBIDDEN, (gchar *) "Vstream Wireless", (gchar *) "VSTREAM", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("ZTE MF627 (A)", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("ZTE MF627 (A)", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void test_cops_response_mf627b (void *f, gpointer d) { + /* The '@' in this string is ASCII 0x40, and 0x40 is a valid GSM-7 char: '¡' (which is 0xc2,0xa1 in UTF-8) */ const char *reply = "+COPS: (2,\"AT&Tp\",\"AT&T@\",\"310410\",0),(3,\"\",\"\",\"31026\",0),"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "AT&Tp", "AT&T@", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_FORBIDDEN, NULL, NULL, "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "AT&Tp", (gchar *) "AT&T¡", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_FORBIDDEN, NULL, NULL, (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("ZTE MF627 (B)", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("ZTE MF627 (B)", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -643,11 +654,11 @@ { const char *reply = "+COPS: (2,\"T-Mobile\",\"TMO\",\"31026\",0),(1,\"AT&T\",\"AT&T\",\"310410\",0),,(0,1,2,3,4),(0,1,2)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "T-Mobile", "TMO", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "T-Mobile", (gchar *) "TMO", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("Huawei E160G", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Huawei E160G", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -655,12 +666,12 @@ { const char *reply = "+COPS: (2,\"\",\"\",\"310410\",2),(1,\"AT&T\",\"AT&T\",\"310410\",0),(1,\"T-Mobile\",\"TMO\",\"31026\",0),,(0,1,2,3,4),(0,1,2)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, NULL, NULL, "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "T-Mobile", "TMO", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, NULL, NULL, (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "T-Mobile", (gchar *) "TMO", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("Sierra AT&T USBConnect Mercury", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Sierra AT&T USBConnect Mercury", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -668,12 +679,12 @@ { const char *reply = "+COPS: (2,\"AT&T\",\"\",\"310410\",0),(2,\"\",\"\",\"3104100\",2),(1,\"AT&T\",\"\",\"310260\",0),,(0-4),(0-2)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "AT&T", NULL, "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, NULL, NULL, "3104100", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", NULL, "310260", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "AT&T", NULL, (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, NULL, NULL, (gchar *) "3104100", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", NULL, (gchar *) "310260", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("Option AT&T Quicksilver", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Option AT&T Quicksilver", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -681,11 +692,11 @@ { const char *reply = "+COPS: (2,\"T-Mobile US\",\"TMO US\",\"31026\",0),(1,\"AT&T\",\"AT&T\",\"310410\",0),,(0, 1, 3),(0-2)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "T-Mobile US", "TMO US", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "T-Mobile US", (gchar *) "TMO US", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("Option iCON 225", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Option iCON 225", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -693,13 +704,13 @@ { const char *reply = "+COPS: (1,\"T-Mobile US\",\"TMO US\",\"31026\",0),(2,\"T-Mobile\",\"T-Mobile\",\"310260\",2),(1,\"AT&T\",\"AT&T\",\"310410\",2),(1,\"AT&T\",\"AT&T\",\"310410\",0),,(0,1,2,3,4),(0,1,2)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "T-Mobile US", "TMO US", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "T-Mobile", "T-Mobile", "310260", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM } + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "T-Mobile US", (gchar *) "TMO US", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "T-Mobile", (gchar *) "T-Mobile", (gchar *) "310260", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM } }; - test_cops_results ("Option iCON 452", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Option iCON 452", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -707,12 +718,12 @@ { const char *reply = "+COPS: (2,\"T - Mobile\",\"T - Mobile\",\"31026\",0),(1,\"AT&T\",\"AT&T\",\"310410\",0),(1,\"AT&T\",\"AT&T\",\"310410\",2)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "T - Mobile", "T - Mobile", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS } + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "T - Mobile", (gchar *) "T - Mobile", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS } }; - test_cops_results ("Ericsson F3507g", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Ericsson F3507g", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -720,12 +731,12 @@ { const char *reply = "+COPS: (2,\"T - Mobile\",\"T - Mobile\",\"31026\",0),(1,\"AT&T\",\"AT&T\",\"310410\"),2),(1,\"AT&T\",\"AT&T\",\"310410\"),0)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "T - Mobile", "T - Mobile", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM } + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "T - Mobile", (gchar *) "T - Mobile", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM } }; - test_cops_results ("Ericsson F3607gw", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Ericsson F3607gw", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -733,12 +744,12 @@ { const char *reply = "+COPS: (2,\"T-Mobile\",\"T-Mobile\",\"31026\",0),(1,\"AT&T\",\"AT&T\",\"310410\",2),(1,\"AT&T\",\"AT&T\",\"310410\",0),,(0,1,2,3,4),(0,1,2)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "T-Mobile", "T-Mobile", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM } + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "T-Mobile", (gchar *) "T-Mobile", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM } }; - test_cops_results ("Sierra MC8775", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Sierra MC8775", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -746,12 +757,12 @@ { const char *reply = "+COPS: (2,\"T - Mobile\",,\"31026\"),(1,\"Einstein PCS\",,\"31064\"),(1,\"Cingular\",,\"31041\"),,(0,1,3),(0,2)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "T - Mobile", NULL, "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "Einstein PCS", NULL, "31064", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "Cingular", NULL, "31041", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "T - Mobile", NULL, (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "Einstein PCS", NULL, (gchar *) "31064", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "Cingular", NULL, (gchar *) "31041", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("Nokia N80", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Nokia N80", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -759,11 +770,11 @@ { const char *reply = "+COPS: (2,\"T-Mobile\",\"TMO\",\"31026\",0),(1,\"AT&T\",\"AT&T\",\"310410\",0),,(0,1,2,3,4),(0,1,2)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "T-Mobile", "TMO", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "T-Mobile", (gchar *) "TMO", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("Huawei E1550", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Huawei E1550", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -771,11 +782,11 @@ { const char *reply = "+COPS: (2,\"T-Mobile\",\"T-Mobile\",\"31026\",0),(1,\"\",\"\",\"310410\",0),"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "T-Mobile", "T-Mobile", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, NULL, NULL, "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "T-Mobile", (gchar *) "T-Mobile", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, NULL, NULL, (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("ZTE MF622", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("ZTE MF622", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -783,12 +794,12 @@ { const char *reply = "+COPS: (1,\"\",\"\",\"31026\",0),(1,\"\",\"\",\"310410\",2),(1,\"\",\"\",\"310410\",0),,(0,1,3,4),(0,1,2)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, NULL, NULL, "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, NULL, NULL, "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, NULL, NULL, "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, NULL, NULL, (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, NULL, NULL, (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, NULL, NULL, (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("Huawei E226", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Huawei E226", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -796,12 +807,12 @@ { const char *reply = "+COPS: (0,\"AT&T MicroCell\",\"AT&T MicroCell\",\"310410\",2)\r\n+COPS: (1,\"AT&T MicroCell\",\"AT&T MicroCell\",\"310410\",0)\r\n+COPS: (1,\"T-Mobile\",\"TMO\",\"31026\",0)\r\n"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_UNKNOWN, "AT&T MicroCell", "AT&T MicroCell", "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T MicroCell", "AT&T MicroCell", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "T-Mobile", "TMO", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_UNKNOWN, (gchar *) "AT&T MicroCell", (gchar *) "AT&T MicroCell", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T MicroCell", (gchar *) "AT&T MicroCell", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "T-Mobile", (gchar *) "TMO", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("Novatel XU870", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Novatel XU870", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -809,12 +820,12 @@ { const char *reply = "+COPS: (2,\"T-Mobile US\",\"TMO US\",\"31026\",0),(1,\"AT&T\",\"AT&T\",\"310410\",2),(1,\"AT&T\",\"AT&T\",\"310410\",0),,(0,1,2,3,4),(0,1,2)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "T-Mobile US", "TMO US", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "T-Mobile US", (gchar *) "TMO US", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("Option GlobeTrotter Ultra Express", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Option GlobeTrotter Ultra Express", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -822,11 +833,11 @@ { const char *reply = "+COPS: (2,\"T - Mobile\",,\"31026\",0),\r\n(1,\"AT&T\",,\"310410\",0),,(0,1,3),(0,2)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "T - Mobile", NULL, "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", NULL, "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "T - Mobile", NULL, (gchar *)"31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", NULL, (gchar *)"310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("Nokia 2720", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Nokia 2720", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -834,12 +845,12 @@ { const char *reply = "+COPS: (2,\"T-Mobile\",\"T-Mobile\",\"31026\",0),(1,\"AT&T\",\"AT&T\",\"310410\",2),(1,\"AT&T\",\"AT&T\",\"310410\",0),,(0,1,2,3,4),(0,1,2)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "T-Mobile", "T-Mobile", "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "T-Mobile", (gchar *) "T-Mobile", (gchar *) "31026", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_UMTS }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("Qualcomm Gobi", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Qualcomm Gobi", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -851,16 +862,16 @@ */ const char *reply = "+COPS: (2,\"blau\",\"\",\"26203\"),(2,\"blau\",\"\",\"26203\"),(3,\"\",\"\",\"26201\"),(3,\"\",\"\",\"26202\"),(3,\"\",\"\",\"26207\"),(3,\"\",\"\",\"26201\"),(3,\"\",\"\",\"26207\")"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "blau", NULL, "26203", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, "blau", NULL, "26203", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_FORBIDDEN, NULL, NULL, "26201", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_FORBIDDEN, NULL, NULL, "26202", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_FORBIDDEN, NULL, NULL, "26207", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_FORBIDDEN, NULL, NULL, "26201", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_FORBIDDEN, NULL, NULL, "26207", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "blau", NULL, (gchar *) "26203", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "blau", NULL, (gchar *) "26203", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_FORBIDDEN, NULL, NULL, (gchar *) "26201", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_FORBIDDEN, NULL, NULL, (gchar *) "26202", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_FORBIDDEN, NULL, NULL, (gchar *) "26207", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_FORBIDDEN, NULL, NULL, (gchar *) "26201", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_FORBIDDEN, NULL, NULL, (gchar *) "26207", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("Sony-Ericsson K600i", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Sony-Ericsson K600i", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -869,11 +880,35 @@ /* Ensure commas within quotes don't trip up the parser */ const char *reply = "+COPS: (1,\"T-Mobile USA, In\",\"T-Mobile\",\"310260\",0),(1,\"AT&T\",\"AT&T\",\"310410\",0),,(0,1,2,3,4),(0,1,2)"; static MM3gppNetworkInfo expected[] = { - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "T-Mobile USA, In", "T-Mobile", "310260", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, - { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, "AT&T", "AT&T", "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "T-Mobile USA, In", (gchar *) "T-Mobile", (gchar *) "310260", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "AT&T", (gchar *) "AT&T", (gchar *) "310410", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, }; - test_cops_results ("Samsung Z810", reply, &expected[0], G_N_ELEMENTS (expected)); + test_cops_results ("Samsung Z810", reply, MM_MODEM_CHARSET_GSM, &expected[0], G_N_ELEMENTS (expected)); +} + +static void +test_cops_response_ublox_lara (void *f, gpointer d) +{ + /* strings in UCS2 */ + const char *reply = + "+COPS: " + "(2,\"004D006F007600690073007400610072\",\"004D006F007600690073007400610072\",\"00320031003400300037\",7)," + "(1,\"0059004F00490047004F\",\"0059004F00490047004F\",\"00320031003400300034\",7)," + "(1,\"0076006F006400610066006F006E0065002000450053\",\"0076006F00640061002000450053\",\"00320031003400300031\",7)," + "(1,\"004F00720061006E00670065002000530050\",\"00450053005000520054\",\"00320031003400300033\",0)," + "(1,\"0076006F006400610066006F006E0065002000450053\",\"0076006F00640061002000450053\",\"00320031003400300031\",0)," + "(1,\"004F00720061006E00670065002000530050\",\"00450053005000520054\",\"00320031003400300033\",7)"; + static MM3gppNetworkInfo expected[] = { + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_CURRENT, (gchar *) "Movistar", (gchar *) "Movistar", (gchar *) "21407", MM_MODEM_ACCESS_TECHNOLOGY_LTE }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "YOIGO", (gchar *) "YOIGO", (gchar *) "21404", MM_MODEM_ACCESS_TECHNOLOGY_LTE }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "vodafone ES", (gchar *) "voda ES", (gchar *) "21401", MM_MODEM_ACCESS_TECHNOLOGY_LTE }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "Orange SP", (gchar *) "ESPRT", (gchar *) "21403", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "vodafone ES", (gchar *) "voda ES", (gchar *) "21401", MM_MODEM_ACCESS_TECHNOLOGY_GSM }, + { MM_MODEM_3GPP_NETWORK_AVAILABILITY_AVAILABLE, (gchar *) "Orange SP", (gchar *) "ESPRT", (gchar *) "21403", MM_MODEM_ACCESS_TECHNOLOGY_LTE }, + }; + + test_cops_results ("u-blox LARA", reply, MM_MODEM_CHARSET_UCS2, &expected[0], G_N_ELEMENTS (expected)); } static void @@ -883,7 +918,7 @@ GList *results; GError *error = NULL; - results = mm_3gpp_parse_cops_test_response (reply, &error); + results = mm_3gpp_parse_cops_test_response (reply, MM_MODEM_CHARSET_GSM, NULL, &error); g_assert (results == NULL); g_assert_no_error (error); } @@ -895,7 +930,7 @@ GList *results; GError *error = NULL; - results = mm_3gpp_parse_cops_test_response (reply, &error); + results = mm_3gpp_parse_cops_test_response (reply, MM_MODEM_CHARSET_GSM, NULL, &error); g_assert (results == NULL); g_assert_no_error (error); } @@ -1008,7 +1043,7 @@ gchar *str; str = g_strdup (t->input); - mm_3gpp_normalize_operator (&str, t->charset); + mm_3gpp_normalize_operator (&str, t->charset, NULL); if (!t->normalized) g_assert (!str); else @@ -1061,6 +1096,7 @@ guint regex_num; gboolean cgreg; gboolean cereg; + gboolean c5greg; } CregResult; static void @@ -1070,13 +1106,13 @@ RegTestData *data, const CregResult *result) { - int i; + guint i; GMatchInfo *info = NULL; MMModem3gppRegistrationState state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; MMModemAccessTechnology access_tech = MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN; gulong lac = 0, ci = 0; GError *error = NULL; - gboolean success, cgreg = FALSE, cereg = FALSE; + gboolean success, cgreg = FALSE, cereg = FALSE, c5greg = FALSE; guint regex_num = 0; GPtrArray *array; @@ -1096,7 +1132,7 @@ if (g_regex_match (r, reply, 0, &info)) { g_debug (" matched with %d", i); - regex_num = i + 1; + regex_num = i; break; } g_match_info_free (info); @@ -1110,19 +1146,18 @@ g_assert (info != NULL); g_assert_cmpuint (regex_num, ==, result->regex_num); - success = mm_3gpp_parse_creg_response (info, &state, &lac, &ci, &access_tech, &cgreg, &cereg, &error); + success = mm_3gpp_parse_creg_response (info, NULL, &state, &lac, &ci, &access_tech, &cgreg, &cereg, &c5greg, &error); + g_match_info_free (info); g_assert (success); g_assert_no_error (error); g_assert_cmpuint (state, ==, result->state); - g_assert (lac == result->lac); - g_assert (ci == result->ci); - - g_debug (" access_tech (%d) == result->act (%d)", - access_tech, result->act); + g_assert_cmpuint (lac, ==, result->lac); + g_assert_cmpuint (ci, ==, result->ci); g_assert_cmpuint (access_tech, ==, result->act); g_assert_cmpuint (cgreg, ==, result->cgreg); g_assert_cmpuint (cereg, ==, result->cereg); + g_assert_cmpuint (c5greg, ==, result->c5greg); } static void @@ -1130,7 +1165,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "+CREG: 1,3"; - const CregResult result = { 3, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN , 2, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_DENIED, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 1, FALSE, FALSE, FALSE }; test_creg_match ("CREG=1", TRUE, reply, data, &result); } @@ -1140,7 +1175,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CREG: 3\r\n"; - const CregResult result = { 3, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN , 1, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_DENIED, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 0, FALSE, FALSE, FALSE }; test_creg_match ("CREG=1", FALSE, reply, data, &result); } @@ -1149,8 +1184,8 @@ test_creg2_mercury_solicited (void *f, gpointer d) { RegTestData *data = (RegTestData *) d; - const char *reply = "+CREG: 0,1,84CD,00D30173"; - const CregResult result = { 1, 0x84cd, 0xd30173, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN , 4, FALSE, FALSE }; + const char *reply = "+CREG: 1,1,84CD,00D30173"; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x84cd, 0xd30173, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 3, FALSE, FALSE, FALSE }; test_creg_match ("Sierra Mercury CREG=2", TRUE, reply, data, &result); } @@ -1160,7 +1195,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CREG: 1,84CD,00D30156\r\n"; - const CregResult result = { 1, 0x84cd, 0xd30156, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN , 3, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x84cd, 0xd30156, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 2, FALSE, FALSE, FALSE }; test_creg_match ("Sierra Mercury CREG=2", FALSE, reply, data, &result); } @@ -1170,7 +1205,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "+CREG: 2,1,\"CE00\",\"01CEAD8F\""; - const CregResult result = { 1, 0xce00, 0x01cead8f, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN , 4, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0xce00, 0x01cead8f, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 3, FALSE, FALSE, FALSE }; test_creg_match ("Sony Ericsson K850i CREG=2", TRUE, reply, data, &result); } @@ -1180,7 +1215,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CREG: 1,\"CE00\",\"00005449\"\r\n"; - const CregResult result = { 1, 0xce00, 0x5449, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN , 3, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0xce00, 0x5449, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 2, FALSE, FALSE, FALSE }; test_creg_match ("Sony Ericsson K850i CREG=2", FALSE, reply, data, &result); } @@ -1190,7 +1225,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "+CREG: 2,0,00,0"; - const CregResult result = { 0, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN , 4, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_IDLE, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 3, FALSE, FALSE, FALSE }; test_creg_match ("Huawei E160G unregistered CREG=2", TRUE, reply, data, &result); } @@ -1200,7 +1235,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "+CREG: 2,1,8BE3,2BAF"; - const CregResult result = { 1, 0x8be3, 0x2baf, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN , 4, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x8be3, 0x2baf, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 3, FALSE, FALSE, FALSE }; test_creg_match ("Huawei E160G CREG=2", TRUE, reply, data, &result); } @@ -1209,8 +1244,8 @@ test_creg2_e160g_unsolicited (void *f, gpointer d) { RegTestData *data = (RegTestData *) d; - const char *reply = "\r\n+CREG: 2,8BE3,2BAF\r\n"; - const CregResult result = { 2, 0x8be3, 0x2baf, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN , 3, FALSE, FALSE }; + const char *reply = "\r\n+CREG: 1,8BE3,2BAF\r\n"; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x8be3, 0x2baf, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 2, FALSE, FALSE, FALSE }; test_creg_match ("Huawei E160G CREG=2", FALSE, reply, data, &result); } @@ -1220,7 +1255,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "+CREG: 2,1,\"8BE3\",\"00002BAF\""; - const CregResult result = { 1, 0x8BE3, 0x2BAF, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN , 4, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x8BE3, 0x2BAF, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 3, FALSE, FALSE, FALSE }; /* Test leading zeros in the CI */ test_creg_match ("Sony Ericsson TM-506 CREG=2", TRUE, reply, data, &result); @@ -1231,7 +1266,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CREG: 2,,\r\n"; - const CregResult result = { 2, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN , 3, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 2, FALSE, FALSE, FALSE }; test_creg_match ("Novatel XU870 unregistered CREG=2", FALSE, reply, data, &result); } @@ -1241,7 +1276,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "+CREG:002,001,\"18d8\",\"ffff\""; - const CregResult result = { 1, 0x18D8, 0xFFFF, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 5, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x18D8, 0xFFFF, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 4, FALSE, FALSE, FALSE }; test_creg_match ("Iridium, CREG=2", TRUE, reply, data, &result); } @@ -1251,7 +1286,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "+CREG:2,1,0001,0010"; - const CregResult result = { 1, 0x0001, 0x0010, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 4, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x0001, 0x0010, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 3, FALSE, FALSE, FALSE }; test_creg_match ("solicited CREG=2 with no leading zeros in integer fields", TRUE, reply, data, &result); } @@ -1261,7 +1296,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "+CREG:002,001,\"0001\",\"0010\""; - const CregResult result = { 1, 0x0001, 0x0010, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 5, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x0001, 0x0010, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 4, FALSE, FALSE, FALSE }; test_creg_match ("solicited CREG=2 with leading zeros in integer fields", TRUE, reply, data, &result); } @@ -1271,7 +1306,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CREG: 1,0001,0010,0\r\n"; - const CregResult result = { 1, 0x0001, 0x0010, MM_MODEM_ACCESS_TECHNOLOGY_GSM, 6, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x0001, 0x0010, MM_MODEM_ACCESS_TECHNOLOGY_GSM, 5, FALSE, FALSE, FALSE }; test_creg_match ("unsolicited CREG=2 with no leading zeros in integer fields", FALSE, reply, data, &result); } @@ -1281,7 +1316,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CREG: 001,\"0001\",\"0010\",000\r\n"; - const CregResult result = { 1, 0x0001, 0x0010, MM_MODEM_ACCESS_TECHNOLOGY_GSM, 7, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x0001, 0x0010, MM_MODEM_ACCESS_TECHNOLOGY_GSM, 6, FALSE, FALSE, FALSE }; test_creg_match ("unsolicited CREG=2 with leading zeros in integer fields", FALSE, reply, data, &result); } @@ -1291,8 +1326,7 @@ { RegTestData *data = (RegTestData *) d; const gchar *reply = "\r\n+CREG: 2,6,\"8B37\",\"0A265185\",7\r\n"; - /* NOTE: '6' means registered for "SMS only", home network; we just assume UNKNOWN in this case */ - const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME_SMS_ONLY, 0x8B37, 0x0A265185, MM_MODEM_ACCESS_TECHNOLOGY_LTE, 8, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME_SMS_ONLY, 0x8B37, 0x0A265185, MM_MODEM_ACCESS_TECHNOLOGY_LTE, 7, FALSE, FALSE, FALSE }; test_creg_match ("Ublox Toby-L2 solicited while on LTE", TRUE, reply, data, &result); } @@ -1302,8 +1336,7 @@ { RegTestData *data = (RegTestData *) d; const gchar *reply = "\r\n+CREG: 6,\"8B37\",\"0A265185\",7\r\n"; - /* NOTE: '6' means registered for "SMS only", home network; we just assume UNKNOWN in this case */ - const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME_SMS_ONLY, 0x8B37, 0x0A265185, MM_MODEM_ACCESS_TECHNOLOGY_LTE, 6, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME_SMS_ONLY, 0x8B37, 0x0A265185, MM_MODEM_ACCESS_TECHNOLOGY_LTE, 5, FALSE, FALSE, FALSE }; test_creg_match ("Ublox Toby-L2 unsolicited while on LTE", FALSE, reply, data, &result); } @@ -1313,7 +1346,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "+CGREG: 1,3"; - const CregResult result = { 3, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN , 2, TRUE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_DENIED, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 1, TRUE, FALSE, FALSE }; test_creg_match ("CGREG=1", TRUE, reply, data, &result); } @@ -1323,7 +1356,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CGREG: 3\r\n"; - const CregResult result = { 3, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN , 1, TRUE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_DENIED, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 0, TRUE, FALSE, FALSE }; test_creg_match ("CGREG=1", FALSE, reply, data, &result); } @@ -1333,7 +1366,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "+CGREG: 2,1,\"8BE3\",\"00002B5D\",3"; - const CregResult result = { 1, 0x8BE3, 0x2B5D, MM_MODEM_ACCESS_TECHNOLOGY_EDGE, 8, TRUE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x8BE3, 0x2B5D, MM_MODEM_ACCESS_TECHNOLOGY_EDGE, 7, TRUE, FALSE, FALSE }; test_creg_match ("Ericsson F3607gw CGREG=2", TRUE, reply, data, &result); } @@ -1343,7 +1376,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CGREG: 1,\"8BE3\",\"00002B5D\",3\r\n"; - const CregResult result = { 1, 0x8BE3, 0x2B5D, MM_MODEM_ACCESS_TECHNOLOGY_EDGE, 6, TRUE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x8BE3, 0x2B5D, MM_MODEM_ACCESS_TECHNOLOGY_EDGE, 5, TRUE, FALSE, FALSE }; test_creg_match ("Ericsson F3607gw CGREG=2", FALSE, reply, data, &result); } @@ -1353,7 +1386,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CREG: 2,5,\"0502\",\"0404736D\"\r\n"; - const CregResult result = { 5, 0x0502, 0x0404736D, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN , 4, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING, 0x0502, 0x0404736D, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 3, FALSE, FALSE, FALSE }; test_creg_match ("Sony-Ericsson MD400 CREG=2", FALSE, reply, data, &result); } @@ -1363,7 +1396,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CGREG: 5,\"0502\",\"0404736D\",2\r\n"; - const CregResult result = { 5, 0x0502, 0x0404736D, MM_MODEM_ACCESS_TECHNOLOGY_UMTS, 6, TRUE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING, 0x0502, 0x0404736D, MM_MODEM_ACCESS_TECHNOLOGY_UMTS, 5, TRUE, FALSE, FALSE }; test_creg_match ("Sony-Ericsson MD400 CGREG=2", FALSE, reply, data, &result); } @@ -1373,7 +1406,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CREG: 5\r\n\r\n+CGREG: 0\r\n"; - const CregResult result = { 5, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 1, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 0, FALSE, FALSE, FALSE }; test_creg_match ("Multi CREG/CGREG", FALSE, reply, data, &result); } @@ -1383,7 +1416,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CGREG: 0\r\n\r\n+CREG: 5\r\n"; - const CregResult result = { 0, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 1, TRUE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_IDLE, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 0, TRUE, FALSE, FALSE }; test_creg_match ("Multi CREG/CGREG #2", FALSE, reply, data, &result); } @@ -1393,7 +1426,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CGREG: 2,1, 81ED, 1A9CEB\r\n"; - const CregResult result = { 1, 0x81ED, 0x1A9CEB, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 4, TRUE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x81ED, 0x1A9CEB, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 3, TRUE, FALSE, FALSE }; /* Tests random spaces in response */ test_creg_match ("Alcatel One-Touch X220D CGREG=2", FALSE, reply, data, &result); @@ -1404,7 +1437,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CREG: 2,1,000B,2816, B, C2816\r\n"; - const CregResult result = { 1, 0x000B, 0x2816, MM_MODEM_ACCESS_TECHNOLOGY_GSM, 9, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x000B, 0x2816, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 8, FALSE, FALSE, FALSE }; test_creg_match ("Samsung Wave S8500 CREG=2", FALSE, reply, data, &result); } @@ -1414,7 +1447,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CREG: 2,1, 0 5, 2715\r\n"; - const CregResult result = { 1, 0x0000, 0x2715, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 4, FALSE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x0000, 0x2715, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 3, FALSE, FALSE, FALSE }; test_creg_match ("Qualcomm Gobi 1000 CREG=2", TRUE, reply, data, &result); } @@ -1424,7 +1457,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CGREG: 1,\"1422\",\"00000142\",3,\"00\"\r\n"; - const CregResult result = { 1, 0x1422, 0x0142, MM_MODEM_ACCESS_TECHNOLOGY_EDGE, 10, TRUE, FALSE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x1422, 0x0142, MM_MODEM_ACCESS_TECHNOLOGY_EDGE, 9, TRUE, FALSE, FALSE }; test_creg_match ("CGREG=2 with RAC", FALSE, reply, data, &result); } @@ -1434,7 +1467,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "+CEREG: 1,3"; - const CregResult result = { 3, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN , 2, FALSE, TRUE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_DENIED, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 1, FALSE, TRUE, FALSE }; test_creg_match ("CEREG=1", TRUE, reply, data, &result); } @@ -1444,7 +1477,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CEREG: 3\r\n"; - const CregResult result = { 3, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN , 1, FALSE, TRUE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_DENIED, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 0, FALSE, TRUE, FALSE }; test_creg_match ("CEREG=1", FALSE, reply, data, &result); } @@ -1454,7 +1487,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CEREG: 2,1, 1F00, 79D903 ,7\r\n"; - const CregResult result = { 1, 0x1F00, 0x79D903, MM_MODEM_ACCESS_TECHNOLOGY_LTE, 8, FALSE, TRUE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x1F00, 0x79D903, MM_MODEM_ACCESS_TECHNOLOGY_LTE, 7, FALSE, TRUE, FALSE }; test_creg_match ("CEREG=2", TRUE, reply, data, &result); } @@ -1464,7 +1497,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CEREG: 1, 1F00, 79D903 ,7\r\n"; - const CregResult result = { 1, 0x1F00, 0x79D903, MM_MODEM_ACCESS_TECHNOLOGY_LTE, 6, FALSE, TRUE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x1F00, 0x79D903, MM_MODEM_ACCESS_TECHNOLOGY_LTE, 5, FALSE, TRUE, FALSE }; test_creg_match ("CEREG=2", FALSE, reply, data, &result); } @@ -1474,7 +1507,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CEREG: 1, 2, 0001, 00000100, 7\r\n"; - const CregResult result = { 2, 0x0001, 0x00000100, MM_MODEM_ACCESS_TECHNOLOGY_LTE, 8, FALSE, TRUE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING, 0x0001, 0x00000100, MM_MODEM_ACCESS_TECHNOLOGY_LTE, 7, FALSE, TRUE, FALSE }; test_creg_match ("Altair LTE CEREG=2", FALSE, reply, data, &result); } @@ -1484,7 +1517,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CEREG: 2, 0001, 00000100, 7\r\n"; - const CregResult result = { 2, 0x0001, 0x00000100, MM_MODEM_ACCESS_TECHNOLOGY_LTE, 6, FALSE, TRUE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_SEARCHING, 0x0001, 0x00000100, MM_MODEM_ACCESS_TECHNOLOGY_LTE, 5, FALSE, TRUE, FALSE }; test_creg_match ("Altair LTE CEREG=2", FALSE, reply, data, &result); } @@ -1494,7 +1527,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CEREG: 2,1, 1F00, 20 ,79D903 ,7\r\n"; - const CregResult result = { 1, 0x1F00, 0x79D903, MM_MODEM_ACCESS_TECHNOLOGY_LTE, 13, FALSE, TRUE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x1F00, 0x79D903, MM_MODEM_ACCESS_TECHNOLOGY_LTE, 11, FALSE, TRUE, FALSE }; test_creg_match ("Novatel LTE E362 CEREG=2", TRUE, reply, data, &result); } @@ -1504,7 +1537,7 @@ { RegTestData *data = (RegTestData *) d; const char *reply = "\r\n+CEREG: 1, 1F00, 20 ,79D903 ,7\r\n"; - const CregResult result = { 1, 0x1F00, 0x79D903, MM_MODEM_ACCESS_TECHNOLOGY_LTE, 12, FALSE, TRUE }; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x1F00, 0x79D903, MM_MODEM_ACCESS_TECHNOLOGY_LTE, 10, FALSE, TRUE, FALSE }; test_creg_match ("Novatel LTE E362 CEREG=2", FALSE, reply, data, &result); } @@ -1513,8 +1546,8 @@ test_cgreg2_thuraya_solicited (void *f, gpointer d) { RegTestData *data = (RegTestData *) d; - const char *reply = "+CGREG: 1, \"0426\", \"F0,0F\""; - const CregResult result = { 1, 0x0426, 0x00F0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 11, TRUE, FALSE }; + const char *reply = "+CGREG: 2, 1, \"0426\", \"F00F\""; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x0426, 0xF00F, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 3, TRUE, FALSE, FALSE }; test_creg_match ("Thuraya solicited CREG=2", TRUE, reply, data, &result); } @@ -1523,12 +1556,52 @@ test_cgreg2_thuraya_unsolicited (void *f, gpointer d) { RegTestData *data = (RegTestData *) d; - const char *reply = "\r\n+CGREG: 1, \"0426\", \"F0,0F\"\r\n"; - const CregResult result = { 1, 0x0426, 0x00F0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 11, TRUE, FALSE }; + const char *reply = "\r\n+CGREG: 1, \"0426\", \"F00F\"\r\n"; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x0426, 0xF00F, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 2, TRUE, FALSE, FALSE }; test_creg_match ("Thuraya unsolicited CREG=2", FALSE, reply, data, &result); } +static void +test_c5greg1_solicited (void *f, gpointer d) +{ + RegTestData *data = (RegTestData *) d; + const char *reply = "+C5GREG: 1,3"; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_DENIED, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 1, FALSE, FALSE, TRUE }; + + test_creg_match ("C5GREG=1", TRUE, reply, data, &result); +} + +static void +test_c5greg1_unsolicited (void *f, gpointer d) +{ + RegTestData *data = (RegTestData *) d; + const char *reply = "\r\n+C5GREG: 3\r\n"; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_DENIED, 0, 0, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN, 0, FALSE, FALSE, TRUE }; + + test_creg_match ("C5GREG=1", FALSE, reply, data, &result); +} + +static void +test_c5greg2_solicited (void *f, gpointer d) +{ + RegTestData *data = (RegTestData *) d; + const char *reply = "+C5GREG: 2,1,1F00,79D903,11,6,ABCDEF"; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x1F00, 0x79D903, MM_MODEM_ACCESS_TECHNOLOGY_5GNR, 13, FALSE, FALSE, TRUE }; + + test_creg_match ("C5GREG=2", TRUE, reply, data, &result); +} + +static void +test_c5greg2_unsolicited (void *f, gpointer d) +{ + RegTestData *data = (RegTestData *) d; + const char *reply = "\r\n+C5GREG: 1,1F00,79D903,11,6,ABCDEF\r\n"; + const CregResult result = { MM_MODEM_3GPP_REGISTRATION_STATE_HOME, 0x1F00, 0x79D903, MM_MODEM_ACCESS_TECHNOLOGY_5GNR, 12, FALSE, FALSE, TRUE }; + + test_creg_match ("C5GREG=2", FALSE, reply, data, &result); +} + /*****************************************************************************/ /* Test CSCS responses */ @@ -1597,8 +1670,8 @@ /* Test Device Identifier builders */ typedef struct { - char *devid; - char *desc; + const char *devid; + const char *desc; guint vid; guint pid; const char *ati; @@ -1878,6 +1951,7 @@ g_debug ("%s... ", item->desc); devid = mm_create_device_identifier (item->vid, item->pid, + NULL, item->ati, item->ati1, item->gsn, @@ -1904,7 +1978,7 @@ MM3gppCmerInd inds = MM_3GPP_CMER_IND_NONE; GError *error = NULL; - ret = mm_3gpp_parse_cmer_test_response (str, &modes, &inds, &error); + ret = mm_3gpp_parse_cmer_test_response (str, NULL, &modes, &inds, &error); g_assert_no_error (error); g_assert (ret); @@ -2130,6 +2204,7 @@ g_debug ("[%u] type: %u", i, type); switch (type) { + case MM_3GPP_CGEV_UNKNOWN: case MM_3GPP_CGEV_NW_DETACH: case MM_3GPP_CGEV_ME_DETACH: break; @@ -2405,7 +2480,7 @@ g_debug ("Testing %s +CGDCONT test response...", desc); - results = mm_3gpp_parse_cgdcont_test_response (reply, &error); + results = mm_3gpp_parse_cgdcont_test_response (reply, NULL, &error); g_assert (results); g_assert_no_error (error); g_assert_cmpuint (g_list_length (results), ==, expected_results_len); @@ -2580,9 +2655,9 @@ "+CGDCONT: 2,\"IP\",\"epc.tmobile.com\",\"\",0,0\r\n" "+CGDCONT: 3,\"IP\",\"MAXROAM.com\",\"\",0,0\r\n"; static MM3gppPdpContext expected[] = { - { 1, MM_BEARER_IP_FAMILY_IPV4, "nate.sktelecom.com" }, - { 2, MM_BEARER_IP_FAMILY_IPV4, "epc.tmobile.com" }, - { 3, MM_BEARER_IP_FAMILY_IPV4, "MAXROAM.com" } + { 1, MM_BEARER_IP_FAMILY_IPV4, (gchar *) "nate.sktelecom.com" }, + { 2, MM_BEARER_IP_FAMILY_IPV4, (gchar *) "epc.tmobile.com" }, + { 3, MM_BEARER_IP_FAMILY_IPV4, (gchar *) "MAXROAM.com" } }; test_cgdcont_read_results ("Samsung", reply, &expected[0], G_N_ELEMENTS (expected)); @@ -2824,11 +2899,12 @@ test = &cid_selection_tests[i]; - context_format_list = test->cgdcont_test ? mm_3gpp_parse_cgdcont_test_response (test->cgdcont_test, NULL) : NULL; + context_format_list = test->cgdcont_test ? mm_3gpp_parse_cgdcont_test_response (test->cgdcont_test, NULL, NULL) : NULL; context_list = test->cgdcont_query ? mm_3gpp_parse_cgdcont_read_response (test->cgdcont_query, NULL) : NULL; cid = mm_3gpp_select_best_cid (test->apn, test->ip_family, context_list, context_format_list, + NULL, &cid_reused, &cid_overwritten); g_assert_cmpuint (cid, ==, test->expected_cid); @@ -2865,10 +2941,12 @@ GArray *mem1 = NULL; GArray *mem2 = NULL; GArray *mem3 = NULL; + GError *error = NULL; g_debug ("Testing Cinterion +CPMS=? response..."); - g_assert (mm_3gpp_parse_cpms_test_response (reply, &mem1, &mem2, &mem3)); + g_assert (mm_3gpp_parse_cpms_test_response (reply, &mem1, &mem2, &mem3, &error)); + g_assert_no_error (error); g_assert_cmpuint (mem1->len, ==, 2); g_assert (is_storage_supported (mem1, MM_SMS_STORAGE_ME)); g_assert (is_storage_supported (mem1, MM_SMS_STORAGE_MT)); @@ -2893,10 +2971,12 @@ GArray *mem1 = NULL; GArray *mem2 = NULL; GArray *mem3 = NULL; + GError *error = NULL; g_debug ("Testing Huawei MU609 +CPMS=? response..."); - g_assert (mm_3gpp_parse_cpms_test_response (reply, &mem1, &mem2, &mem3)); + g_assert (mm_3gpp_parse_cpms_test_response (reply, &mem1, &mem2, &mem3, &error)); + g_assert_no_error (error); g_assert_cmpuint (mem1->len, ==, 1); g_assert (is_storage_supported (mem1, MM_SMS_STORAGE_ME)); g_assert_cmpuint (mem2->len, ==, 1); @@ -2917,10 +2997,12 @@ GArray *mem1 = NULL; GArray *mem2 = NULL; GArray *mem3 = NULL; + GError *error = NULL; g_debug ("Testing Nokia C6 response..."); - g_assert (mm_3gpp_parse_cpms_test_response (reply, &mem1, &mem2, &mem3)); + g_assert (mm_3gpp_parse_cpms_test_response (reply, &mem1, &mem2, &mem3, &error)); + g_assert_no_error (error); g_assert_cmpuint (mem1->len, ==, 0); g_assert_cmpuint (mem2->len, ==, 0); g_assert_cmpuint (mem3->len, ==, 0); @@ -2942,10 +3024,12 @@ GArray *mem1 = NULL; GArray *mem2 = NULL; GArray *mem3 = NULL; + GError *error = NULL; g_debug ("Testing mixed +CPMS=? response..."); - g_assert (mm_3gpp_parse_cpms_test_response (reply, &mem1, &mem2, &mem3)); + g_assert (mm_3gpp_parse_cpms_test_response (reply, &mem1, &mem2, &mem3, &error)); + g_assert_no_error (error); g_assert_cmpuint (mem1->len, ==, 2); g_assert (is_storage_supported (mem1, MM_SMS_STORAGE_ME)); g_assert (is_storage_supported (mem1, MM_SMS_STORAGE_MT)); @@ -2967,10 +3051,12 @@ GArray *mem1 = NULL; GArray *mem2 = NULL; GArray *mem3 = NULL; + GError *error = NULL; g_debug ("Testing mixed +CPMS=? response with spaces..."); - g_assert (mm_3gpp_parse_cpms_test_response (reply, &mem1, &mem2, &mem3)); + g_assert (mm_3gpp_parse_cpms_test_response (reply, &mem1, &mem2, &mem3, &error)); + g_assert_no_error (error); g_assert_cmpuint (mem1->len, ==, 2); g_assert (is_storage_supported (mem1, MM_SMS_STORAGE_ME)); g_assert (is_storage_supported (mem1, MM_SMS_STORAGE_MT)); @@ -2996,10 +3082,12 @@ GArray *mem1 = NULL; GArray *mem2 = NULL; GArray *mem3 = NULL; + GError *error = NULL; g_debug ("Testing mixed +CPMS=? response..."); - g_assert (mm_3gpp_parse_cpms_test_response (reply, &mem1, &mem2, &mem3)); + g_assert (mm_3gpp_parse_cpms_test_response (reply, &mem1, &mem2, &mem3, &error)); + g_assert_no_error (error); g_assert_cmpuint (mem1->len, ==, 0); g_assert_cmpuint (mem2->len, ==, 0); g_assert_cmpuint (mem3->len, ==, 0); @@ -3388,7 +3476,7 @@ /* Only 2G supported */ all = build_mode_all (MM_MODEM_MODE_2G); - filtered = mm_filter_supported_modes (all, combinations); + filtered = mm_filter_supported_modes (all, combinations, NULL); g_assert_cmpuint (filtered->len, ==, 1); g_assert (find_mode_combination (filtered, MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE)); g_array_unref (filtered); @@ -3396,7 +3484,7 @@ /* Only 3G supported */ all = build_mode_all (MM_MODEM_MODE_3G); - filtered = mm_filter_supported_modes (all, combinations); + filtered = mm_filter_supported_modes (all, combinations, NULL); g_assert_cmpuint (filtered->len, ==, 1); g_assert (find_mode_combination (filtered, MM_MODEM_MODE_3G, MM_MODEM_MODE_NONE)); g_array_unref (filtered); @@ -3404,7 +3492,7 @@ /* 2G and 3G supported */ all = build_mode_all (MM_MODEM_MODE_2G | MM_MODEM_MODE_3G); - filtered = mm_filter_supported_modes (all, combinations); + filtered = mm_filter_supported_modes (all, combinations, NULL); g_assert_cmpuint (filtered->len, ==, 3); g_assert (find_mode_combination (filtered, MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE)); g_assert (find_mode_combination (filtered, MM_MODEM_MODE_3G, MM_MODEM_MODE_NONE)); @@ -3414,7 +3502,7 @@ /* 3G and 4G supported */ all = build_mode_all (MM_MODEM_MODE_3G | MM_MODEM_MODE_4G); - filtered = mm_filter_supported_modes (all, combinations); + filtered = mm_filter_supported_modes (all, combinations, NULL); g_assert_cmpuint (filtered->len, ==, 3); g_assert (find_mode_combination (filtered, MM_MODEM_MODE_3G, MM_MODEM_MODE_NONE)); g_assert (find_mode_combination (filtered, MM_MODEM_MODE_4G, MM_MODEM_MODE_NONE)); @@ -3424,7 +3512,7 @@ /* 2G, 3G and 4G supported */ all = build_mode_all (MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G); - filtered = mm_filter_supported_modes (all, combinations); + filtered = mm_filter_supported_modes (all, combinations, NULL); g_assert_cmpuint (filtered->len, ==, 6); g_assert (find_mode_combination (filtered, MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE)); g_assert (find_mode_combination (filtered, MM_MODEM_MODE_3G, MM_MODEM_MODE_NONE)); @@ -3439,98 +3527,6 @@ } /*****************************************************************************/ - -static gboolean -find_capability_combination (GArray *capabilities, - MMModemCapability capability) -{ - guint i; - - for (i = 0; i < capabilities->len; i++) { - MMModemCapability capability_i; - - capability_i = g_array_index (capabilities, MMModemCapability, i); - if (capability_i == capability) - return TRUE; - } - - return FALSE; -} - -static void -test_supported_capability_filter (void *f, gpointer d) -{ - MMModemCapability capability; - GArray *combinations; - GArray *filtered; - - combinations = g_array_sized_new (FALSE, FALSE, sizeof (MMModemCapability), 6); - - /* GSM/UMTS only */ - capability = MM_MODEM_CAPABILITY_GSM_UMTS; - g_array_append_val (combinations, capability); - /* CDMA/EVDO only */ - capability = MM_MODEM_CAPABILITY_CDMA_EVDO; - g_array_append_val (combinations, capability); - /* GSM/UMTS and CDMA/EVDO */ - capability = (MM_MODEM_CAPABILITY_CDMA_EVDO | MM_MODEM_CAPABILITY_GSM_UMTS); - g_array_append_val (combinations, capability); - /* GSM/UMTS+LTE */ - capability = (MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_LTE); - g_array_append_val (combinations, capability); - /* CDMA/EVDO+LTE */ - capability = (MM_MODEM_CAPABILITY_CDMA_EVDO | MM_MODEM_CAPABILITY_LTE); - g_array_append_val (combinations, capability); - /* GSM/UMTS+CDMA/EVDO+LTE */ - capability = (MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_CDMA_EVDO | MM_MODEM_CAPABILITY_LTE); - g_array_append_val (combinations, capability); - - /* Only GSM-UMTS supported */ - filtered = mm_filter_supported_capabilities (MM_MODEM_CAPABILITY_GSM_UMTS, combinations); - g_assert_cmpuint (filtered->len, ==, 1); - g_assert (find_capability_combination (filtered, MM_MODEM_CAPABILITY_GSM_UMTS)); - g_array_unref (filtered); - - /* Only CDMA-EVDO supported */ - filtered = mm_filter_supported_capabilities (MM_MODEM_CAPABILITY_CDMA_EVDO, combinations); - g_assert_cmpuint (filtered->len, ==, 1); - g_assert (find_capability_combination (filtered, MM_MODEM_CAPABILITY_CDMA_EVDO)); - g_array_unref (filtered); - - /* GSM-UMTS and CDMA-EVDO supported */ - filtered = mm_filter_supported_capabilities ((MM_MODEM_CAPABILITY_CDMA_EVDO | - MM_MODEM_CAPABILITY_GSM_UMTS), - combinations); - g_assert_cmpuint (filtered->len, ==, 3); - g_assert (find_capability_combination (filtered, MM_MODEM_CAPABILITY_CDMA_EVDO)); - g_assert (find_capability_combination (filtered, MM_MODEM_CAPABILITY_GSM_UMTS)); - g_assert (find_capability_combination (filtered, (MM_MODEM_CAPABILITY_GSM_UMTS | - MM_MODEM_CAPABILITY_CDMA_EVDO))); - g_array_unref (filtered); - - /* GSM-UMTS, CDMA-EVDO and LTE supported */ - filtered = mm_filter_supported_capabilities ((MM_MODEM_CAPABILITY_CDMA_EVDO | - MM_MODEM_CAPABILITY_GSM_UMTS | - MM_MODEM_CAPABILITY_LTE), - combinations); - g_assert_cmpuint (filtered->len, ==, 6); - g_assert (find_capability_combination (filtered, MM_MODEM_CAPABILITY_CDMA_EVDO)); - g_assert (find_capability_combination (filtered, MM_MODEM_CAPABILITY_GSM_UMTS)); - g_assert (find_capability_combination (filtered, (MM_MODEM_CAPABILITY_GSM_UMTS | - MM_MODEM_CAPABILITY_CDMA_EVDO))); - g_assert (find_capability_combination (filtered, (MM_MODEM_CAPABILITY_GSM_UMTS | - MM_MODEM_CAPABILITY_LTE))); - g_assert (find_capability_combination (filtered, (MM_MODEM_CAPABILITY_CDMA_EVDO | - MM_MODEM_CAPABILITY_LTE))); - g_assert (find_capability_combination (filtered, (MM_MODEM_CAPABILITY_GSM_UMTS | - MM_MODEM_CAPABILITY_CDMA_EVDO | - MM_MODEM_CAPABILITY_LTE))); - g_array_unref (filtered); - - g_array_unref (combinations); -} - -/*****************************************************************************/ /* Test +CCLK responses */ typedef struct { @@ -3538,7 +3534,7 @@ gboolean ret; gboolean test_iso8601; gboolean test_tz; - gchar *iso8601; + const gchar *iso8601; gint32 offset; } CclkTest; @@ -3637,7 +3633,7 @@ gboolean ret; guint sw1; guint sw2; - gchar *hex; + const gchar *hex; } CrsmTest; static const CrsmTest crsm_tests[] = { @@ -3966,6 +3962,7 @@ MMSignal *lte = NULL; success = mm_3gpp_cesq_response_to_signal_info (cesq_response_tests[i].str, + NULL, &gsm, &umts, <e, &error); g_assert_no_error (error); @@ -4028,9 +4025,9 @@ } typedef struct { - gchar *response; + const gchar *response; gint result; - gchar *error_message; + const gchar *error_message; } CSIMResponseTest; static CSIMResponseTest csim_response_test_list [] = { @@ -4188,7 +4185,7 @@ GError *error = NULL; gboolean result; - result = mm_3gpp_parse_ccwa_service_query_response (response, &status, &error); + result = mm_3gpp_parse_ccwa_service_query_response (response, NULL, &status, &error); if (expected_error) { g_assert (!result); @@ -4246,7 +4243,7 @@ GList *call_info_list = NULL; GList *l; - result = mm_3gpp_parse_clcc_response (str, &call_info_list, &error); + result = mm_3gpp_parse_clcc_response (str, NULL, &call_info_list, &error); g_assert_no_error (error); g_assert (result); @@ -4293,7 +4290,7 @@ test_clcc_response_single (void) { static const MMCallInfo expected_call_info_list[] = { - { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" } + { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, (gchar *) "123456789" } }; const gchar *response = @@ -4306,7 +4303,7 @@ test_clcc_response_single_long (void) { static const MMCallInfo expected_call_info_list[] = { - { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_RINGING_IN, "123456789" } + { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_RINGING_IN, (gchar *) "123456789" } }; /* NOTE: priority field is EMPTY */ @@ -4320,11 +4317,11 @@ test_clcc_response_multiple (void) { static const MMCallInfo expected_call_info_list[] = { - { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, NULL }, - { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "123456789" }, - { 3, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "987654321" }, - { 4, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, "000000000" }, - { 5, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_WAITING, "555555555" }, + { 1, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, NULL }, + { 2, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, (gchar *) "123456789" }, + { 3, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, (gchar *) "987654321" }, + { 4, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_ACTIVE, (gchar *) "000000000" }, + { 5, MM_CALL_DIRECTION_INCOMING, MM_CALL_STATE_WAITING, (gchar *) "555555555" }, }; const gchar *response = @@ -4344,7 +4341,7 @@ typedef struct { const gchar *raw; guint n_numbers; - gchar *numbers[MAX_EMERGENCY_NUMBERS]; + const gchar *numbers[MAX_EMERGENCY_NUMBERS]; } EmergencyNumbersTest; static const EmergencyNumbersTest emergency_numbers_tests[] = { @@ -4389,7 +4386,7 @@ /*****************************************************************************/ typedef struct { - gchar *str; + const gchar *str; gint expected_number_list[9]; } TestParseNumberList; @@ -4434,20 +4431,22 @@ typedef struct { const guint8 bcd[10]; gsize bcd_len; - const gchar *str; + const gchar *low_nybble_first_str; + const gchar *high_nybble_first_str; } BcdToStringTest; static const BcdToStringTest bcd_to_string_tests[] = { - { { }, 0, "" }, - { { 0x01 }, 1, "10" }, - { { 0x1F }, 1, "" }, - { { 0xE2 }, 1, "2" }, - { { 0xD3 }, 1, "3" }, - { { 0xC4 }, 1, "4" }, - { { 0xB1, 0x23 }, 2, "1" }, - { { 0x01, 0x23, 0x45, 0x67 }, 4, "10325476" }, - { { 0x01, 0x23, 0x45, 0xA7 }, 4, "1032547" }, - { { 0x01, 0x23, 0x45, 0x67 }, 2, "1032" }, + { { }, 0, "", "" }, + { { 0x01 }, 1, "10", "01" }, + { { 0x1F }, 1, "", "1" }, + { { 0xE2 }, 1, "2", "" }, + { { 0xD3 }, 1, "3", "" }, + { { 0xC4 }, 1, "4", "" }, + { { 0xB1, 0x23 }, 2, "1", "" }, + { { 0x01, 0x2A }, 2, "10", "012" }, + { { 0x01, 0x23, 0x45, 0x67 }, 4, "10325476", "01234567" }, + { { 0x01, 0x23, 0x45, 0xA7 }, 4, "1032547", "012345" }, + { { 0x01, 0x23, 0x45, 0x67 }, 2, "1032", "0123" }, }; static void @@ -4459,34 +4458,21 @@ gchar *str; str = mm_bcd_to_string (bcd_to_string_tests[i].bcd, - bcd_to_string_tests[i].bcd_len); - g_assert_cmpstr (str, ==, bcd_to_string_tests[i].str); + bcd_to_string_tests[i].bcd_len, + TRUE /* low_nybble_first */); + g_assert_cmpstr (str, ==, bcd_to_string_tests[i].low_nybble_first_str); + g_free (str); + + str = mm_bcd_to_string (bcd_to_string_tests[i].bcd, + bcd_to_string_tests[i].bcd_len, + FALSE /* low_nybble_first */); + g_assert_cmpstr (str, ==, bcd_to_string_tests[i].high_nybble_first_str); g_free (str); } } /*****************************************************************************/ -void -_mm_log (const char *loc, - const char *func, - guint32 level, - const char *fmt, - ...) -{ - va_list args; - gchar *msg; - - if (!g_test_verbose ()) - return; - - va_start (args, fmt); - msg = g_strdup_vprintf (fmt, args); - va_end (args); - g_print ("%s\n", msg); - g_free (msg); -} - #define TESTCASE(t, d) g_test_create_case (#t, 0, d, NULL, (GTestFixtureFunc) t, NULL) int main (int argc, char **argv) @@ -4549,6 +4535,7 @@ g_test_suite_add (suite, TESTCASE (test_cops_response_gobi, NULL)); g_test_suite_add (suite, TESTCASE (test_cops_response_sek600i, NULL)); g_test_suite_add (suite, TESTCASE (test_cops_response_samsung_z810, NULL)); + g_test_suite_add (suite, TESTCASE (test_cops_response_ublox_lara, NULL)); g_test_suite_add (suite, TESTCASE (test_cops_response_gsm_invalid, NULL)); g_test_suite_add (suite, TESTCASE (test_cops_response_umts_invalid, NULL)); @@ -4598,6 +4585,11 @@ g_test_suite_add (suite, TESTCASE (test_cereg2_novatel_lte_solicited, reg_data)); g_test_suite_add (suite, TESTCASE (test_cereg2_novatel_lte_unsolicited, reg_data)); + g_test_suite_add (suite, TESTCASE (test_c5greg1_solicited, reg_data)); + g_test_suite_add (suite, TESTCASE (test_c5greg1_unsolicited, reg_data)); + g_test_suite_add (suite, TESTCASE (test_c5greg2_solicited, reg_data)); + g_test_suite_add (suite, TESTCASE (test_c5greg2_unsolicited, reg_data)); + g_test_suite_add (suite, TESTCASE (test_creg_cgreg_multi_unsolicited, reg_data)); g_test_suite_add (suite, TESTCASE (test_creg_cgreg_multi2_unsolicited, reg_data)); @@ -4683,8 +4675,6 @@ g_test_suite_add (suite, TESTCASE (test_supported_mode_filter, NULL)); - g_test_suite_add (suite, TESTCASE (test_supported_capability_filter, NULL)); - g_test_suite_add (suite, TESTCASE (test_cclk_response, NULL)); g_test_suite_add (suite, TESTCASE (test_crsm_response, NULL)); diff -Nru modemmanager-1.12.8/src/tests/test-qcdm-serial-port.c modemmanager-1.16.6/src/tests/test-qcdm-serial-port.c --- modemmanager-1.12.8/src/tests/test-qcdm-serial-port.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/src/tests/test-qcdm-serial-port.c 2021-06-06 21:40:59.000000000 +0800 @@ -34,7 +34,7 @@ #include "libqcdm/src/utils.h" #include "libqcdm/src/com.h" #include "libqcdm/src/errors.h" -#include "mm-log.h" +#include "mm-log-test.h" typedef struct { int master; @@ -54,7 +54,7 @@ status = 0; ret = waitpid (d->child, &status, WNOHANG); g_get_current_time (&now); - if (d->child && (now.tv_sec - start.tv_sec > timeout)) { + if (d->child && (now.tv_sec - start.tv_sec > (glong)timeout)) { /* Kill it */ if (g_test_verbose ()) g_message ("Killing running child process %d", d->child); @@ -72,7 +72,7 @@ static void print_buf (const char *detail, const char *buf, gsize len) { - int i = 0; + guint i = 0; gboolean newline = FALSE; g_print ("%s (%zu) ", detail, len); @@ -116,7 +116,7 @@ struct timeval timeout = { 1, 0 }; char readbuf[1024]; ssize_t bytes_read; - int total = 0, retries = 0; + guint total = 0, retries = 0; gsize decap_len = 0; FD_ZERO (&in); @@ -437,26 +437,6 @@ } } -void -_mm_log (const char *loc, - const char *func, - guint32 level, - const char *fmt, - ...) -{ - va_list args; - gchar *msg; - - if (!g_test_verbose ()) - return; - - va_start (args, fmt); - msg = g_strdup_vprintf (fmt, args); - va_end (args); - g_print ("%s\n", msg); - g_free (msg); -} - typedef void (*TCFunc) (TestData *, gconstpointer); #define TESTCASE_PTY(s, t) g_test_add (s, TestData, NULL, (TCFunc)test_pty_create, (TCFunc)t, (TCFunc)test_pty_cleanup); diff -Nru modemmanager-1.12.8/src/tests/test-sms-part-3gpp.c modemmanager-1.16.6/src/tests/test-sms-part-3gpp.c --- modemmanager-1.12.8/src/tests/test-sms-part-3gpp.c 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/src/tests/test-sms-part-3gpp.c 2021-06-06 21:40:59.000000000 +0800 @@ -24,7 +24,7 @@ #include #include "mm-sms-part-3gpp.h" -#include "mm-log.h" +#include "mm-log-test.h" /********************* PDU PARSER TESTS *********************/ @@ -41,7 +41,7 @@ MMSmsPart *part; GError *error = NULL; - part = mm_sms_part_3gpp_new_from_pdu (0, hexpdu, &error); + part = mm_sms_part_3gpp_new_from_pdu (0, hexpdu, NULL, &error); g_assert_no_error (error); g_assert (part != NULL); @@ -339,7 +339,7 @@ }; hexpdu = mm_utils_bin2hexstr (pdu, sizeof (pdu)); - part = mm_sms_part_3gpp_new_from_pdu (0, hexpdu, &error); + part = mm_sms_part_3gpp_new_from_pdu (0, hexpdu, NULL, &error); g_assert (part == NULL); /* We don't care for the specific error type */ g_assert (error != NULL); @@ -531,7 +531,7 @@ MMSmsEncoding encoding = MM_SMS_ENCODING_UNKNOWN; /* Detect best encoding */ - out = mm_sms_part_3gpp_util_split_text (text, &encoding); + out = mm_sms_part_3gpp_util_split_text (text, &encoding, NULL); g_strfreev (out); mm_sms_part_set_text (part, text); mm_sms_part_set_encoding (part, encoding); @@ -544,6 +544,7 @@ pdu = mm_sms_part_3gpp_get_submit_pdu (part, &len, &msgstart, + NULL, &error); mm_sms_part_free (part); @@ -552,8 +553,7 @@ g_assert_no_error (error); g_assert (pdu != NULL); - g_assert_cmpuint (len, ==, expected_size); - g_assert_cmpint (memcmp (pdu, expected, len), ==, 0); + g_assert_cmpmem (pdu, len, expected, expected_size); g_assert_cmpint (msgstart, ==, expected_msgstart); g_free (pdu); @@ -719,7 +719,7 @@ MMSmsEncoding out_encoding = MM_SMS_ENCODING_UNKNOWN; guint i; - out = mm_sms_part_3gpp_util_split_text (text, &out_encoding); + out = mm_sms_part_3gpp_util_split_text (text, &out_encoding, NULL); g_assert (out != NULL); g_assert (out_encoding != MM_SMS_ENCODING_UNKNOWN); @@ -734,7 +734,7 @@ } static void -test_text_split_short (void) +test_text_split_short_gsm7 (void) { const gchar *text = "Hello"; const gchar *expected [] = { @@ -748,7 +748,7 @@ static void test_text_split_short_ucs2 (void) { - const gchar *text = "你好"; + const gchar *text = "你好"; /* (UTF-8) e4 bd a0 e5 a5 bd */ const gchar *expected [] = { "你好", NULL @@ -758,7 +758,19 @@ } static void -test_text_split_max_single_pdu (void) +test_text_split_short_utf16 (void) +{ + const gchar *text = "😉"; /* U+1F609, winking face */ + const gchar *expected [] = { + "😉", + NULL + }; + + common_test_text_split (text, expected, MM_SMS_ENCODING_UCS2); +} + +static void +test_text_split_max_single_pdu_gsm7 (void) { const gchar *text = "0123456789012345678901234567890123456789" @@ -797,7 +809,23 @@ } static void -test_text_split_two_pdu (void) +test_text_split_max_single_pdu_utf16 (void) +{ + /* NOTE: this string contains 35 Bhaiksuki characters, each of + * them requiring 4 bytes both in UTF-8 and in UTF-16 (140 bytes + * in total). */ + const gchar *text = + "𑰀𑰁𑰂𑰃𑰄𑰅𑰆𑰇𑰈𑰊𑰋𑰌𑰍𑰎𑰏𑰐𑰑𑰒𑰓𑰔𑰕𑰖𑰗𑰘𑰙𑰚𑰛𑰜𑰝𑰞𑰟𑰠𑰡𑰢𑰣"; + const gchar *expected [] = { + "𑰀𑰁𑰂𑰃𑰄𑰅𑰆𑰇𑰈𑰊𑰋𑰌𑰍𑰎𑰏𑰐𑰑𑰒𑰓𑰔𑰕𑰖𑰗𑰘𑰙𑰚𑰛𑰜𑰝𑰞𑰟𑰠𑰡𑰢𑰣", + NULL + }; + + common_test_text_split (text, expected, MM_SMS_ENCODING_UCS2); +} + +static void +test_text_split_two_pdu_gsm7 (void) { const gchar *text = "0123456789012345678901234567890123456789" @@ -838,28 +866,32 @@ common_test_text_split (text, expected, MM_SMS_ENCODING_UCS2); } -/************************************************************/ +static void +test_text_split_two_pdu_utf16 (void) +{ + /* NOTE: this string contains 35 Bhaiksuki characters, each of + * them requiring 4 bytes both in UTF-8 and in UTF-16 (140 bytes + * in total) plus one ASCII char (encoded with 1 byte in UTF-8 and + * 2 bytes in UTF-16), making it a total of 142 bytes when in + * UTF-16 (so not fitting in one single PDU) + * + * When split in chunks, the last chunk will hold 2 Bhaiksuki + * characters plus the last ASCII one (9 bytes in UTF-16) so that + * the first chunk contains the leading 33 Bhaiksuki characters + * (132 characters, less than 134) */ + const gchar *text = + "𑰀𑰁𑰂𑰃𑰄𑰅𑰆𑰇𑰈𑰊𑰋𑰌𑰍𑰎𑰏𑰐𑰑𑰒𑰓𑰔𑰕𑰖𑰗𑰘𑰙𑰚𑰛𑰜𑰝𑰞𑰟𑰠𑰡𑰢𑰣a"; + const gchar *expected [] = { + "𑰀𑰁𑰂𑰃𑰄𑰅𑰆𑰇𑰈𑰊𑰋𑰌𑰍𑰎𑰏𑰐𑰑𑰒𑰓𑰔𑰕𑰖𑰗𑰘𑰙𑰚𑰛𑰜𑰝𑰞𑰟𑰠𑰡", + "𑰢𑰣a", + NULL + }; -void -_mm_log (const char *loc, - const char *func, - guint32 level, - const char *fmt, - ...) -{ - va_list args; - gchar *msg; - - if (!g_test_verbose ()) - return; - - va_start (args, fmt); - msg = g_strdup_vprintf (fmt, args); - va_end (args); - g_print ("%s\n", msg); - g_free (msg); + common_test_text_split (text, expected, MM_SMS_ENCODING_UCS2); } +/************************************************************/ + int main (int argc, char **argv) { setlocale (LC_ALL, ""); @@ -893,12 +925,15 @@ g_test_add_func ("/MM/SMS/3GPP/PDU-Creator/GSM-3", test_create_pdu_gsm_3); g_test_add_func ("/MM/SMS/3GPP/PDU-Creator/GSM-no-validity", test_create_pdu_gsm_no_validity); - g_test_add_func ("/MM/SMS/3GPP/Text-Split/short", test_text_split_short); - g_test_add_func ("/MM/SMS/3GPP/Text-Split/short-UCS2", test_text_split_short_ucs2); - g_test_add_func ("/MM/SMS/3GPP/Text-Split/max-single-pdu", test_text_split_max_single_pdu); - g_test_add_func ("/MM/SMS/3GPP/Text-Split/max-single-pdu-UCS2", test_text_split_max_single_pdu_ucs2); - g_test_add_func ("/MM/SMS/3GPP/Text-Split/two-pdu", test_text_split_two_pdu); - g_test_add_func ("/MM/SMS/3GPP/Text-Split/two-pdu-UCS2", test_text_split_two_pdu_ucs2); + g_test_add_func ("/MM/SMS/3GPP/Text-Split/gsm7/short", test_text_split_short_gsm7); + g_test_add_func ("/MM/SMS/3GPP/Text-Split/ucs2/short", test_text_split_short_ucs2); + g_test_add_func ("/MM/SMS/3GPP/Text-Split/utf16/short", test_text_split_short_utf16); + g_test_add_func ("/MM/SMS/3GPP/Text-Split/gsm7/max-single-pdu", test_text_split_max_single_pdu_gsm7); + g_test_add_func ("/MM/SMS/3GPP/Text-Split/ucs2/max-single-pdu", test_text_split_max_single_pdu_ucs2); + g_test_add_func ("/MM/SMS/3GPP/Text-Split/utf16/max-single-pdu", test_text_split_max_single_pdu_utf16); + g_test_add_func ("/MM/SMS/3GPP/Text-Split/gsm7/two-pdu", test_text_split_two_pdu_gsm7); + g_test_add_func ("/MM/SMS/3GPP/Text-Split/ucs2/two-pdu", test_text_split_two_pdu_ucs2); + g_test_add_func ("/MM/SMS/3GPP/Text-Split/utf16/two-pdu", test_text_split_two_pdu_utf16); return g_test_run (); } diff -Nru modemmanager-1.12.8/src/tests/test-sms-part-cdma.c modemmanager-1.16.6/src/tests/test-sms-part-cdma.c --- modemmanager-1.12.8/src/tests/test-sms-part-cdma.c 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/src/tests/test-sms-part-cdma.c 2021-06-06 21:40:59.000000000 +0800 @@ -23,7 +23,7 @@ #include #include "mm-sms-part-cdma.h" -#include "mm-log.h" +#include "mm-log-test.h" /********************* PDU PARSER TESTS *********************/ @@ -38,8 +38,7 @@ MMSmsPart *part; GError *error = NULL; - mm_dbg (" "); - part = mm_sms_part_cdma_new_from_pdu (0, hexpdu, &error); + part = mm_sms_part_cdma_new_from_pdu (0, hexpdu, NULL, &error); g_assert_no_error (error); g_assert (part != NULL); @@ -88,8 +87,7 @@ MMSmsPart *part; GError *error = NULL; - mm_dbg (" "); - part = mm_sms_part_cdma_new_from_pdu (0, hexpdu, &error); + part = mm_sms_part_cdma_new_from_pdu (0, hexpdu, NULL, &error); g_assert (part == NULL); /* We don't care for the specific error type */ g_assert (error != NULL); @@ -396,7 +394,7 @@ mm_sms_part_take_data (part, data_bytearray); } - pdu = mm_sms_part_cdma_get_submit_pdu (part, &len, &error); + pdu = mm_sms_part_cdma_get_submit_pdu (part, &len, NULL, &error); mm_sms_part_free (part); if (g_test_verbose ()) @@ -502,28 +500,46 @@ expected, sizeof (expected)); } -/************************************************************/ +static void +test_create_parse_pdu_text_ascii_encoding (void) +{ +#define MAX_TEXT_LEN 100 + guint i; + gchar text[MAX_TEXT_LEN + 1]; + + memset (text, 0, sizeof (text)); + + for (i = 0; i < MAX_TEXT_LEN; i++) { + MMSmsPart *part; + guint8 *pdu; + guint len = 0; + GError *error = NULL; + + text[i]='A'; -void -_mm_log (const char *loc, - const char *func, - guint32 level, - const char *fmt, - ...) -{ - va_list args; - gchar *msg; - - if (!g_test_verbose ()) - return; - - va_start (args, fmt); - msg = g_strdup_vprintf (fmt, args); - va_end (args); - g_print ("%s\n", msg); - g_free (msg); + part = mm_sms_part_new (0, MM_SMS_PDU_TYPE_CDMA_SUBMIT); + mm_sms_part_set_cdma_teleservice_id (part, MM_SMS_CDMA_TELESERVICE_ID_WMT); + mm_sms_part_set_number (part, "123456789"); + mm_sms_part_set_text (part, text); + pdu = mm_sms_part_cdma_get_submit_pdu (part, &len, NULL, &error); + g_assert_no_error (error); + g_assert (pdu != NULL); + mm_sms_part_free (part); + + part = mm_sms_part_cdma_new_from_binary_pdu (0, pdu, len, NULL, &error); + g_assert_no_error (error); + g_assert (part != NULL); + g_assert_cmpuint (MM_SMS_CDMA_TELESERVICE_ID_WMT, ==, mm_sms_part_get_cdma_teleservice_id (part)); + g_assert_cmpstr ("123456789", ==, mm_sms_part_get_number (part)); + g_assert_cmpstr (text, ==, mm_sms_part_get_text (part)); + mm_sms_part_free (part); + + g_free (pdu); + } } +/************************************************************/ + int main (int argc, char **argv) { setlocale (LC_ALL, ""); @@ -542,5 +558,7 @@ g_test_add_func ("/MM/SMS/CDMA/PDU-Creator/latin-encoding", test_create_pdu_text_latin_encoding); g_test_add_func ("/MM/SMS/CDMA/PDU-Creator/unicode-encoding", test_create_pdu_text_unicode_encoding); + g_test_add_func ("/MM/SMS/CDMA/PDU-Creator-Parser/ascii-encoding", test_create_parse_pdu_text_ascii_encoding); + return g_test_run (); } diff -Nru modemmanager-1.12.8/src/tests/test-udev-rules.c modemmanager-1.16.6/src/tests/test-udev-rules.c --- modemmanager-1.12.8/src/tests/test-udev-rules.c 2020-01-04 05:54:19.000000000 +0800 +++ modemmanager-1.16.6/src/tests/test-udev-rules.c 2021-06-06 21:40:59.000000000 +0800 @@ -23,7 +23,7 @@ #include #include "mm-kernel-device-generic-rules.h" -#include "mm-log.h" +#include "mm-log-test.h" /************************************************************/ @@ -43,26 +43,6 @@ /************************************************************/ -void -_mm_log (const char *loc, - const char *func, - guint32 level, - const char *fmt, - ...) -{ - va_list args; - gchar *msg; - - if (!g_test_verbose ()) - return; - - va_start (args, fmt); - msg = g_strdup_vprintf (fmt, args); - va_end (args); - g_print ("%s\n", msg); - g_free (msg); -} - int main (int argc, char **argv) { setlocale (LC_ALL, ""); diff -Nru modemmanager-1.12.8/test/Makefile.am modemmanager-1.16.6/test/Makefile.am --- modemmanager-1.12.8/test/Makefile.am 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/test/Makefile.am 2021-06-06 21:40:59.000000000 +0800 @@ -2,6 +2,14 @@ noinst_PROGRAMS = EXTRA_DIST = +AM_CFLAGS = \ + $(WARN_CFLAGS) \ + $(NULL) + +AM_LDFLAGS = \ + $(WARN_LDFLAGS) \ + $(NULL) + ################################################################################ # lsudev ################################################################################ diff -Nru modemmanager-1.12.8/test/Makefile.in modemmanager-1.16.6/test/Makefile.in --- modemmanager-1.12.8/test/Makefile.in 2020-03-14 17:16:04.000000000 +0800 +++ modemmanager-1.16.6/test/Makefile.in 2021-06-06 21:43:43.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -98,14 +98,14 @@ subdir = test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -277,6 +277,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -350,9 +352,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -397,6 +403,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -410,6 +417,14 @@ # mmcli-test-sms ################################################################################ EXTRA_DIST = mmcli-test-sms +AM_CFLAGS = \ + $(WARN_CFLAGS) \ + $(NULL) + +AM_LDFLAGS = \ + $(WARN_LDFLAGS) \ + $(NULL) + @WITH_UDEV_TRUE@lsudev_SOURCES = lsudev.c @WITH_UDEV_TRUE@lsudev_CPPFLAGS = $(GUDEV_CFLAGS) @WITH_UDEV_TRUE@lsudev_LDADD = $(GUDEV_LIBS) diff -Nru modemmanager-1.12.8/test/lsudev.c modemmanager-1.16.6/test/lsudev.c --- modemmanager-1.12.8/test/lsudev.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/test/lsudev.c 2021-06-06 21:40:59.000000000 +0800 @@ -55,7 +55,7 @@ { va_list args; GString *output; - int i; + guint i; g_return_if_fail (fmt != NULL); @@ -175,4 +175,3 @@ return 0; } - diff -Nru modemmanager-1.12.8/test/mmrules.c modemmanager-1.16.6/test/mmrules.c --- modemmanager-1.12.8/test/mmrules.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/test/mmrules.c 2021-06-06 21:40:59.000000000 +0800 @@ -23,7 +23,7 @@ #include #include -#include +#include #include #define PROGRAM_NAME "mmrules" @@ -50,26 +50,6 @@ { NULL } }; -void -_mm_log (const char *loc, - const char *func, - guint32 level, - const char *fmt, - ...) -{ - va_list args; - gchar *msg; - - if (!verbose_flag) - return; - - va_start (args, fmt); - msg = g_strdup_vprintf (fmt, args); - va_end (args); - g_print ("%s\n", msg); - g_free (msg); -} - static void print_version_and_exit (void) { @@ -104,6 +84,7 @@ i, rule_match->parameter, rule_match->value); break; case MM_UDEV_RULE_MATCH_TYPE_UNKNOWN: + default: g_assert_not_reached (); } } @@ -123,6 +104,7 @@ break; case MM_UDEV_RULE_RESULT_TYPE_GOTO_TAG: case MM_UDEV_RULE_RESULT_TYPE_UNKNOWN: + default: g_assert_not_reached (); } } diff -Nru modemmanager-1.12.8/test/mmsmspdu.c modemmanager-1.16.6/test/mmsmspdu.c --- modemmanager-1.12.8/test/mmsmspdu.c 2020-03-14 16:34:43.000000000 +0800 +++ modemmanager-1.16.6/test/mmsmspdu.c 2021-06-06 21:40:59.000000000 +0800 @@ -26,7 +26,7 @@ #include #define _LIBMM_INSIDE_MM #include -#include "mm-log.h" +#include "mm-log-test.h" #include "mm-sms-part-3gpp.h" #define PROGRAM_NAME "mmsmspdu" @@ -93,6 +93,7 @@ case MM_SMS_ENCODING_8BIT: g_print ("encoding: 8BIT\n"); break; + case MM_SMS_ENCODING_UNKNOWN: default: g_print ("encoding: unknown (0x%x)\n", encoding); break; @@ -162,26 +163,6 @@ } } -void -_mm_log (const char *loc, - const char *func, - guint32 level, - const char *fmt, - ...) -{ - va_list args; - gchar *msg; - - if (!verbose_flag) - return; - - va_start (args, fmt); - msg = g_strdup_vprintf (fmt, args); - va_end (args); - g_print ("%s\n", msg); - g_free (msg); -} - static void print_version_and_exit (void) { @@ -218,7 +199,7 @@ exit (EXIT_FAILURE); } - part = mm_sms_part_3gpp_new_from_pdu (0, pdu, &error); + part = mm_sms_part_3gpp_new_from_pdu (0, pdu, NULL, &error); if (!part) { g_printerr ("error: couldn't parse PDU: %s\n", error->message); exit (EXIT_FAILURE); diff -Nru modemmanager-1.12.8/test/mmtty.c modemmanager-1.16.6/test/mmtty.c --- modemmanager-1.12.8/test/mmtty.c 2019-11-28 16:09:40.000000000 +0800 +++ modemmanager-1.16.6/test/mmtty.c 2021-06-06 21:40:59.000000000 +0800 @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include #include @@ -83,26 +83,6 @@ } } -void -_mm_log (const char *loc, - const char *func, - guint32 level, - const char *fmt, - ...) -{ - va_list args; - gchar *msg; - - if (!verbose_flag) - return; - - va_start (args, fmt); - msg = g_strdup_vprintf (fmt, args); - va_end (args); - g_print ("%s\n", msg); - g_free (msg); -} - static void print_version_and_exit (void) { diff -Nru modemmanager-1.12.8/tools/Makefile.am modemmanager-1.16.6/tools/Makefile.am --- modemmanager-1.12.8/tools/Makefile.am 1970-01-01 08:00:00.000000000 +0800 +++ modemmanager-1.16.6/tools/Makefile.am 2021-06-06 21:40:59.000000000 +0800 @@ -0,0 +1,3 @@ +SUBDIRS = . tests + +EXTRA_DIST = test-modemmanager-service.py diff -Nru modemmanager-1.12.8/tools/Makefile.in modemmanager-1.16.6/tools/Makefile.in --- modemmanager-1.12.8/tools/Makefile.in 1970-01-01 08:00:00.000000000 +0800 +++ modemmanager-1.16.6/tools/Makefile.in 2021-06-06 21:43:43.000000000 +0800 @@ -0,0 +1,711 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = tools +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir distdir-am +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_SYS_DIR = @DBUS_SYS_DIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCOV = @GCOV@ +GDBUS_CODEGEN = @GDBUS_CODEGEN@ +GENHTML = @GENHTML@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +GUDEV_CFLAGS = @GUDEV_CFLAGS@ +GUDEV_LIBS = @GUDEV_LIBS@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ +INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ +INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ +INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ +LIBMM_GLIB_LIBS = @LIBMM_GLIB_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSYSTEMD_CFLAGS = @LIBSYSTEMD_CFLAGS@ +LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@ +LIBSYSTEMD_LOGIN_CFLAGS = @LIBSYSTEMD_LOGIN_CFLAGS@ +LIBSYSTEMD_LOGIN_LIBS = @LIBSYSTEMD_LOGIN_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MBIM_CFLAGS = @MBIM_CFLAGS@ +MBIM_LIBS = @MBIM_LIBS@ +MKDIR_P = @MKDIR_P@ +MMCLI_CFLAGS = @MMCLI_CFLAGS@ +MMCLI_LIBS = @MMCLI_LIBS@ +MM_CFLAGS = @MM_CFLAGS@ +MM_DEFAULT_USER_POLICY = @MM_DEFAULT_USER_POLICY@ +MM_GLIB_LT_AGE = @MM_GLIB_LT_AGE@ +MM_GLIB_LT_CURRENT = @MM_GLIB_LT_CURRENT@ +MM_GLIB_LT_REVISION = @MM_GLIB_LT_REVISION@ +MM_LIBS = @MM_LIBS@ +MM_MAJOR_VERSION = @MM_MAJOR_VERSION@ +MM_MICRO_VERSION = @MM_MICRO_VERSION@ +MM_MINOR_VERSION = @MM_MINOR_VERSION@ +MM_POLKIT_SERVICE = @MM_POLKIT_SERVICE@ +MM_VERSION = @MM_VERSION@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POLKIT_CFLAGS = @POLKIT_CFLAGS@ +POLKIT_LIBS = @POLKIT_LIBS@ +POSUB = @POSUB@ +QMI_CFLAGS = @QMI_CFLAGS@ +QMI_LIBS = @QMI_LIBS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSTEMD_UNIT_DIR = @SYSTEMD_UNIT_DIR@ +UDEV_BASE_DIR = @UDEV_BASE_DIR@ +USE_NLS = @USE_NLS@ +VAPIGEN = @VAPIGEN@ +VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ +VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ +VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = . tests +EXTRA_DIST = test-modemmanager-service.py +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tools/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru modemmanager-1.12.8/tools/test-modemmanager-service.py modemmanager-1.16.6/tools/test-modemmanager-service.py --- modemmanager-1.12.8/tools/test-modemmanager-service.py 1970-01-01 08:00:00.000000000 +0800 +++ modemmanager-1.16.6/tools/test-modemmanager-service.py 2021-06-06 21:40:59.000000000 +0800 @@ -0,0 +1,490 @@ +#!/usr/bin/env python3 +# -*- Mode: python; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + +from __future__ import print_function + +import gi +gi.require_version('ModemManager', '1.0') +from gi.repository import GLib, ModemManager +import argparse +import sys +import dbus +import dbus.service +import dbus.mainloop.glib +import random +import collections + +mainloop = GLib.MainLoop() + +######################################################### +IFACE_DBUS = 'org.freedesktop.DBus' + +class UnknownInterfaceException(dbus.DBusException): + def __init__(self, *args, **kwargs): + self._dbus_error_name = '{}.UnknownInterface'.format(IFACE_DBUS) + super().__init__(*args, **kwargs) + +class UnknownPropertyException(dbus.DBusException): + def __init__(self, *args, **kwargs): + self._dbus_error_name = '{}.UnknownProperty'.format(IFACE_DBUS) + super().__init__(*args, **kwargs) + +class MobileEquipmentException(dbus.DBusException): + _dbus_error_name = '{}.Error.MobileEquipment'.format(IFACE_DBUS) + def __init__(self, *args, **kwargs): + equipment_error_num = kwargs.pop('equipment_error', None) + if equipment_error_num is not None: + equipment_error_except = ModemManager.MobileEquipmentError(equipment_error_num) + self._dbus_error_name = '{}.Error.MobileEquipment.{}'.format(IFACE_DBUS, equipment_error_except.value_nick) + super().__init__(*args, **kwargs) + +def log(msg): + if log_file: + try: + log_file.write(msg + "\n") + log_file.flush() + except Exception: + pass + else: + print(msg) + +def to_path_array(src): + array = dbus.Array([], signature=dbus.Signature('o')) + for o in src: + array.append(to_path(o)) + return array + +def to_path(src): + if src: + return dbus.ObjectPath(src.path) + return dbus.ObjectPath("/") + +class ExportedObj(dbus.service.Object): + + DBusInterface = collections.namedtuple('DBusInterface', ['dbus_iface', 'get_props_func', 'set_props_func', 'prop_changed_func']) + + def __init__(self, bus, object_path): + super(ExportedObj, self).__init__(bus, object_path) + self._bus = bus + self.path = object_path + self.__ensure_dbus_ifaces() + log("Will add object with path '%s' to object manager" % object_path) + object_manager.add_object(self) + + def __ensure_dbus_ifaces(self): + if not hasattr(self, '_ExportedObj__dbus_ifaces'): + self.__dbus_ifaces = {} + + def add_dbus_interface(self, dbus_iface, get_props_func, set_props_func, prop_changed_func): + self.__ensure_dbus_ifaces() + self.__dbus_ifaces[dbus_iface] = ExportedObj.DBusInterface(dbus_iface, get_props_func, set_props_func, prop_changed_func) + + def __dbus_interface_get(self, dbus_iface): + if dbus_iface not in self.__dbus_ifaces: + raise UnknownInterfaceException() + return self.__dbus_ifaces[dbus_iface] + + def _dbus_property_get(self, dbus_iface, propname=None): + props = self.__dbus_interface_get(dbus_iface).get_props_func() + if propname is None: + return props + if propname not in props: + raise UnknownPropertyException() + return props[propname] + + def _dbus_property_set(self, dbus_iface, propname, value): + props = self.__dbus_interface_get(dbus_iface).get_props_func() + + try: + if props[propname] == value: + return + except KeyError: + raise UnknownPropertyException() + + if self.__dbus_interface_get(dbus_iface).set_props_func is not None: + self.__dbus_interface_get(dbus_iface).set_props_func(propname, value) + self._dbus_property_notify(dbus_iface, propname) + + def _dbus_property_notify(self, dbus_iface, propname): + prop = self._dbus_property_get(dbus_iface, propname) + self.__dbus_interface_get(dbus_iface).prop_changed_func(self, {propname: prop}) + ExportedObj.PropertiesChanged(self, dbus_iface, {propname: prop}, []) + + @dbus.service.signal(dbus.PROPERTIES_IFACE, signature='sa{sv}as') + def PropertiesChanged(self, iface, changed, invalidated): + pass + + @dbus.service.method(dbus_interface=dbus.PROPERTIES_IFACE, in_signature='s', out_signature='a{sv}') + def GetAll(self, dbus_iface): + return self._dbus_property_get(dbus_iface) + + @dbus.service.method(dbus_interface=dbus.PROPERTIES_IFACE, in_signature='ss', out_signature='v') + def Get(self, dbus_iface, name): + return self._dbus_property_get(dbus_iface, name) + + @dbus.service.method(dbus_interface=dbus.PROPERTIES_IFACE, in_signature='ssv', out_signature='') + def Set(self, dbus_iface, name, value): + return self._dbus_property_set(dbus_iface, name, value) + + def get_managed_ifaces(self): + my_ifaces = {} + for iface in self.__dbus_ifaces: + my_ifaces[iface] = self.__dbus_ifaces[iface].get_props_func() + return self.path, my_ifaces + + +################################################################### +IFACE_SIM = 'org.freedesktop.ModemManager1.Sim' + +PS_IMSI = "Imsi" +PS_OPERATOR_IDENTIFIER = "OperatorIdentifier" +PS_OPERATOR_NAME = "OperatorName" +PS_SIM_IDENTIFIER = "SimIdentifier" + +class Sim(ExportedObj): + def __init__(self, bus, counter, iccid, modem): + object_path = "/org/freedesktop/ModemManager1/SIM/%d" % counter + self.iccid = iccid + self.modem = modem + + self.add_dbus_interface(IFACE_SIM, self.__get_props, None, Sim.PropertiesChanged) + super(Sim, self).__init__(bus, object_path) + + # Properties interface + def __get_props(self): + props = {} + props[PS_IMSI] = "Imsi_1" + props[PS_OPERATOR_IDENTIFIER] = "OperatorIdentifier_1" + props[PS_OPERATOR_NAME] = "OperatorName_1" + props[PS_SIM_IDENTIFIER] = self.iccid + return props + + # methods + @dbus.service.method(dbus_interface=IFACE_SIM, in_signature='ss', out_signature='') + def ChangePin(self, old_pin, new_pin): + pass + + @dbus.service.method(dbus_interface=IFACE_SIM, in_signature='sb', out_signature='ao') + def EnablePin(self, pin, enabled): + pass + + @dbus.service.method(dbus_interface=IFACE_SIM, in_signature='s', out_signature='') + def SendPin(self, pin): + if self.modem.equipmentError is not None: + raise MobileEquipmentException(equipment_error=self.modem.equipmentError) + self.modem.unlock() + + @dbus.service.method(dbus_interface=IFACE_SIM, in_signature='ss', out_signature='') + def SendPuk(self, puk, pin): + self.modem.unlock() + + # signals + @dbus.service.signal(IFACE_SIM, signature='a{sv}') + def PropertiesChanged(self, changed): + pass + + +################################################################### +IFACE_MODEM = 'org.freedesktop.ModemManager1.Modem' + +PM_SIM = "Sim" +PM_BEARERS = "Bearers" +PM_SUPPORTED_CAPABILITIES = "SupportedCapabilities" +PM_CURRENT_CAPABILITIES = "CurrentCapabilities" +PM_MAX_BEARERS = "MaxBearers" +PM_MAX_ACTIVE_BEARERS = "MaxActiveBearers" +PM_MANUFACTURER = "Manufacturer" +PM_MODEL = "Model" +PM_REVISION = "Revision" +PM_DEVICE_IDENTIFIER = "DeviceIdentifier" +PM_DEVICE = "Device" +PM_DRIVERS = "Drivers" +PM_PLUGIN = "Plugin" +PM_PRIMARY_PORT = "PrimaryPort" +PM_PORTS = "Ports" +PM_EQUIPMENT_IDENTIFIER = "EquipmentIdentifier" +PM_UNLOCK_REQUIRED = "UnlockRequired" +PM_UNLOCK_RETRIES = "UnlockRetries" +PM_STATE = "State" +PM_STATE_FAILED_REASON = "StateFailedReason" +PM_ACCESS_TECHNOLOGIES = "AccessTechnologies" +PM_SIGNAL_QUALITY = "SignalQuality" +PM_OWN_NUMBERS = "OwnNumbers" +PM_POWER_STATE = "PowerState" +PM_SUPPORTED_MODES = "SupportedModes" +PM_CURRENT_MODES = "CurrentModes" +PM_SUPPORTED_BANDS = "SupportedBands" +PM_CURRENT_BANDS = "CurrentBands" +PM_SUPPORTED_IP_FAMILIES = "SupportedIpFamilies" + +class Modem(ExportedObj): + counter = 0 + + def __init__(self, bus, add_sim, iccid): + object_path = "/org/freedesktop/ModemManager1/Modem/%d" % Modem.counter + self.sim_object = None + if add_sim: + self.sim_object = Sim(bus, Modem.counter, iccid, self) + self.sim_path = to_path(self.sim_object) + self.equipmentError = None + self.reset_status = True + self.reset_status_clear = False + + self.__props = self.__init_default_props() + + Modem.counter = Modem.counter + 1 + + self.add_dbus_interface(IFACE_MODEM, self.__get_props, self.__set_prop, Modem.PropertiesChanged) + super(Modem, self).__init__(bus, object_path) + + # Properties interface + def __init_default_props(self): + props = {} + props[PM_SIM] = dbus.ObjectPath(self.sim_path) + props[PM_DEVICE] = dbus.String("/fake/path") + props[PM_UNLOCK_REQUIRED] = dbus.UInt32(ModemManager.ModemLock.NONE) + props[PM_STATE] = dbus.Int32(ModemManager.ModemState.UNKNOWN) + props[PM_STATE_FAILED_REASON] = dbus.UInt32(ModemManager.ModemStateFailedReason.UNKNOWN) + # Not already used properties + #props[PM_BEARERS] = None + #props[PM_SUPPORTED_CAPABILITIES] = None + #props[PM_CURRENT_CAPABILITIES] = None + #props[PM_MAX_BEARERS] = None + #props[PM_MAX_ACTIVE_BEARERS] = None + #props[PM_MANUFACTURER] = None + #props[PM_MODEL] = None + #props[PM_REVISION] = None + #props[PM_DEVICE_IDENTIFIER] = None + #props[PM_DRIVERS] = None + #props[PM_PLUGIN] = None + #props[PM_PRIMARY_PORT] = None + #props[PM_PORTS] = None + #props[PM_EQUIPMENT_IDENTIFIER] = None + #props[PM_UNLOCK_RETRIES] = dbus.UInt32(0) + #props[PM_ACCESS_TECHNOLOGIES] = None + #props[PM_SIGNAL_QUALITY] = None + #props[PM_OWN_NUMBERS] = None + #props[PM_POWER_STATE] = None + #props[PM_SUPPORTED_MODES] = None + #props[PM_CURRENT_MODES] = None + #props[PM_SUPPORTED_BANDS] = None + #props[PM_CURRENT_BANDS] = None + #props[PM_SUPPORTED_IP_FAMILIES] = None + return props + + def __get_props(self): + return self.__props + + def __set_prop(self, name, value): + try: + self.__props[name] = value + except KeyError: + pass + + def unlock(self): + self._dbus_property_set(IFACE_MODEM, PM_UNLOCK_REQUIRED , dbus.UInt32(ModemManager.ModemLock.NONE)) + + # methods + @dbus.service.method(dbus_interface=IFACE_MODEM, in_signature='b', out_signature='') + def Enable(self, enable): + pass + + @dbus.service.method(dbus_interface=IFACE_MODEM, in_signature='', out_signature='ao') + def ListBearers(self): + return None + + @dbus.service.method(dbus_interface=IFACE_MODEM, in_signature='a{sv}', out_signature='o') + def CreateBearer(self, properties): + return None + + @dbus.service.method(dbus_interface=IFACE_MODEM, in_signature='o', out_signature='') + def DeleteBearer(self, bearer): + pass + + @dbus.service.method(dbus_interface=IFACE_MODEM, in_signature='', out_signature='') + def Reset(self): + if not self.reset_status: + if self.reset_status_clear: + self.reset_status = True + self.reset_status_clear = False + + raise Exception("Fake reset exception") + + @dbus.service.method(dbus_interface=IFACE_MODEM, in_signature='s', out_signature='') + def FactoryReset(self, code): + pass + + @dbus.service.method(dbus_interface=IFACE_MODEM, in_signature='u', out_signature='') + def SetPowerState(self, state): + pass + + @dbus.service.method(dbus_interface=IFACE_MODEM, in_signature='u', out_signature='') + def SetCurrentCapabilities(self, capabilites): + pass + + @dbus.service.method(dbus_interface=IFACE_MODEM, in_signature='(uu)', out_signature='') + def SetCurrentModes(self, modes): + pass + + @dbus.service.method(dbus_interface=IFACE_MODEM, in_signature='au', out_signature='') + def SetCurrentBands(self, bands): + pass + + @dbus.service.method(dbus_interface=IFACE_MODEM, in_signature='su', out_signature='s') + def Command(self, cmd, timeout): + return None + + # signals + @dbus.service.signal(IFACE_MODEM, signature='a{sv}') + def PropertiesChanged(self, changed): + pass + + @dbus.service.signal(IFACE_MODEM, signature='uuu') + def StateChanged(self, old_state, new_state, reason): + pass + + +################################################################### +IFACE_OBJECT_MANAGER = 'org.freedesktop.DBus.ObjectManager' + +PATH_OBJECT_MANAGER = '/org/freedesktop/ModemManager1' + +IFACE_TEST = 'org.freedesktop.ModemManager1.LibmmGlibTest' +IFACE_MM = 'org.freedesktop.ModemManager1' + +class ObjectManager(dbus.service.Object): + def __init__(self, bus, object_path): + super(ObjectManager, self).__init__(bus, object_path) + self.objs = [] + self.bus = bus + self.modem = None + + @dbus.service.method(dbus_interface=IFACE_OBJECT_MANAGER, + in_signature='', out_signature='a{oa{sa{sv}}}', + sender_keyword='sender') + def GetManagedObjects(self, sender=None): + managed_objects = {} + for obj in self.objs: + name, ifaces = obj.get_managed_ifaces() + managed_objects[name] = ifaces + return managed_objects + + def add_object(self, obj): + self.objs.append(obj) + name, ifaces = obj.get_managed_ifaces() + self.InterfacesAdded(name, ifaces) + + def remove_object(self, obj): + self.objs.remove(obj) + name, ifaces = obj.get_managed_ifaces() + self.InterfacesRemoved(name, ifaces.keys()) + + @dbus.service.signal(IFACE_OBJECT_MANAGER, signature='oa{sa{sv}}') + def InterfacesAdded(self, name, ifaces): + pass + + @dbus.service.signal(IFACE_OBJECT_MANAGER, signature='oas') + def InterfacesRemoved(self, name, ifaces): + pass + + # ModemManager methods + @dbus.service.method(dbus_interface=IFACE_MM, in_signature='', out_signature='') + def ScanDevices(self): + pass + + @dbus.service.method(dbus_interface=IFACE_MM, in_signature='s', out_signature='') + def SetLogging(self, logging): + pass + + # Testing methods + @dbus.service.method(IFACE_TEST, in_signature='', out_signature='') + def Quit(self): + mainloop.quit() + + @dbus.service.method(IFACE_TEST, in_signature='bs', out_signature='o') + def AddModem(self, add_sim, iccid): + self.modem = Modem(self.bus, add_sim, iccid) + return dbus.ObjectPath(self.modem.path) + + @dbus.service.method(IFACE_TEST, in_signature='uuu', out_signature='') + def EmitStateChanged(self, old_state, new_state, reason): + if self.modem is not None: + self.modem.StateChanged(old_state, new_state, reason) + + @dbus.service.method(IFACE_TEST, in_signature='ub', out_signature='') + def SetMobileEquipmentError(self, error, clear): + if self.modem is not None: + if clear: + self.modem.equipmentError = None + else: + self.modem.equipmentError = error + + @dbus.service.method(IFACE_TEST, in_signature='bb', out_signature='') + def SetResetStatus(self, status, clear): + if self.modem is not None: + self.modem.reset_status = status + self.modem.reset_status_clear = clear + + @dbus.service.method(dbus_interface=IFACE_TEST, in_signature='', out_signature='') + def Restart(self): + bus.release_name("org.freedesktop.ModemManager1") + bus.request_name("org.freedesktop.ModemManager1") + +################################################################### +def stdin_cb(io, condition): + mainloop.quit() + +def quit_cb(user_data): + mainloop.quit() + +def main(): + parser = argparse.ArgumentParser(description="ModemManager dbus interface stub utility") + parser.add_argument("-f", "--log-file", help="Path of a file to log things into") + + cfg = parser.parse_args() + + global log_file + + if cfg.log_file: + try: + log_file = open(cfg.log_file, "w") + except Exception: + log_file = None + else: + log_file = None + + log("Starting mainloop") + dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) + + random.seed() + + global object_manager, bus + + bus = dbus.SessionBus() + log("Creating object manager for /org/freedesktop/ModemManager1") + object_manager = ObjectManager(bus, "/org/freedesktop/ModemManager1") + + log("Requesting name org.freedesktop.ModemManager1") + if not bus.request_name("org.freedesktop.ModemManager1"): + log("Unable to acquire the DBus name") + sys.exit(1) + + # Watch stdin; if it closes, assume our parent has crashed, and exit + id1 = GLib.io_add_watch(0, GLib.IOCondition.HUP, stdin_cb) + + log("Starting the main loop") + try: + mainloop.run() + except (Exception, KeyboardInterrupt): + pass + + GLib.source_remove(id1) + + log("Ending the stub") + if log_file: + log_file.close() + sys.exit(0) + + +if __name__ == '__main__': + main() diff -Nru modemmanager-1.12.8/tools/tests/Makefile.am modemmanager-1.16.6/tools/tests/Makefile.am --- modemmanager-1.12.8/tools/tests/Makefile.am 1970-01-01 08:00:00.000000000 +0800 +++ modemmanager-1.16.6/tools/tests/Makefile.am 2021-06-06 21:40:59.000000000 +0800 @@ -0,0 +1,49 @@ +include $(top_srcdir)/gtester.make + +################################################################################ +# common +################################################################################ + +AM_CFLAGS = \ + $(WARN_CFLAGS) \ + $(MM_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/libmm-glib \ + -I${top_srcdir}/libmm-glib/generated \ + -I${top_builddir}/libmm-glib/generated \ + $(NULL) + +LDADD = \ + $(top_builddir)/libmm-glib/libmm-glib.la \ + $(NULL) + +AM_LDFLAGS = \ + $(WARN_LDFLAGS) \ + $(MM_LIBS) \ + $(MM_LDFLAGS) \ + $(NULL) + +noinst_PROGRAMS = test-stub +test_stub_CPPFLAGS = \ + -DTEST_SERVICES=\""$(abs_top_builddir)/tools/tests/services"\" \ + $(NULL) + +# only run the test if introspection was enabled +if HAVE_INTROSPECTION +TEST_PROGS += $(noinst_PROGRAMS) +endif + +test-wrapper.sh: test-wrapper.sh.in + @sed \ + -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \ + -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \ + $< >$@ + @chmod +x $@ + +BUILT_SOURCES = test-wrapper.sh +CLEANFILES = test-wrapper.sh + +EXTRA_DIST += test-wrapper.sh.in services/org.freedesktop.ModemManager1.service.in diff -Nru modemmanager-1.12.8/tools/tests/Makefile.in modemmanager-1.16.6/tools/tests/Makefile.in --- modemmanager-1.12.8/tools/tests/Makefile.in 1970-01-01 08:00:00.000000000 +0800 +++ modemmanager-1.16.6/tools/tests/Makefile.in 2021-06-06 21:43:43.000000000 +0800 @@ -0,0 +1,823 @@ +# Makefile.in generated by automake 1.16.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2020 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = test-stub$(EXEEXT) + +# only run the test if introspection was enabled +@HAVE_INTROSPECTION_TRUE@am__append_1 = $(noinst_PROGRAMS) +subdir = tools/tests +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ + $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ + $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ + $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +PROGRAMS = $(noinst_PROGRAMS) +test_stub_SOURCES = test-stub.c +test_stub_OBJECTS = test_stub-test-stub.$(OBJEXT) +test_stub_LDADD = $(LDADD) +test_stub_DEPENDENCIES = $(top_builddir)/libmm-glib/libmm-glib.la +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__maybe_remake_depfiles = depfiles +am__depfiles_remade = ./$(DEPDIR)/test_stub-test-stub.Po +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = test-stub.c +DIST_SOURCES = test-stub.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ + $(top_srcdir)/gtester.make +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CODE_COVERAGE_CFLAGS = @CODE_COVERAGE_CFLAGS@ +CODE_COVERAGE_ENABLED = @CODE_COVERAGE_ENABLED@ +CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DBUS_SYS_DIR = @DBUS_SYS_DIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GCOV = @GCOV@ +GDBUS_CODEGEN = @GDBUS_CODEGEN@ +GENHTML = @GENHTML@ +GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@ +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ +GLIB_MKENUMS = @GLIB_MKENUMS@ +GMSGFMT = @GMSGFMT@ +GMSGFMT_015 = @GMSGFMT_015@ +GREP = @GREP@ +GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ +GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ +GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ +GTKDOC_MKPDF = @GTKDOC_MKPDF@ +GTKDOC_REBASE = @GTKDOC_REBASE@ +GUDEV_CFLAGS = @GUDEV_CFLAGS@ +GUDEV_LIBS = @GUDEV_LIBS@ +HTML_DIR = @HTML_DIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INTLLIBS = @INTLLIBS@ +INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ +INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ +INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ +INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ +INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ +INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ +INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ +INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ +INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ +LCOV = @LCOV@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ +LIBICONV = @LIBICONV@ +LIBINTL = @LIBINTL@ +LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ +LIBMM_GLIB_LIBS = @LIBMM_GLIB_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBSYSTEMD_CFLAGS = @LIBSYSTEMD_CFLAGS@ +LIBSYSTEMD_LIBS = @LIBSYSTEMD_LIBS@ +LIBSYSTEMD_LOGIN_CFLAGS = @LIBSYSTEMD_LOGIN_CFLAGS@ +LIBSYSTEMD_LOGIN_LIBS = @LIBSYSTEMD_LOGIN_LIBS@ +LIBTOOL = @LIBTOOL@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBICONV = @LTLIBICONV@ +LTLIBINTL = @LTLIBINTL@ +LTLIBOBJS = @LTLIBOBJS@ +LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MBIM_CFLAGS = @MBIM_CFLAGS@ +MBIM_LIBS = @MBIM_LIBS@ +MKDIR_P = @MKDIR_P@ +MMCLI_CFLAGS = @MMCLI_CFLAGS@ +MMCLI_LIBS = @MMCLI_LIBS@ +MM_CFLAGS = @MM_CFLAGS@ +MM_DEFAULT_USER_POLICY = @MM_DEFAULT_USER_POLICY@ +MM_GLIB_LT_AGE = @MM_GLIB_LT_AGE@ +MM_GLIB_LT_CURRENT = @MM_GLIB_LT_CURRENT@ +MM_GLIB_LT_REVISION = @MM_GLIB_LT_REVISION@ +MM_LIBS = @MM_LIBS@ +MM_MAJOR_VERSION = @MM_MAJOR_VERSION@ +MM_MICRO_VERSION = @MM_MICRO_VERSION@ +MM_MINOR_VERSION = @MM_MINOR_VERSION@ +MM_POLKIT_SERVICE = @MM_POLKIT_SERVICE@ +MM_VERSION = @MM_VERSION@ +MSGFMT = @MSGFMT@ +MSGFMT_015 = @MSGFMT_015@ +MSGMERGE = @MSGMERGE@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +POLKIT_CFLAGS = @POLKIT_CFLAGS@ +POLKIT_LIBS = @POLKIT_LIBS@ +POSUB = @POSUB@ +QMI_CFLAGS = @QMI_CFLAGS@ +QMI_LIBS = @QMI_LIBS@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +SYSTEMD_UNIT_DIR = @SYSTEMD_UNIT_DIR@ +UDEV_BASE_DIR = @UDEV_BASE_DIR@ +USE_NLS = @USE_NLS@ +VAPIGEN = @VAPIGEN@ +VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ +VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ +VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ +XGETTEXT = @XGETTEXT@ +XGETTEXT_015 = @XGETTEXT_015@ +XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +runstatedir = @runstatedir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +GTESTER = gtester +GTESTER_REPORT = gtester-report + +# initialize variables for unconditional += appending +EXTRA_DIST = test-wrapper.sh.in \ + services/org.freedesktop.ModemManager1.service.in +TEST_PROGS = $(am__append_1) + +################################################################################ +# common +################################################################################ +AM_CFLAGS = \ + $(WARN_CFLAGS) \ + $(MM_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/libmm-glib \ + -I${top_srcdir}/libmm-glib/generated \ + -I${top_builddir}/libmm-glib/generated \ + $(NULL) + +LDADD = \ + $(top_builddir)/libmm-glib/libmm-glib.la \ + $(NULL) + +AM_LDFLAGS = \ + $(WARN_LDFLAGS) \ + $(MM_LIBS) \ + $(MM_LDFLAGS) \ + $(NULL) + +test_stub_CPPFLAGS = \ + -DTEST_SERVICES=\""$(abs_top_builddir)/tools/tests/services"\" \ + $(NULL) + +BUILT_SOURCES = test-wrapper.sh +CLEANFILES = test-wrapper.sh +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/gtester.make $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/tests/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu tools/tests/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ + esac; +$(top_srcdir)/gtester.make $(am__empty): + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ + echo " rm -f" $$list; \ + rm -f $$list || exit $$?; \ + test -n "$(EXEEXT)" || exit 0; \ + list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f" $$list; \ + rm -f $$list + +test-stub$(EXEEXT): $(test_stub_OBJECTS) $(test_stub_DEPENDENCIES) $(EXTRA_test_stub_DEPENDENCIES) + @rm -f test-stub$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_stub_OBJECTS) $(test_stub_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_stub-test-stub.Po@am__quote@ # am--include-marker + +$(am__depfiles_remade): + @$(MKDIR_P) $(@D) + @echo '# dummy' >$@-t && $(am__mv) $@-t $@ + +am--depfiles: $(am__depfiles_remade) + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ +@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< + +test_stub-test-stub.o: test-stub.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_stub_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_stub-test-stub.o -MD -MP -MF $(DEPDIR)/test_stub-test-stub.Tpo -c -o test_stub-test-stub.o `test -f 'test-stub.c' || echo '$(srcdir)/'`test-stub.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_stub-test-stub.Tpo $(DEPDIR)/test_stub-test-stub.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-stub.c' object='test_stub-test-stub.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_stub_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_stub-test-stub.o `test -f 'test-stub.c' || echo '$(srcdir)/'`test-stub.c + +test_stub-test-stub.obj: test-stub.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_stub_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT test_stub-test-stub.obj -MD -MP -MF $(DEPDIR)/test_stub-test-stub.Tpo -c -o test_stub-test-stub.obj `if test -f 'test-stub.c'; then $(CYGPATH_W) 'test-stub.c'; else $(CYGPATH_W) '$(srcdir)/test-stub.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/test_stub-test-stub.Tpo $(DEPDIR)/test_stub-test-stub.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test-stub.c' object='test_stub-test-stub.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(test_stub_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o test_stub-test-stub.obj `if test -f 'test-stub.c'; then $(CYGPATH_W) 'test-stub.c'; else $(CYGPATH_W) '$(srcdir)/test-stub.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) distdir-am + +distdir-am: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-local +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am +install-exec: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ + mostlyclean-am + +distclean: distclean-am + -rm -f ./$(DEPDIR)/test_stub-test-stub.Po + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f ./$(DEPDIR)/test_stub-test-stub.Po + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: all check check-am install install-am install-exec \ + install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am \ + check-local clean clean-generic clean-libtool \ + clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +### testing rules + +# test: run all tests in cwd and subdirs +test: test-nonrecursive + @ for subdir in $(SUBDIRS) . ; do \ + test "$$subdir" = "." -o "$$subdir" = "po" || \ + ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \ + done + +# test-nonrecursive: run tests only in cwd +test-nonrecursive: ${TEST_PROGS} + @test -z "${TEST_PROGS}" || G_DEBUG=gc-friendly MALLOC_CHECK_=2 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256)) ${GTESTER} --verbose ${TEST_PROGS} + +# test-report: run tests in subdirs and generate report +# perf-report: run tests in subdirs with -m perf and generate report +# full-report: like test-report: with -m perf and -m slow +test-report perf-report full-report: ${TEST_PROGS} + @test -z "${TEST_PROGS}" || { \ + case $@ in \ + test-report) test_options="-k";; \ + perf-report) test_options="-k -m=perf";; \ + full-report) test_options="-k -m=perf -m=slow";; \ + esac ; \ + if test -z "$$GTESTER_LOGDIR" ; then \ + ${GTESTER} --verbose $$test_options -o test-report.xml ${TEST_PROGS} ; \ + elif test -n "${TEST_PROGS}" ; then \ + ${GTESTER} --verbose $$test_options -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ${TEST_PROGS} ; \ + fi ; \ + } + @ ignore_logdir=true ; \ + if test -z "$$GTESTER_LOGDIR" ; then \ + GTESTER_LOGDIR=`mktemp -d "\`pwd\`/.testlogs-XXXXXX"`; export GTESTER_LOGDIR ; \ + ignore_logdir=false ; \ + fi ; \ + if test -d "$(top_srcdir)/.git" ; then \ + REVISION=`git describe` ; \ + else \ + REVISION=$(VERSION) ; \ + fi ; \ + for subdir in $(SUBDIRS) . ; do \ + test "$$subdir" = "." -o "$$subdir" = "po" || \ + ( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \ + done ; \ + $$ignore_logdir || { \ + echo '' > $@.xml ; \ + echo '' >> $@.xml ; \ + echo '' >> $@.xml ; \ + echo ' $(PACKAGE)' >> $@.xml ; \ + echo ' $(VERSION)' >> $@.xml ; \ + echo " $$REVISION" >> $@.xml ; \ + echo '' >> $@.xml ; \ + for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \ + sed '1,1s/^?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \ + done ; \ + echo >> $@.xml ; \ + echo '' >> $@.xml ; \ + rm -rf "$$GTESTER_LOGDIR"/ ; \ + ${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \ + } +.PHONY: test test-report perf-report full-report test-nonrecursive + +# run tests in cwd as part of make check +check-local: test-nonrecursive + +test-wrapper.sh: test-wrapper.sh.in + @sed \ + -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \ + -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \ + $< >$@ + @chmod +x $@ + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru modemmanager-1.12.8/tools/tests/services/org.freedesktop.ModemManager1.service.in modemmanager-1.16.6/tools/tests/services/org.freedesktop.ModemManager1.service.in --- modemmanager-1.12.8/tools/tests/services/org.freedesktop.ModemManager1.service.in 1970-01-01 08:00:00.000000000 +0800 +++ modemmanager-1.16.6/tools/tests/services/org.freedesktop.ModemManager1.service.in 2021-06-06 21:40:59.000000000 +0800 @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.freedesktop.ModemManager1 +Exec=@abs_top_builddir@/tools/tests/test-wrapper.sh diff -Nru modemmanager-1.12.8/tools/tests/test-stub.c modemmanager-1.16.6/tools/tests/test-stub.c --- modemmanager-1.12.8/tools/tests/test-stub.c 1970-01-01 08:00:00.000000000 +0800 +++ modemmanager-1.16.6/tools/tests/test-stub.c 2021-06-06 21:40:59.000000000 +0800 @@ -0,0 +1,459 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details: + * + * Copyright (C) 2020 Frederic Martinsons + */ + +#include +#include +#include +#include +#include +#define MM_LOG_NO_OBJECT +#include + +#define MM_TEST_IFACE_NAME "org.freedesktop.ModemManager1.LibmmGlibTest" + +typedef struct { + GMainLoop *loop; + MMManager *mm_manager; + GDBusConnection *gdbus_connection; + GDBusProxy *mm_proxy; + GDBusProxy *mm_modem_prop_proxy; + GTestDBus *test_bus; + gchar *modem_object_path; + guint timeout_id; + MMSim *sim; + gboolean pin_error; +} TestData; + +static void +setup (TestData **ptdata, + gconstpointer data) +{ + GError *error = NULL; + TestData *tdata = NULL; + + tdata = (TestData *)g_malloc0 (sizeof(TestData)); + *ptdata = tdata; + + tdata->loop = g_main_loop_new (NULL, FALSE); + g_assert_nonnull (tdata->loop); + + tdata->test_bus = g_test_dbus_new (G_TEST_DBUS_NONE); + g_assert_nonnull (tdata->test_bus); + + g_test_dbus_add_service_dir (tdata->test_bus, TEST_SERVICES); + g_test_dbus_up (tdata->test_bus); + + /* Grab a proxy to the fake NM service to trigger tests */ + tdata->mm_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, + NULL, + MM_DBUS_SERVICE, + MM_DBUS_PATH, + MM_TEST_IFACE_NAME, + NULL, &error); + g_assert_no_error (error); + + tdata->gdbus_connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error); + g_assert_no_error (error); + + tdata->mm_manager = mm_manager_new_sync (tdata->gdbus_connection, + G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE, + NULL, + &error); + g_assert_no_error (error); + g_assert_nonnull (tdata->mm_manager); +} + +static void +teardown (TestData **ptdata, + gconstpointer data) +{ + TestData *tdata = NULL; + + tdata = *ptdata; + g_clear_object (&tdata->mm_modem_prop_proxy); + g_clear_object (&tdata->mm_proxy); + g_clear_object (&tdata->mm_manager); + g_clear_object (&tdata->gdbus_connection); + g_test_dbus_down (tdata->test_bus); + g_clear_object (&tdata->test_bus); + g_main_loop_unref (tdata->loop); + g_free (tdata); +} + +static gboolean +loop_timeout_cb (gpointer user_data) +{ + mm_err ("Timeout has elapsed"); + g_assert_not_reached (); + return G_SOURCE_REMOVE; +} + +static void +run_loop_for_ms (TestData *tdata, + guint32 timeout) +{ + mm_info ("Run loop for %u ms", timeout); + tdata->timeout_id = g_timeout_add (timeout, loop_timeout_cb, tdata); + g_main_loop_run (tdata->loop); +} + +static void +stop_loop (TestData *tdata) +{ + if (tdata->timeout_id) { + g_source_remove (tdata->timeout_id); + tdata->timeout_id = 0; + } + mm_info ("Stop the loop"); + g_main_loop_quit (tdata->loop); +} + +static void +add_modem_completion_cb (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + GVariant *dbus_return = NULL; + GVariant *obj_path_variant = NULL; + TestData *tdata = NULL; + + tdata = (TestData*)user_data; + + mm_info ("AddModem DBus call completed"); + dbus_return = g_dbus_proxy_call_finish (tdata->mm_proxy, res, &error); + g_assert_no_error (error); + g_assert_nonnull (dbus_return); + g_assert_cmpstr (g_variant_get_type_string (dbus_return), == , "(o)"); + + obj_path_variant = g_variant_get_child_value (dbus_return, 0); + tdata->modem_object_path = g_variant_dup_string (obj_path_variant, NULL); + + g_assert_null (tdata->mm_modem_prop_proxy); + tdata->mm_modem_prop_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, + NULL, + MM_DBUS_SERVICE, + tdata->modem_object_path, + "org.freedesktop.DBus.Properties", + NULL, &error); + + g_assert_no_error (error); + g_assert_nonnull (tdata->mm_modem_prop_proxy); + + g_variant_unref (dbus_return); + g_variant_unref (obj_path_variant); + + stop_loop (tdata); +} + +static gchar* +add_modem (TestData *tdata, + gboolean add_sim, + const gchar *iccid) +{ + g_dbus_proxy_call (tdata->mm_proxy, + "AddModem", + g_variant_new ("(bs)", add_sim, iccid), + G_DBUS_CALL_FLAGS_NO_AUTO_START, + 1000, + NULL, + add_modem_completion_cb, + tdata); + + run_loop_for_ms (tdata, 1000); + return tdata->modem_object_path; +} + +static void +emit_state_changed_completion_cb (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + GVariant *dbus_return = NULL; + TestData *tdata = NULL; + + tdata = (TestData*)user_data; + + mm_info ("EmitStateChanged DBus call completed"); + dbus_return = g_dbus_proxy_call_finish (tdata->mm_proxy, res, &error); + g_assert_no_error (error); + g_assert_nonnull (dbus_return); + g_variant_unref (dbus_return); + + stop_loop (tdata); +} + +static void +set_modem_state (TestData *tdata, + MMModemState state, + MMModemStateFailedReason reason) +{ + GError *error = NULL; + GVariant *ret = NULL; + GVariant *old_state_variant = NULL; + guint old_state = 0; + + g_assert_nonnull (tdata->mm_modem_prop_proxy); + + /* Get current state */ + ret = g_dbus_proxy_call_sync (tdata->mm_modem_prop_proxy, + "org.freedesktop.DBus.Properties.Get", + g_variant_new ("(ss)", + MM_DBUS_INTERFACE_MODEM, + MM_MODEM_PROPERTY_STATE), + G_DBUS_CALL_FLAGS_NO_AUTO_START, + -1, + NULL, + &error); + g_assert_no_error (error); + g_variant_get (ret, "(v)", &old_state_variant); + old_state = (guint)g_variant_get_int32 (old_state_variant); + g_variant_unref (ret); + g_variant_unref (old_state_variant); + + ret = g_dbus_proxy_call_sync (tdata->mm_modem_prop_proxy, + "org.freedesktop.DBus.Properties.Set", + g_variant_new ("(ssv)", + MM_DBUS_INTERFACE_MODEM, + MM_MODEM_PROPERTY_STATE, + g_variant_new_int32 (state)), + G_DBUS_CALL_FLAGS_NO_AUTO_START, + -1, + NULL, + &error); + g_assert_no_error (error); + g_variant_unref (ret); + + ret = g_dbus_proxy_call_sync (tdata->mm_modem_prop_proxy, + "org.freedesktop.DBus.Properties.Set", + g_variant_new ("(ssv)", + MM_DBUS_INTERFACE_MODEM, + MM_MODEM_PROPERTY_STATEFAILEDREASON, + g_variant_new_uint32 (reason)), + G_DBUS_CALL_FLAGS_NO_AUTO_START, + -1, + NULL, + &error); + + g_assert_no_error (error); + g_variant_unref (ret); + + /* Emit state change signal */ + g_dbus_proxy_call (tdata->mm_proxy, + "EmitStateChanged", + g_variant_new ("(uuu)", old_state, state, reason), + G_DBUS_CALL_FLAGS_NO_AUTO_START, + 1000, + NULL, + emit_state_changed_completion_cb, + tdata); + + run_loop_for_ms (tdata, 1000); +} + +static void +set_modem_unlock_completion_cb (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + GVariant *dbus_return = NULL; + TestData *tdata = NULL; + + tdata = (TestData*)user_data; + + mm_info ("org.freedesktop.DBus.Properties.Set DBus call completed"); + dbus_return = g_dbus_proxy_call_finish (tdata->mm_modem_prop_proxy, res, &error); + g_assert_no_error (error); + g_assert_nonnull (dbus_return); + g_variant_unref (dbus_return); + + stop_loop (tdata); +} + +static void +set_modem_unlock (TestData *tdata, + MMModemLock lock_state) +{ + g_assert_nonnull (tdata->mm_modem_prop_proxy); + + g_dbus_proxy_call (tdata->mm_modem_prop_proxy, + "org.freedesktop.DBus.Properties.Set", + g_variant_new ("(ssv)", + MM_DBUS_INTERFACE_MODEM, + MM_MODEM_PROPERTY_UNLOCKREQUIRED, + g_variant_new_uint32 (lock_state)), + G_DBUS_CALL_FLAGS_NO_AUTO_START, + 1000, + NULL, + set_modem_unlock_completion_cb, + tdata); + + run_loop_for_ms (tdata, 1000); +} + +static void +set_modem_equipment_error (TestData *tdata, + MMMobileEquipmentError equipmentError, + gboolean clear) +{ + GError *error = NULL; + GVariant *ret = NULL; + + ret = g_dbus_proxy_call_sync (tdata->mm_proxy, + "SetMobileEquipmentError", + g_variant_new ("(ub)", equipmentError, clear), + G_DBUS_CALL_FLAGS_NO_AUTO_START, + 3000, + NULL, + &error); + g_assert_no_error (error); + g_variant_unref (ret); +} + +static void +test_modem_interface (TestData **ptdata, + gconstpointer data) +{ + TestData *tdata = NULL; + GDBusObject *modem_object = NULL; + MMModem *mm_modem = NULL; + g_autofree gchar *modem_path = NULL; + + tdata = *ptdata; + /* Add a modem object (with no sim attached) */ + modem_path = add_modem (tdata, FALSE, ""); + modem_object = g_dbus_object_manager_get_object (G_DBUS_OBJECT_MANAGER (tdata->mm_manager), modem_path); + g_assert_nonnull (modem_object); + + mm_modem = mm_object_get_modem (MM_OBJECT (modem_object)); + g_clear_object (&modem_object); + + /* Check the modem states */ + g_assert_cmpuint (mm_modem_get_state (mm_modem), ==, MM_MODEM_STATE_UNKNOWN); + g_assert_cmpuint (mm_modem_get_state_failed_reason (mm_modem), ==, MM_MODEM_STATE_FAILED_REASON_UNKNOWN); + + /* Set new state and check that it is propagated */ + set_modem_state (tdata, MM_MODEM_STATE_REGISTERED, MM_MODEM_STATE_FAILED_REASON_NONE); + + g_assert_cmpuint (mm_modem_get_state (mm_modem), ==, MM_MODEM_STATE_REGISTERED); + g_assert_cmpuint (mm_modem_get_state_failed_reason (mm_modem), ==, MM_MODEM_STATE_FAILED_REASON_NONE); + + g_clear_object (&mm_modem); +} + +static void +mm_sim_send_pin_completion_cb (GObject *source_object, + GAsyncResult *res, + gpointer user_data) +{ + GError *error = NULL; + gboolean ret = FALSE; + TestData *tdata = NULL; + + tdata = (TestData*)user_data; + + mm_info("SendPin DBus method call completed"); + ret = mm_sim_send_pin_finish (tdata->sim, res, &error); + if (tdata->pin_error) { + g_assert_nonnull (error); + g_assert_false (ret); + g_clear_error (&error); + } else { + g_assert_no_error (error); + g_assert_true (ret); + } + stop_loop (tdata); +} + +static void +test_sim_interface (TestData **ptdata, + gconstpointer data) +{ + TestData *tdata = NULL; + GDBusObject *modem_object = NULL; + MMModem *mm_modem = NULL; + GError *error = NULL; + g_autofree gchar *modem_path = NULL; + + tdata = *ptdata; + /* Add a modem with a sim object */ + modem_path = add_modem (tdata, TRUE, "89330122503000800750"); + modem_object = g_dbus_object_manager_get_object (G_DBUS_OBJECT_MANAGER (tdata->mm_manager), modem_path); + g_assert_nonnull (modem_object); + mm_modem = mm_object_get_modem (MM_OBJECT (modem_object)); + g_clear_object (&modem_object); + + g_assert_cmpuint (mm_modem_get_unlock_required (mm_modem), ==, MM_MODEM_LOCK_NONE); + /* Lock the modem */ + set_modem_unlock (tdata, MM_MODEM_LOCK_SIM_PIN); + g_assert_cmpuint (mm_modem_get_unlock_required (mm_modem), ==, MM_MODEM_LOCK_SIM_PIN); + + tdata->sim = mm_modem_get_sim_sync (mm_modem, NULL, &error); + g_assert_no_error (error); + g_assert_nonnull (tdata->sim); + g_assert_cmpstr (mm_sim_get_identifier(tdata->sim), ==, "89330122503000800750"); + + /* Send a pin code */ + tdata->pin_error = FALSE; + mm_sim_send_pin (tdata->sim, "1234", NULL, mm_sim_send_pin_completion_cb, tdata); + run_loop_for_ms (tdata, 1000); + + /* Check that the modem has been unlocked */ + g_assert_cmpuint (mm_modem_get_unlock_required (mm_modem), ==, MM_MODEM_LOCK_NONE); + + /* Re lock it */ + set_modem_unlock (tdata, MM_MODEM_LOCK_SIM_PIN); + g_assert_cmpuint (mm_modem_get_unlock_required (mm_modem), ==, MM_MODEM_LOCK_SIM_PIN); + + /* Set an error that will simulate wrong pin code */ + set_modem_equipment_error (tdata, MM_MOBILE_EQUIPMENT_ERROR_INCORRECT_PASSWORD, FALSE); + + tdata->pin_error = TRUE; + mm_sim_send_pin (tdata->sim, "0000", NULL, mm_sim_send_pin_completion_cb, tdata); + run_loop_for_ms (tdata, 1000); + + g_assert_cmpuint (mm_modem_get_unlock_required (mm_modem), ==, MM_MODEM_LOCK_SIM_PIN); + + /* Clear the error and retry the pin code */ + set_modem_equipment_error (tdata, 0, TRUE); + tdata->pin_error = FALSE; + mm_sim_send_pin (tdata->sim, "1234", NULL, mm_sim_send_pin_completion_cb, tdata); + run_loop_for_ms (tdata, 1000); + + g_assert_cmpuint (mm_modem_get_unlock_required (mm_modem), ==, MM_MODEM_LOCK_NONE); + + g_clear_object (&tdata->sim); + g_clear_object (&mm_modem); +} + +int main (int argc, + char **argv) +{ + g_test_init (&argc, &argv, NULL); + + g_test_add ("/MM/stub/modem/interface", + TestData *, NULL, setup, + test_modem_interface, + teardown); + g_test_add ("/MM/stub/sim/interface", + TestData *, NULL, setup, + test_sim_interface, + teardown); + return g_test_run (); +} diff -Nru modemmanager-1.12.8/tools/tests/test-wrapper.sh.in modemmanager-1.16.6/tools/tests/test-wrapper.sh.in --- modemmanager-1.12.8/tools/tests/test-wrapper.sh.in 1970-01-01 08:00:00.000000000 +0800 +++ modemmanager-1.16.6/tools/tests/test-wrapper.sh.in 2021-06-06 21:40:59.000000000 +0800 @@ -0,0 +1,5 @@ +#!/bin/bash + +# For debugging behavior of test-modemmanager-service.py, you can modify +# this line to add --log-file option +GI_TYPELIB_PATH=@abs_top_builddir@/libmm-glib @abs_top_srcdir@/tools/test-modemmanager-service.py diff -Nru modemmanager-1.12.8/vapi/Makefile.in modemmanager-1.16.6/vapi/Makefile.in --- modemmanager-1.12.8/vapi/Makefile.in 2020-03-14 17:16:04.000000000 +0800 +++ modemmanager-1.16.6/vapi/Makefile.in 2021-06-06 21:43:43.000000000 +0800 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.3 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,14 +91,14 @@ subdir = vapi ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_code_coverage.m4 \ - $(top_srcdir)/m4/compiler_warnings.m4 \ $(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \ - $(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/m4/mm-enable-plugin.m4 $(top_srcdir)/m4/nls.m4 \ $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ $(top_srcdir)/m4/vapigen.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ @@ -224,6 +224,8 @@ LCOV = @LCOV@ LD = @LD@ LDFLAGS = @LDFLAGS@ +LIBELOGIND_CFLAGS = @LIBELOGIND_CFLAGS@ +LIBELOGIND_LIBS = @LIBELOGIND_LIBS@ LIBICONV = @LIBICONV@ LIBINTL = @LIBINTL@ LIBMM_GLIB_CFLAGS = @LIBMM_GLIB_CFLAGS@ @@ -297,9 +299,13 @@ VAPIGEN_MAKEFILE = @VAPIGEN_MAKEFILE@ VAPIGEN_VAPIDIR = @VAPIGEN_VAPIDIR@ VERSION = @VERSION@ +WARN_CFLAGS = @WARN_CFLAGS@ +WARN_LDFLAGS = @WARN_LDFLAGS@ +WARN_SCANNERFLAGS = @WARN_SCANNERFLAGS@ XGETTEXT = @XGETTEXT@ XGETTEXT_015 = @XGETTEXT_015@ XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@ +XSLTPROC_CHECK = @XSLTPROC_CHECK@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -344,6 +350,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@