summaryrefslogtreecommitdiff
path: root/lib/ZSubs.c
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1988-06-29 12:40:24 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1988-06-29 12:40:24 +0000
commit515e7a50ee7bbc1f74c582997bb4e874b2497ae0 (patch)
tree0fe6e848c622272de858b6e84dc88c81632e8268 /lib/ZSubs.c
parent4aec721b9ef06f2057cf0eab0cdc676702967709 (diff)
auditing changes
Diffstat (limited to 'lib/ZSubs.c')
-rw-r--r--lib/ZSubs.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/lib/ZSubs.c b/lib/ZSubs.c
index 667dcdf..39477ba 100644
--- a/lib/ZSubs.c
+++ b/lib/ZSubs.c
@@ -7,7 +7,7 @@
* $Source$
* $Author$
*
- * Copyright (c) 1987 by the Massachusetts Institute of Technology.
+ * Copyright (c) 1987,1988 by the Massachusetts Institute of Technology.
* For copying and distribution information, see the file
* "mit-copyright.h".
*/
@@ -51,7 +51,6 @@ Z_Subscriptions(sublist, nitems, port, opcode, authit)
char *opcode;
int authit;
{
- int wait_for_servack();
int i, retval;
ZNotice_t notice, retnotice;
char **list;
@@ -60,6 +59,7 @@ Z_Subscriptions(sublist, nitems, port, opcode, authit)
if (!list)
return (ENOMEM);
+ (void) bzero((char *)&notice, sizeof(notice));
notice.z_kind = ACKED;
notice.z_port = port;
notice.z_class = ZEPHYR_CTL_CLASS;
@@ -67,7 +67,6 @@ Z_Subscriptions(sublist, nitems, port, opcode, authit)
notice.z_opcode = opcode;
notice.z_sender = 0;
notice.z_recipient = "";
- notice.z_num_other_fields = 0;
notice.z_default_format = "";
notice.z_message_len = 0;
@@ -91,24 +90,17 @@ Z_Subscriptions(sublist, nitems, port, opcode, authit)
return (retval);
if ((retval = ZIfNotice(&retnotice, (struct sockaddr_in *)0,
- wait_for_servack, (char *)&notice.z_uid)) !=
+ ZCompareUIDPred, (char *)&notice.z_uid)) !=
ZERR_NONE)
return (retval);
- ZFreeNotice(&retnotice);
-
- if (retnotice.z_kind == SERVNAK)
+ if (retnotice.z_kind == SERVNAK) {
+ ZFreeNotice(&retnotice);
return (ZERR_SERVNAK);
-
- if (retnotice.z_kind != SERVACK)
+ }
+ if (retnotice.z_kind != SERVACK) {
+ ZFreeNotice(&retnotice);
return (ZERR_INTERNAL);
-
+ }
return (ZERR_NONE);
}
-
-static wait_for_servack(notice, uid)
- ZNotice_t *notice;
- ZUnique_Id_t *uid;
-{
- return (notice->z_kind == SERVACK && ZCompareUID(&notice->z_uid, uid));
-}