| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Fixes #676
Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
|
|
|
|
| |
Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The g_date_time_new_from_unix_utc() method in glib2 may fail if the
given timestamp is too far into the future. The value is supposed to
be seconds since unix time origin, but internally it will be converted
into usecs, so any value longer than G_MAXINT64 / USEC_PER_SECOND
isn't allowed.
This is currently used in the CLI, and we're anyway ignoring the error
returned in that case, but at least it won't crash if it ever happens.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
g_date_time_new, and g_date_time_new_utc return NULL if inputs are out
of range, and currently mm_new_iso8601_time passes the GDateTime created
by those two functions to date_time_format_iso8601 without checking for
NULL values, causing a g_date_time_format_iso8601 crash if PDU data is
corrupted with wrong date.
To prevent this, mm_new_iso8601_time now can return NULL and set a new
GError if GDateTime created by g_date_time_new is NULL.
Fixes #546
|
|
|
|
|
|
| |
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
Includes updates by Aleksander Morgado to fix coding style issues.
|
|
|
|
|
|
| |
meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.
|
|
|
|
| |
For strlen()
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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);
| ^~~~~~~~~~~~~~~~
|
|
|
|
|
|
| |
g_assert_cmpmem() isn't available until glib 2.46, while the minimum
glib version required by ModemManager is 2.36. This patch replaces the
uses of g_assert_cmpmem() with memcmp() instead.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
And make it only available for internal ModemManager compilation.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Both the ModemManager daemon and the mmcli will now include `libmm-glib.h' only.
We also handle two new special `_LIBMM_INSIDE_MM' and `LIBMM_INSIDE_MMCLI'
symbols, which if included before the `libmm-glib.h' library allow us to:
* Don't include the libmm-glib high level API in the ModemManager daemon, as
the object names would clash with those in the core.
* Define some of the methods of helper objects to be included only if compiling
ModemManager daemon or the mmcli.
|
|
It's pointless to have libmm-common around, just merge it into libmm-glib and
make ModemManager depend on libmm-glib directly. At the end, the non-common
stuff in libmm-glib is really minimal.
|