static void subsread_set_syscall_error(struct mailbox_list *list,
const char *function, const char *path)
{
- if (errno == EACCES && !list->mail_set->mail_debug) {
+ if (errno == EACCES && !event_want_debug_log(list->ns->user->event)) {
mailbox_list_set_error(list, MAIL_ERROR_PERM,
"No permission to read subscriptions");
} else {
static void subswrite_set_syscall_error(struct mailbox_list *list,
const char *function, const char *path)
{
- if (errno == EACCES && !list->mail_set->mail_debug) {
+ if (errno == EACCES && !event_want_debug_log(list->ns->user->event)) {
mailbox_list_set_error(list, MAIL_ERROR_PERM,
"No permission to modify subscriptions");
} else {
}
if ((flags & MAIL_STORAGE_FLAG_NO_AUTOVERIFY) != 0) {
- if (!list->mail_set->mail_debug)
+ if (!event_want_debug_log(list->ns->user->event))
return 0;
/* we don't need to verify, but since debugging is
if (!mail_error_from_errno(&error, &error_string))
return FALSE;
- if (storage->set->mail_debug && error != MAIL_ERROR_NOTFOUND) {
+ if (event_want_debug_log(storage->event) && error != MAIL_ERROR_NOTFOUND) {
/* debugging is enabled - admin may be debugging a
(permission) problem, so return FALSE to get the caller to
log the full error message. */