From d1db6f36bbaa615e40b62247588f337cfba3f481 Mon Sep 17 00:00:00 2001 From: CaS Date: Wed, 5 Feb 2003 12:55:02 +0000 Subject: [PATCH] Change the way the init method works git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@15886 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 2 ++ Source/NSConnection.m | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a950393b7..bfa329ffd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,8 @@ * Sourcewin32-def.top: Manually added external functions. * Source/libgnustep-base.def.in: Regenerated to combine external functions and all public classes. + * Source/NSConnection.m: ([-init]) creates a connection usable as + a server. 2003-02-04 Richard Frith-Macdonald diff --git a/Source/NSConnection.m b/Source/NSConnection.m index 608e539ff..2c5388a74 100644 --- a/Source/NSConnection.m +++ b/Source/NSConnection.m @@ -770,13 +770,14 @@ static BOOL multi_threaded = NO; } /** - * Undocumented feature of OPENSTEP/MacOS-X - * -init returns the default connection. + * Return a connection able to act as a server receive incoming requests. */ - (id) init { - RELEASE(self); - return RETAIN([connectionClass defaultConnection]); + NSPort *port = [NSPort port]; + + self = [self initWithReceivePort: port sendPort: nil]; + return self; } /**