On May 8 2008, Mark Crispin wrote:

I see the problem. You're probably the first person to have used the feature of selective expunge with sequence numbers as opposed to UIDs.

The attached imap4r1.c ought to fix this problem.  Please give it a try.

Getting closer. It doesn't segfault anymore, but no matter the sequence string it returns "Excessively complex sequence." Going back to the debugger, it looks to my untrained eye like the sequence is being corrupted by the assignment at line 2397:

stopped in imap_expunge at line 2397 in file "imap4r1.c"
 2397         char *t = (char *) fs_get (IMAPTMPLEN);
(dbx) dump
j = 0
s = 0x215e60 "Hang in there.."
t = 0xffbff3e8 ""
i = 2174752U
args = ARRAY
aseq = RECORD
ret = 0
reply = 0x215e60
stream = 0x31d0e8
sequence = 0x212f20 "25"
options = 0
(dbx) next stopped in imap_expunge at line 2400 in file "imap4r1.c"
 2400        for (*s = '\0', i = 1; i <= stream->nmsgs; ++i)
(dbx) dump
j = 0
s = 0x215e60 "Hang in there.."
t = 0x393d20 ""
i = 1U
args = ARRAY
aseq = RECORD
ret = 0
reply = 0x215e60
stream = 0x31d0e8
sequence = 0x1 "<bad address 0x1>"
options = 0

After completing that for loop, this results in (again, to my untrained eye) a sequence of ',56244' when what was passed in was '25':

stopped in imap_expunge at line 2405 in file "imap4r1.c"
 2405           s += strlen (s);        /* point at end of string */
(dbx) dump
j = 25U
s = 0x393d21 "56244"
t = 0x393d20 ",56244"
i = 25U
args = ARRAY
aseq = RECORD
ret = 25
reply = 0x393d21
stream = 0x31d0e8
sequence = 0x19 "<bad address 0x19>"
options = 0


Is that useful?
-Brian



On Thu, 8 May 2008, [EMAIL PROTECTED] wrote:
Hi folks. Here at the U of Minnesota we use a heavily-modded version of Cambridge's Prayer webmail. Out of the box it has a normal expunge call. I added one to do an expunge on specific messages. So, I happily did:

mail_expunge_full(stream, sequence, 0);

with 'sequence', of course, being a ptr to char the same as one would give to mail_copy_full. It compiles fine, core dumps at run time. Debugging, I get this:

signal SEGV (no mapping at the fault address) in imap_expunge at line 2403 in file "imap4r1.c"
2403           if (LOCAL->tmp[0]) *s++ = ',';

We're linking against a src-unmodified c-client built on solaris 9 with GNU C, from imap-2006k. I know there is a more recent version of the IMAP toolkit; I checked imap_expunge and it has not changed, so I thought I'd ask here first for anything easy and obvious before building a new version of c-client. Also checked the release notes of the newer versions and didn't see anything referring to expunges.

Anyone have any thoughts, or similar experience? I'll be happy to provide any more info as requested. Thanks,

-Brian Hayden
University of Minnesota
Internet Services

_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw



_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Reply via email to