-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Gracefully handle and report failure to reload config #49
Gracefully handle and report failure to reload config #49
Conversation
config.c
Outdated
wl_list_for_each_safe(criteria, tmp, &new_config.criteria, link) { | ||
wl_list_remove(&criteria->link); | ||
wl_list_insert(config->criteria.prev, &criteria->link); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a little gross, but I thought it was worth it to avoid just doing the parsing again. That is an alternative, however.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think you can do it with wl_list_insert_list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, I forgot that was there.
dbus/mako.c
Outdated
} | ||
|
||
static const sd_bus_vtable service_vtable[] = { | ||
SD_BUS_VTABLE_START(0), | ||
SD_BUS_METHOD("DismissAllNotifications", "", "", handle_dismiss_all_notifications, SD_BUS_VTABLE_UNPRIVILEGED), | ||
SD_BUS_METHOD("DismissLastNotification", "", "", handle_dismiss_last_notification, SD_BUS_VTABLE_UNPRIVILEGED), | ||
SD_BUS_METHOD("InvokeAction", "s", "", handle_invoke_action, SD_BUS_VTABLE_UNPRIVILEGED), | ||
SD_BUS_METHOD("Reload", "", "", handle_reload, SD_BUS_VTABLE_UNPRIVILEGED), | ||
SD_BUS_METHOD("Reload", "", "b", handle_reload, SD_BUS_VTABLE_UNPRIVILEGED), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to use dbus errors instead of return values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know those existed, but probably!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks! |
reload_config
return a booleanmakoctl
appropriatelyFixes #44.