bugfix: LOGE messed with errno 25/207225/4
authorAdrian Szyndela <adrian.s@samsung.com>
Thu, 30 May 2019 10:37:53 +0000 (12:37 +0200)
committerAdrian Szyndela <adrian.s@samsung.com>
Fri, 31 May 2019 09:55:07 +0000 (11:55 +0200)
Change-Id: I626c8e4e809791e5a0050a3096b392336f85cc60

src/kdbus.cpp

index ce1f960..32e3257 100644 (file)
@@ -169,10 +169,10 @@ int KdbusConnection::get_conn_info(const char *bus_name,
                set_item_str(cmd->items, bus_name, l+1, KDBUS_ITEM_NAME);
        }
        if (ioctl(fd, KDBUS_CMD_CONN_INFO, cmd) < 0) {
-               LOGE("Failed KDBUS_CMD_CONN_INFO: %m\n");
                if (errno == ENXIO || errno == ESRCH)
                        return DBUSPOLICY_RESULT_DEST_NOT_AVAILABLE;
 
+               LOGE("Failed KDBUS_CMD_CONN_INFO: %m\n");
                return DBUSPOLICY_RESULT_KDBUS_ERROR;
        }