- SCLog(_configd_verbose, LOG_DEBUG, CFSTR("__SCDynamicStoreCopyNotifiedKeys:"));
-
- if (!store || (storePrivate->server == MACH_PORT_NULL)) {
- return kSCStatusNoStoreSession; /* you must have an open session to play */
- }
-
- sessionKey = CFStringCreateWithFormat(NULL, NULL, CFSTR("%d"), storePrivate->server);
- info = CFDictionaryGetValue(sessionData, sessionKey);
- if ((info == NULL) ||
- (CFDictionaryContainsKey(info, kSCDChangedKeys) == FALSE)) {
- CFRelease(sessionKey);
- *notifierKeys = CFArrayCreate(NULL, NULL, 0, &kCFTypeArrayCallBacks);;
- return kSCStatusOK;
- }
- newInfo = CFDictionaryCreateMutableCopy(NULL, 0, info);
-
- *notifierKeys = CFDictionaryGetValue(newInfo, kSCDChangedKeys);
- CFRetain(*notifierKeys);
-
- CFDictionaryRemoveValue(newInfo, kSCDChangedKeys);
- if (CFDictionaryGetCount(newInfo) > 0) {
- CFDictionarySetValue(sessionData, sessionKey, newInfo);
+ mySession = getSession(storePrivate->server);
+ if (mySession->changedKeys != NULL) {
+ *notifierKeys = mySession->changedKeys;
+ mySession->changedKeys = NULL;