added UPP for OTNotifier (needed for carbon)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2002-11-25 21:08:46 +00:00
parent d0c22ffa5b
commit 34b75f4706
2 changed files with 10 additions and 2 deletions

View File

@@ -87,6 +87,7 @@ extern pascal void OTDebugStr(const char* str);
#endif #endif
InetSvcRef gInetSvcRef = 0 ; InetSvcRef gInetSvcRef = 0 ;
int gOTInited = 0 ; int gOTInited = 0 ;
OTNotifyUPP gOTNotifierUPP = NULL ;
OSStatus DoNegotiateIPReuseAddrOption(EndpointRef ep, Boolean enableReuseIPMode); OSStatus DoNegotiateIPReuseAddrOption(EndpointRef ep, Boolean enableReuseIPMode);
@@ -185,7 +186,7 @@ static void SetDefaultEndpointModes(EndpointRef ep , void *data )
junk = OTSetBlocking(ep); junk = OTSetBlocking(ep);
OTAssert("SetDefaultEndpointModes: Could not set blocking", junk == noErr); OTAssert("SetDefaultEndpointModes: Could not set blocking", junk == noErr);
*/ */
junk = OTInstallNotifier(ep, OTInetEventHandler, data); junk = OTInstallNotifier(ep, gOTNotifierUPP, data);
OTAssert("SetDefaultEndpointModes: Could not install notifier", junk == noErr); OTAssert("SetDefaultEndpointModes: Could not install notifier", junk == noErr);
/* /*
junk = OTUseSyncIdleEvents(ep, true); junk = OTUseSyncIdleEvents(ep, true);
@@ -229,6 +230,7 @@ int GSocket_Verify_Inited()
OTAssert("Could not open Inet Services", err == noErr); OTAssert("Could not open Inet Services", err == noErr);
return FALSE ; return FALSE ;
} }
gOTNotifierUPP = NewOTNotifyUPP( OTInetEventHandler ) ;
return TRUE ; return TRUE ;
} }
@@ -243,6 +245,8 @@ void GSocket_Cleanup()
#else #else
CloseOpenTransport() ; CloseOpenTransport() ;
#endif #endif
if ( gOTNotifierUPP )
DisposeOTNotifyUPP( gOTNotifierUPP ) ;
} }
} }

View File

@@ -87,6 +87,7 @@ extern pascal void OTDebugStr(const char* str);
#endif #endif
InetSvcRef gInetSvcRef = 0 ; InetSvcRef gInetSvcRef = 0 ;
int gOTInited = 0 ; int gOTInited = 0 ;
OTNotifyUPP gOTNotifierUPP = NULL ;
OSStatus DoNegotiateIPReuseAddrOption(EndpointRef ep, Boolean enableReuseIPMode); OSStatus DoNegotiateIPReuseAddrOption(EndpointRef ep, Boolean enableReuseIPMode);
@@ -185,7 +186,7 @@ static void SetDefaultEndpointModes(EndpointRef ep , void *data )
junk = OTSetBlocking(ep); junk = OTSetBlocking(ep);
OTAssert("SetDefaultEndpointModes: Could not set blocking", junk == noErr); OTAssert("SetDefaultEndpointModes: Could not set blocking", junk == noErr);
*/ */
junk = OTInstallNotifier(ep, OTInetEventHandler, data); junk = OTInstallNotifier(ep, gOTNotifierUPP, data);
OTAssert("SetDefaultEndpointModes: Could not install notifier", junk == noErr); OTAssert("SetDefaultEndpointModes: Could not install notifier", junk == noErr);
/* /*
junk = OTUseSyncIdleEvents(ep, true); junk = OTUseSyncIdleEvents(ep, true);
@@ -229,6 +230,7 @@ int GSocket_Verify_Inited()
OTAssert("Could not open Inet Services", err == noErr); OTAssert("Could not open Inet Services", err == noErr);
return FALSE ; return FALSE ;
} }
gOTNotifierUPP = NewOTNotifyUPP( OTInetEventHandler ) ;
return TRUE ; return TRUE ;
} }
@@ -243,6 +245,8 @@ void GSocket_Cleanup()
#else #else
CloseOpenTransport() ; CloseOpenTransport() ;
#endif #endif
if ( gOTNotifierUPP )
DisposeOTNotifyUPP( gOTNotifierUPP ) ;
} }
} }