iface-modem-simple: don't call the enable() methods in the class directly

Use the new `mm_base_modem_enable()' instead, which will pass down the
modem-wide cancellable to the enable() implementation.
This commit is contained in:
Aleksander Morgado
2012-03-16 15:21:56 +01:00
parent 686cfbb2c0
commit 1dbe4a12cf

View File

@@ -319,7 +319,7 @@ enable_ready (MMBaseModem *self,
{ {
GError *error = NULL; GError *error = NULL;
if (!MM_BASE_MODEM_GET_CLASS (self)->enable_finish (MM_BASE_MODEM (self), res, &error)) { if (!mm_base_modem_enable_finish (MM_BASE_MODEM (self), res, &error)) {
g_dbus_method_invocation_take_error (ctx->invocation, error); g_dbus_method_invocation_take_error (ctx->invocation, error);
connection_context_free (ctx); connection_context_free (ctx);
return; return;
@@ -428,8 +428,7 @@ connection_step (ConnectionContext *ctx)
case CONNECTION_STEP_ENABLE: case CONNECTION_STEP_ENABLE:
mm_info ("Simple connect state (%d/%d): Enable", mm_info ("Simple connect state (%d/%d): Enable",
ctx->step, CONNECTION_STEP_LAST); ctx->step, CONNECTION_STEP_LAST);
MM_BASE_MODEM_GET_CLASS (ctx->self)->enable (MM_BASE_MODEM (ctx->self), mm_base_modem_enable (MM_BASE_MODEM (ctx->self),
NULL, /* cancellable */
(GAsyncReadyCallback)enable_ready, (GAsyncReadyCallback)enable_ready,
ctx); ctx);
return; return;