Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 11 additions & 37 deletions Core/XMPPStream.m
Original file line number Diff line number Diff line change
Expand Up @@ -1943,7 +1943,7 @@ - (BOOL)authenticateWithPassword:(NSString *)inPassword error:(NSError **)errPtr

id <XMPPSASLAuthentication> someAuth = nil;

if ([self supportsSCRAMSHA1Authentication])
/* if ([self supportsSCRAMSHA1Authentication])
{
someAuth = [[XMPPSCRAMSHA1Authentication alloc] initWithStream:self password:password];
result = [self authenticate:someAuth error:&err];
Expand All @@ -1955,9 +1955,9 @@ - (BOOL)authenticateWithPassword:(NSString *)inPassword error:(NSError **)errPtr
}
else if ([self supportsPlainAuthentication])
{
someAuth = [[XMPPPlainAuthentication alloc] initWithStream:self password:password];
*/ someAuth = [[XMPPPlainAuthentication alloc] initWithStream:self password:password];
result = [self authenticate:someAuth error:&err];
}
/* }
else if ([self supportsDeprecatedDigestAuthentication])
{
someAuth = [[XMPPDeprecatedDigestAuthentication alloc] initWithStream:self password:password];
Expand All @@ -1976,7 +1976,7 @@ - (BOOL)authenticateWithPassword:(NSString *)inPassword error:(NSError **)errPtr
err = [NSError errorWithDomain:XMPPStreamErrorDomain code:XMPPStreamUnsupportedAction userInfo:info];

result = NO;
}
}*/
}};


Expand Down Expand Up @@ -4067,39 +4067,13 @@ - (void)tryNextSrvResult

NSError *connectError = nil;
BOOL success = NO;

while (srvResultsIndex < [srvResults count])
{
XMPPSRVRecord *srvRecord = [srvResults objectAtIndex:srvResultsIndex];
NSString *srvHost = srvRecord.target;
UInt16 srvPort = srvRecord.port;

success = [self connectToHost:srvHost onPort:srvPort withTimeout:XMPPStreamTimeoutNone error:&connectError];

if (success)
{
break;
}
else
{
srvResultsIndex++;
}
}

if (!success)
{
// SRV resolution of the JID domain failed.
// As per the RFC:
//
// "If the SRV lookup fails, the fallback is a normal IPv4/IPv6 address record resolution
// to determine the IP address, using the "xmpp-client" port 5222, registered with the IANA."
//
// In other words, just try connecting to the domain specified in the JID.

success = [self connectToHost:[myJID_setByClient domain] onPort:5222 withTimeout:XMPPStreamTimeoutNone error:&connectError];
}

if (!success)

//Check if app is for staging or production and set XMPPHostName accordingly
NSString *xmppHostName = @"xmpp.medigram-staging.com"; // TODO: change for release

success = [self connectToHost:xmppHostName onPort:5222 withTimeout:XMPPStreamTimeoutNone error:&connectError];

if (!success)
{
[self endConnectTimeout];

Expand Down
2 changes: 0 additions & 2 deletions Extensions/XEP-0054/XMPPvCardTempEmail.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,5 @@
@property (nonatomic, assign, setter=setX400:) BOOL isX400;
@property (nonatomic, assign, setter=setPreferred:) BOOL isPreferred;

@property (nonatomic, weak) NSString *userid;


@end
2 changes: 1 addition & 1 deletion Vendor/KissXML/DDXML.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
//
// The debugging macro adds a significant amount of overhead, and should NOT be enabled on production builds.

#if DEBUG
#ifdef DEBUG
#define DDXML_DEBUG_MEMORY_ISSUES 0
#else
#define DDXML_DEBUG_MEMORY_ISSUES 0 // Don't change me!
Expand Down