14192
|
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 * Copyright (c) 1987 by the Massachusetts Institute of Technology.
|
|
7 * For copying and distribution information, see the file
|
|
8 * "mit-copyright.h".
|
|
9 */
|
|
10
|
|
11 #include "internal.h"
|
|
12
|
|
13 Code_t ZSendList(notice, list, nitems, cert_routine)
|
|
14 ZNotice_t *notice;
|
|
15 char *list[];
|
|
16 int nitems;
|
|
17 Z_AuthProc cert_routine;
|
|
18 {
|
|
19 return(ZSrvSendList(notice, list, nitems, cert_routine, Z_XmitFragment));
|
|
20 }
|
|
21
|
|
22 Code_t ZSrvSendList(notice, list, nitems, cert_routine, send_routine)
|
|
23 ZNotice_t *notice;
|
|
24 char *list[];
|
|
25 int nitems;
|
|
26 Z_AuthProc cert_routine;
|
|
27 Code_t (*send_routine)();
|
|
28 {
|
|
29 Code_t retval;
|
|
30 ZNotice_t newnotice;
|
|
31 char *buffer;
|
|
32 int len;
|
|
33
|
|
34 if ((retval = ZFormatNoticeList(notice, list, nitems, &buffer,
|
|
35 &len, cert_routine)) != ZERR_NONE)
|
|
36 return (retval);
|
|
37
|
|
38 if ((retval = ZParseNotice(buffer, len, &newnotice)) != ZERR_NONE)
|
|
39 return (retval);
|
|
40
|
|
41 retval = Z_SendFragmentedNotice(&newnotice, len, cert_routine,
|
|
42 send_routine);
|
|
43
|
|
44 free(buffer);
|
|
45
|
|
46 return (retval);
|
|
47 }
|