INN commit: trunk (backends/cvtbatch.c doc/pod/cvtbatch.pod)

INN Commit rra at isc.org
Tue Nov 3 18:51:44 UTC 2009


    Date: Tuesday, November 3, 2009 @ 10:51:44
  Author: iulius
Revision: 8704

Fix a bug in cvtbatch which was returning only the size
of the headers of an article with the "b" flag.  It now
correctly returns the size of the whole article (which
is what "b" is supposed to do).

Also add a missing free() call.

Modified:
  trunk/backends/cvtbatch.c
  trunk/doc/pod/cvtbatch.pod

----------------------+
 backends/cvtbatch.c  |    3 ++-
 doc/pod/cvtbatch.pod |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

Modified: backends/cvtbatch.c
===================================================================
--- backends/cvtbatch.c	2009-11-01 19:54:31 UTC (rev 8703)
+++ backends/cvtbatch.c	2009-11-03 18:51:44 UTC (rev 8704)
@@ -43,6 +43,7 @@
             die("usage error");
             break;
 	case 'w':
+            free(format);
 	    for (p = format = optarg; *p; p++) {
 		switch (*p) {
 		case FEED_BYTESIZE:
@@ -75,7 +76,7 @@
 	if (!IsToken(line))
 	    continue;
 	token = TextToToken(line);
-	if ((art = SMretrieve(token, RETR_HEAD)) == NULL)
+	if ((art = SMretrieve(token, RETR_ALL)) == NULL)
 	    continue;
         text = wire_findheader(art->data, art->len, "Message-ID");
 	if (text == NULL) {

Modified: doc/pod/cvtbatch.pod
===================================================================
--- doc/pod/cvtbatch.pod	2009-11-01 19:54:31 UTC (rev 8703)
+++ doc/pod/cvtbatch.pod	2009-11-03 18:51:44 UTC (rev 8704)
@@ -32,7 +32,7 @@
 as specified in newsfeeds(5).  They may be chosen from the following
 set:
 
-    b    Size of the article headers in bytes.
+    b    Size of the article in bytes.
     f    Storage API token of the article (same as "n").
     m    Article message-ID.
     n    Storage API token of the article.




More information about the inn-committers mailing list