summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1988-06-17 13:23:42 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1988-06-17 13:23:42 +0000
commit32ac97c3db9024c61d7f77f485a830f3d7ea2aff (patch)
tree14bf56a1001839965693f5e935a7f58cf35b4ffd
parent672902fefc4c107511405bd27b522dac08cb0279 (diff)
set num_other_fields to zero.
use a real port. compare MultiUID's
-rw-r--r--lib/ZLocateU.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/ZLocateU.c b/lib/ZLocateU.c
index a8d439d..2e8b18f 100644
--- a/lib/ZLocateU.c
+++ b/lib/ZLocateU.c
@@ -33,8 +33,12 @@ Code_t ZLocateUser(user, nlocs)
if (retval != ZERR_NONE && retval != ZERR_NOLOCATIONS)
return (retval);
+ if (ZGetFD() < 0)
+ if ((retval = ZOpenPort((u_short *)0)) != ZERR_NONE)
+ return (retval);
+
notice.z_kind = ACKED;
- notice.z_port = 0;
+ notice.z_port = __Zephyr_port;
notice.z_class = LOCATE_CLASS;
notice.z_class_inst = user;
notice.z_opcode = LOCATE_LOCATE;
@@ -42,6 +46,7 @@ Code_t ZLocateUser(user, nlocs)
notice.z_recipient = "";
notice.z_default_format = "";
notice.z_message_len = 0;
+ notice.z_num_other_fields = 0;
if ((retval = ZSendNotice(&notice, ZAUTH)) != ZERR_NONE)
return (retval);
@@ -49,8 +54,8 @@ Code_t ZLocateUser(user, nlocs)
nrecv = ack = 0;
while (!nrecv || !ack) {
- if ((retval = ZIfNotice(&retnotice, NULL, ZCompareUIDPred,
- (char *)&notice.z_uid)) != ZERR_NONE)
+ if ((retval = ZIfNotice(&retnotice, NULL, ZCompareMultiUIDPred,
+ (char *)&notice.z_multiuid)) != ZERR_NONE)
return (retval);
if (retnotice.z_kind == SERVNAK) {