1700
|
1 /* This file is part of the Project Athena Zephyr Notification System.
|
|
2 * It contains source for the ZSendRawNotice function.
|
|
3 *
|
|
4 * Created by: John T. Kohl
|
|
5 *
|
|
6 * $Source$
|
|
7 * $Author: warmenhoven $
|
|
8 *
|
|
9 * Copyright (c) 1988 by the Massachusetts Institute of Technology.
|
|
10 * For copying and distribution information, see the file
|
|
11 * "mit-copyright.h".
|
|
12 */
|
|
13 /* $Header$ */
|
|
14
|
|
15 #ifndef lint
|
|
16 static char rcsid_ZSendRawList_c[] = "$Header$";
|
|
17 #endif
|
|
18
|
|
19 #include <internal.h>
|
|
20
|
|
21 Code_t ZSendRawList(notice, list, nitems)
|
|
22 ZNotice_t *notice;
|
|
23 char *list[];
|
|
24 int nitems;
|
|
25 {
|
|
26 return(ZSrvSendRawList(notice, list, nitems, Z_XmitFragment));
|
|
27 }
|
|
28
|
|
29 Code_t ZSrvSendRawList(notice, list, nitems, send_routine)
|
|
30 ZNotice_t *notice;
|
|
31 char *list[];
|
|
32 int nitems;
|
|
33 Code_t (*send_routine)();
|
|
34 {
|
|
35 Code_t retval;
|
|
36 ZNotice_t newnotice;
|
|
37 char *buffer;
|
|
38 int len;
|
|
39
|
|
40 if ((retval = ZFormatRawNoticeList(notice, list, nitems, &buffer,
|
|
41 &len)) != 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, NULL, send_routine);
|
|
48
|
|
49 free(buffer);
|
|
50
|
|
51 return (retval);
|
|
52 }
|