| Newsgroups |
gmane.network.sn |
| Message-ID |
<3188.38c3280a.defdc@felicity> |
=?iso-8859-1?Q?Patrik_R=E5dman?= ([email protected]) wrote:
: Hi,
: I found the reason for the weird behaviour of .fifo... (Seemingly random
: group names being printed when a client connected.) writefifo() was
: comparing string pointers (which never changed) instead of the contents of
: the strings. tin (and netscape) sends a long series of GROUP commands when
: connecting, and every tenth group was printed to the fifo.
Yup, it used to be they were different pointers, but that got
changed. Thanks, I will fix this.
: With my patch (see below) applied, it seems to work as intended. :)
: (The patch is for 0.3.2)
: I'm not sure I like this algorithm though. It requires that you read 2-3
: articles from a group before it shows up in the fifo, and some small groups
: get perhaps just 1 new article a day. :) I'd prefer to have it print the
: name of the group the first time that an article is accessed, in order to
: get real data on which groups are read. (Including the low-traffic ones.)
: Is there any particular reason why writefifo() is called from the handlers
: for GROUP, XOVER, XPAT and XHDR? I would think that calling it from the
: commands that access (the body of) an article would be enough?
Because these are typically the first commands a browser emits when
entering a newsgroup. It's all a lot of guesswork, like the magic
number 10. If a different algo works better I'd be glad to use it.
More of the cruft I was talking about :) If I had to do it again
there would be no .fifo at all, instead that info would be piped
out, so the command line might look like:
sngetd tcpserver ... snntpd ...
sngetd opens a pipe as descriptor 3 (e.g.), runs tcpserver which
runs snntpd at the right time. All the while sngetd reads from 3,
which snntpd will write group names to. I dislike filesystem
clutter, a lot of config information can be on a command line, where
it's meaning is more obvious, than in a file, where no one know what
programs use it. In the case of a fifo it is particularly bad,
since you can't place comments in it.
-harold