diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2011-07-17 19:35:29 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-07-17 19:35:29 +0200 |
commit | ce1c60d4e5f16dd654922db35b00bb3133819172 (patch) | |
tree | d42d2bb5922ff016dda2995df6f28f61366c9e40 /plugins/connman.c | |
parent | c91f546b2ba85d458a50ff4570da2609455dbe85 (diff) | |
download | ofono-ce1c60d4e5f16dd654922db35b00bb3133819172.tar.bz2 |
connman: Handle D-Bus without fd passing support
Diffstat (limited to 'plugins/connman.c')
-rw-r--r-- | plugins/connman.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/connman.c b/plugins/connman.c index 40063851..3a3429fe 100644 --- a/plugins/connman.c +++ b/plugins/connman.c @@ -36,6 +36,10 @@ #include <ofono/plugin.h> #include <ofono/private-network.h> +#ifndef DBUS_TYPE_UNIX_FD +#define DBUS_TYPE_UNIX_FD -1 +#endif + #define CONNMAN_SERVICE "net.connman" #define CONNMAN_PATH "/net/connman" @@ -231,8 +235,10 @@ static int connman_request(ofono_private_network_cb_t cb, void *data) DBG(""); - req = g_try_new(struct connman_req, 1); + if (DBUS_TYPE_UNIX_FD < 0) + return -EBADF; + req = g_try_new(struct connman_req, 1); if (req == NULL) return -ENOMEM; |