Author: rfm
Date: Mon Jul 27 11:50:15 2015
New Revision: 38841
URL: http://svn.gna.org/viewcvs/gnustep?rev=38841&view=rev
Log:
Fix crasher if stream is opened more than once.
Modified:
libs/base/trunk/ChangeLog
libs/base/trunk/Source/GSStream.m
Modified: libs/base/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/ChangeLog?rev=38841&r1=38840&r2=38841&view=diff
==============================================================================
--- libs/base/trunk/ChangeLog (original)
+++ libs/base/trunk/ChangeLog Mon Jul 27 11:50:15 2015
@@ -1,3 +1,8 @@
+2015-07-27 Richard Frith-Macdonald <[email protected]>
+
+ * Source/GSStream.m: Fix failure to unschedule from run loop if a
+ stream is opened more than once.
+
2015-07-24 Richard Frith-Macdonald <[email protected]>
* Headers/GNUstepBase/GSIMap.h: add GSI_MAP_TABLE_S
Modified: libs/base/trunk/Source/GSStream.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/GSStream.m?rev=38841&r1=38840&r2=38841&view=diff
==============================================================================
--- libs/base/trunk/Source/GSStream.m (original)
+++ libs/base/trunk/Source/GSStream.m Mon Jul 27 11:50:15 2015
@@ -125,10 +125,14 @@
- (void) removeStream: (NSStream*)aStream mode: (NSString*)mode
{
+ /* We may have added the stream more than once (eg if the stream -open
+ * method was called more than once, so we need to remove all event
+ * registrations.
+ */
[self removeEvent: [aStream _loopID]
type: typeForStream(aStream)
forMode: mode
- all: NO];
+ all: YES];
}
@end
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs