diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2006-04-01 10:31:07 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2006-04-01 10:31:07 +0000 |
commit | 26e3640e0627906e32340df39d41ae73a999f00c (patch) | |
tree | 9c00d5855e12276ceec62e21bcfacf753489017b | |
parent | 62977c31da1eec0999a5d5b787966f1bd1f92ce2 (diff) | |
download | fetchmail-26e3640e0627906e32340df39d41ae73a999f00c.tar.gz fetchmail-26e3640e0627906e32340df39d41ae73a999f00c.tar.bz2 fetchmail-26e3640e0627906e32340df39d41ae73a999f00c.zip |
Add folder information to headers in tracepoll mode.
Reported by Terry Brown.
svn path=/branches/BRANCH_6-3/; revision=4764
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | driver.c | 2 | ||||
-rw-r--r-- | fetchmail.h | 1 | ||||
-rw-r--r-- | transact.c | 4 |
4 files changed, 8 insertions, 1 deletions
@@ -32,7 +32,7 @@ fetchmail 6.3.4 (not yet released): # BUG FIXES: * configure: detect res_* functions properly with newer glibc ABIs. Patch by Miloslav Trmac. - +* tracepolls: add folder information if available. Reported by Terry Brown. fetchmail 6.3.3 (released 2006-03-30): @@ -1297,6 +1297,7 @@ is restored.")); /* now iterate over each folder selected */ for (idp = ctl->mailboxes; idp; idp = idp->next) { + ctl->folder = idp->id; pass = 0; do { dispatches = 0; @@ -1568,6 +1569,7 @@ is restored.")); closeUp: xfree(msgsizes); + ctl->folder = NULL; /* execute wrapup command, if any */ if (ctl->postconnect && (tmperr = system(ctl->postconnect))) diff --git a/fetchmail.h b/fetchmail.h index 67320374..b6ecb534 100644 --- a/fetchmail.h +++ b/fetchmail.h @@ -359,6 +359,7 @@ struct query struct idlist *oldsaved, *newsaved; struct idlist **oldsavedend; char lastdigest[DIGESTLEN]; /* last MD5 hash seen on this connection */ + char *folder; /* folder currently being polled */ /* internal use -- per-message state */ int mimemsg; /* bitmask indicating MIME body-type */ @@ -1190,6 +1190,10 @@ int readheaders(int sock, " polling %s account %s", ctl->server.pollname, ctl->remotename); + if (ctl->folder) + snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), + " folder %s", + ctl->folder); } snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), ")\r\n"); n = stuffline(ctl, buf); |