Article View: comp.bugs.4bsd
Article #570fixes to nntpxmit
From: Ka Kahula
Date: Fri, 06 Mar 1987 18:04
Date: Fri, 06 Mar 1987 18:04
57 lines
2205 bytes
2205 bytes
We were starting nntpxit sessions so often that sometimes one
would begin while another one was still in progress. Also
there is extra junk after the Message-ID in many (but not all)
articles from UMass. The following changes to the version of
nntpxmit that is on the 4.3 tape fix these problems.
RCS file: RCS/nntpxmit.c,v
retrieving revision 1.1
diff -c -r1.1 nntpxmit.c
*** /tmp/,RCSt1015808 Fri Mar 6 12:00:52 1987
--- nntpxmit.c Fri Mar 6 11:05:39 1987
***************
*** 136,141 ****
--- 136,153 ----
return(FALSE);
}
+ #ifdef LOCK_EX
+ /*
+ ** interlock with other copies of this process
+ */
+ if (flock(fileno(filefile), LOCK_EX|LOCK_NB) != 0) {
+ dprintf(stderr, "%s: flock %s: %s\n", pname, file, errmsg(errno));
+ syslog(LOG_INFO, "%s: flock failed: %m\n", host);
+ fclose(filefile);
+ return(FALSE);
+ }
+ #endif
+
if (hello(host) == FAIL) {
fclose(filefile);
return(FALSE);
***************
*** 193,198 ****
--- 205,211 ----
{
struct hbuf header;
char scr[LBUFLEN];
+ char *cp;
bzero(&header, sizeof(header));
if (rfc822read(&header, fp, scr)) {
***************
*** 208,213 ****
--- 221,229 ----
fprintf(stderr, "%s: article w/o message-id!\n", pname);
return(ERR_GOTIT);
}
+ /* Nuke the pinheaders from UMass ! */
+ if ((cp = index(header.ident, '>')) && *++cp)
+ *cp = '\0';
sprintf(buf, "IHAVE %s", header.ident);
if (Do_Stats) Stats.offered++;
________________________________________________________
Matt University matt@oddjob.uchicago.edu
Crawford of Chicago {astrovax,ihnp4}!oddjob!matt
Technical Details
Message-ID:
<3686@oddjob.UChicago.EDU>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!ll-xn!mit-eddie!husc6!uwvax!oddjob!mattShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!ll-xn!mit-eddie!husc6!uwvax!oddjob!matt From: matt@oddjob.UChicago.EDU (Ka Kahula) Newsgroups: comp.bugs.4bsd,news.software.b Subject: fixes to nntpxmit Message-ID: <3686@oddjob.UChicago.EDU> Date: Fri, 6-Mar-87 13:04:26 EST Article-I.D.: oddjob.3686 Posted: Fri Mar 6 13:04:26 1987 Date-Received: Sun, 8-Mar-87 06:30:20 EST Reply-To: matt@oddjob.uchicago.edu (Ka Kahula) Distribution: world Organization: Department of Entropy Lines: 57