[news.software.b] C News question

kayvan@mrspoc.Transact.COM (Kayvan Sylvan) (07/07/89)

In ihave.c, the following segment exists in the faketrans function:

	fap->h.h_ngs = ng;
	fap->h.h_distr = (distr != NULL? distr: ng);
	fap->h.h_msgid = msgid;
	fap->h.h_path = hostname();
	fap->a_charswritten = AVEARTSIZE;
	histent = gethistory(msgid);
	if (histent == NULL || (fap->a_files = findfiles(histent)) == NULL)
		fap->a_files = "no.such.article!";

What is its purpose? I've been staring at this code for a while (it seeming
relevant to my ihave/sendme bug I posted about a few days ago) and have not
figured out why "no.such.article" is there.

My errlog file is filled with messages like this:

relaynews: `PATH=/usr/local/lib/news/bin:/usr/local/lib/newsbin/relay:/bin:/usr/bin </usenet/news/no/such/article! mail usenet' returned exit status 0400
relaynews: `PATH=/usr/local/lib/news/bin:/usr/local/lib/newsbin/relay:/bin:/usr/bin </usenet/news/no/such/article! mail usenet' returned exit status 0400

Any information would be greatly appreciated.

Thanks!!!

			---Kayvan
--
Kayvan Sylvan @ Transact Software, Inc. -*-  Mountain View, CA (415) 961-6112
Internet: kayvan@Transact.COM -*- UUCP: ...!{apple,pyramid,mips}!mrspoc!kayvan
-- 
Kayvan Sylvan @ Transact Software, Inc. -*-  Mountain View, CA (415) 961-6112
Internet: kayvan@Transact.COM -*- UUCP: ...!{apple,pyramid,mips}!mrspoc!kayvan

henry@utzoo.uucp (Henry Spencer) (07/08/89)

In article <KAYVAN.89Jul6191242@mrspoc.Transact.COM> mrspoc!kayvan@Apple.COM writes:
>	histent = gethistory(msgid);
>	if (histent == NULL || (fap->a_files = findfiles(histent)) == NULL)
>		fap->a_files = "no.such.article!";
>
>What is its purpose? I've been staring at this code for a while (it seeming
>relevant to my ihave/sendme bug I posted about a few days ago) and have not
>figured out why "no.such.article" is there.

It's there because there has to be some string in fap->a_files afterward,
and if there is no history-file entry or no filenames in that entry, there
is no valid file name that can be supplied.  This is generally harmless,
since the batcher quietly ignores missing files (such things are normal
results of cancellations and fast expiries).

If you are trying to do ihave/sendme without batching, you are making
several simultaneous mistakes, and we urge you to reconsider.  Unbatched
ihave/sendme is a thoroughly bad idea and we deliberately do not support it.
-- 
$10 million equals 18 PM       |     Henry Spencer at U of Toronto Zoology
(Pentagon-Minutes). -Tom Neff  | uunet!attcan!utzoo!henry henry@zoo.toronto.edu