diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-11-19 12:56:33 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-11-19 13:01:37 +0100 |
commit | 7b778239473f5f5eb033296828fce85c696b856b (patch) | |
tree | 05e81f70d66e747579f09d2af007a19dfdbaaa9d /sal | |
parent | 5ce93720374c26611fa4fcd11997ebd8536e4ce2 (diff) |
sockimpl.h -> sockimpl.hxx
Change-Id: Ic11f5e0923b8b9d656b74b900f52ff154bb65971
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/pipe.cxx | 16 | ||||
-rw-r--r-- | sal/osl/unx/process.cxx | 2 | ||||
-rw-r--r-- | sal/osl/unx/socket.cxx | 22 | ||||
-rw-r--r-- | sal/osl/unx/sockimpl.hxx (renamed from sal/osl/unx/sockimpl.h) | 22 |
4 files changed, 27 insertions, 35 deletions
diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx index 654038fedcbb..12e9b6a8d03e 100644 --- a/sal/osl/unx/pipe.cxx +++ b/sal/osl/unx/pipe.cxx @@ -27,7 +27,7 @@ #include <rtl/ustring.h> #include <rtl/bootstrap.h> -#include "sockimpl.h" +#include "sockimpl.hxx" #include "secimpl.hxx" #define PIPEDEFAULTPATH "/tmp" @@ -97,10 +97,10 @@ oslPipe __osl_createPipeImpl(void) if (pPipeImpl == NULL) return NULL; pPipeImpl->m_nRefCount =1; - pPipeImpl->m_bClosed = sal_False; + pPipeImpl->m_bClosed = false; #if defined(LINUX) - pPipeImpl->m_bIsInShutdown = sal_False; - pPipeImpl->m_bIsAccepting = sal_False; + pPipeImpl->m_bIsInShutdown = false; + pPipeImpl->m_bIsAccepting = false; #endif return pPipeImpl; } @@ -386,7 +386,7 @@ void SAL_CALL osl_closePipe( oslPipe pPipe ) #if defined(LINUX) if ( pPipe->m_bIsAccepting ) { - pPipe->m_bIsInShutdown = sal_True; + pPipe->m_bIsInShutdown = true; pPipe->m_Socket = -1; fd = socket(AF_UNIX, SOCK_STREAM, 0); if ( fd < 0 ) @@ -427,7 +427,7 @@ void SAL_CALL osl_closePipe( oslPipe pPipe ) { unlink(pPipe->m_Name); } - pPipe->m_bClosed = sal_True; + pPipe->m_bClosed = true; /* OSL_TRACE("Out osl_destroyPipe"); */ } @@ -446,13 +446,13 @@ oslPipe SAL_CALL osl_acceptPipe(oslPipe pPipe) OSL_ASSERT(strlen(pPipe->m_Name) > 0); #if defined(LINUX) - pPipe->m_bIsAccepting = sal_True; + pPipe->m_bIsAccepting = true; #endif s = accept(pPipe->m_Socket, NULL, NULL); #if defined(LINUX) - pPipe->m_bIsAccepting = sal_False; + pPipe->m_bIsAccepting = false; #endif if (s < 0) diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx index e4977e79f8fb..57af42be7f59 100644 --- a/sal/osl/unx/process.cxx +++ b/sal/osl/unx/process.cxx @@ -59,7 +59,7 @@ #include "createfilehandlefromfd.hxx" #include "file_url.hxx" #include "readwrite_helper.hxx" -#include "sockimpl.h" +#include "sockimpl.hxx" #include "secimpl.hxx" #define MAX_ARGS 255 diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx index b8ac5ea1da47..4e65858f7485 100644 --- a/sal/osl/unx/socket.cxx +++ b/sal/osl/unx/socket.cxx @@ -29,7 +29,7 @@ #include <ctype.h> #include <sal/types.h> -#include "sockimpl.h" +#include "sockimpl.hxx" /* defines for poll */ #ifdef HAVE_POLL_H @@ -448,7 +448,7 @@ oslSocket __osl_createSocketImpl(int Socket) pSocket->m_nRefCount = 1; #if defined(LINUX) - pSocket->m_bIsAccepting = sal_False; + pSocket->m_bIsAccepting = false; #endif #if OSL_DEBUG_LEVEL > 1 @@ -1362,7 +1362,7 @@ void SAL_CALL osl_releaseSocket( oslSocket pSocket ) if( pSocket && 0 == osl_atomic_decrement( &(pSocket->m_nRefCount) ) ) { #if defined(LINUX) - if ( pSocket->m_bIsAccepting == sal_True ) + if ( pSocket->m_bIsAccepting ) { OSL_FAIL("osl_destroySocket : attempt to destroy socket while accepting\n"); return; @@ -1391,9 +1391,9 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket) pSocket->m_Socket = OSL_INVALID_SOCKET; #if defined(LINUX) - pSocket->m_bIsInShutdown = sal_True; + pSocket->m_bIsInShutdown = true; - if ( pSocket->m_bIsAccepting == sal_True ) + if ( pSocket->m_bIsAccepting ) { int nConnFD; union { @@ -1430,7 +1430,7 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket) close(nConnFD); } } - pSocket->m_bIsAccepting = sal_False; + pSocket->m_bIsAccepting = false; } #endif /* LINUX */ @@ -1688,7 +1688,7 @@ oslSocket SAL_CALL osl_acceptConnectionOnSocket(oslSocket pSocket, pSocket->m_nLastError=0; #if defined(LINUX) - pSocket->m_bIsAccepting = sal_True; + pSocket->m_bIsAccepting = true; #endif /* LINUX */ if( ppAddr && *ppAddr ) @@ -1710,7 +1710,7 @@ oslSocket SAL_CALL osl_acceptConnectionOnSocket(oslSocket pSocket, OSL_TRACE("osl_acceptConnectionOnSocket : accept error '%s'",strerror(errno)); #if defined(LINUX) - pSocket->m_bIsAccepting = sal_False; + pSocket->m_bIsAccepting = false; #endif /* LINUX */ return 0; } @@ -1718,7 +1718,7 @@ oslSocket SAL_CALL osl_acceptConnectionOnSocket(oslSocket pSocket, OSL_ASSERT(AddrLen == sizeof(struct sockaddr)); #if defined(LINUX) - if ( pSocket->m_bIsInShutdown == sal_True ) + if ( pSocket->m_bIsInShutdown ) { close(Connection); OSL_TRACE("osl_acceptConnectionOnSocket : close while accept"); @@ -1751,9 +1751,9 @@ oslSocket SAL_CALL osl_acceptConnectionOnSocket(oslSocket pSocket, pConnectionSockImpl->m_Socket = Connection; pConnectionSockImpl->m_nLastError = 0; #if defined(LINUX) - pConnectionSockImpl->m_bIsAccepting = sal_False; + pConnectionSockImpl->m_bIsAccepting = false; - pSocket->m_bIsAccepting = sal_False; + pSocket->m_bIsAccepting = false; #endif /* LINUX */ return pConnectionSockImpl; } diff --git a/sal/osl/unx/sockimpl.h b/sal/osl/unx/sockimpl.hxx index cfcd1a4303d6..993c8500b998 100644 --- a/sal/osl/unx/sockimpl.h +++ b/sal/osl/unx/sockimpl.hxx @@ -17,24 +17,20 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef _OSL_SOCKETIMPL_H_ -#define _OSL_SOCKETIMPL_H_ +#ifndef INCLUDED_SAL_OSL_UNX_SOCKIMPL_HXX +#define INCLUDED_SAL_OSL_UNX_SOCKIMPL_HXX #include <osl/pipe.h> #include <osl/socket.h> #include <osl/interlck.h> -#ifdef __cplusplus -extern "C" { -#endif - struct oslSocketImpl { int m_Socket; int m_nLastError; oslInterlockedCount m_nRefCount; #if defined(LINUX) - sal_Bool m_bIsAccepting; - sal_Bool m_bIsInShutdown; + bool m_bIsAccepting; + bool m_bIsInShutdown; #endif }; @@ -48,20 +44,16 @@ struct oslPipeImpl { int m_Socket; sal_Char m_Name[PATH_MAX + 1]; oslInterlockedCount m_nRefCount; - sal_Bool m_bClosed; + bool m_bClosed; #if defined(LINUX) - sal_Bool m_bIsAccepting; - sal_Bool m_bIsInShutdown; + bool m_bIsAccepting; + bool m_bIsInShutdown; #endif }; oslSocket __osl_createSocketImpl(int Socket); void __osl_destroySocketImpl(oslSocket pImpl); -#ifdef __cplusplus -} -#endif - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |