LINT
[unix-history] / usr / src / usr.sbin / sendmail / src / daemon.c
index fef2348..1a1c621 100644 (file)
@@ -1,12 +1,13 @@
 # include "sendmail.h"
 # include "sendmail.h"
+# include <sys/mx.h>
 
 
-static char    SccsId[] =      "@(#)daemon.c   3.1     %G%";
+static char    SccsId[] =      "@(#)daemon.c   3.4     %G%";
 
 /*
 **  DAEMON.C -- routines to use when running as a daemon.
 */
 
 
 /*
 **  DAEMON.C -- routines to use when running as a daemon.
 */
 
-static int     DaemonPipe;
+static FILE    *MailPort;      /* port that mail comes in on */
 \f/*
 **  GETREQUESTS -- open mail IPC port and get requests.
 **
 \f/*
 **  GETREQUESTS -- open mail IPC port and get requests.
 **
@@ -25,24 +26,14 @@ static int  DaemonPipe;
 
 getrequests()
 {
 
 getrequests()
 {
-       syserr("Daemon mode not yet implemented");
-       exit(EX_USAGE);
-}
-\f/*
-**  GETRECIPIENTS -- do a sendto to all recipients.
-**
-**     Parameters:
-**             none.
-**
-**     Returns:
-**             none.
-**
-**     Side Effects:
-**             The set of recipients for this request are
-**             collected and designated as recipients.
-*/
+       char *portname = "/dev/mailbox";
 
 
-getrecipients()
-{
-       return;
+
+       struct wh wbuf;
+
+       wbuf.index = index;
+       wbuf.count = 0;
+       wbuf.ccount = cnt;
+       wbuf.data = buf;
+       write(MailPort, &wbuf, sizeof wbuf);
 }
 }