diff options
author | Greg Hudson <ghudson@mit.edu> | 2000-07-05 17:22:06 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2000-07-05 17:22:06 +0000 |
commit | bc51bf1018c59ffb8edbf1717419da4caf592ad9 (patch) | |
tree | fc19be6d4f6a7ce9125371caa76201966b6bcda6 /clients | |
parent | 484457aec1f48914752e76a1359b2cd402444545 (diff) |
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.
Diffstat (limited to 'clients')
-rw-r--r-- | clients/zaway/zaway.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; } |