base-bearer,iface-modem-simple: log user requests to connect/disconnect

This commit is contained in:
Aleksander Morgado
2019-10-17 08:07:10 +00:00
parent 667d1613a8
commit f228d0dd6f
2 changed files with 10 additions and 1 deletions
+4
View File
@@ -927,6 +927,8 @@ handle_connect (MMBaseBearer *self,
MM_BASE_BEARER_MODEM, &ctx->modem,
NULL);
mm_dbg ("User request to connect bearer '%s'", self->priv->path);
mm_base_modem_authorize (ctx->modem,
invocation,
MM_AUTHORIZATION_DEVICE_CONTROL,
@@ -1118,6 +1120,8 @@ handle_disconnect (MMBaseBearer *self,
MM_BASE_BEARER_MODEM, &ctx->modem,
NULL);
mm_dbg ("User request to disconnect bearer '%s'", self->priv->path);
mm_base_modem_authorize (ctx->modem,
invocation,
MM_AUTHORIZATION_DEVICE_CONTROL,
+6 -1
View File
@@ -736,6 +736,8 @@ handle_connect (MmGdbusModemSimple *skeleton,
ctx->self = g_object_ref (self);
ctx->dictionary = g_variant_ref (dictionary);
mm_dbg ("User request to connect modem");
mm_base_modem_authorize (MM_BASE_MODEM (self),
invocation,
MM_AUTHORIZATION_DEVICE_CONTROL,
@@ -885,8 +887,11 @@ handle_disconnect (MmGdbusModemSimple *skeleton,
*
* We will detect the '/' string and set the bearer path as NULL in the
* context if so, and otherwise use the given input string as path */
if (g_strcmp0 (bearer_path, "/") != 0)
if (g_strcmp0 (bearer_path, "/") != 0) {
mm_dbg ("User request to disconnect modem (bearer '%s')", bearer_path);
ctx->bearer_path = g_strdup (bearer_path);
} else
mm_dbg ("User request to disconnect modem (all bearers)");
mm_base_modem_authorize (MM_BASE_MODEM (self),
invocation,