Author: rfm
Date: Wed Mar 26 08:56:09 2014
New Revision: 37768
URL: http://svn.gna.org/viewcvs/gnustep?rev=37768&view=rev
Log:
handle invalidation of connection while getting root proxy
Modified:
libs/base/trunk/ChangeLog
libs/base/trunk/Source/NSConnection.m
libs/base/trunk/Source/NSProcessInfo.m
Modified: libs/base/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/ChangeLog?rev=37768&r1=37767&r2=37768&view=diff
==============================================================================
--- libs/base/trunk/ChangeLog (original)
+++ libs/base/trunk/ChangeLog Wed Mar 26 08:56:09 2014
@@ -1,3 +1,8 @@
+2014-03-26 Richard Frith-Macdonald <[email protected]>
+
+ * Source/NSConnection.m: handle invalidation of connection while
+ getting root proxy.
+
2014-03-26 Riccardo Mottola <[email protected]>
* Source/NSProcessInfo.m (determineOperatingSystem):
Modified: libs/base/trunk/Source/NSConnection.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSConnection.m?rev=37768&r1=37767&r2=37768&view=diff
==============================================================================
--- libs/base/trunk/Source/NSConnection.m (original)
+++ libs/base/trunk/Source/NSConnection.m Wed Mar 26 08:56:09 2014
@@ -1673,20 +1673,32 @@
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)
- {
- 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_DURING
+ {
+ /*
+ * 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
+
return AUTORELEASE(newProxy);
}
Modified: libs/base/trunk/Source/NSProcessInfo.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/NSProcessInfo.m?rev=37768&r1=37767&r2=37768&view=diff
==============================================================================
--- libs/base/trunk/Source/NSProcessInfo.m (original)
+++ libs/base/trunk/Source/NSProcessInfo.m Wed Mar 26 08:56:09 2014
@@ -123,10 +123,6 @@
#import "GNUstepBase/NSString+GNUstepBase.h"
#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
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs