[Libreoffice-commits] .: 2 commits - sal/osl

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Jan 11 01:36:15 PST 2013


 sal/osl/unx/socket.c   |   14 --------------
 sal/osl/unx/sockimpl.h |    4 ----
 sal/osl/w32/socket.cxx |   10 ----------
 sal/osl/w32/sockimpl.h |    4 ----
 4 files changed, 32 deletions(-)

New commits:
commit 69f2f50c99ba218b185d94b118b38ea92b6560a0
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Jan 11 10:35:00 2013 +0100

    Further socket callback clean-up
    
    Change-Id: Ifcbb87cff50584934f214634c1b6f1d0a43ae8f3

diff --git a/sal/osl/unx/sockimpl.h b/sal/osl/unx/sockimpl.h
index 353d915..cfcd1a4 100644
--- a/sal/osl/unx/sockimpl.h
+++ b/sal/osl/unx/sockimpl.h
@@ -28,8 +28,6 @@
 extern "C" {
 #endif
 
-typedef void* (*oslCloseCallback) (void*);
-
 struct oslSocketImpl {
     int                 m_Socket;
     int                 m_nLastError;
diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx
index 09206b1..c200a7b 100644
--- a/sal/osl/w32/socket.cxx
+++ b/sal/osl/w32/socket.cxx
@@ -1126,8 +1126,6 @@ oslSocket SAL_CALL osl_createSocket (
     else
     {
         pSocket->m_Flags            = 0;
-        pSocket->m_CloseCallback    = NULL;
-        pSocket->m_CallbackArg  = NULL;
     }
 
     return pSocket;
@@ -1160,12 +1158,6 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket)
     closesocket(pSocket->m_Socket);
 
     pSocket->m_Socket = OSL_INVALID_SOCKET;
-
-    /* registrierten Callback ausfuehren */
-    if (pSocket->m_CloseCallback != NULL)
-    {
-        pSocket->m_CloseCallback(pSocket->m_CallbackArg);
-    }
 }
 
 /*****************************************************************************/
@@ -1423,8 +1415,6 @@ oslSocket SAL_CALL osl_acceptConnectionOnSocket (
     pConnectionSocket= __osl_createSocketImpl(Connection);
 
     pConnectionSocket->m_Flags          = 0;
-    pConnectionSocket->m_CloseCallback  = NULL;
-    pConnectionSocket->m_CallbackArg    = NULL;
 
     return pConnectionSocket;
 }
diff --git a/sal/osl/w32/sockimpl.h b/sal/osl/w32/sockimpl.h
index 8d5468a..2b5ebeb 100644
--- a/sal/osl/w32/sockimpl.h
+++ b/sal/osl/w32/sockimpl.h
@@ -32,14 +32,10 @@ extern "C" {
 /*****************************************************************************/
 #define OSL_SOCKET_FLAGS_NONBLOCKING    0x0001
 
-typedef void* (SAL_CALL * oslCloseCallback) (void*);
-
 struct oslSocketImpl {
     oslInterlockedCount m_nRefCount;
     SOCKET              m_Socket;
     int                 m_Flags;
-    oslCloseCallback    m_CloseCallback;
-    void*               m_CallbackArg;
 };
 
 struct oslSocketAddrImpl
commit 48e236dabd6c89bda4e9e599e2ac1173f27e1b39
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date:   Thu Jan 10 20:04:41 2013 +0100

    Remove useless callback in unix socket implementation
    
    Change-Id: Ibe46e2f1628f4d2e4840429703e0d5a69059a188
    Signed-off-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index 1af9039..a9f3fc0 100644
--- a/sal/osl/unx/socket.c
+++ b/sal/osl/unx/socket.c
@@ -469,8 +469,6 @@ oslSocket __osl_createSocketImpl(int Socket)
 
     pSocket->m_Socket = Socket;
     pSocket->m_nLastError = 0;
-    pSocket->m_CloseCallback = 0;
-    pSocket->m_CallbackArg = 0;
     pSocket->m_nRefCount = 1;
 
 #if defined(LINUX)
@@ -1466,10 +1464,6 @@ oslSocket SAL_CALL osl_createSocket(oslAddrFamily   Family,
         {
             pSocket->m_nLastError=errno;
         }
-
-
-        pSocket->m_CloseCallback    = NULL;
-        pSocket->m_CallbackArg  = NULL;
     }
 
     return pSocket;
@@ -1560,12 +1554,6 @@ void SAL_CALL osl_closeSocket(oslSocket pSocket)
     }
 #endif /* LINUX */
 
-    /* registrierten Callback ausfuehren */
-    if (pSocket->m_CloseCallback != NULL)
-    {
-        pSocket->m_CloseCallback(pSocket->m_CallbackArg);
-    }
-
     nRet=close(nFD);
     if ( nRet != 0 )
     {
@@ -1905,8 +1893,6 @@ oslSocket SAL_CALL osl_acceptConnectionOnSocket(oslSocket pSocket,
 
     pConnectionSockImpl->m_Socket           = Connection;
     pConnectionSockImpl->m_nLastError       = 0;
-    pConnectionSockImpl->m_CloseCallback    = NULL;
-    pConnectionSockImpl->m_CallbackArg      = NULL;
 #if defined(LINUX)
     pConnectionSockImpl->m_bIsAccepting     = sal_False;
 
diff --git a/sal/osl/unx/sockimpl.h b/sal/osl/unx/sockimpl.h
index d2c68b6..353d915 100644
--- a/sal/osl/unx/sockimpl.h
+++ b/sal/osl/unx/sockimpl.h
@@ -33,8 +33,6 @@ typedef void* (*oslCloseCallback) (void*);
 struct oslSocketImpl {
     int                 m_Socket;
     int                 m_nLastError;
-    oslCloseCallback    m_CloseCallback;
-    void*               m_CallbackArg;
     oslInterlockedCount m_nRefCount;
 #if defined(LINUX)
     sal_Bool            m_bIsAccepting;


More information about the Libreoffice-commits mailing list