aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib
AgeCommit message (Collapse)Author
2017-03-29libmm-glib: remove explicit GDestroyNotify cast on g_object_unrefBen Chan
g_object_unref is in form of `void (*)(gpointer)`, which matches the GDestroyNotify signature. An explicit GDestroyNotify cast on g_object_unref is thus not needed.
2017-02-10libmm-glib: set clear func by default in the MMModemPortInfo arrayAleksander Morgado
So that we don't leak the port names allocated within each MMModemPortInfo. ==261== 672 bytes in 84 blocks are definitely lost in loss record 7,314 of 7,383 ==261== at 0x402C51E: malloc (vg_replace_malloc.c:299) ==261== by 0x4484878: g_malloc (gmem.c:94) ==261== by 0x449D51D: g_strdup (gstrfuncs.c:363) ==261== by 0x44B5B73: g_variant_dup_string (gvariant.c:1529) ==261== by 0x44B945E: g_variant_valist_get_nnp (gvariant.c:4775) ==261== by 0x44B945E: g_variant_valist_get_leaf (gvariant.c:4945) ==261== by 0x44B945E: g_variant_valist_get (gvariant.c:5126) ==261== by 0x44B922C: g_variant_valist_get (gvariant.c:5161) ==261== by 0x44B9FC9: g_variant_get_va (gvariant.c:5388) ==261== by 0x44BA3C5: g_variant_get_child (gvariant.c:5486) ==261== by 0x6613FA8: mm_common_ports_variant_to_garray (mm-common-helpers.c:238) ==261== by 0x6601AB9: ensure_internal_ports (mm-modem.c:766) ==261== by 0x6603E42: mm_modem_peek_ports (mm-modem.c:825) ==261== by 0x65CD94D: owns_port (nm-modem-broadband.c:196) Reported-by: Piotr Figiel <p.figiel@camlintechnologies.com>
2017-02-08libmm-glib: fix leaking bearer_path stringPiotr Figiel
==261== 482 bytes in 12 blocks are definitely lost in loss record 7,290 of 7,383 ==261== at 0x402C51E: malloc (vg_replace_malloc.c:299) ==261== by 0x4484878: g_malloc (gmem.c:94) ==261== by 0x449D51D: g_strdup (gstrfuncs.c:363) ==261== by 0x44B5B73: g_variant_dup_string (gvariant.c:1529) ==261== by 0x44B945E: g_variant_valist_get_nnp (gvariant.c:4775) ==261== by 0x44B945E: g_variant_valist_get_leaf (gvariant.c:4945) ==261== by 0x44B945E: g_variant_valist_get (gvariant.c:5126) ==261== by 0x44B922C: g_variant_valist_get (gvariant.c:5161) ==261== by 0x44B9FC9: g_variant_get_va (gvariant.c:5388) ==261== by 0x44BA1DB: g_variant_get (gvariant.c:5335) ==261== by 0x664E2EF: mm_gdbus_modem_simple_call_connect_finish (mm-gdbus-modem.c:22451) ==261== by 0x6608A08: simple_connect_ready (mm-modem-simple.c:154) ==261== by 0x429136F: g_task_return_now (gtask.c:1107) ==261== by 0x4291A69: g_task_return (gtask.c:1165)
2017-02-03glib: remove invocations of g_type_init()Ben Chan
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 ModemManager is 2.36, calling g_type_init() isn't necessarily in the ModemManager code.
2017-01-04libmm-glib,modem: init/clear ports mutexAleksander Morgado
2017-01-04libmm-glib: fix memleak of MMModem's portsThomas Haller
Fixes: 3206e9566392e8a9678bbd49e0de9bb21ed75291
2016-10-13libmm-glib,call-properties: fix wrong enum returnedAleksander Morgado
https://bugs.freedesktop.org/show_bug.cgi?id=98220
2016-10-12iface-modem: always sort supported and current bands before exposing themAleksander Morgado
2016-10-12api,signal: new RSCP itemAleksander Morgado
2016-09-29core: allow building and running without udevAleksander Morgado
Instead of relying on the udev daemon and GUDev to manage the devices reported by the kernel, we can now run ModemManager relying solely on the kernel events reported via the new ReportKernelEvent() API. Therefore, the '--no-auto-scan' option is implicit for the ModemManager daemon when udev is disabled in the build. Additionally, a new custom implementation of the kernel device object is provided, which uses sysfs to load the properties and attributes required in each kernel device, instead of using a GUdevDevice. The udev rule files are kept in place, and a simple custom parser is provided which preloads all rules in memory once and then applies them to the different kernel objects reported via ReportKernelEvent(), e.g. to set port type hints. A simple unit test setup is prepared to validate the udev rules during the `check' Makefile target.
2016-09-29core: allow disabling auto-scan and notifying ports one by one via APIAleksander Morgado
This commit enables a new core ModemManager daemon option, so that automatic detection of available modems is totally disabled: '--no-auto-scan'. Note that this option also replaces the previously used '--test-no-auto-scan' option, which was only used during tests. Along with the new ModemManager option, a new ReportKernelEvent() method in the API is defined, which allows notifying the daemon of which interfaces it should be accessing, as well as the main details of each interface. The only mandatory parameters in the new method are 'action' (add/remove), 'name' (the name of the interface) and 'subsystem' (the subsystem of the interface). The mmcli tool has support for using the new api method via several new options: * The '--report-kernel-event' option allows specifying device ports one by one, and is a direct mapping of the ReportKernelEvent() method: $ sudo mmcli --report-kernel-event="action=add,name=wwan0,subsystem=net" $ sudo mmcli --report-kernel-event="action=add,name=cdc-wdm0,subsystem=usbmisc" * The '--report-kernel-event-auto-scan' option uses udev monitoring to notify events automatically to the daemon. This allows to operate in a way equivalent to the default daemon operation (with implicit auto-scan). Worth noting that the ReportKernelEvent() method is only usable when '--no-auto-scan' is explicitly used in the daemon. An error will be reported if the method is tried while standard udev monitoring is enabled (implicit if auto scan isn't explicitly disabled in the daemon). If mmcli is going to be used only to report 'real time' events, an optional '--initial-kernel-events=[PATH]' may be given in the ModemManager call to automatically process a set of port kernel events one by one on boot. The file may e.g. contain: action=add,name=wwan0,subsystem=net action=add,name=cdc-wdm0,subsystem=usbmisc
2016-08-10api,signal: Ec/Io is in dB, not dBmAleksander Morgado
2016-08-10libmm-glib,helpers: don't warn when trying to read invalid match info indexAleksander Morgado
We may want to use the mm_get_()_from_match_info() calls to read optional items, so that the method returns FALSE if the item index doesn't apply. So, avoid the implicit warning issued by g_return_val_if_fail().
2016-04-19libmm-glib,common-helpers: fix reading boolean from stringAleksander Morgado
The "0" case wasn't being handled properly: $ sudo mmcli -m 0 --create-bearer="apn=,allow-roaming=0" Error parsing properties string: 'Cannot get boolean from string '0''
2016-03-25libmm-glib: fix enum conversion warning/errorBrian Norris
mm-modem-oma.c:400:51: error: implicit conversion from enumeration type 'MMOmaSessionType' to different enumeration type 'MMOmaFeature' [-Werror,-Wenum-conversion] g_return_val_if_fail (MM_IS_MODEM_OMA (self), MM_OMA_SESSION_TYPE_UNKNOWN); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/glib-2.0/glib/gmessages.h:382:11: note: expanded from macro 'g_return_val_if_fail' return (val); \ ~~~~~~ ^~~ This should be MMOmaFeature, not MMOmaSessionType. The end result is the same, as both are 0.
2016-03-16libmm-glib,modem-voice: fix unknown methods in documentationAleksander Morgado
html/MMCallProperties.html:141: warning: no link for: 'mm-modem-voice-create' -> (<code class="function">mm_modem_voice_create()</code>). html/MMCallProperties.html:141: warning: no link for: 'mm-modem-voice-create-sync' -> (<code class="function">mm_modem_voice_create_sync()</code>). html/MMModemVoice.html:379: warning: no link for: 'mm-modem-voice-delete-finish' -> (<code class="function">mm_modem_voice_delete_finish()</code>). html/MMModemVoice.html:380: warning: no link for: 'mm-modem-voice-delete-sync' -> (<code class="function">mm_modem_voice_delete_sync()</code>).
2016-03-16libmm-glib,modem-location: fix unknown method in documentationAleksander Morgado
html/MMModemLocation.html:516: warning: no link for: 'mm-modem-dup-supl-server' -> (<code class="function">mm_modem_dup_supl_server()</code>).
2016-03-15build,libmm-glib: built headers shouldn't be included in distAleksander Morgado
2016-03-15build: end all multiline list variables with $(NULL)Aleksander Morgado
So that appending a new item in the list only inserts one new line (i.e. the last $(NULL) is the last item always).
2016-03-15build,libmm-glib: fix gdbus-codegen rulesAleksander Morgado
The rule with multiple targets means that for each of the target the command specified is run; not that a single run of the command generates all the targets specified. So, generate the .c file with the command, and make the .h and the .xml files a side-effect of the .c generation.
2016-01-20libmm-glib: make C++ happy by not using 'class'Dan Williams
2015-12-19location: support updating the GPS refresh timeAleksander Morgado
The default setup uses a refresh time of 30s, which means that even if the GPS location updates are received at a higher frequency, the DBus interface will still expose at most one update every 30s. This patch includes a new "SetGpsRefreshTime()" method in the Location interface, which takes a single 'u' parameter, specifying the refresh rate to use, in seconds. This method also allows 0 being passed, which will make the implementation to publish the GPS location updates are soon as ModemManager detects them. Along with the new method, a "GpsRefreshTime" read-only property is exposed to specify the refresh time in effect. The new method and property will only be applicable if the device has GPS capabilities. https://bugs.freedesktop.org/show_bug.cgi?id=89924
2015-12-07libmm-glib: retrieve stats from the bearerAleksander Morgado
The MMBearer object is updated to provide getter methods to retrieve the new MMBearerStats object.
2015-12-07libmm-glib: new helper object to handle bearer statsAleksander Morgado
The new MMBearerStats object provides a simple API to interact with the new dictionary containing the bearer connection stats.
2015-09-24libmm-glib: don't create a SIM object if empty path (/) givenAleksander Morgado
Instead, we'll return NULL and an error set.
2015-09-16libmm-glib, simple: add missing introspection annotations to disconnect()Krzysztof Kotlenga
2015-08-02libmm-glib,docs: fix missing documentationsAleksander Morgado
2015-08-02libmm-glib,call: add missing 'dtmf' variable descriptionAleksander Morgado
2015-08-02core,libmm-glib,cli,voice: Replaced 'SendTone' method and 'ToneReceived' ↵Marco Bascetta
signal with 'SendDtmf' and 'DtmfReceived'
2015-08-02libmm-glib,cli: Replaced 'list call' with 'list calls'Marco Bascetta
2015-08-02libmm-glib,voice: minor coding style fixesAleksander Morgado
2015-08-02api,voice: added DTMF interface specificationMarco Bascetta
2015-08-02fixes: added voice support in libmm-glib MMManager, also fixed wrong number ↵Riccardo Vangelisti
of parameters in mm-call-list class init
2015-08-02build: added voice call include in libmm-glib and modified Makefile.amRiccardo Vangelisti
2015-08-02libmm-glib: added support for Modem.Voice and Call interfacesRiccardo Vangelisti
2015-01-11build: add code coverage supportJakub Sitnicki
Build all targets, except for CLI tools (mmcli, uml290), with special flags needed for collecting code coverage information when the build has been configured with --enable-code-coverage. Three new targets are available in the top build directory: - `check-code-coverage' runs the test suite and generates a code coverage report, - `code-coverage-capture' generates a code coverage report from already collected data, which can come in handy when one wants to see code paths touched by a particular test, - `code-coverage-clean' removes the collected coverage data and the generated reports.
2014-09-05libmm-glib,location: add helpers to get/set the SUPL server addressAleksander Morgado
2014-07-29libmbim-glib: handle explicit '+' on positive numbersDavid McCullough
2014-06-13libmm-glib: always return all bearer propertiesDan Williams
IPv6 may have addresses and other information even if the bearer's method is DHCP.
2014-06-11build: look for gdbus-codegen through pkg-configAleksander Morgado
2014-06-03libmm-glib: fix a memory leak of GMutexBen Chan
2014-05-20libmbim-glib: consistently use spaces for indentationBen Chan
2014-05-05libmm-glib: Initialize result arrayMartin Pitt
In mm_modem_messaging_get_supported_storages(), initialize array to avoid a potential crash with an uninitialized value, and a build failure due to mm-modem-messaging.c:168:24: error: 'array' may be used uninitialized in this function [-Werror=maybe-uninitialized] *n_storages = array->len; https://bugzilla.gnome.org/show_bug.cgi?id=729267
2014-03-25api: add MTU to bearer IP config propertiesBen Chan
This patch adds a 'mtu' value to the Ip4Config and Ip6Config property of a Bearer object, which indicates the value of the maximum transmission unit for the established connection when such information is available (e.g. via QMI_WDS_GET_RUNTIME_SETTINGS on a QMI modem or MBIM_CID_IP_CONFIGURATION on a MBIM modem).
2014-02-27libmm-glib: deep-copy ports array in ensure_internal_ports() (bgo #724900)Dan Williams
ensure_internal_ports() didn't deep-copy the ports array, which meant that anything calling mm_modem_port_info_array_free() was freeing the internal memory owned by MMModem if it retrieved the array with mm_modem_get_ports(). https://bugzilla.gnome.org/show_bug.cgi?id=724900
2014-02-13libmm-glib,tests: use gdbus-codegen to generate code for the new Test interfaceAleksander Morgado
2013-11-22libmm-glib: add methods to retrieve 'Bearers' property in Modem interfaceBen Chan
2013-11-21introspection,api: new 'Messages' property in the Messaging interfaceAleksander Morgado
https://bugzilla.gnome.org/show_bug.cgi?id=712276
2013-11-21introspection,api: new 'Bearers' property in the Modem interfaceAleksander Morgado
https://bugzilla.gnome.org/show_bug.cgi?id=712276
2013-10-25libmm-glib: allow new 'teleservice-id' and 'service-category' keywords in ↵Aleksander Morgado
MMSmsProperties