adium 5851:a78a400f7451: nil strings cause crashes. Fixes #16587
commits at adium.im
commits at adium.im
Sat Apr 5 20:08:21 UTC 2014
details: http://hg.adium.im/adium/rev/a78a400f7451
revision: 5851:a78a400f7451
branch: adium-1.5.10
author: Frank Dowsett <wixardy at adium.im>
date: Sat Apr 05 15:53:18 2014 -0400
nil strings cause crashes. Fixes #16587
Subject: adium 5852:94d694509fea: Ignore the Brew dependency directory.
details: http://hg.adium.im/adium/rev/94d694509fea
revision: 5852:94d694509fea
branch: adium-1.6
author: Frank Dowsett <wixardy at adium.im>
date: Sat Apr 05 12:41:19 2014 -0400
Ignore the Brew dependency directory.
Subject: adium 5853:69643a591cb1: merge adium-1.6 into default
details: http://hg.adium.im/adium/rev/69643a591cb1
revision: 5853:69643a591cb1
branch: (none)
author: Frank Dowsett <wixardy at adium.im>
date: Sat Apr 05 12:57:41 2014 -0400
merge adium-1.6 into default
Subject: adium 5854:2aa34a01048d: Disable reachability scheduling when the system sleeps and enables it back when system wakes up.
details: http://hg.adium.im/adium/rev/2aa34a01048d
revision: 5854:2aa34a01048d
branch: (none)
author: Zorg <zorgiepoo at gmail.com>
date: Mon Jan 20 13:48:06 2014 -0500
Disable reachability scheduling when the system sleeps and enables it back when system wakes up.
Fixes #16249 a bug where Adium reconnected to IM services when woken up from Power Nap.
r=wix
Subject: adium 5855:b484898a0d0d: Disable reachability scheduling when the system sleeps and enables it back when system wakes up.
details: http://hg.adium.im/adium/rev/b484898a0d0d
revision: 5855:b484898a0d0d
branch: adium-1.5.10
author: Zorg <zorgiepoo at gmail.com>
date: Mon Jan 20 13:48:06 2014 -0500
Disable reachability scheduling when the system sleeps and enables it back when system wakes up.
Fixes #16249 a bug where Adium reconnected to IM services when woken up from Power Nap.
r=wix
(transplanted from 2aa34a01048d620f5283530b2c16a5ed358c33b8)
diffs (127 lines):
diff -r 9fb7892fb30a -r b484898a0d0d Frameworks/AIUtilities Framework/Source/AIHostReachabilityMonitor.h
--- a/Frameworks/AIUtilities Framework/Source/AIHostReachabilityMonitor.h Wed Apr 02 23:50:35 2014 +0200
+++ b/Frameworks/AIUtilities Framework/Source/AIHostReachabilityMonitor.h Mon Jan 20 13:48:06 2014 -0500
@@ -28,6 +28,8 @@
NSMutableArray *hosts;
NSMutableArray *observers;
NSMutableArray *reachabilities;
+ NSMutableArray *AI_hostsBeforeSleep;
+ NSMutableArray *AI_observersBeforeSleep;
NSMutableSet *unconfiguredHostsAndObservers;
diff -r 9fb7892fb30a -r b484898a0d0d Frameworks/AIUtilities Framework/Source/AIHostReachabilityMonitor.m
--- a/Frameworks/AIUtilities Framework/Source/AIHostReachabilityMonitor.m Wed Apr 02 23:50:35 2014 +0200
+++ b/Frameworks/AIUtilities Framework/Source/AIHostReachabilityMonitor.m Mon Jan 20 13:48:06 2014 -0500
@@ -34,10 +34,16 @@
- (void)beginMonitorngIPChanges;
- (void)stopMonitoringIPChanges;
+ at property (nonatomic, copy) NSArray *AI_hostsBeforeSleep;
+ at property (nonatomic, copy) NSArray *AI_observersBeforeSleep;
+
+- (void)systemWillSleep:(NSNotification *)notification;
- (void)systemDidWake:(NSNotification *)notification;
+
@end
@implementation AIHostReachabilityMonitor
+ at synthesize AI_hostsBeforeSleep, AI_observersBeforeSleep;
#pragma mark Shared instance management
@@ -80,6 +86,11 @@
selector:@selector(systemDidWake:)
name:AISystemDidWake_Notification
object:nil];
+
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(systemWillSleep:)
+ name:AISystemWillSleep_Notification
+ object:nil];
}
return self;
}
@@ -93,6 +104,8 @@
[hosts release]; hosts = nil;
[observers release]; observers = nil;
[reachabilities release]; reachabilities = nil;
+ [AI_hostsBeforeSleep release]; AI_hostsBeforeSleep = nil;
+ [AI_observersBeforeSleep release]; AI_observersBeforeSleep = nil;
[unconfiguredHostsAndObservers release]; unconfiguredHostsAndObservers = nil;
[hostAndObserverListLock unlock];
@@ -625,22 +638,26 @@
CFRelease(ipChangesRunLoopSourceRef);
ipChangesRunLoopSourceRef = nil;
}
+
+ self.AI_hostsBeforeSleep = nil;
+ self.AI_observersBeforeSleep = nil;
}
#pragma mark -
#pragma mark Sleep and Wake
/*!
- * @brief System is waking from sleep
+ * @brief System will go into sleep
*
- * When the system wakes, manually reconfigure reachability checking as not all network configurations will report a change.
+ * Before the system sleeps, unschedule reachability checking, and back up a copy of the hosts and observers to
+ * re-configure reachability for when the system wakes up
*/
-- (void)systemDidWake:(NSNotification *)notification
+- (void)systemWillSleep:(NSNotification *)notification
{
[hostAndObserverListLock lock];
-
- NSArray *oldHosts = [hosts copy];
- NSArray *oldObservers = [observers copy];
+
+ self.AI_hostsBeforeSleep = hosts;
+ self.AI_observersBeforeSleep = observers;
NSEnumerator *enumerator;
SCNetworkReachabilityRef reachabilityRef;
@@ -656,7 +673,17 @@
[reachabilities removeAllObjects];
[hostAndObserverListLock unlock];
+}
+/*!
+ * @brief System is waking from sleep
+ *
+ * When the system wakes, manually reconfigure reachability checking as not all network configurations will report a change.
+ */
+- (void)systemDidWake:(NSNotification *)notification
+{
+ NSArray *oldHosts = self.AI_hostsBeforeSleep;
+ NSArray *oldObservers = self.AI_observersBeforeSleep;
NSUInteger numObservers = [oldObservers count];
for (unsigned i = 0; i < numObservers; i++) {
NSString *host = [oldHosts objectAtIndex:i];
@@ -666,8 +693,8 @@
forHost:host];
}
- [oldHosts release];
- [oldObservers release];
+ self.AI_hostsBeforeSleep = nil;
+ self.AI_observersBeforeSleep = nil;
}
#pragma mark -
diff -r 9fb7892fb30a -r b484898a0d0d Frameworks/AIUtilities Framework/Source/AILinkTrackingController.m
--- a/Frameworks/AIUtilities Framework/Source/AILinkTrackingController.m Wed Apr 02 23:50:35 2014 +0200
+++ b/Frameworks/AIUtilities Framework/Source/AILinkTrackingController.m Mon Jan 20 13:48:06 2014 -0500
@@ -354,7 +354,7 @@
[[NSCursor arrowCursor] set]; //Restore the regular cursor
if (showTooltip) {
- [AITooltipUtilities showTooltipWithString:nil onWindow:nil atPoint:NSMakePoint(0,0) orientation:TooltipAbove]; //Hide the tooltip
+ [AITooltipUtilities showTooltipWithString:@"" onWindow:nil atPoint:NSMakePoint(0,0) orientation:TooltipAbove]; //Hide the tooltip
[hoveredLink release]; hoveredLink = nil;
[hoveredString release]; hoveredString = nil;
More information about the commits
mailing list