cookie in batcher.c
KIZU takashi
kizu at ics.es.osaka-u.ac.jp
Sat Sep 11 04:15:30 UTC 1999
Dear sirs,
>>>>> In article <19990910000100N.kizu at manazuru.ics.es.osaka-u.ac.jp>, KIZU takashi <kizu at ics.es.osaka-u.ac.jp> writes:
KIZU> I'm afraid that the variable `Cookie' on
KIZU> backends/batcher.c. has something wrong.
Sorry, I forgot the version information. It was INN-2.2.1.
KIZU> I try to make a patch against this problem. I hope it will be
KIZU> help you.
That patch has a bug, too. So please forget and try this one.
Sincerely yours.
- Osaka Univ. Japan.
- Kizu, Takashi kizu at ics.es.osaka-u.ac.jp
-- Attached file included as plaintext by Listar --
-- Desc: patch_for_batcher
--- batcher.c 1999/09/11 03:23:22 1.1
+++ batcher.c 1999/09/11 03:39:45
@@ -123,7 +123,11 @@
/* Last batch exit okay? */
if (BATCHstatus == 0) {
+#if 0
if (feof(stdin)) {
+#else
+ if (feof(stdin) && Cookie == -1) {
+#endif
/* Yes, and we're all done -- remove input and exit. */
(void)fclose(stdin);
if (Input)
@@ -131,7 +135,9 @@
exit(0);
}
/* Don't seek back -- batch was fine. */
+#if 0
Cookie = -1;
+#endif
}
/* Make an appropriate spool file. */
@@ -337,6 +343,9 @@
/* Record line length in case we do an ftell. Not portable to
* systems with non-Unix file formats. */
length = strlen(line);
+#if 1
+ Cookie = ftell(stdin) - length;
+#endif
/* Get lines like "name size" */
if ((p = strchr(line, '\n')) == NULL) {
@@ -436,7 +445,9 @@
BytesInCB += strlen(InitialString) + 1;
BytesWritten += strlen(InitialString) + 1;
}
+#if 0
Cookie = ftell(stdin) - length;
+#endif
goto SendIt;
}
@@ -476,7 +487,11 @@
QIOclose(qp);
else
(void)close(artfd);
+#if 0
RequeueAndExit(Cookie, line, BytesInArt);
+#else
+ RequeueAndExit(Cookie, (char *)NULL, 0L);
+#endif
}
if ((F = BATCHstart()) == NULL) {
@@ -488,7 +503,9 @@
(void)close(artfd);
break;
}
+#if 0
Cookie = ftell(stdin) - length;
+#endif
}
SendIt:
@@ -540,6 +557,9 @@
BytesWritten += BytesInArt;
ArtsInCB++;
ArtsWritten++;
+#if 1
+ Cookie = -1;
+#endif
if (GotInterrupt) {
BATCHstatus = BATCHclose(F);
More information about the inn-bugs
mailing list