diff options
author | Robert S. French <rfrench@mit.edu> | 1988-06-15 12:55:05 +0000 |
---|---|---|
committer | Robert S. French <rfrench@mit.edu> | 1988-06-15 12:55:05 +0000 |
commit | ddd9009109578d25cced7c894590dea07e3005a0 (patch) | |
tree | 759bb7fb3ed36c52040ae37d4d8e46561c76d247 /lib/ZSubs.c | |
parent | 8954e484c2f8654993f8570558dab76218861ecd (diff) |
For John
Diffstat (limited to 'lib/ZSubs.c')
-rw-r--r-- | lib/ZSubs.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/ZSubs.c b/lib/ZSubs.c index dba8cd1..667dcdf 100644 --- a/lib/ZSubs.c +++ b/lib/ZSubs.c @@ -51,6 +51,7 @@ Z_Subscriptions(sublist, nitems, port, opcode, authit) char *opcode; int authit; { + int wait_for_servack(); int i, retval; ZNotice_t notice, retnotice; char **list; @@ -90,12 +91,12 @@ Z_Subscriptions(sublist, nitems, port, opcode, authit) return (retval); if ((retval = ZIfNotice(&retnotice, (struct sockaddr_in *)0, - ZCompareUIDPred, (char *)¬ice.z_uid)) != + wait_for_servack, (char *)¬ice.z_uid)) != ZERR_NONE) return (retval); ZFreeNotice(&retnotice); - + if (retnotice.z_kind == SERVNAK) return (ZERR_SERVNAK); @@ -104,3 +105,10 @@ Z_Subscriptions(sublist, nitems, port, opcode, authit) return (ZERR_NONE); } + +static wait_for_servack(notice, uid) + ZNotice_t *notice; + ZUnique_Id_t *uid; +{ + return (notice->z_kind == SERVACK && ZCompareUID(¬ice->z_uid, uid)); +} |