OSDN Git Service

neard: Fix passing negative error code to strerror
authorSzymon Janc <szymon.janc@tieto.com>
Tue, 29 Jan 2013 08:54:30 +0000 (09:54 +0100)
committerJohan Hedberg <johan.hedberg@intel.com>
Tue, 29 Jan 2013 21:57:27 +0000 (15:57 -0600)
error_reply expects non-negative error code.

plugins/neard.c

index 380eddc..a68500a 100644 (file)
@@ -636,7 +636,7 @@ static DBusMessage *push_oob(DBusConnection *conn, DBusMessage *msg, void *data)
 
        agent = adapter_get_agent(adapter);
        if (!agent)
-               return error_reply(msg, -ENONET);
+               return error_reply(msg, ENONET);
 
        io_cap = agent_get_io_capability(agent);
        agent_unref(agent);