Commit Graph

9 Commits

Author SHA1 Message Date
Aleksander Morgado
ef942ca564 iface-modem-firmware: fix reporting empty firmware list
ModemManager[2804]: <warn>  [1545055222.508649] No valid firmware images listed. Assuming firmware unsupported.
    ModemManager[2804]: <debug> [1545055222.508665] firmware list loading failed: unsupported
    ModemManager[2804]: <debug> [1545055222.508683] Couldn't load firmware image list: firmware list unknown
    ModemManager[2804]: <debug> [1545055222.508728] Couldn't load current firmware image: current firmware unknown

    (ModemManager:2804): GLib-CRITICAL **: 15:00:22.508: g_variant_builder_end: assertion '!GVSB(builder)->uniform_item_types || GVSB(builder)->prev_item_type != NULL || g_variant_type_is_definite (GVSB(builder)->type)' failed

    Thread 1 "ModemManager" received signal SIGTRAP, Trace/breakpoint trap.
    0x00007ffff75b39b6 in ?? () from /usr/lib/libglib-2.0.so.0
    (gdb) bt
    #0  0x00007ffff75b39b6 in  () at /usr/lib/libglib-2.0.so.0
    #1  0x00007ffff75b4363 in g_logv () at /usr/lib/libglib-2.0.so.0
    #2  0x00007ffff75b4560 in g_log () at /usr/lib/libglib-2.0.so.0
    #3  0x00007ffff758867d in g_variant_builder_end () at /usr/lib/libglib-2.0.so.0
    #4  0x00005555555e4d12 in load_current_ready (self=0x55555579c330, res=0x5555557388e0, ctx=0x5555557d6d80) at mm-iface-modem-firmware.c:84
    #5  0x00007ffff778f194 in  () at /usr/lib/libgio-2.0.so.0
    #6  0x00007ffff778f1c9 in  () at /usr/lib/libgio-2.0.so.0
    #7  0x00007ffff75c4271 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
    #8  0x00007ffff75c5f89 in  () at /usr/lib/libglib-2.0.so.0
    #9  0x00007ffff75c6f62 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
    #10 0x0000555555597aa0 in main (argc=2, argv=0x7fffffffe488) at main.c:181
2018-12-17 15:06:56 +01:00
Aleksander Morgado
adcce66dd7 broadband-modem-qmi: avoid NULL success return in firmware_load_current
Instead of assuming that NULL is a valid return, make sure we return
an error instead.

This also makes it sure that if the GTask gets cancelled, the result
we set is always a valid GObject, so that the g_object_unref passed as
GDestroyNotify can be safely called always. Not a big deal anyway, as
the GTask cannot be currently cancelled.
2017-10-20 17:56:36 +02:00
Aleksander Morgado
dbb4597e33 broadband-modem-qmi: avoid NULL success return in firmware_load_list
Instead of assuming that NULL is a valid return, make sure we return
an error instead.
2017-10-20 17:56:36 +02:00
Ben Chan
2442058667 iface-modem-firmware: port mm_iface_modem_firmware_initialize to use GTask 2017-06-28 10:18:55 +02:00
Ben Chan
9823d9d6f6 core: remove explicit GDestroyNotify cast on g_free / g_object_unref
g_free and g_object_unref are in form of  `void (*)(gpointer)`, which
matches the GDestroyNotify signature. An explicit GDestroyNotify cast on
g_free and g_object_unref is thus not needed.
2017-03-29 10:22:05 +02:00
Dan Williams
182cf1fa89 iface-modem-firmware: clarify log message about unsupported firmware interface 2016-06-01 12:12:47 -05:00
Aleksander Morgado
c16bcdf68c core: make sure objects retrieved with g_object_get() are valid in the ifaces
The interfaces usually retrieve objects (e.g. skeletons) from the Modem object
using g_object_get(), but we didn't make sure that these objects were actually
valid before using them.

This should clean up errors happening when the modem gets unplugged and still
some actions are ongoing.

Should fix https://bugzilla.gnome.org/show_bug.cgi?id=685933
2012-10-11 11:41:15 +02:00
Aleksander Morgado
da8cc53636 iface-modem-firmware: fix error reporting on firmware change 2012-10-05 11:07:41 +02:00
Aleksander Morgado
67db1b50b4 iface-modem-firmware: new `MMIfaceModemFirmware' interface 2012-10-04 19:08:03 +02:00