1 /* This file is part of the Project Athena Zephyr Notification System.
2 * It contains source for ZReceiveNotice function.
4 * Created by: Robert French
6 * $Id: ZRecvNot.c,v 1.15 1999/01/22 23:19:21 ghudson Exp $
8 * Copyright (c) 1987,1988 by the Massachusetts Institute of Technology.
9 * For copying and distribution information, see the file
14 static char rcsid_ZReceiveNotice_c[] = "$Id: ZRecvNot.c,v 1.15 1999/01/22 23:19:21 ghudson Exp $";
19 Code_t ZReceiveNotice(notice, from)
21 struct sockaddr_in *from;
24 struct _Z_InputQ *nextq;
28 if ((retval = Z_WaitForComplete()) != ZERR_NONE)
31 nextq = Z_GetFirstComplete();
33 len = nextq->packet_len;
35 if (!(buffer = (char *) malloc((unsigned) len)))
41 (void) memcpy(buffer, nextq->packet, len);
46 if ((retval = ZParseNotice(buffer, len, notice)) != ZERR_NONE)
48 notice->z_checked_auth = auth;