adium 3325:1760d3bfac88: Initialize the AMPurpleJabberAdHocServe...
commits at adium.im
commits at adium.im
Mon Sep 20 03:07:02 UTC 2010
details: http://hg.adium.im/adium/rev/1760d3bfac88
revision: 3325:1760d3bfac88
author: Evan Schoenberg
date: Sun Sep 19 22:06:04 2010 -0500
Initialize the AMPurpleJabberAdHocServer when the account initializes, before we ever attempt to connect. This ensures that jabber_add_feature() is called before any JabberStream is created by libpurple, which in turns keeps our advertised capabilities consistent with the hash generated ot describe them. Fixes #14273
(transplanted from c6ef8efaf14f4d1e3d2ecdd13fe76f262dafb96e)
diffs (57 lines):
diff -r cc8e7d8ceb58 -r 1760d3bfac88 Adium.xcodeproj/project.pbxproj
--- a/Adium.xcodeproj/project.pbxproj Sun Sep 19 20:58:33 2010 -0400
+++ b/Adium.xcodeproj/project.pbxproj Sun Sep 19 22:06:04 2010 -0500
@@ -9681,6 +9681,7 @@
};
buildConfigurationList = DADE8E3A085507450062B664 /* Build configuration list for PBXProject "Adium" */;
compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
en,
diff -r cc8e7d8ceb58 -r 1760d3bfac88 Frameworks/Adium Framework/Source/AIListObject.m
--- a/Frameworks/Adium Framework/Source/AIListObject.m Sun Sep 19 20:58:33 2010 -0400
+++ b/Frameworks/Adium Framework/Source/AIListObject.m Sun Sep 19 22:06:04 2010 -0500
@@ -161,6 +161,7 @@
- (NSSet *) groups
{
+#warning Very inefficient
return [[m_groups copy] autorelease];
}
diff -r cc8e7d8ceb58 -r 1760d3bfac88 Plugins/Purple Service/ESPurpleJabberAccount.m
--- a/Plugins/Purple Service/ESPurpleJabberAccount.m Sun Sep 19 20:58:33 2010 -0400
+++ b/Plugins/Purple Service/ESPurpleJabberAccount.m Sun Sep 19 22:06:04 2010 -0500
@@ -49,6 +49,13 @@
@implementation ESPurpleJabberAccount
+- (void)initAccount
+{
+ [super initAccount];
+
+ adhocServer = [[AMPurpleJabberAdHocServer alloc] initWithAccount:self];
+}
+
/*!
* @brief The UID will be changed. The account has a chance to perform modifications
*
@@ -98,6 +105,8 @@
{
[xmlConsoleController close];
[xmlConsoleController release];
+ [adhocServer release];
+ [gateways release];
[super dealloc];
}
@@ -731,8 +740,6 @@
[gateways release];
gateways = [[NSMutableArray alloc] init];
- [adhocServer release];
- adhocServer = [[AMPurpleJabberAdHocServer alloc] initWithAccount:self];
[adhocServer addCommand:@"ping" delegate:(id<AMPurpleJabberAdHocServerDelegate>)[AMPurpleJabberAdHocPing class] name:@"Ping"];
[super didConnect];
More information about the commits
mailing list