X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5fde6fcc9b551340a194ae4c726db5ab64b5c594..b6ca231f85a50ea7dc5af6d0f3c98854970dffdc:/src/mac/carbon/gsocket.c?ds=sidebyside diff --git a/src/mac/carbon/gsocket.c b/src/mac/carbon/gsocket.c index ed895445f2..20e4049f58 100644 --- a/src/mac/carbon/gsocket.c +++ b/src/mac/carbon/gsocket.c @@ -195,19 +195,25 @@ static void SetDefaultEndpointModes(EndpointRef ep , void *data ) int GSocket_Init() { - OSStatus err ; + OSStatus err ; #if TARGET_CARBON - InitOpenTransportInContext( kInitOTForApplicationMask , NULL ) ; + // Marc Newsam: added the clientcontext variable + // however, documentation is unclear how this works + OTClientContextPtr clientcontext; + + InitOpenTransportInContext(kInitOTForApplicationMask, &clientcontext); + gInetSvcRef = OTOpenInternetServicesInContext(kDefaultInternetServicesPath, + NULL, &err, clientcontext); #else - InitOpenTransport() ; + InitOpenTransport() ; + gInetSvcRef = OTOpenInternetServices(kDefaultInternetServicesPath, NULL, &err); #endif - gInetSvcRef = OTOpenInternetServices(kDefaultInternetServicesPath, NULL, &err); - if ( gInetSvcRef == NULL || err != kOTNoError ) - { - OTAssert("Could not open Inet Services", err == noErr); - return FALSE ; - } - return TRUE; + if ( gInetSvcRef == NULL || err != kOTNoError ) + { + OTAssert("Could not open Inet Services", err == noErr); + return FALSE ; + } + return TRUE; } void GSocket_Cleanup()