[Exim] local_scan: removing recipients

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Jan-Piet Mens
Date:  
À: exim-users
Sujet: [Exim] local_scan: removing recipients
Hello,

According to the documentation in chapter 39, if I want to remove
a recipient in the local_scan routine, I must delete recipients by
"removing them from the vector". What exactly does that mean?
Must I free() reserved space, or not?

Would something like this be okay?

if (delete_this_person) {
    int n;
    recipient_item *rcur, *rnext;


    rcur = = &recipients_list[nr];
    for (n = nr+1; n < recipient_count; n++, rcur++) {


        free(rcpts[n].address);        // Must I free?


        rnext = recipients_list[n];


        rcur->address = rnext->address;
        rcur->pno      = rnext->pno;
        rcur->errors_to = rnext->errors_to;
    }
    --recipients_count;
}


Thanks & regards,
    -JP