base-bearer: avoid using MM_CORE_ERROR_CANCELLED
This commit is contained in:
@@ -724,8 +724,7 @@ connect_ready (MMBaseBearer *self,
|
|||||||
mm_dbg ("Couldn't connect bearer '%s': '%s'",
|
mm_dbg ("Couldn't connect bearer '%s': '%s'",
|
||||||
self->priv->path,
|
self->priv->path,
|
||||||
error->message);
|
error->message);
|
||||||
if ( g_error_matches (error, MM_CORE_ERROR, MM_CORE_ERROR_CANCELLED)
|
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
|
||||||
|| g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
|
|
||||||
/* Will launch disconnection */
|
/* Will launch disconnection */
|
||||||
launch_disconnect = TRUE;
|
launch_disconnect = TRUE;
|
||||||
} else
|
} else
|
||||||
@@ -735,10 +734,8 @@ connect_ready (MMBaseBearer *self,
|
|||||||
else if (g_cancellable_is_cancelled (self->priv->connect_cancellable)) {
|
else if (g_cancellable_is_cancelled (self->priv->connect_cancellable)) {
|
||||||
mm_dbg ("Connected bearer '%s', but need to disconnect", self->priv->path);
|
mm_dbg ("Connected bearer '%s', but need to disconnect", self->priv->path);
|
||||||
mm_bearer_connect_result_unref (result);
|
mm_bearer_connect_result_unref (result);
|
||||||
error = g_error_new (
|
error = g_error_new (G_IO_ERROR, G_IO_ERROR_CANCELLED,
|
||||||
MM_CORE_ERROR,
|
"Bearer got connected, but had to disconnect after cancellation request");
|
||||||
MM_CORE_ERROR_CANCELLED,
|
|
||||||
"Bearer got connected, but had to disconnect after cancellation request");
|
|
||||||
launch_disconnect = TRUE;
|
launch_disconnect = TRUE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user