openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pesce...@apache.org
Subject svn commit: r1709400 - in /openoffice/branches/AOO410/main: ./ sal/osl/unx/socket.c sal/osl/unx/sockimpl.h
Date Mon, 19 Oct 2015 12:12:48 GMT
Author: pescetti
Date: Mon Oct 19 12:12:48 2015
New Revision: 1709400

URL: http://svn.apache.org/viewvc?rev=1709400&view=rev
Log:
#i126586# Fix automation deadlock on *BSD systems.
Patch by: damjan

Modified:
    openoffice/branches/AOO410/main/   (props changed)
    openoffice/branches/AOO410/main/sal/osl/unx/socket.c
    openoffice/branches/AOO410/main/sal/osl/unx/sockimpl.h

Propchange: openoffice/branches/AOO410/main/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Oct 19 12:12:48 2015
@@ -2,4 +2,4 @@
 /openoffice/branches/ia2/main:1417739-1541842
 /openoffice/branches/ooxml-osba/main:1546391,1546395,1546574,1546934,1547030,1547392,1551920,1551954,1551958,1552283
 /openoffice/branches/rejuvenate01/main:1480411,1534063,1534098,1536312,1549902,1560617
-/openoffice/trunk/main:1571617,1571677,1572569,1572577,1573547,1574058,1574101,1575922,1576216,1576748,1578786,1579934,1580657,1580779,1581746,1581840,1582359,1582365,1582709,1583336,1583418,1583589,1583988,1585171,1585261,1586242,1586249,1586583,1587468,1589050,1591501,1592692,1592716,1594206,1595847,1595851,1595858,1596218,1596491,1596494,1597076,1597102,1597109,1599169,1599173-1599174,1600581,1600587,1600590,1600630,1600861,1600863,1600883,1602434,1602791,1602823,1602850,1603416,1603897,1603941,1604028,1604709,1604786,1605044,1605355,1605689,1606055,1606061,1606706,1607111,1607793,1607836,1608348,1608376,1608730,1608733,1609204,1609208,1609302,1609426,1610347,1610411,1610422,1610671,1611470,1611549,1612070-1612071,1612539,1612801,1616457,1616944,1620195,1621121,1623847,1623849-1623850,1630814,1633294,1633297,1635806,1642300-1642302,1643177,1650314,1654282,1669457,1669459,1669462-1669463,1669465,1677190,1687177,1689883,1689959,1692551,1694132,1694701,1695962,1697807,1700078,170012
 6,1700135,1702107,1702894,1702898,1702986,1702988,1705193,1705196,1705199,1705276,1705364,1705368-1705369,1705542,1706649,1707167,1707169-1707170,1707175,1707397,1707408,1707412,1707642,1707645
+/openoffice/trunk/main:1571617,1571677,1572569,1572577,1573547,1574058,1574101,1575922,1576216,1576748,1578786,1579934,1580657,1580779,1581746,1581840,1582359,1582365,1582709,1583336,1583418,1583589,1583988,1585171,1585261,1586242,1586249,1586583,1587468,1589050,1591501,1592692,1592716,1594206,1595847,1595851,1595858,1596218,1596491,1596494,1597076,1597102,1597109,1599169,1599173-1599174,1600581,1600587,1600590,1600630,1600861,1600863,1600883,1602434,1602791,1602823,1602850,1603416,1603897,1603941,1604028,1604709,1604786,1605044,1605355,1605689,1606055,1606061,1606706,1607111,1607793,1607836,1608348,1608376,1608730,1608733,1609204,1609208,1609302,1609426,1610347,1610411,1610422,1610671,1611470,1611549,1612070-1612071,1612539,1612801,1616457,1616944,1620195,1621121,1623847,1623849-1623850,1630814,1633294,1633297,1635806,1642300-1642302,1643177,1650314,1654282,1669457,1669459,1669462-1669463,1669465,1677190,1687177,1689883,1689959,1692551,1694132,1694701,1695962,1697807,1700078,170012
 6,1700135,1702107,1702894,1702898,1702986,1702988,1705193,1705196,1705199,1705276,1705364,1705368-1705369,1705542,1706649,1707167,1707169-1707170,1707175,1707397,1707408,1707412,1707642,1707645,1708477,1708483

