]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/socket.cpp
Use text/uri-list instead of x-moz-url in wxGTK wxURLDataObject.
[wxWidgets.git] / src / common / socket.cpp
index 33690a33222cc8ed6262c068c804c69c812fd935..6f32e83791aa4a74fffb14f3e637425594464cf0 100644 (file)
@@ -887,8 +887,12 @@ bool wxSocketBase::Destroy()
     Notify(false);
 
     // Schedule this object for deletion instead of destroying it right now if
-    // possible as we may have other events pending for it
-    if ( wxTheApp )
+    // it can have other events pending for it and we have a way to do it.
+    //
+    // Notice that sockets used in other threads won't have any events for them
+    // and we shouldn't use delayed destruction mechanism for them as it's not
+    // MT-safe.
+    if ( wxIsMainThread() && wxTheApp )
     {
         wxTheApp->ScheduleForDestruction(this);
     }
@@ -1814,7 +1818,11 @@ wxSocketServer::wxSocketServer(const wxSockAddress& addr,
         return;
     }
 
-    wxLogTrace( wxTRACE_Socket, wxT("wxSocketServer on fd %d"), m_impl->m_fd );
+    // Notice that we need a cast as SOCKET is 64 bit under Win64 and that the
+    // cast is safe because a SOCKET is a handle and so limited to 32 (or,
+    // actually, even 24) bit values anyhow.
+    wxLogTrace( wxTRACE_Socket, wxT("wxSocketServer on fd %u"),
+                static_cast<unsigned>(m_impl->m_fd) );
 }
 
 // --------------------------------------------------------------------------