Lines Matching refs:pPipe
137 oslPipe pPipe=0; in osl_createPipe() local
149 pPipe = osl_psz_createPipe(pszPipeName, Options, Security); in osl_createPipe()
157 return pPipe; in osl_createPipe()
169 oslPipe pPipe; in osl_psz_createPipe() local
200 pPipe= __osl_createPipeImpl(); in osl_psz_createPipe()
203 pPipe->m_Socket = socket(AF_UNIX, SOCK_STREAM, 0); in osl_psz_createPipe()
204 if ( pPipe->m_Socket < 0 ) in osl_psz_createPipe()
207 __osl_destroyPipeImpl(pPipe); in osl_psz_createPipe()
214 if ((Flags = fcntl(pPipe->m_Socket, F_GETFD, 0)) != -1) in osl_psz_createPipe()
217 if (fcntl(pPipe->m_Socket, F_SETFD, Flags) == -1) in osl_psz_createPipe()
243 if ( connect(pPipe->m_Socket,(struct sockaddr *)&addr,len) >= 0 ) in osl_psz_createPipe()
246 close (pPipe->m_Socket); in osl_psz_createPipe()
247 __osl_destroyPipeImpl(pPipe); in osl_psz_createPipe()
255 if ( bind(pPipe->m_Socket, (struct sockaddr *)&addr, len) < 0 ) in osl_psz_createPipe()
258 close (pPipe->m_Socket); in osl_psz_createPipe()
259 __osl_destroyPipeImpl(pPipe); in osl_psz_createPipe()
270 strncpy(pPipe->m_Name, name, sizeof(pPipe->m_Name)); in osl_psz_createPipe()
272 if ( listen(pPipe->m_Socket, 5) < 0 ) in osl_psz_createPipe()
276 close (pPipe->m_Socket); in osl_psz_createPipe()
277 __osl_destroyPipeImpl(pPipe); in osl_psz_createPipe()
281 return (pPipe); in osl_psz_createPipe()
287 if ( connect( pPipe->m_Socket, (struct sockaddr *)&addr, len) >= 0 ) in osl_psz_createPipe()
289 return (pPipe); in osl_psz_createPipe()
295 close (pPipe->m_Socket); in osl_psz_createPipe()
296 __osl_destroyPipeImpl(pPipe); in osl_psz_createPipe()
301 void SAL_CALL osl_acquirePipe( oslPipe pPipe ) in osl_acquirePipe() argument
303 osl_incrementInterlockedCount( &(pPipe->m_nRefCount) ); in osl_acquirePipe()
306 void SAL_CALL osl_releasePipe( oslPipe pPipe ) in osl_releasePipe() argument
309 if( 0 == pPipe ) in osl_releasePipe()
312 if( 0 == osl_decrementInterlockedCount( &(pPipe->m_nRefCount) ) ) in osl_releasePipe()
314 if( ! pPipe->m_bClosed ) in osl_releasePipe()
315 osl_closePipe( pPipe ); in osl_releasePipe()
317 __osl_destroyPipeImpl( pPipe ); in osl_releasePipe()
321 void SAL_CALL osl_closePipe( oslPipe pPipe ) in osl_closePipe() argument
331 if( ! pPipe ) in osl_closePipe()
336 if( pPipe->m_bClosed ) in osl_closePipe()
341 ConnFD = pPipe->m_Socket; in osl_closePipe()
348 if ( pPipe->m_bIsAccepting ) in osl_closePipe()
350 pPipe->m_bIsInShutdown = sal_True; in osl_closePipe()
351 pPipe->m_Socket = -1; in osl_closePipe()
355 OSL_TRACE("osl_destroyPipe : Pipe Name '%s'",pPipe->m_Name); in osl_closePipe()
358 strncpy(addr.sun_path, pPipe->m_Name, sizeof(addr.sun_path)); in osl_closePipe()
389 if ( strlen(pPipe->m_Name) > 0 ) in osl_closePipe()
391 unlink(pPipe->m_Name); in osl_closePipe()
393 pPipe->m_bClosed = sal_True; in osl_closePipe()
402 oslPipe SAL_CALL osl_acceptPipe(oslPipe pPipe) in osl_acceptPipe() argument
407 OSL_ASSERT(pPipe); in osl_acceptPipe()
408 if ( pPipe == 0 ) in osl_acceptPipe()
413 OSL_ASSERT(strlen(pPipe->m_Name) > 0); in osl_acceptPipe()
416 pPipe->m_bIsAccepting = sal_True; in osl_acceptPipe()
419 s = accept(pPipe->m_Socket, NULL, NULL); in osl_acceptPipe()
422 pPipe->m_bIsAccepting = sal_False; in osl_acceptPipe()
432 if ( pPipe->m_bIsInShutdown ) in osl_acceptPipe()
470 sal_Int32 SAL_CALL osl_receivePipe(oslPipe pPipe, in osl_receivePipe() argument
476 OSL_ASSERT(pPipe); in osl_receivePipe()
478 if ( pPipe == 0 ) in osl_receivePipe()
485 nRet = recv(pPipe->m_Socket, in osl_receivePipe()
501 sal_Int32 SAL_CALL osl_sendPipe(oslPipe pPipe, in osl_sendPipe() argument
507 OSL_ASSERT(pPipe); in osl_sendPipe()
509 if ( pPipe == 0 ) in osl_sendPipe()
516 nRet = send(pPipe->m_Socket, in osl_sendPipe()
533 oslPipeError SAL_CALL osl_getLastPipeError(oslPipe pPipe) in osl_getLastPipeError() argument
535 (void) pPipe; /* unused */ in osl_getLastPipeError()
540 sal_Int32 SAL_CALL osl_writePipe( oslPipe pPipe, const void *pBuffer , sal_Int32 n ) in osl_writePipe() argument
546 OSL_ASSERT(pPipe); in osl_writePipe()
551 RetVal= osl_sendPipe(pPipe, pBuffer, BytesToSend); in osl_writePipe()
567 sal_Int32 SAL_CALL osl_readPipe( oslPipe pPipe, void *pBuffer , sal_Int32 n ) in osl_readPipe() argument
573 OSL_ASSERT( pPipe ); in osl_readPipe()
577 RetVal= osl_receivePipe(pPipe, pBuffer, BytesToRead); in osl_readPipe()