mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
handle invalidation of connection while getting root proxy
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37768 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f5326c8db1
commit
974fa5d811
3 changed files with 29 additions and 16 deletions
|
@ -1,3 +1,8 @@
|
|||
2014-03-26 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSConnection.m: handle invalidation of connection while
|
||||
getting root proxy.
|
||||
|
||||
2014-03-26 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Source/NSProcessInfo.m (determineOperatingSystem):
|
||||
|
|
|
@ -1673,20 +1673,32 @@ static NSLock *cached_proxies_gate = nil;
|
|||
NSParameterAssert(IreceivePort);
|
||||
NSParameterAssert(IisValid);
|
||||
|
||||
/*
|
||||
* If this is a server connection without a remote end, its root proxy
|
||||
* is the same as its root object.
|
||||
*/
|
||||
if (IreceivePort == IsendPort)
|
||||
NS_DURING
|
||||
{
|
||||
return [self rootObject];
|
||||
}
|
||||
op = [self _makeOutRmc: 0 generate: &seq_num reply: YES];
|
||||
[self _sendOutRmc: op type: ROOTPROXY_REQUEST];
|
||||
/*
|
||||
* If this is a server connection without a remote end, its root proxy
|
||||
* is the same as its root object.
|
||||
*/
|
||||
if (IreceivePort == IsendPort)
|
||||
{
|
||||
return [self rootObject];
|
||||
}
|
||||
op = [self _makeOutRmc: 0 generate: &seq_num reply: YES];
|
||||
[self _sendOutRmc: op type: ROOTPROXY_REQUEST];
|
||||
|
||||
ip = [self _getReplyRmc: seq_num];
|
||||
[ip decodeValueOfObjCType: @encode(id) at: &newProxy];
|
||||
[self _doneInRmc: ip];
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
/* The ports/connection may have been invalidated while getting the
|
||||
* root proxy ... if so we should return nil.
|
||||
*/
|
||||
newProxy = nil;
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
|
||||
ip = [self _getReplyRmc: seq_num];
|
||||
[ip decodeValueOfObjCType: @encode(id) at: &newProxy];
|
||||
[self _doneInRmc: ip];
|
||||
return AUTORELEASE(newProxy);
|
||||
}
|
||||
|
||||
|
|
|
@ -124,10 +124,6 @@
|
|||
|
||||
#import "GSPrivate.h"
|
||||
|
||||
@interface NSBundle (Private)
|
||||
+ (NSString*) _gnustep_target_os;
|
||||
@end
|
||||
|
||||
/* This error message should be called only if the private main function
|
||||
* was not executed successfully. This may happen ONLY if another library
|
||||
* or kit defines its own main function (as gnustep-base does).
|
||||
|
|
Loading…
Reference in a new issue