Date: Fri, 9 Aug 2002 10:32:15 -0500 (CDT) From: Gilles Detillieux To: "ht://Dig mailing list" Subject: [htdig] Prevent htnotify from looping endlessly - PATCH for 3.1.6 This was submitted via htdig-Patches on SourceForge, by Martin Kraemer . 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: Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/ Dept. Physiology, U. of Manitoba Winnipeg, MB R3E 3J7 (Canada) ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ htdig-general mailing list To unsubscribe, send a message to with a subject of unsubscribe FAQ: http://htdig.sourceforge.net/FAQ.html