- if (status != KERN_SUCCESS) {
- if (status == MACH_SEND_INVALID_DEST) {
- /* the server's gone and our session port's dead, remove the dead name right */
- (void) mach_port_deallocate(mach_task_self(), storePrivate->server);
- } else {
- /* we got an unexpected error, leave the [session] port alone */
- SCLog(TRUE, LOG_ERR, CFSTR("SCDynamicStoreAddWatchedKey notifyadd(): %s"), mach_error_string(status));
- }
- storePrivate->server = MACH_PORT_NULL;
- _SCErrorSet(status);
- return FALSE;
- }
-