diff options
author | Robert S. French <rfrench@mit.edu> | 1987-07-09 16:02:06 +0000 |
---|---|---|
committer | Robert S. French <rfrench@mit.edu> | 1987-07-09 16:02:06 +0000 |
commit | e85212e9bd725eda9c1ca3667ee5bbf4d4316379 (patch) | |
tree | 5a291eea92b9c9eeccc5c752c75962124794fa56 /lib/ZFlsSubs.c | |
parent | eb457f2f6720a5336d2931798f452810c2b156ed (diff) |
Initial revision
Diffstat (limited to 'lib/ZFlsSubs.c')
-rw-r--r-- | lib/ZFlsSubs.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/ZFlsSubs.c b/lib/ZFlsSubs.c new file mode 100644 index 0000000..330a468 --- /dev/null +++ b/lib/ZFlsSubs.c @@ -0,0 +1,39 @@ +/* This file is part of the Project Athena Zephyr Notification System. + * It contains source for the ZFlushSubscriptions function. + * + * Created by: Robert French + * + * $Source$ + * $Author$ + * + * Copyright (c) 1987 by the Massachusetts Institute of Technology. + * For copying and distribution information, see the file + * "mit-copyright.h". + */ +/* $Header$ */ + +#include <zephyr/mit-copyright.h> + +#include <zephyr/zephyr_internal.h> + +Code_t ZFlushSubscriptions() +{ + int i; + + if (!__subscriptions_list) + return (ZERR_NONE); + + for (i=0;i<__subscriptions_num;i++) { + free(__subscriptions_list[i].class); + free(__subscriptions_list[i].classinst); + free(__subscriptions_list[i].recipient); + } + + free((char *)__subscriptions_list); + + __subscriptions_list = 0; + __subscriptions_num = 0; + + return (ZERR_NONE); +} + |