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.
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
21a5aaf4fe, 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
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.
==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)
==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)
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,
^
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,
^
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,
^
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);
^
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);
^
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);
^
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);
^
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);
^
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)) {
^
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,
^
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))) {
^~
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,
^
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);
^
Charset definition moved from enable state machine to init state machine,
so that the right current charset is available also during further
initialization steps