summaryrefslogtreecommitdiff
path: root/src/error.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-05-12 19:26:25 -0700
committerMarcel Holtmann <marcel@holtmann.org>2009-05-12 19:26:25 -0700
commit6c47db77851dcd782625ea9a43e9070da6d1ba13 (patch)
tree486cf48ba5464fe7f4824d50bb4f4e5584758262 /src/error.c
parent2d95197b84332c6f7f7dd40e584f95b52507e490 (diff)
downloadconnman-6c47db77851dcd782625ea9a43e9070da6d1ba13.tar.gz
connman-6c47db77851dcd782625ea9a43e9070da6d1ba13.tar.bz2
connman-6c47db77851dcd782625ea9a43e9070da6d1ba13.zip
Fix service state signal emission and error handling
Diffstat (limited to 'src/error.c')
-rw-r--r--src/error.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/error.c b/src/error.c
index f8f6fdc1..2c361bc8 100644
--- a/src/error.c
+++ b/src/error.c
@@ -23,14 +23,19 @@
#include <config.h>
#endif
+#include <errno.h>
+#include <string.h>
+
#include <gdbus.h>
#include "connman.h"
-DBusMessage *__connman_error_failed(DBusMessage *msg)
+DBusMessage *__connman_error_failed(DBusMessage *msg, int errnum)
{
+ const char *str = strerror(errnum);
+
return g_dbus_create_error(msg, CONNMAN_ERROR_INTERFACE
- ".Failed", NULL);
+ ".Failed", str);
}
DBusMessage *__connman_error_invalid_arguments(DBusMessage *msg)