On Tue, 15 Nov 2005, John Morrissey wrote:
Yes, I would also rather avoid trying to convince Courier's maintainer to
change this.

:-)

Would a patch be accepted that detected negative usage and reported zero in
that case while still using strtoul() to achieve the full range of an RFC
2087 number? Zero is the de facto result of negative usage, and it would
avoid throwing an error. It's almost cliched to say, but this would make
libc-client more liberal in what it accepts, without impacting compliant
implementations.

I don't want to do this by default, but the attached patch will do this if you specify "/loser" in the mailbox name. You need to use "/loser" with Courier servers anyway.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
*** imap4r1.c~  2005-11-04 09:04:41.000000000 -0800
--- imap4r1.c   2005-11-15 10:53:43.000000000 -0800
***************
*** 4107,4116 ****
        if (*s != ')') for (ql = qc = mail_newquotalist (); T;
                          qc = qc->next = mail_newquotalist ()) {
        if ((qc->name = imap_parse_astring (stream,&s,reply,NIL)) && s &&
!           (*s++ == ' ') && isdigit (*s)) {
!         qc->usage = strtoul (s,(char **) &s,10);
!         if ((*s++ == ' ') && isdigit (*s)) {
!           qc->limit = strtoul (s,(char **) &s,10);
                                /* another resource follows? */
            if (*s == ' ') continue;
                                /* end of resource list? */
--- 4107,4118 ----
        if (*s != ')') for (ql = qc = mail_newquotalist (); T;
                          qc = qc->next = mail_newquotalist ()) {
        if ((qc->name = imap_parse_astring (stream,&s,reply,NIL)) && s &&
!           (*s++ == ' ') && (isdigit (*s) || (LOCAL->loser && (*s == '-')))) {
!         if (isdigit (*s)) qc->usage = strtoul (s,(char **) &s,10);
!         else if (t = strchr (s,' ')) t = s;
!         if ((*s++ == ' ') && (isdigit (*s) || (LOCAL->loser &&(*s == '-')))){
!           if (isdigit (*s)) qc->limit = strtoul (s,(char **) &s,10);
!           else if (t = strpbrk (s,' )')) t = s;
                                /* another resource follows? */
            if (*s == ' ') continue;
                                /* end of resource list? */
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to