Fix an issue where the log option is applied incorrectly
[platform/upstream/connman.git] / src / error.c
index c414469..1a05920 100644 (file)
@@ -2,7 +2,7 @@
  *
  *  Connection Manager
  *
- *  Copyright (C) 2007-2012  Intel Corporation. All rights reserved.
+ *  Copyright (C) 2007-2013  Intel Corporation. All rights reserved.
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License version 2 as
@@ -58,10 +58,12 @@ DBusMessage *__connman_error_failed(DBusMessage *msg, int errnum)
        case EISCONN:
                return __connman_error_already_connected(msg);
        case ENOTCONN:
+       case ECONNREFUSED:
                return __connman_error_not_connected(msg);
        case ETIMEDOUT:
                return __connman_error_operation_timeout(msg);
        case EALREADY:
+       case EINPROGRESS:
                return __connman_error_in_progress(msg);
        case ENOKEY:
                return __connman_error_passphrase_required(msg);
@@ -183,3 +185,17 @@ DBusMessage *__connman_error_invalid_property(DBusMessage *msg)
        return g_dbus_create_error(msg, CONNMAN_ERROR_INTERFACE
                                ".InvalidProperty", "Invalid property");
 }
+
+#if defined TIZEN_EXT_WIFI_MESH
+DBusMessage *__connman_error_invalid_command(DBusMessage *msg)
+{
+       return g_dbus_create_error(msg, CONNMAN_ERROR_INTERFACE
+                               ".InvalidCommand", "Invalid Mesh Command");
+}
+
+DBusMessage *__connman_error_scan_abort_failed(DBusMessage *msg)
+{
+       return g_dbus_create_error(msg, CONNMAN_ERROR_INTERFACE
+                               ".ScanAbortFailed", "Scan Abort Failed");
+}
+#endif