ObjXMPP  Check-in [b654efc74b]

Overview
Comment:Fix selector for exception handling in XMPPConnection
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: b654efc74b460e5a48bddd6f947341efeb9c27d387680ff559d75405ef1f5109
User & Date: florob@babelmonkeys.de on 2013-02-10 17:01:20
Other Links: manifest | tags
Context
2013-02-10
22:23
XMPPContact: Handle presences without resource check-in: cf986fb621 user: florob@babelmonkeys.de tags: trunk
17:01
Fix selector for exception handling in XMPPConnection check-in: b654efc74b user: florob@babelmonkeys.de tags: trunk
16:31
Implement -hash for XMPPJID check-in: 7df3923343 user: florob@babelmonkeys.de tags: trunk
Changes

Modified src/XMPPConnection.m from [4a5affb637] to [7c6a173624].

439
440
441
442
443
444
445
446

447
448
449
450
451
452
453
454
455
456
457
458
459

460
461
462
463
464
465
466
439
440
441
442
443
444
445

446
447
448
449
450
451
452
453
454
455
456
457
458

459
460
461
462
463
464
465
466







-
+












-
+







-      (BOOL)stream: (OFStream*)stream
  didReadIntoBuffer: (char*)buffer
	     length: (size_t)length
	  exception: (OFException*)exception
{
	if (exception != nil) {
		[delegates broadcastSelector: @selector(connection:
						  didThrowException::)
						  didThrowException:)
				  withObject: self
				  withObject: exception];
		[self close];
		return NO;
	}

	@try {
		if (![self XMPP_parseBuffer: buffer
				     length: length])
			return NO;
	} @catch (id e) {
		[delegates broadcastSelector: @selector(connection:
						  didThrowException::)
						  didThrowException:)
				  withObject: self
				  withObject: e];
		[self close];
		return NO;
	}

	if (oldParser != nil || oldElementBuilder != nil) {

Modified tests/test.m from [80ad4b43b9] to [1cf3c54e24].

215
216
217
218
219
220
221






222
223
224
225
226
227
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233







+
+
+
+
+
+






}

-   (void)connection: (XMPPConnection*)conn
  didReceivePresence: (XMPPPresence*)pres
{
	of_log(@"Presence: %@", pres);
}

-  (void)connection: (XMPPConnection*)conn
  didThrowException: (id)e
{
	@throw e;
}

- (void)connectionWasClosed: (XMPPConnection*)conn
{
	of_log(@"Connection was closed!");
}
@end