340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
|
- (BOOL)stream: (OFStream*)stream
didReadIntoBuffer: (char*)buffer
length: (size_t)length
exception: (OFException*)exception
{
if (exception != nil) {
[self close];
return NO;
}
if (![self XMPP_parseBuffer: buffer
length: length])
return NO;
if (oldParser != nil || oldElementBuilder != nil) {
[oldParser release];
[oldElementBuilder release];
oldParser = nil;
oldElementBuilder = nil;
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
<
<
<
<
|
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
|
- (BOOL)stream: (OFStream*)stream
didReadIntoBuffer: (char*)buffer
length: (size_t)length
exception: (OFException*)exception
{
if (exception != nil) {
[delegates broadcastSelector: @selector(connection:
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::)
withObject: self
withObject: e];
[self close];
return NO;
}
if (oldParser != nil || oldElementBuilder != nil) {
[oldParser release];
[oldElementBuilder release];
oldParser = nil;
oldElementBuilder = nil;
|