/[pkg-mixmaster]/trunk/Mix/Src/rem.c
ViewVC logotype

Diff of /trunk/Mix/Src/rem.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5 by rabbi, Wed Oct 31 08:19:51 2001 UTC revision 6 by rabbi, Fri Nov 2 20:57:03 2001 UTC
# Line 6  Line 6 
6     details.     details.
7    
8     Process remailer messages     Process remailer messages
9     $Id: rem.c,v 1.1 2001/10/31 08:19:53 rabbi Exp $ */     $Id: rem.c,v 1.2 2001/11/02 20:57:03 rabbi Exp $ */
10    
11    
12  #include "mix3.h"  #include "mix3.h"
# Line 296  void pool_packetexp(void) Line 296  void pool_packetexp(void)
296    
297  void logmail(char *mailbox, BUFFER *message)  void logmail(char *mailbox, BUFFER *message)
298  {  {
299      time_t t;
300      struct tm *tc;
301      char line[LINELEN];
302    
303    /* mailbox is "|program", "user@host", "stdout" or "filename" */    /* mailbox is "|program", "user@host", "stdout" or "filename" */
304    buf_rewind(message);    buf_rewind(message);
305    if (mailbox[0] == '\0')       /* default action */    if (mailbox[0] == '\0')       /* default action */
# Line 335  void logmail(char *mailbox, BUFFER *mess Line 339  void logmail(char *mailbox, BUFFER *mess
339        return;        return;
340      }      }
341      lock(mbox);      lock(mbox);
342      if (!bufileft(message, "From "))      if (!bufileft(message, "From ")) {
343        fprintf(mbox, "From Mixmaster Wed Jan 01 00:00:00 1970\n");        t = time(NULL);
344          tc = localtime(&t);
345          strftime(line, LINELEN, "From Mixmaster %a %b %d %H:%M:%S %Y\n", tc);
346          fprintf(mbox, line);
347        }
348      buf_write(message, mbox);      buf_write(message, mbox);
349      fprintf(mbox, "\n");      fprintf(mbox, "\n");
350      unlock(mbox);      unlock(mbox);

Legend:
Removed from v.5  
changed lines
  Added in v.6

  ViewVC Help
Powered by ViewVC 1.1.5