Re: broken xhdr xref

Patrik Rådman <[email protected]>
Newsgroups gmane.network.sn
Message-ID <[email protected]>
Gabor Z. Papp <[email protected]> wrote:
> Just received this mail from the move-newsrc's package author:
> 
> * Jonathan Kamens <[email protected]>:
> 
> | There's nothing wrong with message-id-to-newsrc.  Your NNTP server is
> | producing bogus responses to "xhdr xref" commands.  For example, the
> | first "xhdr xref" command in the output you sent looks like this:
[snip]
> | There's probably a way for me to work around the problem, but I don't

Interesting. He's right, sn doesn't seem to be doing the right thing there.

If one wanted to hack move-newsrc to work with sn, it could use the
XOVER command and grab the Xref from there, but I created a patch that should
fix this problem... Please test!

  - Patrik


--- commands.c.orig	Mon Apr 22 21:46:12 2002
+++ commands.c	Mon Apr 22 21:52:57 2002
@@ -475,7 +475,10 @@
    char *id;
 
    id = art_findfield(article.head, args[1]);
-   args_write(1, "%d %s\r\n", speclo, *id ? id : "<0>");
+   if (*id)
+      args_write(1, "%d %s\r\n", speclo, id);
+   else if (strcasecmp(args[1], "xref") == 0)   /* Xref needs to be generated on the fly */
+      args_write(1, "%d %s %s:%d\r\n", speclo, me, specgroup, speclo);
 }
 
 void do_xhdr (void) { xlooper(args[2], putxhdr, "221 XHDR follows\r\n"); }


-- 
  Patrik Rådman  ·  patrik at iki dot fi  ·  http://www.iki.fi/patrik/
                     "Now, where was I?"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.