#endif
-static void make_message(FILE *fp, char *target_room, char *author)
+/*
+ * Simplified function to generate a message in our format
+ */
+static void ap_make_message(FILE *fp, char *target_room, char *author)
{
int a;
long bb, cc;
}
}
-
snprintf(tempspool, sizeof tempspool,
"./network/spoolin/ap.%04x",
getpid());
}
/* Generate a message from stdin */
- make_message(tempfp, target_room, author);
+ ap_make_message(tempfp, target_room, author);
/* Copy it to a new temp file in the spool directory */
rewind(tempfp);
perror("cannot open spool file");
exit(errno);
}
- while (ch = getc(tempfp), (ch >= 0))
+ while (ch = getc(tempfp), (ch >= 0)) {
putc(ch, spoolfp);
+ }
fclose(tempfp);
fclose(spoolfp);