+ CtdlLogPrintf(CTDL_INFO, "Networking started for <%s>\n", CC->room.QRname);
+
+ /* If there are digest recipients, we have to build a digest */
+ if (sc->digestrecps != NULL) {
+ sc->digestfp = tmpfile();
+ fprintf(sc->digestfp, "Content-type: text/plain\n\n");
+ }
+
+ /* Do something useful */
+ CtdlForEachMessage(MSGS_GT, sc->lastsent, NULL, NULL, NULL,
+ network_spool_msg, sc);
+
+ /* If we wrote a digest, deliver it and then close it */
+ snprintf(buf, sizeof buf, "room_%s@%s",
+ CC->room.QRname, config.c_fqdn);
+ for (i=0; buf[i]; ++i) {
+ buf[i] = tolower(buf[i]);
+ if (isspace(buf[i])) buf[i] = '_';
+ }
+ if (sc->digestfp != NULL) {
+ fprintf(sc->digestfp, " -----------------------------------"
+ "------------------------------------"
+ "-------\n"
+ "You are subscribed to the '%s' "
+ "list.\n"
+ "To post to the list: %s\n",
+ CC->room.QRname, buf
+ );
+ network_deliver_digest(sc); /* deliver and close */
+ }
+
+ /* Now rewrite the config file */
+ writenfree_spoolcontrol_file (&sc, filename);