]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - zephyr/lib/ZSendList.c
set svn:keywords
[1ts-debian.git] / zephyr / lib / ZSendList.c
1 /* This file is part of the Project Athena Zephyr Notification System.
2  * It contains source for the ZSendList function.
3  *
4  *      Created by:     Robert French
5  *
6  *      $Id$
7  *
8  *      Copyright (c) 1987 by the Massachusetts Institute of Technology.
9  *      For copying and distribution information, see the file
10  *      "mit-copyright.h". 
11  */
12
13 #ifndef lint
14 static char rcsid_ZSendList_c[] = "$Id$";
15 #endif
16
17 #include <internal.h>
18
19 Code_t ZSendList(notice, list, nitems, cert_routine)
20     ZNotice_t *notice;
21     char *list[];
22     int nitems;
23     Z_AuthProc cert_routine;
24 {
25     return(ZSrvSendList(notice, list, nitems, cert_routine, Z_XmitFragment));
26 }
27
28 Code_t ZSrvSendList(notice, list, nitems, cert_routine, send_routine)
29     ZNotice_t *notice;
30     char *list[];
31     int nitems;
32     Z_AuthProc cert_routine;
33     Code_t (*send_routine)();
34 {
35     Code_t retval;
36     ZNotice_t newnotice;
37     char *buffer;
38     int len;
39
40     if ((retval = ZFormatNoticeList(notice, list, nitems, &buffer, 
41                                     &len, cert_routine)) != ZERR_NONE)
42         return (retval);
43
44     if ((retval = ZParseNotice(buffer, len, &newnotice)) != ZERR_NONE)
45         return (retval);
46     
47     retval = Z_SendFragmentedNotice(&newnotice, len, cert_routine,
48                                     send_routine);
49
50     free(buffer);
51
52     return (retval);
53 }