]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/modules/ctdlproto/serv_rooms.c
cdb_next_item() now returns both key and value
[citadel.git] / citadel / server / modules / ctdlproto / serv_rooms.c
index c57395a78252806bb63d29f229d47dec20428be8..29f57c8883241bd84e6d0ae71c22ae4a2efaa266 100644 (file)
@@ -322,21 +322,18 @@ void cmd_goto(char *gargs) {
 
 void cmd_whok(char *cmdbuf) {
        struct ctdluser temp;
-       struct cdbdata cdbus;
+       struct cdbkeyval cdbus;
        int ra;
 
        cprintf("%d Who knows room:\n", LISTING_FOLLOWS);
        cdb_rewind(CDB_USERS);
-       while (cdbus = cdb_next_item(CDB_USERS), cdbus.ptr!=NULL) {
+       while (cdbus = cdb_next_item(CDB_USERS), cdbus.val.ptr!=NULL) {
                memset(&temp, 0, sizeof temp);
-               memcpy(&temp, cdbus.ptr, sizeof temp);
-
+               memcpy(&temp, cdbus.val.ptr, sizeof temp);
                CtdlRoomAccess(&CC->room, &temp, &ra, NULL);
-               if ((!IsEmptyStr(temp.fullname)) && 
-                   (CC->room.QRflags & QR_INUSE) &&
-                   (ra & UA_KNOWN)
-                       )
+               if ((!IsEmptyStr(temp.fullname)) && (CC->room.QRflags & QR_INUSE) && (ra & UA_KNOWN)) {
                        cprintf("%s\n", temp.fullname);
+               }
        }
        cprintf("000\n");
 }