diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-06-29 21:31:17 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-06-29 21:31:17 +0200 |
commit | 536e1b71efa1c4adb459b2efd802c441be8bde43 (patch) | |
tree | 66b9c106a615fec86daef39d2274a29ebd817914 /src/error.c | |
parent | 04e0a4abe1df6ab7773c6347f91a19babc6e381a (diff) | |
download | connman-536e1b71efa1c4adb459b2efd802c441be8bde43.tar.gz connman-536e1b71efa1c4adb459b2efd802c441be8bde43.tar.bz2 connman-536e1b71efa1c4adb459b2efd802c441be8bde43.zip |
Add some special error conversion handling for EACCES and EINVAL
Diffstat (limited to 'src/error.c')
-rw-r--r-- | src/error.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/error.c b/src/error.c index 56c21902..6fc15a8b 100644 --- a/src/error.c +++ b/src/error.c @@ -34,6 +34,13 @@ DBusMessage *__connman_error_failed(DBusMessage *msg, int errnum) { const char *str = strerror(errnum); + switch (errnum) { + case EACCES: + return __connman_error_permission_denied(msg); + case EINVAL: + return __connman_error_invalid_arguments(msg); + } + return g_dbus_create_error(msg, CONNMAN_ERROR_INTERFACE ".Failed", str); } |