]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/modules/imap/imap_acl.c
validate_recipients() - completed removal of unused param
[citadel.git] / citadel / server / modules / imap / imap_acl.c
index 1cb6337f8cdfd0818c77cfd43e7d48ebe6c8a601..b69fe6efdcbbdf02117f53a5a2dad95152023f92 100644 (file)
@@ -3,7 +3,7 @@
 // Copyright (c) 2007-2023 by the citadel.org team
 //
 //  This program is open source software.  Use, duplication or disclosure
-//  are subject to the terms of the GNU General Public License, version 3.
+//  is subject to the terms of the GNU General Public License, version 3.
 
 #include "../../sysdep.h"
 #include <stdlib.h>
@@ -107,7 +107,7 @@ void imap_getacl(int num_parms, ConstStr *Params) {
        int msgs, new;
        int ret;
        struct ctdluser temp;
-       struct cdbdata *cdbus;
+       struct cdbkeyval cdbus;
        int ra;
        StrBuf *rights;
 
@@ -136,10 +136,9 @@ void imap_getacl(int num_parms, ConstStr *Params) {
        // Traverse the userlist
        rights = NewStrBuf();
        cdb_rewind(CDB_USERS);
-       while (cdbus = cdb_next_item(CDB_USERS), cdbus != NULL) {
+       while (cdbus = cdb_next_item(CDB_USERS), cdbus.val.ptr!=NULL) {         // always read through to the end
                memset(&temp, 0, sizeof temp);
-               memcpy(&temp, cdbus->ptr, sizeof temp);
-               cdb_free(cdbus);
+               memcpy(&temp, cdbus.val.ptr, sizeof temp);
 
                CtdlRoomAccess(&CC->room, &temp, &ra, NULL);
                if (!IsEmptyStr(temp.fullname)) {
@@ -188,7 +187,7 @@ void imap_listrights(int num_parms, ConstStr *Params) {
 
        // Search for the specified user
        ret = (-1);
-       valid = validate_recipients(Params[3].Key, NULL, 0);
+       valid = validate_recipients(Params[3].Key, 0);
        if (valid != NULL) {
                if (valid->num_local == 1) {
                        ret = CtdlGetUser(&temp, valid->recp_local);