[381] in Zephyr_Comments
Timeouts for ZIfNotice
daemon@ATHENA.MIT.EDU (Barr3y Jaspan)
Wed Oct 11 21:21:46 1989
Date: Wed, 11 Oct 89 21:21:33 -0400
From: Barr3y Jaspan <bjaspan@ATHENA.MIT.EDU>
To: zephyr-comments@ATHENA.MIT.EDU
I have written a function called ZPauseIfNotice (it's a bad name, I
know.. make a better suggestion) that behaves just like ZIfNotice()
except that it takes a struct timeval and returns ETIMEDOUT if that
time elapses before a notice matching the predicate is received.
The file currently lives in
/afs/sipb/project/sipbsrc/src/xzwrite/Ztimeout.c. Please look at it
and tell me how stupidly I wrote it. (Before anyone asks, I did not
use the time(0) method because I wanted better resolution.)
Comments I have:
1) It should return ZERR_TIMEOUT, not ETIMEDOUT. However, other
Zephyr functions already return ETIMEDOUT. This is a bad precedent.
2) The timeout problem exists with ZSubscribeTo as well. Perhaps a
ZPauseSubscribeTo (again, a bad name) should be written.
3) John Kohl believes this timeout problem is in fact a bug where
either the hostmanager is not retrying properly, or the server isn't
sending acknowledgements properly, or somesuch.
comments?
Barr3y