bugGNUstep - Bugs: bug #37939, NSNetService simple boolean logic...

Group
 
 

bug #37939: NSNetService simple boolean logic bug

Submitter:  Marcus Müller <znek>
Submitted:  Sun 16 Dec 2012 08:51:54 PM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 18 Dec 2012 09:19:46 AM UTC, comment #1: 

Thanks ... I applied your fix.

Richard Frith-Macdonald <CaS>
Group Member
Sun 16 Dec 2012 08:51:54 PM UTC, original submission:  

-[NSNetService getInputStream:outputStream] accidentaly fails if either inputStream or outputStream pointer parameters are NULL (which is legal for either one).

The fix is simple:


Index: Source/NSNetServices.m
===================================================================
--- Source/NSNetServices.m (revision 35898)
+++ Source/NSNetServices.m (working copy)
@@ -281,7 +281,7 @@
                  inputStream: inputStream
                 outputStream: outputStream];
  
-  return inputStream && outputStream;
+  return inputStream || outputStream;
 }
 
 /*

Marcus Müller <znek>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by znek (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-12-18 CaS StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code