bhayden | 18 May 20:31

Using spg (search) in mail_sort

Background: working on mods to Cambridge's Prayer webmail, which uses 
c-client.

Current issue: mail_sort works as expected, consistently, with one 
exception. Any search program (spg) passed to it seems to be completely 
ignored. I've tried many different approaches for the last 48 hours and 
nothing has worked, so I'm curious if there are known issues with this. If 
not, I'll be happy to provide any further detail (code and debugging info).

Basic relevant snip:

    search_pgm = mail_newsearchpgm();   /* Basic search program */
    search_pgm->undeleted = T;
    sort_pgm = mail_newsortpgm();
    stream->dtb->sort = &mail_sort_msgs;
    sort_pgm->function = SORTARRIVAL;
    if (!
        (tmp =
         mail_sort(stream, NIL, search_pgm, sort_pgm, (SO_FREE | SE_FREE))))
    {
           return (NIL);
    }

I also tried, among other things, making an explicit assignment:

   stream->dtb->sort = &mail_sort_msgs;

in order to make sure that mail_sort_msgs, with its call to 
mail_search_full, was being used. It was, and still no difference. It 
appears that the search program is being invoked, but matches all messages 
in the stream no matter the criteria...

-Brian Hayden

_______________________________________________
Imap-uw mailing list
Imap-uw <at> u.washington.edu
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw


Gmane