Modified: openoffice/branches/AOO410/main/sal/osl/unx/socket.c
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/sal/osl/unx/socket.c?rev=1709400&r1=1709399&r2=1709400&view=diff
==============================================================================
--- openoffice/branches/AOO410/main/sal/osl/unx/socket.c (original)
+++ openoffice/branches/AOO410/main/sal/osl/unx/socket.c Mon Oct 19 12:12:48 2015
@@ -490,7 +490,7 @@ oslSocket __osl_createSocketImpl(int Soc
     pSocket->m_CallbackArg = 0;
 	pSocket->m_nRefCount = 1;
 
-#if defined(LINUX)
+#if CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT
     pSocket->m_bIsAccepting = sal_False;
 #endif
 
@@ -1824,13 +1824,13 @@ void SAL_CALL osl_releaseSocket( oslSock
 {
 	if( pSocket && 0 == osl_decrementInterlockedCount( &(pSocket->m_nRefCount)
) )
 	{
-#if defined(LINUX)
+#if CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT
     if ( pSocket->m_bIsAccepting == sal_True )
     {
         OSL_ENSURE(0, "osl_destroySocket : attempt to destroy socket while accepting\n");
         return;
     }
-#endif /* LINUX */
+#endif /* CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT */
 		osl_closeSocket( pSocket );
 		__osl_destroySocketImpl( pSocket );
 	}
@@ -1858,7 +1858,7 @@ void SAL_CALL osl_closeSocket(oslSocket
 
     pSocket->m_Socket = OSL_INVALID_SOCKET;
 
-#if defined(LINUX)
+#if CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT
     pSocket->m_bIsInShutdown = sal_True;
 
     if ( pSocket->m_bIsAccepting == sal_True )
@@ -1904,7 +1904,7 @@ void SAL_CALL osl_closeSocket(oslSocket
         }
         pSocket->m_bIsAccepting = sal_False;
     }
-#endif /* LINUX */
+#endif /* CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT */
 
 	/* registrierten Callback ausfuehren */
 	if (pSocket->m_CloseCallback != NULL)
@@ -2185,9 +2185,9 @@ oslSocket SAL_CALL osl_acceptConnectionO
 	}
 
     pSocket->m_nLastError=0;
-#if defined(LINUX)
+#if CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT
     pSocket->m_bIsAccepting = sal_True;
-#endif /* LINUX */
+#endif /* CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT */
 
 	if( ppAddr && *ppAddr )
 	{
@@ -2208,23 +2208,23 @@ oslSocket SAL_CALL osl_acceptConnectionO
         pSocket->m_nLastError=errno;
 		OSL_TRACE("osl_acceptConnectionOnSocket : accept error '%s'\n",strerror(errno));
 
-#if defined(LINUX)
+#if CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT
         pSocket->m_bIsAccepting = sal_False;
-#endif /* LINUX */
+#endif /* CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT */
         return 0;
     }
 
     OSL_ASSERT(AddrLen == sizeof(struct sockaddr));
 
 
-#if defined(LINUX)
+#if CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT
     if ( pSocket->m_bIsInShutdown == sal_True )
     {
         close(Connection);
 		OSL_TRACE("osl_acceptConnectionOnSocket : close while accept\n");
         return 0;
     }
-#endif /* LINUX */
+#endif /* CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT */
 
 
 	if(ppAddr)
@@ -2253,11 +2253,11 @@ oslSocket SAL_CALL osl_acceptConnectionO
 	pConnectionSockImpl->m_nLastError		= 0;
 	pConnectionSockImpl->m_CloseCallback	= NULL;
 	pConnectionSockImpl->m_CallbackArg		= NULL;
-#if defined(LINUX)
+#if CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT
 	pConnectionSockImpl->m_bIsAccepting		= sal_False;
 
     pSocket->m_bIsAccepting = sal_False;
-#endif /* LINUX */
+#endif /* CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT */
 	return pConnectionSockImpl;
 }
 

Modified: openoffice/branches/AOO410/main/sal/osl/unx/sockimpl.h
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/sal/osl/unx/sockimpl.h?rev=1709400&r1=1709399&r2=1709400&view=diff
==============================================================================
--- openoffice/branches/AOO410/main/sal/osl/unx/sockimpl.h (original)
+++ openoffice/branches/AOO410/main/sal/osl/unx/sockimpl.h Mon Oct 19 12:12:48 2015
@@ -33,6 +33,12 @@ extern "C" {
 #endif
 
 typedef void* (*oslCloseCallback) (void*);
+
+#if defined(LINUX) || defined(FREEBSD) || defined(NETBSD)
+#define CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT 1
+#else
+#define CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT 0
+#endif
 	
 struct oslSocketImpl {
     int					m_Socket;
@@ -40,7 +46,7 @@ struct oslSocketImpl {
 	oslCloseCallback	m_CloseCallback;
 	void*				m_CallbackArg;
 	oslInterlockedCount m_nRefCount;
-#if defined(LINUX)
+#if CLOSESOCKET_DOESNT_WAKE_UP_ACCEPT
     sal_Bool            m_bIsAccepting;
     sal_Bool            m_bIsInShutdown;
 #endif



Mime
View raw message