diff options
Diffstat (limited to 'nss/common.h')
-rw-r--r-- | nss/common.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/nss/common.h b/nss/common.h index 7c21484..254a5bb 100644 --- a/nss/common.h +++ b/nss/common.h @@ -2,7 +2,7 @@ common.h - common functions for NSS lookups Copyright (C) 2006 West Consulting - Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Arthur de Jong + Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Arthur de Jong This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -35,6 +35,10 @@ #include "solnss.h" #endif /* NSS_FLAVOUR_SOLARIS */ +/* skip timeout determines the maximum time to wait when closing the + connection and reading whatever data that is available */ +#define SKIP_TIMEOUT 500 + /* These are macros for handling read and write problems, they are NSS specific due to the return code so are defined here. They genrally close the open file, set an error code and return with @@ -127,7 +131,7 @@ /* close socket and we're done */ \ if ((retv == NSS_STATUS_SUCCESS) || (retv == NSS_STATUS_TRYAGAIN)) \ { \ - (void)tio_skipall(fp); \ + (void)tio_skipall(fp, SKIP_TIMEOUT); \ (void)tio_close(fp); \ } \ return retv; @@ -188,7 +192,7 @@ NSS_AVAILCHECK; \ if (fp != NULL) \ { \ - (void)tio_skipall(fp); \ + (void)tio_skipall(fp, SKIP_TIMEOUT); \ (void)tio_close(fp); \ fp = NULL; \ } \ |