libidav/pwdstore.c

changeset 102
64ded9f6a6c6
parent 101
7b3a3130be44
equal deleted inserted replaced
101:7b3a3130be44 102:64ded9f6a6c6
135 newp->unlock_cmd = p->unlock_cmd ? strdup(p->unlock_cmd) : NULL; 135 newp->unlock_cmd = p->unlock_cmd ? strdup(p->unlock_cmd) : NULL;
136 newp->lock_cmd = p->lock_cmd ? strdup(p->lock_cmd) : NULL; 136 newp->lock_cmd = p->lock_cmd ? strdup(p->lock_cmd) : NULL;
137 newp->encoffset = p->encoffset; 137 newp->encoffset = p->encoffset;
138 newp->isdecrypted = p->isdecrypted; 138 newp->isdecrypted = p->isdecrypted;
139 139
140 CxIterator i = cxMapIterator(p->ids); 140 CxMapIterator i = cxMapIterator(p->ids);
141 cx_foreach(CxMapEntry *, e, i) { 141 cx_foreach(CxMapEntry *, e, i) {
142 PwdEntry *entry = e->value; 142 PwdEntry *entry = e->value;
143 pwdstore_put(newp, entry->id, entry->user, entry->password); 143 pwdstore_put(newp, entry->id, entry->user, entry->password);
144 } 144 }
145 145
487 i = cxListIterator(p->locations); 487 i = cxListIterator(p->locations);
488 cx_foreach(PwdIndexEntry*, e, i) { 488 cx_foreach(PwdIndexEntry*, e, i) {
489 write_index_entry(index, e); 489 write_index_entry(index, e);
490 } 490 }
491 491
492 i = cxMapIteratorValues(p->ids); 492 CxMapIterator mi = cxMapIteratorValues(p->ids);
493 cx_foreach(PwdEntry*, value, i) { 493 cx_foreach(PwdEntry*, value, mi) {
494 if(!value->id || !value->user || !value->password) { 494 if(!value->id || !value->user || !value->password) {
495 continue; 495 continue;
496 } 496 }
497 497
498 uint32_t idlen = strlen(value->id); 498 uint32_t idlen = strlen(value->id);

mercurial