From: Gilles D. <gr...@sc...> - 2002-08-09 15:32:25
|
This was submitted via htdig-Patches on SourceForge, by Martin Kraemer <martin(at)apache.org>. Thanks, Martin! On Solaris 8, ... I have the effect that htnotify loops apparently endlessly, eating more and more space. I tracked it down to htnotify:: readPreAndPostamble() reading unconfigured prefix and suffix files. The returned value of config["htnotify_prefix_file"] and config["htnotify_suffix_file"] is not NULL, but "", so the loops while (! in.bad() && ! in.eof()) are entered (why? I don't know. It shouldn't have opened the "" files in the first place) and keeps appending '\n' characters without finding an end. The patch against 3.1.6 fixes that by checking for "" in addition to NULL. --- htnotify/htnotify.cc.orig 2002-02-01 00:47:18.000000000 +0100 +++ htnotify/htnotify.cc 2002-08-09 16:24:04.206967000 +0200 @@ -185,7 +185,7 @@ // define default preamble text - blank string preambleText = ""; - if (prefixfile != NULL) + if (prefixfile != NULL && strcmp(prefixfile,"") != 0) { ifstream in(prefixfile); char buffer[1024]; @@ -212,7 +212,7 @@ postambleText << " http://www.htdig.org/meta.html\n\n"; postambleText << "Cheers!\n\nht://Dig Notification Service\n"; - if (suffixfile != NULL) + if (suffixfile != NULL && strcmp(suffixfile,"") != 0) { ifstream in(suffixfile); char buffer[1024]; -- Gilles R. Detillieux E-mail: <gr...@sc...> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/ Dept. Physiology, U. of Manitoba Winnipeg, MB R3E 3J7 (Canada) |