* src/Connection.m ([Connection +rootProxyAtName:onHost:]):

Return nil if we fail to create a port for talking to a remote server.
        ([Connection forwardForProxy:selector:argFrame:]):
        Changes to ensure that ConnectedDecoder is correctly dismissed in the
	case where a DO method returns an object but does not have any
	parameter values returned.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2016 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Andrew McCallum 1997-01-06 22:22:11 +00:00
parent fc3e8b56a7
commit 67423c4b62

View file

@ -322,6 +322,7 @@ static int messages_received_count;
+ (Proxy*) rootProxyAtName: (NSString*)n onHost: (NSString*)h
{
id p = [default_out_port_class newForSendingToRegisteredName: n onHost: h];
if (p == nil) return p;
return [self rootProxyAtPort: p];
}
@ -583,12 +584,18 @@ static int messages_received_count;
/* Get the reply rmc, and decode it. */
{
ConnectedDecoder *ip = nil;
int last_argnum;
BOOL is_exception;
void decoder(int argnum, void *datum, const char *type, int flags)
{
NSParameterAssert(ip != (id)-1);
if (type == 0) {
if (ip) {
/* this must be here to avoid trashing alloca'ed retframe */
[ip dismiss];
ip = nil;
}
return;
}
/* If we didn't get the reply packet yet, get it now. */
if (!ip)
{
@ -619,15 +626,8 @@ static int messages_received_count;
autorelease'ed. */
if (*type == _C_CHARPTR)
[MallocAddress autoreleaseMallocAddress: *(char**)datum];
if (argnum == last_argnum)
{
/* this must be here to avoid trashing alloca'ed retframe */
[ip dismiss];
ip = (id)-1;
}
}
last_argnum = type_get_number_of_arguments(type) - 1;
retframe = mframe_build_return (argframe, type, out_parameters,
decoder);
/* Make sure we processed all arguments, and dismissed the IP. */