Overview
Context
Changes
Modified ObjXMPP.oc
from [ecbe635ebf]
to [54fe2ba1eb].
1
2
3
|
1
2
3
|
-
+
|
package_description 1
package_format 1
package_depends_on ObjOpenSSL
LIBS="-lobjxmpp $LIBS"
|
Modified src/XMPPConnection.m
from [c9e6b14c30]
to [c4d409163f].
︙ | | |
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
|
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
|
-
+
-
-
-
+
|
[_socket asyncConnectToHost: record.target
port: record.port];
}
- (void)resolver: (OFDNSResolver *)resolver
didResolveDomainName: (OFString *)domainName
answerRecords: (OFDictionary *)answerRecords
response: (OFDNSResponse *)response
authorityRecords: (OFDictionary *)authorityRecords
additionalRecords: (OFDictionary *)additionalRecords
exception: (id)exception
{
OFMutableArray *records = [OFMutableArray array];
if (exception != nil) {
[_delegates
broadcastSelector: @selector(connection:didThrowException:)
withObject: self
withObject: exception];
return;
}
for (OFDNSResourceRecord *record in
[answerRecords objectForKey: domainName])
[response.answerRecords objectForKey: domainName])
if ([record isKindOfClass: [OFSRVDNSResourceRecord class]])
[records addObject: record];
/* TODO: Sort records */
[records makeImmutable];
if (records.count == 0) {
|
︙ | | |
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
|
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
|
-
-
+
+
-
-
+
+
+
|
if (_server != nil)
[_socket asyncConnectToHost: _server
port: _port];
else {
OFString *SRVDomain = [_domainToASCII
stringByPrependingString: @"_xmpp-client._tcp."];
[[OFThread DNSResolver]
asyncResolveHost: SRVDomain
OFDNSRequest *request = [OFDNSRequest
requestWithHost: SRVDomain
recordClass: OF_DNS_RESOURCE_RECORD_CLASS_IN
recordType: OF_DNS_RESOURCE_RECORD_TYPE_SRV
delegate: self];
recordType: OF_DNS_RESOURCE_RECORD_TYPE_SRV];
[[OFThread DNSResolver] asyncPerformRequest: request
delegate: self];
}
objc_autoreleasePoolPop(pool);
}
- (bool)xmpp_parseBuffer: (const void *)buffer
length: (size_t)length
|
︙ | | |
Modified src/XMPPFileStorage.m
from [51fa277e00]
to [1e77051632].
︙ | | |
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
-
-
+
-
+
|
#include <stdlib.h>
#import <ObjFW/OFString.h>
#import <ObjFW/OFArray.h>
#import <ObjFW/OFDictionary.h>
#import <ObjFW/OFNumber.h>
#import <ObjFW/OFData.h>
#import <ObjFW/OFAutoreleasePool.h>
#import <ObjFW/OFNotImplementedException.h>
#import "XMPPFileStorage.h"
@implementation XMPPFileStorage
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- (instancetype)initWithFile: (OFString *)file
{
self = [super init];
@try {
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
void *pool = objc_autoreleasePoolPush();
_file = [file copy];
@try {
_data = [[OFData dataWithContentsOfFile: file]
.messagePackValue copy];
} @catch (id e) {
_data = [[OFMutableDictionary alloc] init];
}
[pool release];
objc_autoreleasePoolPop(pool);
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
|
︙ | | |
Modified src/XMPPSCRAMAuth.m
from [0d02b6cf21]
to [9093752bba].
︙ | | |
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
|
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
|
-
+
-
+
|
[ret makeImmutable];
return ret;
}
- (OFData *)continueWithData: (OFData *)data
{
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
void *pool = objc_autoreleasePoolPush();
OFData *ret;
if (!_serverSignature)
ret = [self xmpp_parseServerFirstMessage: data];
else
ret = [self xmpp_parseServerFinalMessage: data];
[ret retain];
[pool release];
objc_autoreleasePoolPop(pool);
return [ret autorelease];
}
- (OFData *)xmpp_parseServerFirstMessage: (OFData *)data
{
size_t i;
|
︙ | | |