From 6fd2bb26cd16adb9a38d37af9dda94ee7baa1c1c Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 23 Apr 2013 17:52:24 +0000 Subject: reuse upstream code for creating/removing spool --- USER/USER.xs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'USER/USER.xs') diff --git a/USER/USER.xs b/USER/USER.xs index 05e011e..0aa7b61 100644 --- a/USER/USER.xs +++ b/USER/USER.xs @@ -275,8 +275,8 @@ Admin_UserAdd(self, ent, is_system, dont_create_home) } /* Create a mail spool for the user. */ - if (lu_mailspool_create_remove(self, ent, 1) != 1) { - warn(_("Error creating mail spool.\n")); + if (lu_mail_spool_create(self, ent, &error) != 1) { + warn(_("Error creating mail spool: %s\n"), error ? error->string : "Unknown error"); RETVAL = 3; } } @@ -623,9 +623,10 @@ void Admin_CleanSpool(self, ent) USER::ADMIN *self USER::ENT *ent + USER__ERR *error = NULL; PPCODE: - if (lu_mailspool_create_remove(self, ent, 0) != 1) { - warn(_("Error deleting mail spool.\n")); + if (lu_mail_spool_remove(self, ent, &error) != 1) { + warn(_("Error deleting mail spool: %s\n"), error ? error->string : "Unknown error"); } MODULE = USER PACKAGE = USER::ENT PREFIX = Ent_ -- cgit v1.2.1