diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-08-23 16:19:00 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-08-23 16:19:00 +0000 |
commit | cbc61d193386d307e35cc709591833175ed044d8 (patch) | |
tree | 03999f2c1dc9998f4751ab64845d7f13a7385e6c | |
parent | 921ab9a35a115e9612e61eb8c1ec32e8cc8faa34 (diff) | |
download | fetchmail-cbc61d193386d307e35cc709591833175ed044d8.tar.gz fetchmail-cbc61d193386d307e35cc709591833175ed044d8.tar.bz2 fetchmail-cbc61d193386d307e35cc709591833175ed044d8.zip |
Condition out most of the debugging.
svn path=/trunk/; revision=59
-rw-r--r-- | pop3.c | 47 |
1 files changed, 45 insertions, 2 deletions
@@ -193,7 +193,12 @@ struct hostrec *queryctl; ok = POP3_sendRETR(number,socket); if (ok != 0) goto cleanUp; - + +#ifdef DEBUGLOG + if (outlevel == O_VERBOSE) + fprintf(stderr, "reading text of %d\n", number); +#endif /* DEBUGLOG */ + if (number >= first || queryctl->fetchall) ok = POP3_readmsg(socket,mboxfd, queryctl->servername, @@ -201,13 +206,29 @@ struct hostrec *queryctl; queryctl->rewrite); else ok = 0; + +#ifdef DEBUGLOG + if (outlevel == O_VERBOSE) + fprintf(stderr, "done reading text of %d; status %d\n", number, ok); +#endif /* DEBUGLOG */ + if (ok != 0) goto cleanUp; +#ifdef DEBUGLOG + if (outlevel == O_VERBOSE) + fprintf(stderr, "about to update last-seen field with %d\n", number); +#endif /* DEBUGLOG */ + /* update the last-seen field for this host */ if (use_uidl && (ok = POP3_sendUIDL(number, socket, &cp)) == 0) (void) strcpy(queryctl->lastid, cp); +#ifdef DEBUGLOG + if (outlevel == O_VERBOSE) + fprintf(stderr, "about to check for deletion of %d\n", number); +#endif /* DEBUGLOG */ + /* maybe we delete this message now? */ if ((number < first && queryctl->flush) || !queryctl->keep) { if (outlevel > O_SILENT && outlevel < O_VERBOSE) @@ -221,13 +242,35 @@ struct hostrec *queryctl; else ; /* message is kept */ - /* close the mail pipe if we're using the system mailbox */ +#ifdef DEBUGLOG + if (outlevel == O_VERBOSE) + fprintf(stderr, "about to check for mail folder close after %d\n", number); +#endif /* DEBUGLOG */ + + /* close the mail pipe, we'll reopen before next message */ if (queryctl->output == TO_MDA && (queryctl->fetchall || number >= first)) { + +#ifdef DEBUGLOG + if (outlevel == O_VERBOSE) + fprintf(stderr, "about to close pipe\n"); +#endif /* DEBUGLOG */ + ok = closemailpipe(mboxfd); + +#ifdef DEBUGLOG + if (outlevel == O_VERBOSE) + fprintf(stderr, "done closing pipe, status %d\n", ok); +#endif /* DEBUGLOG */ + if (ok != 0) goto cleanUp; } + +#ifdef DEBUGLOG + if (outlevel == O_VERBOSE) + fprintf(stderr, "finished processing of %d\n", number); +#endif /* DEBUGLOG */ } ok = POP3_sendQUIT(socket); |