]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/control.c
cdb_next_item() now returns both key and value
[citadel.git] / citadel / server / control.c
index ff3cccaa0de11fcc7584760186a04f07dc6ea409..b6e4d88bea0757699e4d774de376ef1e19f77f60 100644 (file)
@@ -639,18 +639,18 @@ void cmd_conf(char *argbuf) {
 
        // CONF LISTVAL - list configuration variables in the database and their values
        else if (!strcasecmp(cmd, "LISTVAL")) {
-               struct cdbdata cdbcfg;
+               struct cdbkeyval cdbcfg;
                int keylen = 0;
                char *key = NULL;
                char *value = NULL;
        
                cprintf("%d all configuration variables\n", LISTING_FOLLOWS);
                cdb_rewind(CDB_CONFIG);
-               while (cdbcfg = cdb_next_item(CDB_CONFIG), cdbcfg.ptr!=NULL) {
-                       if (cdbcfg.len < 1020) {
-                               keylen = strlen(cdbcfg.ptr);
-                               key = cdbcfg.ptr;
-                               value = cdbcfg.ptr + keylen + 1;
+               while (cdbcfg = cdb_next_item(CDB_CONFIG), cdbcfg.val.ptr!=NULL) {
+                       if (cdbcfg.val.len < 1020) {
+                               keylen = strlen(cdbcfg.val.ptr);
+                               key = cdbcfg.val.ptr;
+                               value = cdbcfg.val.ptr + keylen + 1;
                                cprintf("%s|%s\n", key, value);
                        }
                }