ForEachUser(AddValidUser, NULL);
// Now traverse through the visits, purging irrelevant records...
- cdb_rewind(CDB_VISIT);
- while(cdbvisit = cdb_next_item(CDB_VISIT), cdbvisit != NULL) {
+ void *cur = cdb_rewind(CDB_VISIT);
+ while(cdbvisit = cdb_next_item(cur, CDB_VISIT), cdbvisit != NULL) {
memset(&vbuf, 0, sizeof(struct visit));
memcpy(&vbuf, cdbvisit->ptr,
( (cdbvisit->len > sizeof(struct visit)) ?
// Phase 1: traverse through the table, discovering old records...
syslog(LOG_DEBUG, "Purge use table: phase 1");
- cdb_rewind(CDB_USETABLE);
- while(cdbut = cdb_next_item(CDB_USETABLE), cdbut != NULL) {
+ void *cur = cdb_rewind(CDB_USETABLE);
+ while(cdbut = cdb_next_item(cur, CDB_USETABLE), cdbut != NULL) {
++total;
if (cdbut->len > sizeof(struct UseTable))
memcpy(&ut, cdbut->ptr, sizeof(struct UseTable));
// Phase 1: traverse through the table, discovering old records...
syslog(LOG_DEBUG, "Purge EUID index: phase 1");
- cdb_rewind(CDB_EUIDINDEX);
- while(cdbei = cdb_next_item(CDB_EUIDINDEX), cdbei != NULL) {
+ void *cur = cdb_rewind(CDB_EUIDINDEX);
+ while(cdbei = cdb_next_item(cur, CDB_EUIDINDEX), cdbei != NULL) {
memcpy(&msgnum, cdbei->ptr, sizeof(long));