• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
SystemConfiguration problem with Proxy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SystemConfiguration problem with Proxy


  • Subject: SystemConfiguration problem with Proxy
  • From: Stephane Sudre <email@hidden>
  • Date: Fri, 18 Nov 2005 14:04:18 +0100

I'm seeing a problem with the way Proxy configuration are obtained via SystemConfiguration.

Let's say I have 2 Interfaces: Built-in Ethernet and Airport. Built-in Ethernet is the currently active interface.

When I register to be notified when the Proxy configuration is changed, I do this:

_dynamicStoreContext.version=0x0001000;
_dynamicStoreContext.info=(void *) self;
_dynamicStoreContext.retain=NULL;
_dynamicStoreContext.release=NULL;
_dynamicStoreContext.copyDescription=NULL;

dynamicStoreRef_=SCDynamicStoreCreate(kCFAllocatorDefault,CFSTR("Test Proxy"),ProxyDynamicStoreCallBack,&_dynamicStoreContext);

if (dynamicStoreRef_!=NULL)
{
CFMutableArrayRef tNotificationKeyArray;

tNotificationKeyArray=CFArrayCreateMutable(kCFAllocatorDefault,0,&kCFTyp eArrayCallBacks);

if (tNotificationKeyArray!=NULL)
{
CFStringRef tStringRef;

tStringRef=SCDynamicStoreKeyCreateProxies(kCFAllocatorDefault);

if (tStringRef!=NULL)
{
CFArrayAppendValue(tNotificationKeyArray,tStringRef);

// Release Memory

CFRelease(tStringRef);
}

SCDynamicStoreSetNotificationKeys(dynamicStoreRef_,tNotificationKeyArray ,NULL);

dynamicStoreSourceRef_=SCDynamicStoreCreateRunLoopSource(kCFAllocatorDef ault,dynamicStoreRef_,0);

CFRunLoopAddSource(CFRunLoopGetCurrent(),dynamicStoreSourceRef_,kCFRunLo opDefaultMode);

CFRelease(tNotificationKeyArray);
}
}


This is working pretty fine as long as the Built-in Ethernet interface is the active one.

Now in System Preferences > Network, I turn off the Built-in Ethernet interface and turn on the Airport one.

I'm notified that the Proxy configuration is now nil.

But I am never notified for the Proxy configuration of the Airport Interface.

Is there a solution to be notified for every modification of the _currently active_ Interface Proxy settings?

Or is there a bug regarding this matter (Mac OS X 10.3.9)?


_______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: SystemConfiguration problem with Proxy
      • From: Allan Nathanson <email@hidden>
  • Prev by Date: Re: Kernel extension debugging tool?
  • Next by Date: Re: SystemConfiguration problem with Proxy
  • Previous by thread: Re: kCFStreamPropertyHTTPAttemptPersistentConnection
  • Next by thread: Re: SystemConfiguration problem with Proxy
  • Index(es):
    • Date
    • Thread