Article View: net.notes
Article #221How to fix notes to NOT generate new "orphaned responses"
From: Berry Kercheval
Date: Mon, 24 Jun 1985 21:15
Date: Mon, 24 Jun 1985 21:15
143 lines
5595 bytes
5595 bytes
Attention Notes system maintainers:
If you apply this fix to 'newsinput.c' your site will not generate any more
of those obnoxious 'Orphaned Response' messages everyone is ignoring.
This fix will not deal with incoming articles already titled "Re: Orphaned
Response -(nf)" but at least you will no longer be a part of the problem.
You should be able to feed this context diff into patch(1).
If you do not have patch, five minutes in your editor and a make will
fix you up.
--berry
-----cut here------
*** newsinput.c Fri Oct 21 11:11:54 1983
--- onewsinput.c Mon Apr 11 10:43:25 1983
***************
*** 134,149
j = i; /* start at rhs */
while (j && (line[j] != '!') && (line[j] != ':') && (line[j] != '.'))
! {
! if ( line[j] == ')' ) {
! while ( j && (line[j] != '(' )) /* skip over Realnames in parens
! * from 2.9 news */
! j--;
! }
! j--; /* back to sys */
! }
!
! atcount = 0; /* count ARPA hosts parsed */
for (i = 0, j++; (i < NAMESZ); i++)
if ((auth.aname[i] = line[j + i]) == '@' && atcount++)
{
--- 133,140 -----
while (getc (rawnews) != '\n'); /* make sure is end */
j = i; /* start at rhs */
while (j && (line[j] != '!') && (line[j] != ':') && (line[j] != '.'))
! j--; /* back to sys */
! atcount = 0; /* count ARPA hosts parsed */
for (i = 0, j++; (i < NAMESZ); i++)
if ((auth.aname[i] = line[j + i]) == '@' && atcount++)
{
***************
*** 159,169
else
if (auth.aname[i] == 0)
break;
! /* build the from system */
! for (i = 0; (i < SYSSZ - 1) &&
! line[i] != '!' &&
! line[i] != ':' &&
! line[i] != '.'; i++)
fromsys[i] = line[i];
fromsys[i] = '\0';
--- 150,157 -----
else
if (auth.aname[i] == 0)
break;
! /* build the from system */
! for (i = 0; (i < SYSSZ - 1) && line[i] != '!' && line[i] != ':' && line[i] != '.'; i++)
fromsys[i] = line[i];
fromsys[i] = '\0';
***************
*** 459,465
copydate (&entered, ¬e.n_date);
gettime (&whentime); /* get current time */
status = ORPHND + FRMNEWS; /* combo there */
- #ifdef notdef
for (i = 0, p = "Orphaned Response"; (i < TITLEN) && *p; p++, i++)
note.ntitle[i] = *p;
for (; i < TITLEN; i++)
--- 447,452 -----
copydate (&entered, ¬e.n_date);
gettime (&whentime); /* get current time */
status = ORPHND + FRMNEWS; /* combo there */
for (i = 0, p = "Orphaned Response"; (i < TITLEN) && *p; p++, i++)
note.ntitle[i] = *p;
for (; i < TITLEN; i++)
***************
*** 465,470
for (; i < TITLEN; i++)
note.ntitle[i] = ' ';
/* pad */
where.addr = 0; /* no text */
notenum = putnote (&io, &where, note.ntitle, status,
¬e, ¬e.n_auth, NOPOLICY, NOLOCKIT, NOADDID, fromsys, ADDTIME);
--- 452,458 -----
for (; i < TITLEN; i++)
note.ntitle[i] = ' ';
/* pad */
+
where.addr = 0; /* no text */
notenum = putnote (&io, &where, note.ntitle, status,
¬e, ¬e.n_auth, NOPOLICY, NOLOCKIT, NOADDID, fromsys, ADDTIME);
***************
*** 468,495
where.addr = 0; /* no text */
notenum = putnote (&io, &where, note.ntitle, status,
¬e, ¬e.n_auth, NOPOLICY, NOLOCKIT, NOADDID, fromsys, ADDTIME);
- #else
- for (i = length; i < TITLEN; i++)
- title[i] = ' '; /* space fill */
- where.addr = 0; /* no text */
- {
- FILE *fp;
-
- fp = fopen("/ff/notes/.utilities/orphanlog", "a");
- if ( fp != NULL ) {
- fprintf (fp,"Orphaned response from news. ");
- fprintf (fp,"Creating empty base note:\n");
- fprintf (fp,"\tSystem: %s\n", fromsys);
- fprintf (fp,"\tTitle: \"%s\"\n", title);
- fprintf (fp,"Orphans so far: %d\n", io.norphans);
- fprintf (fp,"----------------------\n\n");
- fclose (fp);
- }
- }
- notenum = putnote (&io, &where, title, status,
- ¬e, ¬e.n_auth, NOPOLICY, NOLOCKIT,
- NOADDID, fromsys, ADDTIME);
- #endif
io.norphans++; /* census of orphans */
getnrec (&io, notenum, ¬e2); /* get good one */
}
--- 456,461 -----
where.addr = 0; /* no text */
notenum = putnote (&io, &where, note.ntitle, status,
¬e, ¬e.n_auth, NOPOLICY, NOLOCKIT, NOADDID, fromsys, ADDTIME);
io.norphans++; /* census of orphans */
getnrec (&io, notenum, ¬e2); /* get good one */
}
----end of patch-------
--
Berry Kercheval Zehntel Inc. (ihnp4!zehntel!zinfandel!berry)
(415)932-6900 (kerch@lll-tis.ARPA)
Technical Details
Message-ID:
<437@zinfandel.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!umcp-cs!gymble!lll-crg!dual!qantel!vlsvax1!zehntel!zinfandel!berryShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site zinfandel.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!umcp-cs!gymble!lll-crg!dual!qantel!vlsvax1!zehntel!zinfandel!berry From: berry@zinfandel.UUCP (Berry Kercheval) Newsgroups: net.notes,net.news Subject: How to fix notes to NOT generate new "orphaned responses" Message-ID: <437@zinfandel.UUCP> Date: Mon, 24-Jun-85 17:15:14 EDT Article-I.D.: zinfande.437 Posted: Mon Jun 24 17:15:14 1985 Date-Received: Sat, 29-Jun-85 04:13:14 EDT Reply-To: berry@zinfandel.UUCP (Berry Kercheval) Organization: Zehntel Inc., Walnut Creek CA Lines: 143 Keywords: Orphaned Response, notes, fix