]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blob - zephyr/lib/ZFlsSubs.c
upstream tag
[1ts-debian.git] / zephyr / lib / ZFlsSubs.c
1 /* This file is part of the Project Athena Zephyr Notification System.
2  * It contains source for the ZFlushSubscriptions function.
3  *
4  *      Created by:     Robert French
5  *
6  *      $Id: ZFlsSubs.c,v 1.5 1999/01/22 23:19:06 ghudson Exp $
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 #include <internal.h>
14
15 #ifndef lint
16 static const char rcsid_ZFlushSubscriptions_c[] = "$Id: ZFlsSubs.c,v 1.5 1999/01/22 23:19:06 ghudson Exp $";
17 #endif
18
19 Code_t ZFlushSubscriptions()
20 {
21         register int i;
22         
23         if (!__subscriptions_list)
24                 return (ZERR_NONE);
25
26         for (i=0;i<__subscriptions_num;i++) {
27                 free(__subscriptions_list[i].zsub_class);
28                 free(__subscriptions_list[i].zsub_classinst);
29                 free(__subscriptions_list[i].zsub_recipient);
30         }
31         
32         free((char *)__subscriptions_list);
33
34         __subscriptions_list = 0;
35         __subscriptions_num = 0;
36
37         return (ZERR_NONE);
38 }
39