From 4e02941bf4dfd57c928e911445a8a51f15bce215 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Fri, 13 Jul 2007 08:44:29 +0000 Subject: add const and add FIXME about a to-be-fixed race condition git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@301 ef36b2f9-881f-0410-afb5-c4e39611909c --- common/tio.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'common') diff --git a/common/tio.c b/common/tio.c index 9ddc6bc..9ba7fc7 100644 --- a/common/tio.c +++ b/common/tio.c @@ -273,6 +273,10 @@ int tio_flush(TFILE *fp) /* check write buffer presence */ if (fp->writebuffer==NULL) return 0; +/* +FIXME: we have a race condition here (setting and restoring the signal mask), this is a critical region that should be locked +*/ + /* set up sigaction */ memset(&act,0,sizeof(struct sigaction)); act.sa_handler=SIG_IGN; @@ -312,7 +316,7 @@ int tio_flush(TFILE *fp) int tio_write(TFILE *fp, const void *buf, size_t count) { size_t fr; - uint8_t *ptr=(const uint8_t *)buf; + const uint8_t *ptr=(const uint8_t *)buf; /* ensure that we have a write buffer */ if (fp->writebuffer==NULL) { -- cgit v1.2.3