From: Lucas De Marchi <lucas.de.marchi@xxxxxxxxx> --- src/adapter.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/adapter.c b/src/adapter.c index 26016f6..a6593b2 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -415,8 +415,12 @@ static DBusMessage *set_pairable(DBusMessage *msg, goto store; err = set_mode(adapter, MODE_DISCOVERABLE); - if (err < 0 && msg) - return btd_error_failed(msg, strerror(-err)); + if (err < 0) { + if (msg != NULL) + return btd_error_failed(msg, strerror(-err)); + + return NULL; + } store: mgmt_set_pairable(adapter->dev_id, pairable); -- 1.7.12.2 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html