summaryrefslogtreecommitdiff
path: root/vos
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2004-01-07 15:08:27 +0000
committerRüdiger Timm <rt@openoffice.org>2004-01-07 15:08:27 +0000
commit2bdeac66f6920aad7e0e8f4133e5c87708475e5c (patch)
treefb2c3c59945e43a801bfa372da0b6c304df2145f /vos
parent3c6f263c2a9de912d2fde4b87d280da09e0d8f96 (diff)
INTEGRATION: CWS geordi2q12 (1.2.92); FILE MERGED
2004/01/07 15:26:30 hr 1.2.92.1: #111934#: merge CWS sal7pp2 -> SRC680
Diffstat (limited to 'vos')
-rw-r--r--vos/source/pipe.cxx40
1 files changed, 21 insertions, 19 deletions
diff --git a/vos/source/pipe.cxx b/vos/source/pipe.cxx
index 9f650bd02261..b34db2004646 100644
--- a/vos/source/pipe.cxx
+++ b/vos/source/pipe.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: pipe.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jbu $ $Date: 2001-04-27 10:47:08 $
+ * last change: $Author: rt $ $Date: 2004-01-07 16:08:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -255,14 +255,15 @@ void OPipe::close()
/*****************************************************************************/
OPipe::TPipeError OPipe::accept(OStreamPipe& Connection)
{
- VOS_ASSERT(m_pPipeRef && (*m_pPipeRef)());
+ if ( isValid() )
+ {
+ Connection = osl_acceptPipe((*m_pPipeRef)());
- Connection= osl_acceptPipe((*m_pPipeRef)());
+ if(Connection.isValid())
+ return E_None;
+ }
- if(Connection.isValid())
- return E_None;
- else
- return getError();
+ return getError();
}
/*****************************************************************************/
@@ -270,11 +271,12 @@ OPipe::TPipeError OPipe::accept(OStreamPipe& Connection)
/*****************************************************************************/
sal_Int32 OPipe::recv(void* pBuffer, sal_uInt32 BytesToRead)
{
- VOS_ASSERT(m_pPipeRef && (*m_pPipeRef)());
-
- return osl_receivePipe((*m_pPipeRef)(),
- pBuffer,
- BytesToRead);
+ if ( isValid() )
+ return osl_receivePipe((*m_pPipeRef)(),
+ pBuffer,
+ BytesToRead);
+ else
+ return -1;
}
@@ -283,12 +285,12 @@ sal_Int32 OPipe::recv(void* pBuffer, sal_uInt32 BytesToRead)
/*****************************************************************************/
sal_Int32 OPipe::send(const void* pBuffer, sal_uInt32 BytesToSend)
{
- VOS_ASSERT(m_pPipeRef && (*m_pPipeRef)());
-
- return osl_sendPipe((*m_pPipeRef)(),
- pBuffer,
- BytesToSend);
-
+ if ( isValid() )
+ return osl_sendPipe((*m_pPipeRef)(),
+ pBuffer,
+ BytesToSend);
+ else
+ return -1;
}
/*****************************************************************************/