Support outgoing connections bound to a specific local address.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@18953 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2004-03-29 14:53:37 +00:00
parent 3c85fee35b
commit 1a0cf15c79
7 changed files with 108 additions and 17 deletions

View file

@ -3317,6 +3317,11 @@ static NSCharacterSet *tokenSet = nil;
*/
- (void) addContent: (id)newContent
{
if ([newContent isKindOfClass: [GSMimeDocument class]] == NO)
{
[NSException raise: NSInvalidArgumentException
format: @"Content to add is not a GSMimeDocument"];
}
if (content == nil)
{
content = [NSMutableArray new];
@ -4469,6 +4474,18 @@ static NSCharacterSet *tokenSet = nil;
{
if (newContent != content)
{
unsigned c = [newContent count];
while (c-- > 0)
{
id o = [newContent objectAtIndex: c];
if ([o isKindOfClass: [GSMimeDocument class]] == NO)
{
[NSException raise: NSInvalidArgumentException
format: @"Content contains non-GSMimeDocument"];
}
}
newContent = [newContent mutableCopy];
ASSIGN(content, newContent);
RELEASE(newContent);