diff options
-rw-r--r-- | configure.ac | 18 | ||||
-rw-r--r-- | src/mm-iface-modem.c | 2 |
2 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index a6ebfd62..d3c9beba 100644 --- a/configure.ac +++ b/configure.ac @@ -314,6 +314,23 @@ fi AM_CONDITIONAL(WITH_POLKIT, [test "x$with_polkit" != "xno"]) dnl----------------------------------------------------------------------------- +dnl AT command via DBus support (disabled by default unless running in --debug) +dnl +dnl It is suggested that this option is only enabled in custom built systems and +dnl only if truly required. +dnl + +AC_ARG_WITH(at_command_via_dbus, + AS_HELP_STRING([--with-at-command-via-dbus], + [Build with Modem.Command() interface enabled always]), + [], + [with_at_command_via_dbus=no]) + +if test "x$with_at_command_via_dbus" = "xyes"; then + AC_DEFINE(WITH_AT_COMMAND_VIA_DBUS, 1, [Define if you want to enable AT commands via DBus]) +fi + +dnl----------------------------------------------------------------------------- dnl MBIM support (enabled by default) dnl @@ -444,6 +461,7 @@ echo " qmi: ${with_qmi} systemd suspend/resume: ${with_systemd_suspend_resume} systemd journal: ${with_systemd_journal} + at command via dbus: ${with_at_command_via_dbus} Miscellaneous: gobject introspection: ${found_introspection} diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index 3f4c577b..17b3c295 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -753,6 +753,7 @@ handle_command_auth_ready (MMBaseModem *self, return; } +#if ! defined WITH_AT_COMMAND_VIA_DBUS /* If we are not in Debug mode, report an error */ if (!mm_context_get_debug ()) { g_dbus_method_invocation_return_error (ctx->invocation, @@ -763,6 +764,7 @@ handle_command_auth_ready (MMBaseModem *self, handle_command_context_free (ctx); return; } +#endif /* If command is not implemented, report an error */ if (!MM_IFACE_MODEM_GET_INTERFACE (self)->command || |