From ddd9009109578d25cced7c894590dea07e3005a0 Mon Sep 17 00:00:00 2001 From: "Robert S. French" Date: Wed, 15 Jun 1988 12:55:05 +0000 Subject: For John --- lib/ZSendPkt.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lib/ZSendPkt.c') diff --git a/lib/ZSendPkt.c b/lib/ZSendPkt.c index 0eff764..c2b4bde 100644 --- a/lib/ZSendPkt.c +++ b/lib/ZSendPkt.c @@ -26,6 +26,7 @@ Code_t ZSendPacket(packet, len, waitforack) int len; int waitforack; { + int wait_for_hmack(); Code_t retval; struct sockaddr_in dest; struct timeval tv; @@ -61,7 +62,7 @@ Code_t ZSendPacket(packet, len, waitforack) if (select(0, &t1, &t2, &t3, &tv) < 0) return (errno); retval = ZCheckIfNotice(&acknotice, (struct sockaddr_in *)0, - ZCompareUIDPred, (char *)¬ice.z_uid); + wait_for_hmack, (char *)¬ice.z_uid); if (retval == ZERR_NONE) { ZFreeNotice(&acknotice); return (ZERR_NONE); @@ -71,3 +72,10 @@ Code_t ZSendPacket(packet, len, waitforack) } return (ZERR_HMDEAD); } + +static wait_for_hmack(notice, uid) + ZNotice_t *notice; + ZUnique_Id_t *uid; +{ + return (notice->z_kind == HMACK && ZCompareUID(¬ice->z_uid, uid)); +} -- cgit v1.2.3