ObjFW  Diff

Differences From Artifact [fe916bd7cf]:

To Artifact [0baa314b8c]:


454
455
456
457
458
459
460





























































}

- (uint16_t)port
{
	return port;
}
@end




































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
}

- (uint16_t)port
{
	return port;
}
@end

@implementation OFBindFailedException
+ newWithObject: (id)obj
	andHost: (const char*)h
	andPort: (uint16_t)p
      andFamily: (int)f
{
	return [self newWithObject: obj
			   andHost: h
			   andPort: p
			 andFamily: f];
}

- initWithObject: (id)obj
	 andHost: (const char*)h
	 andPort: (uint16_t)p
       andFamily: (int)f
{
	if ((self = [super initWithObject: obj])) {
		host = (h != NULL ? strdup(h) : NULL);
		port = p;
		family = f;
	}

	return self;
}

- free
{
	if (host != NULL)
		free(host);

	return [super free];
}

- (const char*)cString
{
	if (string != NULL)
		return string;

	asprintf(&string, "Binding to port %d on %s using family %d failed in "
	    "object of type %s!", port, host, family, [object name]);

	return string;
}

- (const char*)host
{
	return host;
}

- (uint16_t)port
{
	return port;
}

- (int)family
{
	return family;
}
@end