Skip to content

Commit

Permalink
[devicelock] No need to set dbus return value a second time
Browse files Browse the repository at this point in the history
Regardless if things go bad or not, other programs will need to
process the dbus call that started the devicelock callback. So
no need to set it again. Saves a few cpu cycles :D

Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
  • Loading branch information
philippedeswert committed Aug 26, 2014
1 parent d558918 commit a0d0d76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/usb_moded-devicelock.c
Expand Up @@ -117,6 +117,7 @@ int stop_devicelock_listener(void)

static DBusHandlerResult devicelock_unlocked_cb(DBusConnection *conn, DBusMessage *msg, void *user_data)
{
/* regardless what happens, we want that other programs get a chance to process this */
DBusHandlerResult result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
const char *interface = dbus_message_get_interface(msg);
const char *member = dbus_message_get_member(msg);
Expand Down Expand Up @@ -147,7 +148,6 @@ static DBusHandlerResult devicelock_unlocked_cb(DBusConnection *conn, DBusMessag
}
}
}
result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;

cleanup:
return result;
Expand Down

0 comments on commit a0d0d76

Please sign in to comment.