From bc51bf1018c59ffb8edbf1717419da4caf592ad9 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Wed, 5 Jul 2000 17:22:06 +0000 Subject: Fix test for file argument in the presence of options. Temporarily work around libzephyr change to return ETIMEDOUT from ZReceiveNotice(), which shouldn't have happened. --- clients/zaway/zaway.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'clients') diff --git a/clients/zaway/zaway.c b/clients/zaway/zaway.c index 8186f61..332598f 100644 --- a/clients/zaway/zaway.c +++ b/clients/zaway/zaway.c @@ -113,7 +113,7 @@ int main(argc,argv) } fp = fopen(awayfile,"r"); - if (!fp && argc > 1) { + if (!fp && argc > optind) { fprintf(stderr,"File %s not found!\n",awayfile); exit(1); } @@ -136,7 +136,8 @@ int main(argc,argv) for (;;) { if ((retval = ZReceiveNotice(¬ice, (struct sockaddr_in *)0)) != ZERR_NONE) { - com_err(argv[0],retval,"while receiving notice"); + if (retval != ETIMEDOUT) + com_err(argv[0],retval,"while receiving notice"); continue; } -- cgit v1.2.3