libidav/pwdstore.c

changeset 835
b4285fb0f582
parent 833
8aa2dc02d9b7
equal deleted inserted replaced
834:6a466635eace 835:b4285fb0f582
375 if(e) { 375 if(e) {
376 return; 376 return;
377 } 377 }
378 PwdIndexEntry *newentry = malloc(sizeof(PwdIndexEntry)); 378 PwdIndexEntry *newentry = malloc(sizeof(PwdIndexEntry));
379 newentry->id = id; 379 newentry->id = id;
380 if(locations) { 380 if(cxListSize(locations) > 0) {
381 newentry->locations = locations; 381 newentry->locations = locations;
382 cxListAdd(p->locations, newentry); 382 cxListAdd(p->locations, newentry);
383 } else { 383 } else {
384 newentry->locations = NULL; 384 newentry->locations = NULL;
385 cxListAdd(p->noloc, newentry); 385 cxListAdd(p->noloc, newentry);
386 cxListDestroy(locations);
386 } 387 }
387 cxMapPut(p->index, cx_hash_key_str(id), newentry); 388 cxMapPut(p->index, cx_hash_key_str(id), newentry);
388 } 389 }
389 390
390 void write_index_entry(CxBuffer *out, PwdIndexEntry *e) { 391 void write_index_entry(CxBuffer *out, PwdIndexEntry *e) {

mercurial