/*
 *
 *	Copyright (C) 1988, 1989 by the Massachusetts Institute of Technology
 *    	Developed by the MIT Student Information Processing Board (SIPB).
 *    	For copying information, see the file mit-copyright.h in this release.
 *
 */
/*
 *
 * disserve.c -- Simple top level program for test.
 *
 */

#include <stdio.h>
#include <syslog.h>
#include <com_err.h>
#include "rpproc.h"

int main (argc,argv)
    int argc;
    char **argv;
{
    int code;

#ifndef SUBPROC
#ifdef LOG_DAEMON
    openlog ("discuss", LOG_PID, LOG_DAEMON);
#else
    openlog ("discuss", LOG_PID);
#endif
#endif
    init_server_rpc("discuss",&code);
    if (code) {
#ifndef SUBPROC
	syslog (LOG_ERR, "RPC initialization failed: %s",
		error_message (code));
#else
	fprintf(stderr, "%s\n", error_message(code));
#endif
	exit(1);
    }
    while (!code)
	recvit (&code);
    return 0;
}
