- Jan 10, 2018
-
-
- Oct 08, 2017
-
-
Aleksander Morgado authored
-
Aleksander Morgado authored
-
- Sep 14, 2017
-
-
Aleksander Morgado authored
Fixes: 9ef87239
-
Aleksander Morgado authored
-
Aleksander Morgado authored
MbimAtdsProvider is a struct and is already documented in the ATDS service doc.
-
Aleksander Morgado authored
Just to make gtk-doc happy really.
-
Aleksander Morgado authored
Even when cloning a git checkout, as we have m4/compiler-warnings under version control.
-
Aleksander Morgado authored
Remove the need to run `gtkdocize' when building from git; this should be an operation done by the maintainer when modernizing the gtk-doc setup (think of e.g. gettextize), no need to do it unconditionally. This makes it easier for platforms without gtk-doc to build from git. When trying to build with documentation enabled and gtk-doc isn't found, we get some nice warnings and errors in the configure report: checking for gtk-doc... no configure: WARNING: You will not be able to create source packages with 'make dist' because gtk-doc >= 1.0 is not found. checking for gtkdoc-check... no checking for gtkdoc-check... no checking for gtkdoc-rebase... no checking for gtkdoc-mkpdf... no checking whether to build gtk-doc documentation... yes configure: error: You must have gtk-doc >= 1.0 installed to build documentation for ModemManager. Please install gtk-doc or disable building the documentation by adding '--disable-gtk-doc' to './configure'. Files generated with gtkdocize (gtk-doc) 1.26.1.
-
Aleksander Morgado authored
Using an intermediate constant variable breaks compilation with C compilers, as these variables cannot be used as initializers. Instead, define a deprecated type and cast all deprecated symbols to that type. We lose the information about what the new replacement symbol is, but we don't break compilation. Also, add MBIM_DISABLE_DEPRECATED guards around deprecated symbols. So that when this symbol is defined, e.g. via CFLAGS, building a program that uses the libmbim API will fail if the program references deprecated symbols. For now we just use it to keep gtk-doc-scan happy and avoid unnecessary warnings. Equivalent to ModemManager commits eedd4ab4457 and f0bb6ef856.
-
- Sep 12, 2017
-
-
Aleksander Morgado authored
If we try to 'MBIM open' the channel with a Sierra Wireless EM7345 (FIH7160_V1.1_MODEM_01.1349.12) and the channel is already open in the device (e.g. mbim-proxy crashed and we try to reopen, or just running consecutive mbimcli commands with --no-close), the device returns a 'MBIM close done' message for every 'MBIM open' request we send. We update the logic to try to detect this case, and if we do, we launch an explicit 'MBIM close' operation before retrying the 'MBIM open' again. E.g. this is the flow when trying to run mbimcli command while the MBIM channel is already open in the device side: $ mbimcli -d /dev/cdc-wdm1 --query-device-caps --no-close --verbose [06 ago 2017, 16:58:21] [Debug] opening device... [06 ago 2017, 16:58:21] [Debug] [/dev/cdc-wdm1] Queried max control message size: 512 [06 ago 2017, 16:58:21] [Debug] [/dev/cdc-wdm1] Sent message... <<<<<< RAW: <<<<<< length = 16 <<<<<< data = 01:00:00:00:10:00:00:00:01:00:00:00:00:02:00:00 [06 ago 2017, 16:58:21] [Debug] [/dev/cdc-wdm1] Sent message (translated)... <<<<<< Header: <<<<<< length = 16 <<<<<< type = open (0x00000001) <<<<<< transaction = 1 <<<<<< Contents: <<<<<< max_control_transfer = 512 [06 ago 2017, 16:58:21] [Debug] [/dev/cdc-wdm1] Received message... >>>>>> RAW: >>>>>> length = 16 >>>>>> data = 02:00:00:80:10:00:00:00:02:00:00:00:00:00:00:00 [06 ago 2017, 16:58:21] [Debug] [/dev/cdc-wdm1] No transaction matched in received message [06 ago 2017, 16:58:21] [Debug] [/dev/cdc-wdm1] Received unexpected message (translated)... >>>>>> Header: >>>>>> length = 16 >>>>>> type = close-done (0x80000002) >>>>>> transaction = 2 >>>>>> Contents: >>>>>> status error = 'None' (0x00000000) [06 ago 2017, 16:58:21] [Debug] [/dev/cdc-wdm1] Sent message... <<<<<< RAW: <<<<<< length = 12 <<<<<< data = 02:00:00:00:0C:00:00:00:02:00:00:00 [06 ago 2017, 16:58:21] [Debug] [/dev/cdc-wdm1] Sent message (translated)... <<<<<< Header: <<<<<< length = 12 <<<<<< type = close (0x00000002) <<<<<< transaction = 2 [06 ago 2017, 16:58:21] [Debug] [/dev/cdc-wdm1] Received message... >>>>>> RAW: >>>>>> length = 16 >>>>>> data = 02:00:00:80:10:00:00:00:02:00:00:00:00:00:00:00 [06 ago 2017, 16:58:21] [Debug] [/dev/cdc-wdm1] Sent message... <<<<<< RAW: <<<<<< length = 16 <<<<<< data = 01:00:00:00:10:00:00:00:03:00:00:00:00:02:00:00 [06 ago 2017, 16:58:21] [Debug] [/dev/cdc-wdm1] Sent message (translated)... <<<<<< Header: <<<<<< length = 16 <<<<<< type = open (0x00000001) <<<<<< transaction = 3 <<<<<< Contents: <<<<<< max_control_transfer = 512 [06 ago 2017, 16:58:21] [Debug] [/dev/cdc-wdm1] Received message... >>>>>> RAW: >>>>>> length = 16 >>>>>> data = 01:00:00:80:10:00:00:00:03:00:00:00:00:00:00:00 [06 ago 2017, 16:58:21] [Debug] MBIM Device at '/dev/cdc-wdm1' ready
-
Aleksander Morgado authored
Lets check if the operation timed out on the main state machine, instead of when the open command response is processed. This will allow us to queue up new steps sending/receiving messages and have a single place to check the timeout for all of them.
-
- Sep 11, 2017
-
-
Aleksander Morgado authored
Usually the canonicalize_file_name() GNU extension is preferred to the POSIX realpath(), as it covers some of the limitations the latter has. But this extension isn't available in lots of platforms or in other c library implementations (e.g. musl), so just default to the POSIX method to improve portability. Note that the check for canonicalize_file_name() availability during configure isn't as trivial as adding a new AC_CHECK_FUNCS(), and importing a gnulib module seems overkill just for this one liner.
-
- Aug 08, 2017
-
-
Aleksander Morgado authored
If e.g. mbim-proxy is started by ModemManager and we send a Ctrl+C to it, the signal would be propagated to the mbim-proxy process and we would kill it right away, while leaving ModemManager still around wondering why the socket to the proxy got a HUP. Avoid this, by making sure the mbim-proxy gets its own process group.
-
This patch adds a new '--query-pin-list' action to mbimcli for querying the list of PINs supported by a MBIM device and additional details for each PIN type.
-
- Aug 03, 2017
-
-
Aleksander Morgado authored
When the device is gone while an open() operation is ongoing, we're completing and freeing the 'opening device info' struct, but we didn't remove it from the private info, so when device_open_ready() happened, we were trying to complete and free it again. Avoid this issue by making sure no already-freed structs are kept in the private info, and also allowing device_open_ready() to get called without a valid pending 'opening device info'. [30 Jul 2017, 15:24:33] [Debug] [/dev/cdc-wdm0] Sent message (translated)... <<<<<< Header: <<<<<< length = 16 <<<<<< type = open (0x00000001) <<<<<< transaction = 1 <<<<<< Contents: <<<<<< max_control_transfer = 4096 [30 Jul 2017, 15:24:38] [Debug] [/dev/cdc-wdm0] Sent message... <<<<<< RAW: <<<<<< length = 16 <<<<<< data = 01:00:00:00:10:00:00:00:02:00:00:00:00:10:00:00 [30 Jul 2017, 15:24:38] [Debug] [/dev/cdc-wdm0] Sent message (translated)... <<<<<< Header: <<<<<< length = 16 <<<<<< type = open (0x00000001) <<<<<< transaction = 2 <<<<<< Contents: <<<<<< max_control_transfer = 4096 [30 Jul 2017, 15:24:42] [Debug] [/dev/cdc-wdm0] unexpected port hangup! [30 Jul 2017, 15:24:42] [Debug] Client (7) connection closed... [30 Jul 2017, 15:24:42] -Warning ** error opening device: Device is gone [30 Jul 2017, 15:24:43] [Debug] open operation timed out: closed ==24404== Invalid read of size 8 ==24404== at 0x4E4A673: peek_opening_device_info (in /usr/lib/libmbim-glib.so.4.2.0) ==24404== by 0x4E4BD7B: device_open_ready (in /usr/lib/libmbim-glib.so.4.2.0) ==24404== by 0x50CAF61: g_simple_async_result_complete (in /usr/lib/libgio-2.0.so.0.3707.0) ==24404== by 0x50CB028: complete_in_idle_cb (in /usr/lib/libgio-2.0.so.0.3707.0) ==24404== by 0x5602EEA: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.3707.0) ==24404== by 0x5603207: g_main_context_iterate.isra.13 (in /usr/lib/libglib-2.0.so.0.3707.0) ==24404== by 0x56035D1: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.3707.0) ==24404== by 0x4010F8: main (in /usr/lib/mbim-proxy) ==24404== Address 0x6d3bfe0 is 0 bytes inside a block of size 16 free'd ==24404== at 0x4C2A0C0: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==24404== by 0x4E4AC21: untrack_device (in /usr/lib/libmbim-glib.so.4.2.0) ==24404== by 0x5395392: _g_closure_invoke_va (in /usr/lib/libgobject-2.0.so.0.3707.0) ==24404== by 0x53A805D: g_signal_emit_valist (in /usr/lib/libgobject-2.0.so.0.3707.0) ==24404== by 0x53A8A51: g_signal_emit (in /usr/lib/libgobject-2.0.so.0.3707.0) ==24404== by 0x4E49424: data_available (in /usr/lib/libmbim-glib.so.4.2.0) ==24404== by 0x5602EEA: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.3707.0) ==24404== by 0x5603207: g_main_context_iterate.isra.13 (in /usr/lib/libglib-2.0.so.0.3707.0) ==24404== by 0x56035D1: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.3707.0) ==24404== by 0x4010F8: main (in /usr/lib/mbim-proxy) ==24404== Block was alloc'd at ==24404== at 0x4C2B3D0: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==24404== by 0x5607B00: g_malloc (in /usr/lib/libglib-2.0.so.0.3707.0) ==24404== by 0x5617E12: g_slice_alloc (in /usr/lib/libglib-2.0.so.0.3707.0) ==24404== by 0x5618385: g_slice_alloc0 (in /usr/lib/libglib-2.0.so.0.3707.0) ==24404== by 0x4E4B1A9: internal_open (in /usr/lib/libmbim-glib.so.4.2.0) ==24404== by 0x4E4BAC5: device_new_ready (in /usr/lib/libmbim-glib.so.4.2.0) ==24404== by 0x50CAF61: g_simple_async_result_complete (in /usr/lib/libgio-2.0.so.0.3707.0) ==24404== by 0x50CB028: complete_in_idle_cb (in /usr/lib/libgio-2.0.so.0.3707.0) ==24404== by 0x5602EEA: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.3707.0) ==24404== by 0x5603207: g_main_context_iterate.isra.13 (in /usr/lib/libglib-2.0.so.0.3707.0) ==24404== by 0x56035D1: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.3707.0) ==24404== by 0x4010F8: main (in /usr/lib/mbim-proxy) ==24404==
-
-
-
- Jul 29, 2017
-
-
- Jul 28, 2017
-
-
This patch adds a new '--query-ip-packet-filters' action to mbimcli for querying the IP packet filters currently set up on a MBIM device.
-
-
__mbim_utils_str_hex is a useful utility method for returning a hexadecimal string representation of a sequence of bytes in memory. This patch turns it into 'mbim_common_str_hex', which can be shared between libmbim-glib and mbimcli.
-
- Jul 27, 2017
-
-
This patch updates the code to consistently use guint32, instead of guint, for 'session_id' variables as SessionId is UINT32.
-
-
-
-
-
When mbim_message_phonebook_delete_response_parse fails, set_phonebook_delete_ready should shutdown with a failure status and return.
-
- Jul 26, 2017
-
-
As the Context struct is allocated via g_slice_new and its 'cancellable' field is only set when a GCancellable is provided, there is no guarantee that the cancellable field is always initialized. This patch fixes the code to always initialize the cancellable field of the Context struct.
-
-
-
-
- Jul 18, 2017
-
-
Aleksander Morgado authored
==21554== 64 bytes in 1 blocks are definitely lost in loss record 2,960 of 4,396 ==21554== at 0x4C2E10F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==21554== by 0x644E0CF: g_realloc (in /usr/lib/libglib-2.0.so.0.5200.2) ==21554== by 0x6469C06: ??? (in /usr/lib/libglib-2.0.so.0.5200.2) ==21554== by 0x6469F94: g_string_insert_len (in /usr/lib/libglib-2.0.so.0.5200.2) ==21554== by 0x64345E1: ??? (in /usr/lib/libglib-2.0.so.0.5200.2) ==21554== by 0x643585A: g_build_path (in /usr/lib/libglib-2.0.so.0.5200.2) ==21554== by 0x57C25E2: get_descriptors_filepath (mbim-device.c:837) ==21554== by 0x57C267A: read_max_control_transfer (mbim-device.c:921) ==21554== by 0x57C2F89: create_iochannel_with_socket (mbim-device.c:1161) ==21554== by 0x57C2C06: wait_for_proxy_cb (mbim-device.c:1073) ==21554== by 0x6449332: ??? (in /usr/lib/libglib-2.0.so.0.5200.2) ==21554== by 0x64488B4: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.5200.2)
-
- Jun 28, 2017
-
-
Commit e5b6807d "libmbim-glib: fix G_DEPRECATED_FOR annotations" replaced macro defintions with `static const int' definitions for those deprecated enumerators. However, gtk-doc doesn't seem to document `static const int' defintions. This patch works around the issue by adding a macro defintion on top of a `static const int' defintion.
-
Dan Williams authored
-
Dan Williams authored
See https://code.wireshark.org/review/gitweb?p=wireshark.git;a=blob;f=epan/dissectors/packet-mbim.c ATDS/Operators seems to be the same as BasicConnect/VisibleProviders except that CellularClass has been replaced with a "Provider PLMN Mode". ATDS/RegisterState seems to be exactly the same as BasicConnect/RegisterState if the Wireshark dissector is to be believed. Doesn't implement ATDS/SetProjectionTables yet.
-
mbim-compat.h defines a few deprecated enumerators as an alias to their equivalence using macros and annotates those macros with G_DEPRECATED_FOR, which may be expanded to `__attribute__((deprecated))'. Neither gcc nor clang supports `__attribute__((deprecated))' on macros. Thus, a G_DEPRECATED_FOR annotation before a macro definition is actually associated with the next identifier found after the macro definition, which is incorrect. Alternatively, the G_DEPRECATED_FOR annotation can be used on the deprecated enumerators. But only gcc 6 or above supports enumerator attributes. To address the issue, this patch defines the deprecated enumerators as `static const int' values, which can then be annotated with G_DEPRECATED_FOR.
-
- Jun 27, 2017
-
-
According to MBIM spec Rev 1.0 Errata-1 Table 10-17, a value 0 of the ReadyInfo field in MBIM_SUBSCRIBER_READY_INFO refers to MBIMReadyInfoFlagsNone and indicates that the device is in normal mode. This patch adds MBIM_READY_INFO_FLAG_NONE (0) to the MbimReadyInfoFlag enum, such that `mbimcli --query-subscriber-ready-info` shows 'Ready info' as 'none' instead of 'unknown' when the ReadyInfo field is 0.
-
g_type_init() has been deprecated (and also marked with the attribute 'deprecated') since glib 2.36 as the type system is automatically initialized. Since the minimum version of glib required by libmbim is 2.36, calling g_type_init() isn't necessarily in the libmbim code.
-
- Jun 23, 2017
-
-