/*
- * $Id: main.cc,v 1.325 2000/12/30 23:29:07 wessels Exp $
+ * $Id: main.cc,v 1.326 2001/01/01 16:24:39 hno Exp $
*
* DEBUG: section 1 Startup and Main Loop
* AUTHOR: Harvest Derived
authenticateShutdown();
storeDirCloseSwapLogs();
errorClean();
- mimeFreeMemory();
parseConfigFile(ConfigFile);
_db_init(Config.Log.log, Config.debugOptions);
ipcache_restart(); /* clear stuck entries */
/*
- * $Id: mime.cc,v 1.96 2000/12/05 09:15:59 wessels Exp $
+ * $Id: mime.cc,v 1.97 2001/01/01 16:24:39 hno Exp $
*
* DEBUG: section 25 MIME Parsing
* AUTHOR: Harvest Derived
} mimeEntry;
static mimeEntry *MimeTable = NULL;
-static mimeEntry **MimeTableTail = NULL;
+static mimeEntry **MimeTableTail = &MimeTable;
static void mimeLoadIconFile(const char *icon);
return m ? m->view_option : 0;
}
+/* Initializes/reloads the mime table
+ * Note: Due to Solaris STDIO problems the caller should NOT
+ * call mimeFreeMemory on reconfigure. This way, if STDIO
+ * fails we at least have the old copy loaded.
+ */
void
mimeInit(char *filename)
{
debug(50, 1) ("mimeInit: %s: %s\n", filename, xstrerror());
return;
}
- if (MimeTableTail == NULL)
- MimeTableTail = &MimeTable;
+ mimeFreeMemory();
while (fgets(buf, BUFSIZ, fp)) {
if ((t = strchr(buf, '#')))
*t = '\0';