commit-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mailutils doc/texinfo/imap4.texi include/mailut...


From: Alain Magloire
Subject: mailutils doc/texinfo/imap4.texi include/mailut...
Date: Fri, 02 Nov 2001 00:03:29 -0500

CVSROOT:        /home/cvs
Module name:    mailutils
Changes by:     Alain Magloire <address@hidden> 01/11/02 00:03:29

Modified files:
        doc/texinfo    : imap4.texi 
        include/mailutils: folder.h mailbox.h 
        mailbox        : folder.c folder_imap.c folder_pop.c mailbox.c 
                         mbx_imap.c mbx_mbox.c mbx_pop.c 
        mailbox/include: folder0.h imap0.h mailbox0.h 

Log message:
        There were confusion, about the authority_t and the ticket_t.
        An authority_t is an object that implementes an authentication
        mechanism i.e. APOP, SASL, User/Passwd.  To retrieve or get
        information from the client/user, authority_t will use the
        ticket_t, it will call ticket_pop ().  For example, on an
        authority_t object that implements the user/passwd mechanism
        ticket_pop () will be call two times once for the user and
        the other for the passwd, by the authority_t object.
        
        So far so good, but the problem here was we had
        mailbox_{g,s}et_ticket(), folder_{g,s}et_ticket() and
        mailbox_{g,s}et_authority() and folder_{g,s}_authority().
        For example for a ticket , depending on when xx_set_ticket ()
        was done, a ticket_t could have been set on the mailbox_t structure
        or on the folder_t structure.  This was leading to use the wrong one,
        folder->ticket or mailbox->ticket.  Same problem occurs for
        authority_t.  To clear this up, ticket_t can only be set on the
        authority_t and autority_t can only be on a folder.  Having only one
        way to get at the authority or at the ticket fix the race conditions:
        {
        // No error checking is done.
        mailbox_t mbox;
        folder_t folder;
        authority_t auth;
        ticket_t ticket; ..
        ..
        // Setting the ticket
        mailbox_create (&mbox, where);
        mailbox_get_folder (mbox, &folder);
        folder_get_authority (folder, &auth)
        authority_set_ticket (auth, ticket);
        ....
        }
        
        * include/mailutils/mailbox.h: Remove mailbox_{g,s}et_ticket().
        mailbox_{gs}et_authority ().
        * include/mailutils/folder.h: Remove folder_{gs}et_authority().
        * mailbox/mailbox.c (mailbox_get_folder): New function.
        (mailbox_get_ticket): Removed.
        (mailbox_set_ticket): Removed.
        (mailbox_set_authority): Removed.
        (mailbox_get_authority): Removed.
        * mailbox/folder.c (folder_get_ticket): Removed.
        (folder_set_ticket): Removed.
        (folder_destroy): Removed destruction of ticket.
        * mailbox/folder_imap.c (folder_imap_get_authority): New function.
        (_folder_imap_init): Create authority.
        * mailbox/folder_pop.c (folder_pop_get_authority): New function.
        (folder_pop_open): New function.
        (folder_pop_close): New function.
        (_folder_pop_init): Create authority.
        * mailbox/mbx_imap.c (_mailbox_imap_init): Remove the creation
        of authority here, moved to _folder_imap_init().
        * mailbox/mbx_pop.c (_mailbox_pop_init): Remove the creation
        of authority here, moved to _folder_imap_init().

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/mailutils/doc/texinfo/imap4.texi.diff?cvsroot=OldCVS&tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/mailutils/include/mailutils/folder.h.diff?cvsroot=OldCVS&tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/mailutils/include/mailutils/mailbox.h.diff?cvsroot=OldCVS&tr1=1.14&tr2=1.15&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/mailutils/mailbox/folder.c.diff?cvsroot=OldCVS&tr1=1.12&tr2=1.13&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/mailutils/mailbox/folder_imap.c.diff?cvsroot=OldCVS&tr1=1.39&tr2=1.40&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/mailutils/mailbox/folder_pop.c.diff?cvsroot=OldCVS&tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/mailutils/mailbox/mailbox.c.diff?cvsroot=OldCVS&tr1=1.48&tr2=1.49&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/mailutils/mailbox/mbx_imap.c.diff?cvsroot=OldCVS&tr1=1.56&tr2=1.57&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/mailutils/mailbox/mbx_mbox.c.diff?cvsroot=OldCVS&tr1=1.60&tr2=1.61&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/mailutils/mailbox/mbx_pop.c.diff?cvsroot=OldCVS&tr1=1.58&tr2=1.59&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/mailutils/mailbox/include/folder0.h.diff?cvsroot=OldCVS&tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/mailutils/mailbox/include/imap0.h.diff?cvsroot=OldCVS&tr1=1.11&tr2=1.12&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/mailutils/mailbox/include/mailbox0.h.diff?cvsroot=OldCVS&tr1=1.17&tr2=1.18&r1=text&r2=text




reply via email to

[Prev in Thread] Current Thread [Next in Thread]