From a31c2d49b6ed819cf77417a262c19bdba5a2a92d Mon Sep 17 00:00:00 2001 From: Patrik Flykt Date: Fri, 14 Dec 2012 13:01:19 +0200 Subject: [PATCH] vpn-provider: Report disconnect errors other than -EINPROGRESS Return code -EINPROGRESS is an indication of a disconnect taking place, not a disconnect error. --- vpn/vpn-provider.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c index e98573fb..4c9fa159 100644 --- a/vpn/vpn-provider.c +++ b/vpn/vpn-provider.c @@ -457,10 +457,10 @@ static DBusMessage *do_disconnect(DBusConnection *conn, DBusMessage *msg, DBG("conn %p provider %p", conn, provider); err = __vpn_provider_disconnect(provider); - if (err < 0) + if (err < 0 && err != -EINPROGRESS) return __connman_error_failed(msg, -err); - else - return g_dbus_create_reply(msg, DBUS_TYPE_INVALID); + + return g_dbus_create_reply(msg, DBUS_TYPE_INVALID); } static const GDBusMethodTable connection_methods[] = { -- 2.34.1