[Exim] local_scan: removing recipients

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Jan-Piet Mens
Data:  
Para: exim-users
Assunto: [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