git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11508
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include <OTDebug.h>
#endif
InetSvcRef gInetSvcRef = 0 ;
#include <OTDebug.h>
#endif
InetSvcRef gInetSvcRef = 0 ;
OSStatus DoNegotiateIPReuseAddrOption(EndpointRef ep, Boolean enableReuseIPMode);
OSStatus DoNegotiateIPReuseAddrOption(EndpointRef ep, Boolean enableReuseIPMode);
return TRUE ;
InitOpenTransportInContext(kInitOTForApplicationMask, &clientcontext);
return TRUE ;
InitOpenTransportInContext(kInitOTForApplicationMask, &clientcontext);
gInetSvcRef = OTOpenInternetServicesInContext(kDefaultInternetServicesPath,
NULL, &err, clientcontext);
#else
gInetSvcRef = OTOpenInternetServicesInContext(kDefaultInternetServicesPath,
NULL, &err, clientcontext);
#else
return TRUE ;
InitOpenTransport() ;
return TRUE ;
InitOpenTransport() ;
gInetSvcRef = OTOpenInternetServices(kDefaultInternetServicesPath, NULL, &err);
#endif
if ( gInetSvcRef == NULL || err != kOTNoError )
gInetSvcRef = OTOpenInternetServices(kDefaultInternetServicesPath, NULL, &err);
#endif
if ( gInetSvcRef == NULL || err != kOTNoError )
- if ( gInetSvcRef != NULL )
- OTCloseProvider( gInetSvcRef );
-#if TARGET_CARBON
- CloseOpenTransportInContext( NULL ) ;
-#else
- CloseOpenTransport() ;
-#endif
+ if ( gOTInited != 0 )
+ {
+ if ( gInetSvcRef != NULL )
+ OTCloseProvider( gInetSvcRef );
+ #if TARGET_CARBON
+ CloseOpenTransportInContext( NULL ) ;
+ #else
+ CloseOpenTransport() ;
+ #endif
+ }
}
/* Constructors / Destructors for GSocket */
}
/* Constructors / Destructors for GSocket */
#include <OTDebug.h>
#endif
InetSvcRef gInetSvcRef = 0 ;
#include <OTDebug.h>
#endif
InetSvcRef gInetSvcRef = 0 ;
OSStatus DoNegotiateIPReuseAddrOption(EndpointRef ep, Boolean enableReuseIPMode);
OSStatus DoNegotiateIPReuseAddrOption(EndpointRef ep, Boolean enableReuseIPMode);
return TRUE ;
InitOpenTransportInContext(kInitOTForApplicationMask, &clientcontext);
return TRUE ;
InitOpenTransportInContext(kInitOTForApplicationMask, &clientcontext);
gInetSvcRef = OTOpenInternetServicesInContext(kDefaultInternetServicesPath,
NULL, &err, clientcontext);
#else
gInetSvcRef = OTOpenInternetServicesInContext(kDefaultInternetServicesPath,
NULL, &err, clientcontext);
#else
return TRUE ;
InitOpenTransport() ;
return TRUE ;
InitOpenTransport() ;
gInetSvcRef = OTOpenInternetServices(kDefaultInternetServicesPath, NULL, &err);
#endif
if ( gInetSvcRef == NULL || err != kOTNoError )
gInetSvcRef = OTOpenInternetServices(kDefaultInternetServicesPath, NULL, &err);
#endif
if ( gInetSvcRef == NULL || err != kOTNoError )
- if ( gInetSvcRef != NULL )
- OTCloseProvider( gInetSvcRef );
-#if TARGET_CARBON
- CloseOpenTransportInContext( NULL ) ;
-#else
- CloseOpenTransport() ;
-#endif
+ if ( gOTInited != 0 )
+ {
+ if ( gInetSvcRef != NULL )
+ OTCloseProvider( gInetSvcRef );
+ #if TARGET_CARBON
+ CloseOpenTransportInContext( NULL ) ;
+ #else
+ CloseOpenTransport() ;
+ #endif
+ }
}
/* Constructors / Destructors for GSocket */
}
/* Constructors / Destructors for GSocket */