]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - zephyr/lib/ZSendNot.c
finalize -3
[1ts-debian.git] / zephyr / lib / ZSendNot.c
1 /* This file is part of the Project Athena Zephyr Notification System.
2  * It contains source for the ZSendNotice 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_ZSendNotice_c[] = "$Id$";
15 #endif
16
17 #include <internal.h>
18
19 Code_t ZSendNotice(notice, cert_routine)
20     ZNotice_t *notice;
21     Z_AuthProc cert_routine;
22 {
23     return(ZSrvSendNotice(notice, cert_routine, Z_XmitFragment));
24 }
25
26 Code_t ZSrvSendNotice(notice, cert_routine, send_routine)
27     ZNotice_t *notice;
28     Z_AuthProc cert_routine;
29     Code_t (*send_routine)();
30 {    
31     Code_t retval;
32     ZNotice_t newnotice;
33     char *buffer;
34     int len;
35
36     if ((retval = ZFormatNotice(notice, &buffer, &len, 
37                                 cert_routine)) != ZERR_NONE)
38         return (retval);
39
40     if ((retval = ZParseNotice(buffer, len, &newnotice)) != ZERR_NONE)
41         return (retval);
42     
43     retval = Z_SendFragmentedNotice(&newnotice, len, cert_routine,
44                                     send_routine);
45
46     free(buffer);
47
48     return (retval);
49 }